TeensyPhonon
Active member
Hello everyone,
I have a project where I need to record the Green's functions in two rooms. For those who don't know what it is, it’s basically what you hear if you play a brief impulse like an explosion.
To do this, I just have an I2S amplifier and an I2S microphone on two separate Teensies. One Teensy is able to trigger the second one using its pin 0.
The problem is that the Teensy is using DMA, so there is some jitter introducing a random delay... It’s not a problem with one microphone, but with 32 (and the same number of Teensies), it completely breaks the relations between the Green's functions. (It is a bit like trying to measure the speed of sound, the travel time is messed up and you obtain the wrong speed.)
I have been able to correct that in software, but it is really inelegant and not robust as it requires additional measurements.
So, I am looking again at another solution! What I want is simply to start recording sound into an array on the Teensy when the trigger signal is detected (or at least with a fixed delay) with microsecond precision.
I am thinking of two solutions:
- Using I2S with one sample at a time: inefficient (later code is using blocks, so...) and not super precise (22 µs maximum).
- Controlling the DMA to make it start at the right time. How?
Is that even possible at all?
I have a project where I need to record the Green's functions in two rooms. For those who don't know what it is, it’s basically what you hear if you play a brief impulse like an explosion.
To do this, I just have an I2S amplifier and an I2S microphone on two separate Teensies. One Teensy is able to trigger the second one using its pin 0.
The problem is that the Teensy is using DMA, so there is some jitter introducing a random delay... It’s not a problem with one microphone, but with 32 (and the same number of Teensies), it completely breaks the relations between the Green's functions. (It is a bit like trying to measure the speed of sound, the travel time is messed up and you obtain the wrong speed.)
I have been able to correct that in software, but it is really inelegant and not robust as it requires additional measurements.
So, I am looking again at another solution! What I want is simply to start recording sound into an array on the Teensy when the trigger signal is detected (or at least with a fixed delay) with microsecond precision.
I am thinking of two solutions:
- Using I2S with one sample at a time: inefficient (later code is using blocks, so...) and not super precise (22 µs maximum).
- Controlling the DMA to make it start at the right time. How?
Is that even possible at all?