Please familiarise yourself with the forum rules & guidelines

Implement basic file access via SysEx when tethered to a computer via USB

MarkMark Santa Barbara CAPosts: 2
edited December 2018 in Deluge Software Suggestions

Yes, the Downrush tool exists, but it requires the FlashAir card and software, which is kind of finicky to set up, and doesn't work terribly well in a lot of common environments, especially since the Deluge box is basically a Faraday cage, so WiFi connectivity can be pretty bad.

I think it'd be useful if the Deluge provided a small suite of SysEx commands to allow reading and writing files from the internal storage. You could implement the universal "Patch Dump" and "File Dump" commands, but that only solves about half the problem, and aren't really geared towards a complex filesystem layout like the Deluge uses (I don't think). Since everything on the SD card is either an XML file or a WAV file, stored in a directory hierarchy, it might make sense to implement something more general purpose. This could then be used by tools like DownRush (or a future Synthstrom editor/patch librarian) to manage the files on the Deluge in a more user-friendly way.

I was thinking something like an HTTP-style GET and PUT interface, using URLs like this:

(sysex header) GET file://SYNTHS/ (sysex end token)

would get the list of SYNT###.xml files, and

(sysex header) GET file://SYNTHS/SYNT033.XML (sysex end token)

would return the contents of the XML file in a SysEx message from the Deluge

(sysex header) PUT file://SYNTHS/SYNT033.XML ... (sysex end token)

would allow the PC to replace an existing preset (or make a new one)

You could also implement DELETE, and possibly HEAD (if you wanted to support querying metadata about the file).

Because samples are so much larger than presets, you might want to have a "file chunk" message, that could be sent repeatedly to build up the sample a chunk at a time without flooding the Deluge with a few megabytes of MIDI data in a single message.

I was originally going to suggest that the Deluge should "just" show up as a mass storage device when plugged into the computer, but the more I thought about it, the less I liked that idea. Since both the Deluge and the PC could both try to update the filesystem at the same time, you'd have to implement some kind of layer on top of the actual filesystem, making sure that the PC always sees a consistent view of the filesystem, and you'd need some way to refresh things after the deluge writes something. And you'd inevitably have issues with the CPU and flash bandwidth if someone tries to upload/download large samples while playing...

Post edited by Mark on


  • 0
    amiga909amiga909 Central EuropePosts: 1,066

    usb file access had been requested before, i like the mass storage thing, just because it would save time, byebye inserting and ejecting the sd card all the time.
    what seems hard to me is writing to an audio file while Deluge is playing it. opening a sample editor on the computer and “live edit” samples would be rad but i can see a tons of issues with the Deluge sample streaming.

    sysex commands: Mark you should edit the thread titlle, so i can upvote them :)
    i like the idea, Jamie had requested that too sometimes ago, would be a bomb for Downrush. REST style API is a cool idea, not sure if u can apply its ideas to Sysex because it is not based on the HTTP protocol.

  • 0
    MarkMark Santa Barbara CAPosts: 2

    Implementing “HTTP over SysEx” would be a supremely-nerdy solution, to be sure. But it’d have the advantage that there are already a bunch of off-the-shelf libraries to handle the details, and it’s all text, so easier to understand and debug than a proprietary binary protocol.

    Even if not going quite that nerdy, a path-based get/put API would still make a lot of sense for the way the Deluge’s storage is implemented.

Sign In or Register to comment.