lucasparis
Member
I'd like to send more audio signals over usb then 2 (I need 18 actually) and they can be lower sampling rate, so I've though of a way to packet (encode, decode) audio samples sequentially into one audio stream.
Let's say I have a 44100 signal, and I want to decode 3 signals at 14700 sampling rate from it, I would alternate samples serially from each channel and use 1 amplitude as a starting marker (1 will be filtered out from the source encoded signals) to count which sample is which signal, so in the incoming samples it would be:
sample 0 (value 1 -> seperator, means next sample si the first signal), sample 1 (value variable -> signal 1's first sample), sample 2 (value variable -> signal 2's first sample), sample 3 (value variable -> signal 3's first sample), sample 4 (value 1 -> seperator, means next sample si the first signal), sample 5 (value variable -> signal 1's second sample)
... etc
How would I go about coding this kind of seperation with teensy audio? any starting leads? I'm gonna look into coding custom
I know how to encode the signals on the computer side but I'm not sure how to efficiently code the decoding on the teensy.
Might actually be easier to do it in serial...
Let's say I have a 44100 signal, and I want to decode 3 signals at 14700 sampling rate from it, I would alternate samples serially from each channel and use 1 amplitude as a starting marker (1 will be filtered out from the source encoded signals) to count which sample is which signal, so in the incoming samples it would be:
sample 0 (value 1 -> seperator, means next sample si the first signal), sample 1 (value variable -> signal 1's first sample), sample 2 (value variable -> signal 2's first sample), sample 3 (value variable -> signal 3's first sample), sample 4 (value 1 -> seperator, means next sample si the first signal), sample 5 (value variable -> signal 1's second sample)
... etc
How would I go about coding this kind of seperation with teensy audio? any starting leads? I'm gonna look into coding custom
I know how to encode the signals on the computer side but I'm not sure how to efficiently code the decoding on the teensy.
Might actually be easier to do it in serial...