Hello, I understand Bela.io runs in delta sigma mode (1 bit, oversampled). Is there a way to output pure i2s audio 16bit/44.1khz for non-oversampling DACs ?

Thanks.

The stream that goes down the I2S line is actually 16 bit, 44.1kHz. The oversampling is internal to the codec. The I2S on the board is actually fairly flexible (what TI calls "McASP"), so most likely you'll be able to connect a different DAC, if you work out the low-level configuration of the port on the system-on-chip side, I guess. Chapter 24 of the Technical Reference Manual is where all the details are: https://www.ti.com/lit/ug/spruh73p/spruh73p.pdf .

6 months later

Hi. This is just an initial take on finding out whether the Bela may fit my needs (usb midi in, processed through csound, yielding high resolution digital audio out to send to my own dac/preamp.)

I see the Multichannel Audio Serial Port (McASP) supports I2S, TDM, S/PDIF etc, and that it can output up-sampled data at 96 kHz or 192 kHz.

But am I right in understanding from your post above that before the data stream gets to the McAsp it passes through your codec where it is compressed to 16bit/44.1Khz?

Is there any way to break in before that point and replace the codec or something? If so what kind of programming interface is needed to do something like that, and is that interface provided in the package? Is the McAsp made available through the provided pins?

Apologies if I am asking a foolish question here, as I do not have substantive domain expertise, I'm just trying to get a grasp on possibilities before a deep dive. Thank you.

EDIT - Sorry I see now that this thread is in the PD category. Moderator, please move or add a tag if appropriate. Thks.

    ronan0 But am I right in understanding from your post above that before the data stream gets to the McAsp it passes through your codec where it is compressed to 16bit/44.1Khz?

    The codec currently runs at 44.1kHz, and set to receive 16 bit data on the McASP. Currently, the audio clock is generated by the codec. Running it faster would be no problem (except that you'd need to remove some of the operations from the audio loop in the PRU(e.g.: disable analogs and digitals, as explained a long while back, e.g.: here). Anyhow, if you only run audio (and no digital/analog), then running at double sampling rate should be fairly straightforward (even with the on-board codec, in fact there is some code in startAudio() in core/I2c_Codec.cpp which hasn't been used in a very long while buy may just work). Running 24 bit is a bit more complicated, in that it requires restructuring the way data is placed in memory, which involves modifying the C++ ARM code and the PRU code, and comes with a slight CPU performance penalty (more data to copy back and forth), but still it should be doable).

    If you don't mind asking, why are you looking for such high sampling rates?

    Forgot to mention: if you want to use an external codec/DAC, it will have to provide the needed clocks to the McASP (e.g.: in I2S mode), or you will have to rewrite part of the McASP initialization code in order to make the McASP the clock source (the McASP is very flexible, so it can do it, but it just needs to be configured appropriately), and possibly some of the pinmuxer settings as well.

    Thanks very much for all that Giulio. To try and answer your question, my interest in this lies in using physical modelling synthesis driven by a midi wind controller to engineer beautiful wind sounds. So my desire for a higher sampling rate / bit depth is driven by:

    (a) Often the mathematical model of a component of the instrument will give rise to higher frequency artifacts (that may perhaps "do" something to the sound, while being unhearable?) Sure, here we have a subjective feeling, theoretically a modern well implemented low-pass filter at 22K should leave everything else untouched before sampling, and it makes no difference. But I'm not completely convinced, I do believe I can "hear" a difference between the two output settings.

    (b) I have been generally ill-disposed to CDs, feeling there was something "nicer" about vinyl. I prefer the listening experience. Is that subjective feeling part-related to the sample rate / bit depth? Existing theoretical understanding would probably say no, but again I'm not completely convinced.

    I am drawn to your platform to see what it can bring to the experience of live playing a midi wind controller with those type of latencies. It is an interesting proposition. Short answer, I could probably live with the sample rate and bit depth constraint to investigate the proposition, acknowledging that on other platforms I have tended towards 24bit/96KHz. I suppose in the end the proof will be in the pudding.

    The concern about the accuracy of the physical model can be addressed by oversampling internally in software.