-
Older Activity
-
Yesterday, 04:43 PM
Trying to allocate 512kbytes of float arrays as well as other stuff in, er, 512k of RAM?
EDIT: Paul beat me to it!
5 replies | 78 view(s)
-
06-02-2023, 09:00 PM
The best introduction is probably at https://www.pjrc.com/teensy/td_libs_Audio.html, but then it’s mostly a case of looking at the existing objects, figuring out how a simple one works, and having a go at modifying it...
6 replies | 140 view(s)
-
06-02-2023, 08:13 PM
It wasn’t designed in from the start, for some reason. I’ve had a go at remedying this, see https://forum.pjrc.com/threads/66840-Roadmap-quot-Dynamic-Updates-quot-any-effort-going-on. If you give it a try, please do...
6 replies | 140 view(s)
-
06-02-2023, 06:26 PM
Correct - the SD card's SCK signal is on Teensy pin 13, which is also the built-in LED pin. This is unfortunate, but unavoidable. The only way to turn the LED off is to physically remove it, but that won't help the...
356 replies | 33741 view(s)
-
06-01-2023, 07:23 PM
Yup. The constructor for the object is badly written, and fails to initialise the waveshape pointer to a NULL value. If the object is statically declared then it's guaranteed to be initialised to zero, but using new...
6 replies | 140 view(s)
-
06-01-2023, 05:31 PM
That sounds much like my observation, though perhaps a little contradictory - you're saying 8 channels makes it worse, then that you get glitches even with 2 channels?! :confused:
But ... it does appeaar that if we...
25 replies | 422 view(s)
-
05-31-2023, 09:57 PM
Well, it was intended to expand the capability of the existing USB audio from 2x2 to up to 8x8, and other sample rates. As far as I know it’s all standard USB descriptors and behaviour, so should work with any DAW...
25 replies | 422 view(s)
-
05-31-2023, 09:14 PM
As Paul said in post #2, there are 7 total I2S data pins, of which 2 must be input and 2 output. Each pin is 2 channels. An audio adaptor has 1 each input and output (2 channel) pin. So 3 adaptors would give you 6x6,...
25 replies | 422 view(s)
-
05-31-2023, 08:39 PM
There seem to be differential amp modules available based on the OPA1632 which might be useful. Not sure, never used them…
I was just thinking that if the USB recording quality isn’t perfect, the SD would be a...
25 replies | 422 view(s)
-
05-31-2023, 07:41 PM
Ah, hadn’t twigged that the Focusrite spec was misleading…
Easy enough to get the Teensy to mix 6 inputs (and the outputs too, if you want) to a stereo monitor mix. All the bits you need are in the audio library,...
25 replies | 422 view(s)
-
05-31-2023, 07:08 PM
Sounds like you’d have to put some effort into the analogue side, then. As much fun as it’d be to build your own, you might find something like a Focusrite Scarlett 8i6 would tick the boxes, and give you 24/192k quality...
25 replies | 422 view(s)
-
05-31-2023, 05:27 PM
Excellent news!
I'm sure ground loops are significant, but I'm equally sure there's a power routing issue whereby the SD card power is not starred from the source pins, but runs first to the SGTL5000.
Here's a...
25 replies | 422 view(s)
-
05-31-2023, 08:40 AM
Personally I wouldn't buy anything from AliExpress. Did it once, but the boards that turned up didn't work, and zero luck getting a refund.
Paul did do an update to the 6-in 8-out CS42448 board to bump it to 8...
25 replies | 422 view(s)
-
05-31-2023, 06:45 AM
The forum thread on >2 channel USB audio is at https://forum.pjrc.com/threads/70176-USB-interface-for-multi-channel-outputs-not-just-stereo. Post #42 gives you an idea of the remaining issues that I’m aware of but...
25 replies | 422 view(s)
-
05-30-2023, 06:58 PM
Yes indeed, and @manicksan has done just that - you can find it here, as part of a rather out-of-date fork of the Audio library. I think it might be slight overkill as it may result in code duplication for each mixer...
4 replies | 222 view(s)
-
05-28-2023, 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 | 258 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 | 140 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 | 140 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 | 362 view(s)
-
05-25-2023, 09:37 AM
Not enough audio blocks allocated.
3 replies | 139 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...
356 replies | 33741 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 | 168 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...
356 replies | 33741 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...
356 replies | 33741 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 | 168 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...
356 replies | 33741 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 | 7955 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...
356 replies | 33741 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....
356 replies | 33741 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 | 362 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 | 4153 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 | 4153 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 | 4153 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 | 4153 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 | 4153 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,...
356 replies | 33741 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
356 replies | 33741 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...
356 replies | 33741 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 | 150 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...
356 replies | 33741 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".
356 replies | 33741 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...
356 replies | 33741 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...
356 replies | 33741 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 | 275 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 | 275 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 | 275 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) {...
356 replies | 33741 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 | 7955 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 | 7955 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...
356 replies | 33741 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...
356 replies | 33741 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 | 7955 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 | 367 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 | 78 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 | 367 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...
356 replies | 33741 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...
356 replies | 33741 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...
356 replies | 33741 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...
356 replies | 33741 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 | 275 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 | 7955 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...
356 replies | 33741 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 | 275 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 | 152 view(s)
-
04-28-2023, 04:46 PM
No response, so I did it anyway. PR#703.
11 replies | 275 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 | 7955 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 | 275 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 | 10090 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 | 198 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 | 10090 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 | 7955 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 | 7955 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 | 7955 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 | 7955 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 | 7955 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 | 7955 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 | 7955 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 | 7955 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 | 7955 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 | 7955 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 | 7955 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 | 7955 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 | 10090 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 | 7955 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 | 694 view(s)
-
04-05-2023, 05:08 AM
D14? The code says CS is on D5…
7 replies | 324 view(s)