Is audio/midi over USB possible?

Wanted to prompt a technical discussion on what’s physically possible.

Im a software engineer but Ive very little experience with hardware development so wanted to pose some questions to people smarter than me.

I’m not wanting to discuss what’s currently possible on current firmware. I’m trying to understand what is theoretically possible given the current hardware limitations.

I’m assuming there is no hard-line between the USB and OT, based on topics ive read here it seems like the USB is only for the card reader so I assumed it was architected with the CF card in between the PC and OT like
PC–usb–>CF---->OT. This means maybe using the CF card as the go between for the PC to talk to the OT


  1. Is a CF card capable of simultaneous read/write? TLDR: seems yes.

To my knowledge we can currently read 8 static machines from the CF card in “real time”.

Reading (to my knowledge) is just allocating a pointer to point at an array of addresses on the CF card and reading the values.
Could a PC write to a buffer/array to an address and then on the next cycle the OT reads?

Then for each track the PC would likely want to get the output of the OT track. So this would involve the OT writing to a different location and the PC reading from that.

I believe the OT can currently perform simultaneous read/write to the CF card. Since I can save a sample from a flex machine while the OT is playing from a static machine on another track.

  1. B) Is CF capable of simultaneous read/write from 2 locations?
    TLDR; dont know

IE can a PC be reading and writing at the same time as the OT is reading writing?

Does the current implementation of compact flash prohibit this? Would it require custom CF drivers to allow simultaneous access from the OT and PC?
The fact we need to enter " USB host mode’ makes me think possibly the entire CF card is locked to access from only a single point, either the PC or the OT.


  1. Does USB/CF have enough bandwidth to support 8 stereo tracks simultaneous read/write at say 44.1khz? TLDR: seems likely

1 channel = 16bit*44100*2channels = ~1.4Mbps
8 channels = ~1.4MBps.
So PC writing OT reading needs ~3MBps.
Then for the PC to read the tracks output back in, then wed need an additional 3MBps.
So totaling roughly 6MBps for audio??

This doesn’t seem impossible from a bandwidth standpoint?


  1. Can you get around file read/write locks?
    TLDR; seems possible.

Let’s assume you can access the CF card from PC and OT at same time but just cant access a single file from both PC and OT at same time. Perhaps instead you can write a buffer of audio to a “file” and then the next to a different file and alternate between read/write these 2
files. Each buffer file is a stereo file. Each track has its own file for audio PC->OT and another for OT->PC.
You write a buffer to one and close.
Then while the OT is reading that you write the next buffer to the other file.
Then once OT is done reading buffer 1 it moves to Buffer2, and meanwhile PC overwrites buffer 1 with the next buffer of audio.

This means each track has 4 files.
Eg
T1PCA - buffer a for audio from pc
T1PCB - buffer b for audio from pc
T1OTA - buffer a for audio from ot
T1OTB - buffer b for audio from ot


What then would it take to do something like this?
I assume custom drivers on the computer side and of course custom firmware on the OT side.

I realize that if it was easy to implement, elektron probs would have done it already. But I also know the realities of developing products is such that the resources may have been put on new products rather than trying to hack features into old ones. So I’m wondering if there is things I’m missing here that push this into true impossible territory, or if this is simply a case of "no one has the time to implement "

Thanks for taking the time to read!

2 Likes

these are some questions i was very curious about :smiley: this is a topic i would come back to. sorry for no answers though.

found these :

2 Likes

Yea unfortunately it seems to always just be ‘not possible, due to hardware reasons.’

I’m hoping we could get to the bottom of what exact hardware reasons they mean!

1 Like

That is the case. Indeed it’s a hardware restriction of USB itself, which only works in a strict host/client setup (each and every USB device can only have one host at a time).

When entering USB host mode the OT hands over the control of the CF card to the PC completely (from a hardware AND software perspective). It’s very like unplugging the CF card from the OT and plugging it into an external card reader connected to the PC, just that it is done automatically for you.

Additionally: for shared access from different devices a kind of network storage protocol would be needed to synchronize the access to the storage. Otherwise the filesystem gets corrupted in “no” time.

7 Likes

6Mbps should be achievable for good CF cards. You don’t need to worry about lock files if only a single host can access the storage at once, either OR or PC would be accessing it fully synchronously, then unmount and let the other host mount the card. But the latency of flipping the USB device back and forth between the OT and PC would be huge.

Like all flash memory, CF cards have a maximum number of writes per block before the block fails permanently. To avoid that, they do wear leveling which moves the data around to avoid hammering the same blocks every time. That adds latency too. And reading/writing constantly to transmit audio data will hit that maximum number of writes much sooner, reducing the lifetime of the card significantly.

The latency of mounting/unmounting the USB host between the PC and OT seems likely to be the killer though. It typically takes about a second for a USB storage device to be detected and mounted by a computer. Even with custom firmware doing it without asking for confirmation, it would be hard to do that hundreds or thousands of times per second for each packet you want to send/receive.

3 Likes

Curiosity is all good, however, for anyone more interested in the destination rather than the journey …

One of the more definitive statements, there is one which qualifies it more but i can’t find (and life is too short), so to avoid building of even the faintest of hopes (to ultimately dash) of any likely functionality beyond card reader from an OT USB port

There are actually quite a few comments and topics touching on this, it’s fine to scrutinise it hypothetically, but be mindful to avoid creating artificial hope or clinging to semantic grey areas … as you were, i’ll add the other ‘official’ post if i stumble upon it, but i am 100% satisfied fwiw that this is all a pipe dream … no harm understanding it better though :mag:

4 Likes

Yup! Just wanted to know exactly the hardware limitations.
The main true limitation it seems is the number of times a location can be written to on CF card.
Sounds like everything else could be worked around (custom firmware for CF to allow usage as a pseudo network drive for 2 machines etc) so that is a shame!

So essentially if there was a true hard-line from USB to the internals of the OT we might actually be able to do it, but as this doesn’t exist, the chances of having a firmware update to allow it are basically zero (barring the absurd like creating a custom storage that fits a CF slot but allows far better long term RAM like usage)

Oh well! Glad to know for sure :slight_smile:

Thanks for all the input!