3 ms·
I'm wondering if anyone here does embedded audio synthesis. Is a Teensy the way to go?
by skybrian 7y ago
I'm wondering if anyone here does embedded audio synthesis. Is a Teensy the way to go?
- moron4hire 7y agoIt's a little slow. I've used a Mega, but all around prefer the Adafruit Feather line.
- StavrosK 7y agoWhich processor, though? There are a few.
- moron4hire 7y agoI don't know if they've made something more updated, but I usually get the Feather M0 nrf52. The Bluetooth connectivity is super cool for controlling things, and as long as you don't enable encryption, it is relatively low latency.
- StavrosK 7y agoI see, thanks! I'm going to get a few to play with, I've seen other people recommend that microcontroller too.
- skybrian 7y agoThat's what I bought the first time, but unfortunately there don't seem to be good audio libraries for the Feather line, and the Teensy Audio library looks quite sophisticated. Or did I miss something?
- moron4hire 7y agoThey should be compatible. It's all Wiring at the end of the day. But IDK, I just write my own.
- diydsp 7y agoI highly recommend Axoloti. It has all the connectors ready to go, is easily expandable to write custom code but has all the boilerplate stuff and basic objects, so you can get creativity quickly without having to write and debug an envelope generator and filter, etc. Or if you want to start from a lower-level: Teensy 4.0 is amazingly fast. Teensy 3.6 will suffice. Nucleo STMH734ZI2 is great, too. Nucleo STM32L476RG is not as fast, but good enough for single voice synthesis or basic guitar effects. STM32 Discovery still holds up well.
- jstsch 7y agoIf you're looking at tiny boards, then I'd check out the ESP32 based boards right now. Cheaper. Personally, I think the R-pi Zero is quite attractive due to its lower barrier of entry. Also, consider creating your synth/audio processor on your local machine first. Tweak all parameters. Make it perfect. Then port to hardware + UI. Not the other way around. The times of fixed points maths/DSP optimisations driving your algorithms are behind us.
- vnorilo 7y agoIf you want to poke around and have fun, Bela [1] is pretty good way to get started. It's got a prebuilt framework where you can just push a piece of c(++) that gets to run in a xenomai real time audio thread with predigested signals from all the peripherals. [1] https://bela.io/ https://bela.io/
- telesilla 7y agoI second the Beta. It's been a real pleasure to work with.
- squeaky-clean 7y agoI started off with a Teensy3.2, it was definitely nice. I really don't enjoy all the wiring and actual physical side of it though. So now I mostly reprogram eurorack modules. Not nearly as cheap, but some modules from 4MS or Mutable Instruments (among others) are fully open source along with the bootloader and unit testing system. For example I reprogram my DLD a lot. https://github.com/4ms/DLD/blob/master/README.md https://github.com/4ms/DLD/blob/master/README.md
- recursinging 7y agoUnequivocally yes. Most of the problems mentioned in the article simply do not apply to the single threaded, and (almost) deterministic nature of microcontrollers. The Teensy 4.0 clocks at 600Mhz with a true double precision FPU. This affords a very comfortable budget for DSP, even at single sample update rates. Having this allows for straightforward code, not always relying on ARM intrisics - which I personally find much more enjoyable to write, and especially so to read. The Teensy audio library is already fully featured, well developed, and the community is active. Now with the Teensy 4.0, I expect that to only improve.
- scoutt 7y agoIt DOES apply to a certain extent, and can produce a whole different set of headaches. Instead of having "threads" you have the main program loop and the interrupt that sends audio (mostly through I2S, interrupt triggered when the I2S buffer is empty). When the interrupt hits you better have a buffer ready to be sent, otherwise it will click. Of course, the interrupt handler has to do just that (set a DMA transfer to send audio). All that in sync with: capturing audio, reading from SD or storage, mixing, changing volume, applying effects, etc. Together with whatever the MCU has to do like reading buttons, communicating with other devices and dealing with a bunch of other interrupts. It's not always deterministic. If the MCU has to do a lot of audio processing in-between audio interrupts, a big buffer (not always available) can be the solution at the cost of latency. If a smaller buffer is used instead, then the MCU executes the audio interrupt very frequently and the main program barely executes... ... lots of headaches.