Update README.md

main
Rich Heslip 3 years ago
parent 04d4162c63
commit 2548f78159
  1. 13
      README.md

@ -4,14 +4,14 @@ DaisySP DSP Library for the Teensy 4
Alpha release 0.1 March 28 2021
This is a port of Electrosmith's DaisySP signal processing library to the PJRC Teensy 4.x https://github.com/electro-smith/DaisySP. Its a Teensy Audio library object and allows you to use the features of both. Teensy Audio is fast and memory efficient but has a limited selection of DSP functions. DaisySP is a CPU and memory hog but it has a lot of very sophisticated audio processing functions. The Teensy 4.x is VERY fast and you can do a lot of signal processing with it.
This is a port of Electrosmith's DaisySP signal processing library to the PJRC Teensy 4.x https://github.com/electro-smith/DaisySP. This library allows you to use the features of the Teensy Audio library and DaisySP together. Teensy Audio is fast and memory efficient but has a limited selection of DSP functions. DaisySP is a bit of a CPU and memory hog but it has some sophisticated audio processing functions. The Teensy 4.x is VERY fast and you can do a lot of signal processing with it.
DaisySP is a DSP library consisting mostly of code collected from other projects - Csound, Soundpipe, and Mutable Instruments eurorack modules. DaisySP is quite similar to Soundpipe but much better written and documented. I ported Soundpipe first and then realized DaisySP is much better.
DaisySP consists mostly of code collected from other projects - Csound, Soundpipe, and Mutable Instruments eurorack modules. DaisySP is quite similar to Soundpipe but much better written and documented. I ported Soundpipe first and then realized DaisySP is much better.
DaisySP uses floating point for all DSP operations and as such will run slowly on the Teensy 3.x - this has not been tested. On a Teensy 4.x each DaisySP function consumes roughly 1% of the CPU so you could create a polyphonic synth with 10 oscillators, 10 envelope generators and 10 filters and still have lots of CPU left. The sine oscillator uses up more CPU since its implemented as a trig function. DaisySP has antialiased polyblep oscillators which are quite CPU efficient.
DaisySP uses floating point for all DSP operations and as such will run slowly on the Teensy 3.x - this has not been tested. On a Teensy 4.x each DaisySP function call consumes roughly 1% of the CPU so you could create a polyphonic synth with 10 oscillators, 10 envelope generators and 10 filters and still have lots of CPU left. The sine oscillator uses up more CPU since its implemented as a trig function. DaisySP has antialiased polyblep oscillators which are quite CPU efficient - much better than the simplistic and noisy waveform generators in the Teensy Audio library.
This implementation adds a DaisySP Teensy Audio synth object to the Teensy Audio library. An Audio Library synth object has no inputs and it outputs a single stream of audio samples. The library currently supports only one instance of a DaisySP object - more may be possible but I'm not good enough with C++ to figure it out.
The simplest setup is a DaisySP object to the Teensy Audio Sheild object which is set up like this:
The simplest setup is a DaisySP object to the Teensy Audio Shield object which is set up like this:
AudioSynthDaisySP synth; // create the daisysp synth audio object
@ -23,7 +23,7 @@ AudioConnection patchCord1(synth,0,out,0); // patch mono synth to right and lef
AudioConnection patchCord2(synth,0,out,1);
Teensy Audio processes 128 16 bit integer samples at a time and uses a dynamic pool of sample buffers which are passed between audio objects. This is generally more CPU efficient but can make coding audio objects quite complicated because of the dynamic sample buffer management. Every audio object has a callback function which processes blocks of samples approximately every 2.3 ms @ 44.1khz sample rate.
Teensy Audio processes 128 16 bit integer samples at a time and uses a dynamic pool of sample buffers which are passed between audio objects. This is memory and CPU efficient but can make coding audio objects quite complicated because of the dynamic sample buffer management. Every audio object has a callback function which processes blocks of samples approximately every 2.3 ms @ 44.1khz sample rate.
In contrast, DaisySP processes one sample at a time using floating point and each function allocates its memory statically. Simple, but uses a lot of memory for things like reverbs and delays and its pretty CPU intensive.
@ -44,5 +44,8 @@ I have not tested the library extensively but so far everything works as expecte
Tested with Arduino 1.85 and Teensyduino 1.53.
Rich Heslip rheslip@hotmail.com

Loading…
Cancel
Save