Hi there everyone, this has a little to do with interfacing but more to do with audio output with Arduino.
I am working on a project that combines Arduino sensor inputs with Max/MSP instruments and audio control.
Currently, the sensor values are sent over serial to Max, and then trigger instruments. That all works fine, and it plays music from my computer.
My team member wants to send the Max audio back over serial to play out of a speaker connected directly to the Arduino.
Is this even possible?
My current thought was maybe to use the number~ object to generate a number from the audio. I assume that number~ is describing the amplitude of the sound and the variation creates the frequency.
Then I'd send that over serial, but then the question is this:
Is there Arduino code that can read the number~ values and basically use them to set amplitude values changing in real-time to produce sound from a speaker?
My team member wants to send the Max audio back over serial to play out of a speaker connected directly to the Arduino.
Is this even possible?
Well yes but not at any sample rate or quality that a normal person would find acceptable.
Your solution is sending back a sound descriptor rather than the sound. MIDI is an example of a sound descriptor. You seem to be proposing a synthesiser type control signal giving the amplitude of a waveform. You will also need something to give you the frequency. The MOZZI project is perhaps the best around but it takes up the whole memory capacity of the Arduino Uno.
But the big question is why you want to do this in the first place, it seems a lot of work for so little gain?