USB audio input clips prematurely

Hi, first of all thanks for keeping the project alive and for adding USB audio support!

I was testing it on macos, with an original axoloti core, and it’s functional (yay!). But I think that the “audio in stereo” object is clipping the signal coming from the PC “prematurely”. Or more precisely, the signal out of the object seems to have double the amplitude of the signal coming from the PC, resulting in clipping for any signal value outside the [-0.5,0.5] range, as seen from the OS side.

To verify that, I created a small Pure Data patch, selected the Axoloti Core as the output interface and sent the audio there. Signals of amplitude 0.5 on the PD side result in a signal of amplitude 64 on the axoloti side. Any value bigger than that is of course clipped to 64 (same of course for negative values).

What I hear is consistent with what I see, as soon as I output a sine wave of amplitude just above 0.5, I’ll hear the typical digital hard-clipping distortion.

I cannot show the PD patch because it’s my first post and I can’t add more than one image to the post, but here’s the Ksoloti patch running:

On the left channel you can see the clipped sine wave (on the PD side, that’s at ~0.6), on the right channel you can see a constant signal of amplitude close to -64 (on the PD side that is -0.49…).

I am using Ksoloti 1.1.0, I installed it yesterday from the github release page (the binary created on dec 2, 2025). The board is a (quite old) axoloti core.

1 Like

I guess I can still post the PD patch here as reference:

1 Like

Doesn’t look just like clipping, there is data missing as well.

The USB Object just takes the data straight from the USB so it is incorrect in the USB data from the host is my guess.

As a wild guess has it by any chance on your machine set it to 24 bits instead of 16?

@Ksoloti Other people are using this ok on the original Axolot?

there is data missing as well.

If you are referring to the discontinuity in the graph for the sine waveform, I think it’s just an artifact of how scope’s graph is drawn/refreshed, as I keep seeing those but I do not hear any glitch.

As a wild guess has it by any chance on your machine set it to 24 bits instead of 16?

I am not sure how that would be possible on macos, from what I know applications just “trade” floating point data with the OS, and there isn’t bit-depth selection option in puredata or plugdata, or in the OS sound settings.

In case it’s helpful, the axoloti shows up as “Axoloti Core” in macos sound settings and the “Audio MIDI setup” tool, as a 48kHz, 16bit, 4ch interface. Interestignly it’s also shown among the inputs, even though my patch only contains the usbaudio/in stereo object.

Another thing worth noting is that the OS control for the output volume is active, but doesn’t seem to have any effect on the signal amplitude. Not on the signal coming “into the patch” - which to me is expected since I assume that these OS controls are to influence some “post-DAC” volume control - but also not on the output volume itself (neither the line or the headphone out).

I do see a USB Audio volume changed message in the Ksoloti console when I change the volume, and also the occasional Host USB clock is fast and USB Audio Synced messages (I think when the latter appears I also hear a glitch).

Who knows what is possible :slight_smile: There was a USB audio version that had 24 bit audio advertised but didn’t work, I was just checking that hadn’t made it’s way back into the firmware.

I’m not really sure what is going on with the firmware you are using, what version is it?

p.s. I will check the volume control stuff here tomorrow, I thought I had implemented that but will check, maybe I didn’t! …

Sorry my bad, looks like some bug/weirdness with PlugData. Tested with Audacity and the same patch in Pure Data and things are fine :confused:

I wonder why Plug Data has this issue with the Axoloti Core only, though, as things are fine with my other USB interfaces. But I guess that’s a question for the Plug Data folks :sweat_smile:

1 Like

Ah, that’s good :slight_smile:

1 Like