DaisySP audio processing library port to Teensy Audio

rheslip

Member
This is kind of a hack but it works - DaisySP as a Teensy audio object. DaisySP is mostly code ported from other projects - Csound, Soundpipe, Mutable Instruments eurorack modules etc. There is a lot of neat audio processing stuff in there that the Teensy Audio library does not have.

Editorial:

My intent is not to somehow rip off Electrosmith and undermine their Daisy product. Very little of the DaisySP code originates from Electrosmith - its open source and its fair game. I have purchased stuff from them and I encourage others to do so. The Daisy is a nice product line and it offers features that Teensy doesn't have but I prefer coding with Arduino and the extensive libraries that ecosystem provides. You will need a Teensy 4.x for this because it chews up memory and CPU pretty fast. Or buy a Daisy if that floats your boat.

https://github.com/rheslip/DaisySP_Teensy
 
I wrote a 16 voice polyphonic synth example for the DaisySP library. https://github.com/rheslip/DaisySP_Teensy/tree/main/examples/polysynth

each voice has:
4 polyblep sawtooth oscillators
1 moog ladder filter
1 envelope generator which controls voice amplitude and filter frequency

plus mono reverb at the end of the chain. Total of 64 antialiased oscillators, 16 filters, 16 envelope generators, 1 reverb and 1 LFO (LFO not used as yet). It uses 69% of a Teensy 4.x CPU at 811Mhz.

DaisySP uses all floating point math - samples are converted to 16 bit integer before they are passed on to the Teensy Audio library for output to the audio shield.

Teensy 4 is a beast!
 
Last edited:
Have looked at the polysynth example
so basically you create a custom "super" Audio object.

It's good implementation

I found one error in your polysynth example
https://github.com/rheslip/DaisySP_Teensy/blob/main/examples/polysynth/polysynth.ino

at line 69 you define a for loop using int i=0
but then you redefine i again in the cascaded for-loop at line 74

pros:
it's easy to understand how/when the "signal" is manipulated

cons:
don't know how it can be implemented in the Design Tool
(only as a AudioSynthDaisySP at the moment)
 
Have looked at the polysynth example

at line 69 you define a for loop using int i=0
but then you redefine i again in the cascaded for-loop at line 74

Thanks for pointing that out. The compiler keeps it straight but it is confusing to a reader. I just pushed changes to the example sketches.

Its trivial to set up the Teensy Audio library for DaisySP so you don't really need the Audio designer. DaisySP does almost everything the Audio library does plus a lot more. I like the simpler programming model of DaisySP.
 
Back
Top