Hi,
since this is my first post here, I would like to tell something about me. Regarding the teensy I am mainly interested in its audio capabilities. About one year ago I started my first DIY-DSP project. I build a freeDsp which I conrolled with an Arduino via I2C (the first time I came in contact with mirco-controller programming). This setup is also still in use in my hifi-system. However
I am not completely content with it. A few month ago I came across the Teensy 4 with its SPDIF-in and out and the powerful audio library and I decided to give it a try. But I needed the SPDIF input...
After spending some time with the imxrt reference manual, learnig about DMA, how the Teensy audio library works, which additianal hardware is required,... I got it finally working.
What I implemented is:
- A SPDIF input class which receives the audio data and is compatible with the audio library/ inherits from the AudioStream class.
- The SPDIF input class also contains an ASRC algorithm (I implemented this algoritm: https://ccrma.stanford.edu/~jos/resample/resample.pdf)
and also a noise shaping + dithering algorithm. To get noise shaping filter coefficients, I implemented the following algorithm in Python: https://pdfs.semanticscholar.org/ea9c/d52008b1821a1104b5be0d9b18ae63eb410a.pdf
I used the same weighting function as in the paper to get the filter coefficients.
For now I am using a AudioOutputSPDIF3 object to output the audio signal. This object also has the 'update responsisbility'. On the other hand the spdif input receives audio samples at an arbitrary rate (e.g. 48kHz). The signal pipline is as follows:
spdif input (24bit samples) -> ASRC (32bit float computation) -> quantize to 16bit (+ triangular dither + noiseshaping) -> (via blocks/ audio library) spdif output
I am now wondering if there is interest to integrate the spdif input into the audio library? If so, the just let me know how to proceed.
Best regards
Alex
since this is my first post here, I would like to tell something about me. Regarding the teensy I am mainly interested in its audio capabilities. About one year ago I started my first DIY-DSP project. I build a freeDsp which I conrolled with an Arduino via I2C (the first time I came in contact with mirco-controller programming). This setup is also still in use in my hifi-system. However
I am not completely content with it. A few month ago I came across the Teensy 4 with its SPDIF-in and out and the powerful audio library and I decided to give it a try. But I needed the SPDIF input...
After spending some time with the imxrt reference manual, learnig about DMA, how the Teensy audio library works, which additianal hardware is required,... I got it finally working.
What I implemented is:
- A SPDIF input class which receives the audio data and is compatible with the audio library/ inherits from the AudioStream class.
- The SPDIF input class also contains an ASRC algorithm (I implemented this algoritm: https://ccrma.stanford.edu/~jos/resample/resample.pdf)
and also a noise shaping + dithering algorithm. To get noise shaping filter coefficients, I implemented the following algorithm in Python: https://pdfs.semanticscholar.org/ea9c/d52008b1821a1104b5be0d9b18ae63eb410a.pdf
I used the same weighting function as in the paper to get the filter coefficients.
For now I am using a AudioOutputSPDIF3 object to output the audio signal. This object also has the 'update responsisbility'. On the other hand the spdif input receives audio samples at an arbitrary rate (e.g. 48kHz). The signal pipline is as follows:
spdif input (24bit samples) -> ASRC (32bit float computation) -> quantize to 16bit (+ triangular dither + noiseshaping) -> (via blocks/ audio library) spdif output
I am now wondering if there is interest to integrate the spdif input into the audio library? If so, the just let me know how to proceed.
Best regards
Alex