Maximal I/O capabilities of the Teensy Audio Library?

Status
Not open for further replies.
Hello dear Teensy lovers. I'm planning to do my first big music project after doing some basic stuff like a simple sample player on a Padauk PFS173. So I'm currently thinking of building a copy of a Geodesics eurorank module in hardware.
Geodesics is an incredible synth project with lots of very nice modules but unfortunately they're only available on VCV Rack. So I thought I could do maybe a simpler version of Geodesics Branes or Fate.

So Lets talk about Branes. Its a noise generator and sample and hold module with additional signal inputs for each noise source which will replace then the corresponding noise source. 7 Noise sources are sharing a single trigger input.
So I would need about:
14 Audio Outputs with good sample rate
6 Trigger Inputs
14 Audio Inputs which can be band limited since the audio triggers which sample those inputs are maximal in "lower" audio rate.

I already did some basic sample and hold examples on a Teensy 3.2 but the bare amount of I/O required for this project is overwhelming. Is it even possible? Can even the Teensy 4.0 handle 14 audio outputs at once and how? Since I have no idea how you could use 2 I2S_OCT outputs in the audio library since it's not documented if it's even possible to use more than 1 of them. Same question on the I2S_OCT Input.

However the internal routing and processing is really a minimum. It's more or less just a simple sample and hold module witch some additional stuff like 2 inputs sharing the same trigger, but this should not be a problem.
Do you even suggest it to such a project with a micro or would you do this completely in analogue?

If this will be too much for the teensy I think I'm better with Fate since it is still a nice module but has much less I/O problems to solve :)

So thank you for your time and hopefully we can make really nice things together
Gruftgrabbler
 
The CS42448 chip is probably your best path, since that is the best supported chip with a larger number of inputs and outputs. Teensy 4.0 & 4.1 have 2 independent digital audio ports which can both implement TDM, so you could pretty easily connect two CS42448 chips.

A few years ago I made this circuit board for testing CS42448 and developing the TDM software support.

https://oshpark.com/shared_projects/2Yj6rFaW

(click the "Description" button on that page)

While it is designed for Teensy 3.2, it definitely does work with Teensy 4.0 using wires to route the five TDM signals from their locations on Teensy 4 to the pins that PCB expects for Teensy 3.

As for which I/O can be used together, the quickest way to explore is using the design tool. Just drag various inputs & outputs onto the canvas. If they conflict in their hardware or software usage, you'll get little yellow warning icons on the ones which can't be used together. Most of them also have info about this in their documentation, but the details are complex. Several months ago we put all those details into the design tool and Frank added the Javascript code to detect when they conflict and show those icons.
 
Thank your for your answer. This sounds reasonable. You're doing great work for the community man!
I think I will order those chips and prototype the hell out of them :) :) :)
 
Before closing this thread completely. Can I ask one more time what's the best way to generate blue and brownian (aka red) noise on the teensy with the audio library? I could technically create brownian noise with the 2 pole lowpass filter provided with the library. But I'm not sure where the cutoff should be since brownian noise should not have a cutoff frequency by definition or not? Blue noise is more complicated. Its +3db/Octave noise which can't be done with the 2 pole filter and have to be done with the biquad filter. Settings here are far more complicated, tho 0.o
 
The audio library has a biquad filter. But the 5 filter coefficients are stored with only 32 bit precision, which usually isn't enough for really low corner frequencies. It might work for this, or might not. If you compute the coefficients as real numbers (double precision float) and any are really small, like 0.0001 or less, that's a red flag that you're getting into the range where numerical precision might be an issue.

As far as directly generating noise with specific spectrum, the only colors I know about are white and pink. I really have no idea about how you might directly synthesize those others.
 
Before closing this thread completely. Can I ask one more time what's the best way to generate blue and brownian (aka red) noise on the teensy with the audio library? I could technically create brownian noise with the 2 pole lowpass filter provided with the library. But I'm not sure where the cutoff should be since brownian noise should not have a cutoff frequency by definition or not? Blue noise is more complicated. Its +3db/Octave noise which can't be done with the 2 pole filter and have to be done with the biquad filter. Settings here are far more complicated, tho 0.o

Brownian noise is unbounded if there's no lower cutoff, so you need one in the real world.
White noise into an integrator is one approach, but I don't think there's support
for integrators in the Audio lib. An integrator needs either a lower cutoff (high pass action
built-in), or you'd need to put a servo around it to avoid saturation. The low pass in that
servo arrangement would be subject to the numerical precision issues Paul mentioned....

Blue noise could be done by differentiating pink noise perhaps? Differentiating is doable as a
single sample delay followed by subtraction, or as an 2-coefficient FIR high pass filter?

A discrete integrator or differentiator however don't have an accurate 6dB/octave response
though due to the Z-transform, if this matters.

BTW differentiators and integrators are 1st-order. Biquad filters are 2-pole (strictly upto
2 poles and 2 zeroes).
 
Status
Not open for further replies.
Back
Top