Axoloti as audio interface


#1

Is anyone working on this?

There's code to use the STM32F4Discovery board as a class compliant USB audio interface. The code I've seen is only USB 1 (FS), so probably won't ever get more than one stereo pair without rewriting that, and AFAIK the Axoloti hardware doesn't support USB HS, does it?

But I'm thinking it'd be possible to integrate the audio-over-USB code with Axoloti, ie. have objects that made USB audio streams available in Patcher, either to use as a straight audio interface, or to use Axoloti as an external, USB-attached effects box. Or a combination.

Obviously this'd have to be integrated with the existing USB endpoints as a multifunction USB device. There's some code to be written but doesn't seem out of reach?

Googling, I found mention of a problem with ChibiOS, lack of support for isochronous endpoints. This can be probably fixed (maybe even by me), but I'm wondering if there's something I'm missing -- would it be that different to the existing code that uses the SAI peripheral?


#2

It means the ability to transmit audio via USB instead of audio outputs?
this is very interesting.


#3

I haven't done any efforts in this direction, or studied the issues in depth.
Axoloti is already a multifunction usb device with an Audio Class since MIDI is a subclass of audio.
My biggest concern is audio clocking. Axoloti does not have the hardware to slave its audio sample clock to an external source. There might be a way using the HSI oscillator and trimming the drift out of it, but I'm not sure if the resolution is good enough and if the audio codec PLL will be fine with it.
Without clock-slaving, I believe running audio software with multiple soundcards will cause issues since the clocks will drift apart. Even if the pc compensates for clock drift (by resampling), this could increase latency.
Axoloti is USB full speed, so stereo full duplex at 48kHz/16bit is the maximum.
I'm not sure if it is possible or not. If you want to develop this, it's going to take you through the depths of USB, STM32, and Chibios.


#4

How do you mean multiple soundcards, exactly?


#5

@rvense when Axoloti Core acts as a soundcard in a setup there will be likely other soundcards involved too: on the motherboard, or other usb/firewire/pci/pci-express soundcards.
In case Axoloti Core is the only soundcard in use in an application, this is not as much a concern.

What's the use case? Routing a few DAW tracks, or fx sends/returns through Axoloti, while others channels go through a normal soundcard? Then clocking is really a concern.
Or just digitally recording the output of Axoloti perhaps while feeding it a stereo track too?


#6

Personally, I don't have an audio interface of acceptible quality that works with my main machine since I got a laptop without a Firewire port (well, ExpressCard) and I'm on Linux, so the selection of working interfaces is limited. I have legacy setups running, but I'd like to get rid of them.

I've actually been meaning (for months) to beat the STM32F4Discovery code into shape (it's a very quick hack) and make a small expansion board as a shield for the small F407 board my mate did a while ago to have a DIY audio interface -- but obviously, I'd just end up with something like half an Axoloti. So my first thought was just to use this hardware that I have now which has very nice stereo I/O.

Then, of course, I got the idea that instead of just reusing the hardware, I could make it work with the Axoloti software -- just have an object for USB audio I/O like the audio objects, so you could filter things on the way in or out. I'd forgotten about the USB1 limit to begin with, of course, so I was imagining more streams between the computer and the Axoloti, but it'd still be somewhat interesting as a proof of concept, I think. I think of the present hardware as a first generation, anyway, and assume that faster connectivity and more audio I/O is somewhere on or over the horizon.

In short, the synchronization is less of an issue for me to begin with (since I don't need to worry about a second interface), but I'm honestly not familiar with the details of the USB audio class.

I'm reading the source and we'll see what, if anything, happens. I could use one of my two 'loti as a dedicated audio interface (replace firmware completely), but it seems like a waste.


#7

we'll see what, if anything, happens.

I recommend wireshark to capture and diagnose USB traffic.

I can see the potential of a USB audio I/O object. My own priorities in development are different. But feel free to hack!


#8

I think there would be a lot of potential in the opposite arrangement, too. That is, being able to connect a class-compliant USB audio interface to the axoloti to add additional channels of analog i/o (unless I'm mistaken and that's already possible? I haven't gotten mine yet). Being able to process more channels, have multiple audio insert points in a patch, and so on would open up all kinds of possibilities in a hardware setup, especially for modular synth users.


#9

Sorry, not supported. This development is entirely different from exposing Axoloti as a USB audio device, it's more complex (need to test with a lot of different soundcards), and the same concerns about audio clocking apply.
Seriously I don't think this will happen.
Please keep your expectations realistic. Axoloti is already a pretty wild animal.


#10

Class compliant USB audio interfaces, especially multichannel ones, rarely work out of the box on Linux. Often the driver needs some help to correctly initialise and use the hardware ("quirks"). You'd have to do all that on other platforms, too. I think it'd be very hard as well. And as has been said, 'loti is not high-speed USB.

As far an audio device mode, there's this thread at the ChibiOS forums:

http://forum.chibios.org/phpbb/viewtopic.php?f=16&t=926&sid=c8039b823b9201bf875f613ffded1df5

So that's... a little closer, I think.


#11

I would have been really surprised if class compliant audio was supported (if only because of the USB bus speed) on the current version but it would be a cool addition for some future version of the hardware. Probably could have phrased the previous post more clearly in that regard.


#12

Any progress whatsoever on USB audio? There's a lack of decent quality, open source USB interfaces on the market and I personally would LOOOVE to have one, especially with the exceedingly intricate DSP capabilities the Axoloti has. It could be the studio swiss army knife.

S/PDIF output however could be nice too ^^


#13

No progress on USB audio, this is very low priority.


#14

@johannes and non-USB digital sound IO? Every conversion back and forth inherently introduces quantization noise..


#15

I believe SPDIF out is technically possible in firmware, but it would not be able to slave to any incoming clock source. So all other digital audio equipment would need to slave to the axoloti clock, or it needs a digital asynchronous sample rate converter. Not so useful in my opinion.


#16

I think any digital IO option is better than none. It would be silly to use the Axoloti for signal processing, have it convert the signal back to analogue, only to sample it again into the computer.

Also S/PDIF to analogue DACs are readily available off eBay from China and using one of these coupled with the Axoloti via an optical link would make na excellent hum and noise eliminating technique for live usage. Then again, so would be using a D.I. box and a balanced lead...


#17

To go into a PA, digital is very rare. Except between a digital mixer desk and a stage breakout, avoiding an expensive and bulky multichannel analog snake. Such stage breakouts do not always provide SPDIF or ADAT digital audio inputs.
Sure SPDIF out would be nice, but sorry not a top priority. I believe the sound quality of the Axoloti analog audio I/O is reasonably good. Sampling it again on a computer is less perfect than a pure digital path, but it's better to spend time playing than worrying :smile:


#18

Yes, of course, but that wasn't my point. I don't even have any digital links as of now, we still run on analouge, mainly because of al the equipment we already own and which would be entirely replaced by digital desk. (Yet it's probably inevitable.)

My point was that it would enable shorter analogue cable runs to minimize risks of noise pickup. Or in case of optical it would enable complete isolation.

I could even see the Axoloti becoming a single AD conversion point in my home studio. I'm sick of having to use a soundcard with closed-source firmware with my pure F/LOSS system.


#19

Has anybody been looking into this lately? SPDIF out I mean..


#20

Why don't you use a teensy with a super dac board? Balanced I/O too. It's obvious that this is not a development priority. I would love USB in/out for FX processing but it's a huge amount of dev work.