shorepine / tulipcc

The Tulip Creative Computer - a portable Python synthesizer for music and graphics
https://tulip.computer/
Other
432 stars 28 forks source link

Audio input #290

Closed dromer closed 2 months ago

dromer commented 2 months ago

It is unfortunate that the platform wasn't made with audio input and effects processing in mind.

Does anyone have a suitable recommendation on how to get an additional codec with input?

(and maybe a hint for a future v2 ;) )

bwhitman commented 2 months ago

I would start by building a breadboard or breakout board Tulip but replace the DAC with a DAC+ADC chip, something like the SGTL5000 on the Teensy audio board? https://www.pjrc.com/store/teensy3_audio.html

The next step would be to turn on i2s audio in in the audio setup code of Tulip. We do this all in C here: https://github.com/shorepine/tulipcc/blob/c13accf5e5de518bf71c09498dcaaca2a07714ff/tulip/shared/alles.c#L151

You could grab the audio buffer during rendering of the audio output around here : https://github.com/shorepine/tulipcc/blob/c13accf5e5de518bf71c09498dcaaca2a07714ff/tulip/shared/alles.c#L73

And pass that buffer to whatever you want, either in C to a third party effects library, or make it available as python callbacks for people to write live callback effects or to sample audio to disk/RAM for the Tulip sampler.

Re "v2": no osborne effect allowed here! :) tulip is brand new and I really want to focus on getting a great community going on the existing hardware. we're just getting started! building your own and getting audio input on it is awesome and I'd be delighted to help document it once you get a prototype.