You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now we can only playback RawSamples, WAV and MP3. It'd be nice to add a synthio module that can generate audio based on settings set from Python. For buffering changes, it could also take in MIDI commands and apply them over time.
The synthesiser can implement the AudioSample protocol, but in addition to that, we'd like to be able not to pass it a buffer upfront, but to call a write method instead that queues data up. That way we'd be able to pipe MIDI from BLE or USB directly into this object.
OTOH,
that would make looping (or even passing the same AudioSample to play() repeatedly) impossible;
the protocol for audiosample_reset_buffer_fun has no way to report failure if the AudioSample is not rewindable;
if the queued MIDI stream depletes during playback, the playback will stop, instead of waiting for new input. For real-time input, when the MIDI events arrive at the same speed that they're played, this would happen after every event!
Perhaps a new protocol, e.g. AudioStream, should be defined alongside AudioSample, and Audio*Out implementations will need to be updated to handle the new kind of input -- e.g. a new method play_stream which wouldn't take a loop parameter. Then synthio can have MidiStream alongside MidiTrack, with much of the implementation shared. Similarly, there can then be RawStream alongside RawSample.
@tannewt has there been any development on this? i was curious to see if there's any way to implement small scale audio synthesis on circuitplayground bluefruit
Right now we can only playback RawSamples, WAV and MP3. It'd be nice to add a
synthio
module that can generate audio based on settings set from Python. For buffering changes, it could also take in MIDI commands and apply them over time.The Teensy Audio library is a really neat Arduino library we can reference: https://github.com/PaulStoffregen/Audio
It has these synth modules:
These effects:
These filters:
These analyzers:
The text was updated successfully, but these errors were encountered: