PDA

View Full Version : MIDI Lfo with audio lib



capicoso
04-19-2016, 10:25 PM
Hi. As I mentioned in a previous thread, as a part of a project, i'm making an lfo. At first I didn't use the library, made the lfo manually, but it was a bit complex and harder to read, so I went with the audio lib and I made it with the waveform object.
Thing is, I need to send the lfo via midi. With the first method(without library) I could do it, because I just used the variable to write the DAC and use it in the control change message(slowed down) but now with the audio lib I don't have the variable for use.
Is there any way that the waveform object could return me the amplitude? So I can use that variable to send the lfo via midi.
thanks

B.Jacquot
04-20-2016, 05:42 PM
If you use the queue object, you can get the waveform output data back to the sketch.

http://www.pjrc.com/teensy/gui/?info=AudioRecordQueue

Keep in mind that the audio information is updated much more quickly than the MIDI baud rate. MIDI would only have time to send a handful of values from each buffer received from the queue.