-
Older Activity
-
Yesterday, 05:03 PM
This one intrigued me, and besides, the M5Stack controllers looked too good not to have a play with...
I think I found "it", although there could be something more subtle going on. It looks as if you can get the...
5 replies | 223 view(s)
-
05-25-2023, 03:10 PM
It's not just about the speed, though. In the case of the SD(Fat) library, if you attempt card access from both ISR and foreground code, you will eventually come across the bug* whereby you're halfway through the...
3 replies | 130 view(s)
-
05-25-2023, 01:24 PM
Don't do this. Just ... don't even try. Pretty much any complex library will not play nicely if you use it from within an interrupt, and the SdFat library (which SD is just a thin skin over) is a definite case in point....
3 replies | 130 view(s)
-
05-25-2023, 09:41 AM
Yes, I've tried it and you haven't allocated enough AudioMemory. It rather looks from other posts you've made that you might have tried it yourself and got it working ... if so, it's a good plan to report the fact,...
9 replies | 344 view(s)
-
05-25-2023, 09:37 AM
Not enough audio blocks allocated.
3 replies | 118 view(s)
-
05-24-2023, 12:53 PM
That's definitely the SD card writes - the profile of the clicks is a dead giveaway, as is the repeat every 46ms. I'm not sure if the revision D2 audio adaptor makes a difference - I don't have one to test. The clicks...
354 replies | 33126 view(s)
-
05-23-2023, 07:21 PM
PR #67 submitted. Will it get in? Who knows - the oldest PR in that repo is coming up on 9 years old... I hope so, because I think it fixes a pretty serious bug in the interaction between the audio and SPI libraries.
1 replies | 154 view(s)
-
05-23-2023, 06:33 PM
Is this the "clicking" you mean? Highlighted is the last 0.655s of your file, amplified and zoomed in:
If so, I'm fairly sure it's high-current pulses that occur during SD writes coupling in to the microphone...
354 replies | 33126 view(s)
-
05-21-2023, 09:14 PM
OK, I've tested with a Kingston 16Gb card I happen to have, and which performs pretty badly on tests. The read and write speeds are OK, but it can have horrible internal delays at times, up to 1.4 seconds. I did a...
354 replies | 33126 view(s)
-
05-21-2023, 07:24 PM
Hi folks
Chasing an obscure bug, and I think I might have found it. Or I'm misunderstanding something...
In SPI.h and .cpp, there is lots of conditional compilation for different architectures. Some of these...
1 replies | 154 view(s)
-
05-20-2023, 07:39 PM
Hmmm ... that's a bit weird. It may be worth re-formatting the SD card with the official formatter, or just trying another card - even name brands can be pretty variable.
One thing that I did notice is that you've...
354 replies | 33126 view(s)
-
05-20-2023, 03:58 PM
I've branched again, because Nic's fixes for interpolation aren't fully merged with his master branch at the time of writing. You can find my attempts at...
79 replies | 7905 view(s)
-
05-20-2023, 03:38 PM
Not surprising, it's only allowing you to see if the SD card writes are taking a long time. If you post a few dozen lines from the serial monitor, including the startup message, it'll help us to form an opinion of how...
354 replies | 33126 view(s)
-
05-20-2023, 12:22 PM
There’s only one playback button in the project, but in any case the question is moot as the latest code in the linked repo just automatically disables MTP during recording, so you don’t need to do anything at power up....
354 replies | 33126 view(s)
-
05-19-2023, 07:50 PM
Might be worth boosting your AudioMemory(5) up a bit? The USB audio object uses a couple of blocks per channels as buffers, so you're perilously close to starving the system of blocks for use elsewhere in the flow....
9 replies | 344 view(s)
-
05-19-2023, 05:04 PM
Good news! Do come back if you have further questions, I’d like to be as sure as possible that it’s in good shape before it gets into a PR or beta.
66 replies | 4102 view(s)
-
05-19-2023, 04:46 PM
The only limit is the amount of spare memory you have. If your heap is mostly unused on a Teensy 4.x, then you have about 5s of buffer for a mono signal, or 2.5s for stereo. With 8MB of PSRAM that grows to 90s or 45s....
66 replies | 4102 view(s)
-
05-18-2023, 08:19 PM
I think Paul did mention he wanted to include it at some point, but I can't find that post at the moment. And there are probably other priorities...
EDIT: found it:...
66 replies | 4102 view(s)
-
05-18-2023, 08:13 PM
It's really important to configure a suitably sized buffer for each and every buffered playback or record object. In this instance, in setup() you need something like:
record.createBuffer(8192,AudioBuffer::inHeap);...
66 replies | 4102 view(s)
-
05-18-2023, 07:35 AM
I put a re-worked example of Recorder.ino into the examples - if you get the whole Audio library from the repo you should have it already in examples/Audio/Buffered/Recorder. You can look over the code directly on...
66 replies | 4102 view(s)
-
05-17-2023, 08:24 PM
You can change the relative volumes of the beep and wave players by adjusting the mixer gains. Look for these lines:
mixer.gain(0, 1.0f);
mixer.gain(1, 1.0f);
Channel 0 gain (the first line) controls the beeps,...
354 replies | 33126 view(s)
-
05-17-2023, 06:47 PM
You don’t need it. I only do because of a mod I did to test 4 channel output.
Everything else sounds ok, no idea why your greeting doesn’t play
354 replies | 33126 view(s)
-
05-17-2023, 05:03 PM
In post #323 you said you can play back the last message - I assume that's still correct? In which case it sounds as if the phone and your wiring is OK.
One successful sketch tried just now is:
/**
* Audio...
354 replies | 33126 view(s)
-
05-17-2023, 04:52 PM
Would that be this thread? or maybe this one? mcginty and I were getting quite close towards the end of 2022, but he dropped off the radar this year for reasons unclear, and the job is only about 90% (?) done.
If you...
4 replies | 143 view(s)
-
05-17-2023, 04:00 PM
Works fine for me. Here it is in the root of the SD card, visible via MTP:
Tested with both the current repo code and the version you posted (or something very close to it - I've changed a few button pins, the...
354 replies | 33126 view(s)
-
05-16-2023, 06:25 PM
Two problems I can see. The file is 8 bits per sample, but the audio library only supports 16-bit samples. And the name of the file is "greetings.wav", whereas the code is expecting a file called "greeting.wav".
354 replies | 33126 view(s)
-
05-15-2023, 04:26 PM
That's not a message in WAV format, it's a web page that plays the audio and won't let me download the content. So it doesn't help me help you...
354 replies | 33126 view(s)
-
05-15-2023, 10:36 AM
Can you post your greeting.wav here? You’ll probably need to zip it as the forum doesn’t accept wav attachments. AFK ATM but will look at some point.
What software are you using to create the file? You could try...
354 replies | 33126 view(s)
-
05-15-2023, 06:27 AM
In my use of ER I’ve actually gone to some effort to avoid my callbacks being processed as a group. There’s no advantage to doing so, and as you say it could make loop() timings significantly variable. Not that anyone...
11 replies | 263 view(s)
-
05-14-2023, 09:14 PM
I’d like to think it Works As Intended, but I’m just as good as the next person at including bugs in my code :) Hence suggesting it goes in a beta for people to try, or ignore, as they wish.
The big advantage of...
11 replies | 263 view(s)
-
05-14-2023, 03:41 PM
... tumbleweed ...
Can I put in a plug for this at least to go into the next Teensyduino beta? As far as I can see:
no-one's objecting
no-one's even using EventResponder in Teensyduino libraries
it's...
11 replies | 263 view(s)
-
05-07-2023, 08:58 PM
Looked at this again, finally realised what the issue is. It's this:
// Non-blocking delay, which pauses execution of main program logic,
// but while still listening for input
void wait(unsigned int milliseconds) {...
354 replies | 33126 view(s)
-
05-07-2023, 01:57 PM
That's probably just as well - there seem to be serious issues playing stereo files at 2.5x speed! We may need to involve Nic to fix these, if he can spare a bit of time, as I'm getting a bit lost.
I think you'll...
79 replies | 7905 view(s)
-
05-07-2023, 08:24 AM
Interim report….
I got some incorrect output from 100% amplitude 330Hz sine waves at 2.5x playback speed, traced to overflow in the interpolation function - fix pushed.
I also tested a stereo file for the first...
79 replies | 7905 view(s)
-
05-06-2023, 09:24 PM
I've just revisited this, and I wasn't quite right. Here's an edit of the only Gerbers available at the moment:
Green is one ground, blue the other, and yellow the 3.3V supply. For this board, the between-5V-and-3V...
354 replies | 33126 view(s)
-
05-06-2023, 08:39 AM
As far as I could tell both GND pins aren't actually connected - I've asked if Gerbers of the most recent layout are available, but so far no response.
Note that what I've shown in post #311 is much more than linking...
354 replies | 33126 view(s)
-
05-05-2023, 12:22 PM
I need to do some more testing with multiple files, for sure. If I find and fix something, all well and good, I can let you know and you can test again.
If not, I really am going to need more quantifiable reports...
79 replies | 7905 view(s)
-
05-03-2023, 09:04 PM
Just tested that hypothesis, and no dice even with the buffer statically allocated. (As a matter of fact I don't think the SD filesystem is interrupt-driven, but blocks the sketch during reads, writes etc.)
...
8 replies | 351 view(s)
-
05-03-2023, 01:27 PM
Does anyone know if Gerber files are available for more recent versions of the Teensy Audio adaptor? Revisions C, D and D2 would be of most interest, though probably just one would do as I think they’re all very...
0 replies | 76 view(s)
-
05-03-2023, 07:33 AM
This looks like it might be the same thing I found recently - SD card writes draw a large current, and poor supply routing (and / or decoupling) results in power rail sagging which couples into the mic signal. See...
8 replies | 351 view(s)
-
05-01-2023, 08:47 PM
I'm thinking either manufacturing, or design... It could be, as this board has been in production in one form or another for quite a long time (2014?), that SD card behaviour has changed and board revisions haven't kept...
354 replies | 33126 view(s)
-
05-01-2023, 09:35 AM
OK, getting somewhere now. I tried the Teensy 4.0 and got audible noise - a sort of "motorboating" sound. Played around with CPU speed (no difference), swapped back to Teensy 4.1 not on the breadboard, same noise, put...
354 replies | 33126 view(s)
-
04-30-2023, 09:47 PM
I’d say a zipped WAV is better, because the exact information is preserved. There’s no knowing what an MP3 will throw away! Interesting to know about the effect of the clock speed change, if it’s 4x higher then it...
354 replies | 33126 view(s)
-
04-30-2023, 09:18 PM
That's just my standard test setup, I was too lazy to switch to a Teensy 4.0. If I get a moment I may give that a try, which will also force me to put the audio adaptor below the Teensy as I don't have top sockets on a...
354 replies | 33126 view(s)
-
04-30-2023, 09:03 PM
It's effectively only two files, a pair in each of the teensy3 and teensy4 folders, EventResponder.cpp and .h
I'm really trying to figure out the best thing to do for your second case - as you say, if loop() is fast...
11 replies | 263 view(s)
-
04-30-2023, 08:16 PM
Looping now working OK, as far as I can tell, and various pieces of debug code are commented or #ifdef'd out. You will still need to put some extra yield() calls into your loop, until the correct approach for...
79 replies | 7905 view(s)
-
04-30-2023, 05:20 PM
Hi folks
I've just circled back to this, having bought some cheap electret microphones off eBay then not got around to trying them. Here's the test "setup", if you can dignify it with that name:
The buttons on the...
354 replies | 33126 view(s)
-
04-28-2023, 07:03 PM
Thanks for that Paul. I can absolutely see your reasoning there, and the aim of my PR is to leave the default action of EventResponder the same, while allowing other options open to the programmer.
My feedback is...
11 replies | 263 view(s)
-
04-28-2023, 04:49 PM
@BriComp beat me to it ... story of my life. There's two versions in cores, one each for Teensy 3.x and 4.x in the appropriately named folders, but they're essentially identical.
4 replies | 144 view(s)
-
04-28-2023, 04:46 PM
No response, so I did it anyway. PR#703.
11 replies | 263 view(s)
-
04-26-2023, 09:05 PM
I'm close to getting looping working OK, but have run out of time for the moment to get a reasonably clean update pushed to GitHub. However, I've just discovered that EventResponder doesn't do quite what I thought it...
79 replies | 7905 view(s)
-
04-26-2023, 08:50 PM
This is probably a question for Paul, so I hope he's got some bandwidth!
I've been making regular and successful use of EventResponder to perform what I understand to be its intended action, to trigger...
11 replies | 263 view(s)
-
04-25-2023, 08:22 PM
I don't think VSCode / PlatformIO is the issue here, I think you've been unlucky...
Code space on Teensy 4.x is allocated in 32k chunks, with unused space shown as "padding". With the old TD's smaller code, your...
78 replies | 10060 view(s)
-
04-24-2023, 09:15 PM
Typically, no. Your best bet is to use a mixer as a switch, connecting the dry signal to one input and the effect output to another. Note that a gain of 0.0 or 1.0 is very efficiently dealt with, so you won’t be adding...
4 replies | 194 view(s)
-
04-23-2023, 08:57 PM
I've done a very brief test (working on other stuff at the moment), and it looks like the newer compiler is producing bigger code. The memory usage difference between stock and dynamic Audio libraries is very similar,...
78 replies | 10060 view(s)
-
04-23-2023, 08:45 AM
I've downloaded your MicroDexed-touch code for a brief look ... not to make any changes!
As it's fairly complex it's really hard to see where you might be stripping stuff out to test my updates, and you appear not...
79 replies | 7905 view(s)
-
04-22-2023, 06:53 PM
Hmmm ... all that strongly suggests you may have somewhere in your code where the SD card is being accessed under interrupt. That's been a major cause of instability for me while doing these SD playback / recording...
79 replies | 7905 view(s)
-
04-22-2023, 02:19 PM
Even more stability improvements, has now been running the test for over an hour without a crash.
79 replies | 7905 view(s)
-
04-22-2023, 11:03 AM
Another update pushed, giving further stability improvements. I'm still seeing the occasional temporary audio "stall", which may be a bug (more likely) or possibly an SD card artefact.
My test code:
has 7 audio...
79 replies | 7905 view(s)
-
04-18-2023, 09:54 PM
Glad it’s working better for you.
Using PSRAM lets you use much larger buffers, which ought to help if your application blocks or doesn’t yield() for long periods. It is slower than heap RAM, so if timing is...
79 replies | 7905 view(s)
-
04-18-2023, 09:00 PM
Quick update, now does a better job of reloading buffers if yield() hasn't been called for a while. Also outputs a zero sample if the required one isn't in a buffer, rather than attempting to read from the filesystem...
79 replies | 7905 view(s)
-
04-17-2023, 08:48 PM
Couple of updates today. playbackRate < 0.0 should now work a bit better in terms of predictive preload, and it's possible to use PSRAM for the buffer memory so you aren't risking running out of heap when using many /...
79 replies | 7905 view(s)
-
04-17-2023, 05:56 PM
Nah, don't do that, I'm having too much fun! Besides, some of that is independent of file reading (e.g. interpolation), and optimising looping is next up on my hit list anyway. There will no doubt be a few gotchas...
79 replies | 7905 view(s)
-
04-17-2023, 07:26 AM
You don't have to be fast, I think there are quite a few things I need to do before it's worth doing a proper test with real-life applications!
One thing you could perhaps try fairly easily is to change the buffer...
79 replies | 7905 view(s)
-
04-16-2023, 08:49 PM
Hi Moo
No worries about no response, though it's great to hear from you. If you keep lurking and chip in with the occasional "please don't do that!", all will be fine.
I'm actually starting from a fork of your...
79 replies | 7905 view(s)
-
04-16-2023, 08:30 PM
I've taken a quick look, but it's probably not a good use of my time to try to get my head round your project in order to use it as a debugging tool. Also, I might get distracted playing with it!
If you can figure...
79 replies | 7905 view(s)
-
04-16-2023, 05:22 PM
I've just pushed up some changes which catch some NULL pointer cases: it seems to be a lot more stable now, so I'd recommend giving that a go.
I've tested with different speeds including reverse play and it's...
79 replies | 7905 view(s)
-
04-11-2023, 08:06 PM
Not 100% sure what you're aiming for, as you've not included your most recent code, and your older examples don't have a filter object.
I've made what I'd guess are something like your changes, specifically making...
78 replies | 10060 view(s)
-
04-09-2023, 07:52 PM
Hi folks
I've finally managed to get a bit of time to look at asynchronous (i.e. not in the audio update interrupt) loading of sample data for this library. The existing structure doesn't really lend itself to my...
79 replies | 7905 view(s)
-
04-06-2023, 05:00 PM
This may or may not be relevant to all the use cases mentioned above, but I have a PR in which recovers the incoming S/PDIF clock and uses it for the I2S objects. I seem to recall I couldn’t do TDM because it needs a...
13 replies | 677 view(s)
-
04-05-2023, 05:08 AM
D14? The code says CS is on D5…
7 replies | 316 view(s)
-
04-03-2023, 11:12 AM
You're using an audio adaptor Rev D2, but haven't put an AudioControlSGTL5000 object in, and hence it's not enabled and the output volume isn't set. Take a look at almost any of the audio examples - ToneSweep is a good...
3 replies | 146 view(s)
-
04-03-2023, 11:07 AM
One more thing I've spotted, though it's almost certainly not relevant. The example SD recording didn't have the header written, so it doesn't appear as a stereo WAV file. Did you let the recording run to completion?...
7 replies | 248 view(s)
-
04-02-2023, 09:00 PM
+1 for writing in bigger blocks. It would be a good idea to increase the AudioMemory() allocation as well, since this is used for the AudioRecordQueue objects. Note that AudioRecordQueue::available() returns a count of...
7 replies | 248 view(s)
-
04-02-2023, 04:53 PM
I've just tagged v0.10-alpha of the cores and v0.11-alpha of the Audio library.
Not much change to the cores, but they do align with Teensyduino 1.58. The Audio library has lots of fixes and features, in particular...
78 replies | 10060 view(s)
-
04-02-2023, 04:48 PM
Because you can't connect two outputs to one input. Connect myEffect to mixer input 2 and set that channel's gain to something sensible. It's always best to use the Design Tool to generate or modify your audio...
7 replies | 341 view(s)
-
04-02-2023, 03:45 PM
OK, more goodness pushed to the above repo. I think use of these objects with the Dynamic Audio library is ... let's say, way better. May not be perfect, but definitely worth a try. Should still work happily with the...
66 replies | 4102 view(s)
-
04-02-2023, 02:55 PM
Yup, that sure is some terrible soldering! You might want to grab some stripboard to practise on, Teensys are quite an expensive way of making mistakes. I'd suggest getting some solder wick and (after you've had that...
7 replies | 341 view(s)
-
04-01-2023, 07:17 PM
I've pushed a few changes to https://github.com/h4yn0nnym0u5e/Audio/tree/feature/buffered-SD, which improve stability when using the preload capability. The preload API still needs to be documented, and a demo made.
...
66 replies | 4102 view(s)
-
04-01-2023, 05:15 PM
The caution means exactly what it says - don't do it, you will probably break the audio adaptor.
You either need to find a replacement cable, or fit an amplifier driven from the line level pins and sending its...
1 replies | 154 view(s)
-
04-01-2023, 03:14 PM
As noted in various recent threads (sorry, too lazy to search for them :D), the SPI library is smart enough to reject an attempt to set invalid pins for the SPI hardware, so these are all ignored.
It would be useful...
7 replies | 341 view(s)
-
04-01-2023, 10:16 AM
Please take a look at my supposedly improved documentation, which you can find at https://github.com/h4yn0nnym0u5e/audio-guestbook/tree/feature/doc-01. This gives you a bit more detail on where the sketch and libraries...
13 replies | 471 view(s)
-
03-31-2023, 10:52 AM
This thread may be worth a look. There should be links to various repositories which update the USB core code to more channels and higher data rates, plus additional Audio objects which can make use of that.
There...
14 replies | 2063 view(s)
-
03-30-2023, 07:05 PM
That's right :)
You're quite right. I've corrected my fork, which also updates the pull request that's been pending since 3rd February...
Yes. I think a lot of his changes are very useful, so the "do not use" is...
23 replies | 1005 view(s)