How Start an Open Source project to create a replacement for RME Totalmix fx

Programming applications for making music on Linux.

Moderators: MattKingUSA, khz

User avatar
Be.
Established Member
Posts: 55
Joined: Mon Mar 16, 2015 4:51 am
Been thanked: 6 times

Re: How Start an Open Source project to create a replacement for RME Totalmix fx

Post by Be. »

Be. wrote: Wed Apr 20, 2022 8:34 am I am also struggling to figure out how the input preamp gains and output level controls work. I see USB control transfer output messages when manipulating these, but I have not figured out how to make sense of the data. For the preamp gains, each change sends 5 control messages. 4 of them seem to stay constant and the other goes up and down when the gain is only moving in one direction. For the outputs, 2 control messages are sent, but I haven't figured out how the level is represented. For the mixing matrix, the levels are simply 16 bit unsigned integers.
I figured out the input preamps and output volume controls as well as the various switches:

Code: Select all

    // preamp gain
    // wValue gain is in units of 0.5 dB
    // mic preamps 0 - 1 go up to +60 dB (wValue 180)
    // instrument preamps go up to +9 dB (wValue 18)
    // wIndex is the same as the matrix index for the channel
    device.write_control(0x40, 26, 18, 2, &[], Duration::from_millis(10)).unwrap();

    // output level
    // wValue is 0 - 255 up to +6 dB, 0 dB is 243
    // wIndex is 4 + the matrix index for the channel
    device.write_control(0x40, 26, 243, 4 + 0, &[], Duration::from_millis(10)).unwrap();
    device.write_control(0x40, 26, 243, 4 + 0, &[], Duration::from_millis(10)).unwrap();
    // TotalMix FX also sends another output with value 0 - 16384, with 0 dB at 8192,
    // like the mixing matrix. However, sending these doesn't seem to do anything??
    // wIndex starts at 992
//     device.write_control(0x40, 18, 0x2000, 992 + 0, &[], Duration::from_millis(10)).unwrap();

//     // phantom power 1 on
//     device.write_control(0x40, 23, 0, 1, &[], Duration::from_millis(10)).unwrap();
//     // phantom power 1 off
//     device.write_control(0x40, 23, 0, 0, &[], Duration::from_millis(10)).unwrap();
//     // phantom power 2 on
//     device.write_control(0x40, 23, 2, 2, &[], Duration::from_millis(10)).unwrap();
//     // phantom power 2 off
//     device.write_control(0x40, 23, 0, 2, &[], Duration::from_millis(10)).unwrap();
//
//     // pad 1 on
//     device.write_control(0x40, 23, 16, 16, &[], Duration::from_millis(10)).unwrap();
//     // pad 1 off
//     device.write_control(0x40, 23, 0, 16, &[], Duration::from_millis(10)).unwrap();
//     // pad 2 on
//     device.write_control(0x40, 23, 32, 32, &[], Duration::from_millis(10)).unwrap();
//     // pad 2 off
//     device.write_control(0x40, 23, 0, 32, &[], Duration::from_millis(10)).unwrap();
//
//     // instrument 1 (input 3) +4 dBu
//     device.write_control(0x40, 23, 4, 4, &[], Duration::from_millis(10)).unwrap();
//     // instrument 1 (input 3) -10 dBV
//     device.write_control(0x40, 23, 0, 4, &[], Duration::from_millis(10)).unwrap();
//     // instrument 2 (input 4) +4 dBu
//     device.write_control(0x40, 23, 8, 8, &[], Duration::from_millis(10)).unwrap();
//     // instrument 2 (input 4) -10 dBV
//     device.write_control(0x40, 23, 0, 8, &[], Duration::from_millis(10)).unwrap();
//
//     // clock source automatic
//     device.write_control(0x40, 23, 3, 3, &[], Duration::from_millis(10)).unwrap();
//     // clock source internal
//     device.write_control(0x40, 23, 0, 3, &[], Duration::from_millis(10)).unwrap();
//
//     // SPIDF
//     device.write_control(0x40, 23, 1024, 1024, &[], Duration::from_millis(10)).unwrap();
//     // ADAT
//     device.write_control(0x40, 23, 0, 1024, &[], Duration::from_millis(10)).unwrap();

    // Do these do anything on the Babyface Pro??
//     // SPIDF emph on
//     device.write_control(0x40, 23, 256, 256, &[], Duration::from_millis(10)).unwrap();
//     // SPDIF emph off
//     device.write_control(0x40, 23, 0, 256, &[], Duration::from_millis(10)).unwrap();
//
//     // SPIDF pro on
//     device.write_control(0x40, 23, 128, 128, &[], Duration::from_millis(10)).unwrap();
//     // SPDIF pro off
//     device.write_control(0x40, 23, 0, 128, &[], Duration::from_millis(10)).unwrap();
I am still stumped about the EQ and low cut controls in class compliant mode though.
User avatar
Be.
Established Member
Posts: 55
Joined: Mon Mar 16, 2015 4:51 am
Been thanked: 6 times

Re: How Start an Open Source project to create a replacement for RME Totalmix fx

Post by Be. »

Be. wrote: Wed Apr 20, 2022 8:34 am They replied that it is possible to control the EQs in class compliant mode. TotalMix FX for iPad can do this. How this works though, I'm stumped without being able to record the USB traffic with an iPad.
RME said that TotalMix FX on iPad uses MIDI to control the Babyface Pro and they will not help more than that. This is good news though because it means an expensive hardware USB analyzer is not needed to reverse engineer TotalMix FX for iOS because there are iOS applications that can intercept MIDI. I will get a cheap old iPad on eBay to continue this reverse engineering work.

I am disappointed that I spent the effort to figure out the USB control protocol only to hit this dead end of not being able to control the onboard DSP. On the bright side, with MIDI, I don't need to write a server for remote usage because aseqnet can already do that. :D
User avatar
eikakot
Established Member
Posts: 103
Joined: Fri Jan 29, 2010 2:24 pm
Location: Vilnius, Lithuania
Has thanked: 7 times
Been thanked: 3 times
Contact:

Re: How Start an Open Source project to create a replacement for RME Totalmix fx

Post by eikakot »

Thanks Be. for your effort. RME has great hardware and to get more out of it on linux would be awesome! Somehow I always thought that reverb and echo were done on fpga but as you said it is written in the manual that it is not so I've learned something new :) I agree that there is no point in implementing those but to be able to control the eq would be excellent.
User avatar
sjzstudio
Established Member
Posts: 161
Joined: Fri Apr 10, 2020 11:24 pm
Has thanked: 19 times
Been thanked: 25 times

Re: How Start an Open Source project to create a replacement for RME Totalmix fx

Post by sjzstudio »

Good job. Could this be extended to other Fireface series devices? Eg 802, UFX II, UFX +

Do you plan to continue the development work? In that case, did you think of opening a patreon project, for example.
User avatar
Be.
Established Member
Posts: 55
Joined: Mon Mar 16, 2015 4:51 am
Been thanked: 6 times

Re: How Start an Open Source project to create a replacement for RME Totalmix fx

Post by Be. »

sjzstudio wrote: Mon Apr 25, 2022 5:50 am Good job. Could this be extended to other Fireface series devices? Eg 802, UFX II, UFX +
Yes, hopefully it will be fairly easy to extend this to support other USB Audio Class compliant RME devices after the first device is working.
Do you plan to continue the development work? In that case, did you think of opening a patreon project, for example.
Yes and yes. Probably going to use LiberaPay or OpenCollective rather than Patreon though.
Attachments
reverse-engineer-audio-interfaces.png
reverse-engineer-audio-interfaces.png (215.21 KiB) Viewed 8471 times
User avatar
sjzstudio
Established Member
Posts: 161
Joined: Fri Apr 10, 2020 11:24 pm
Has thanked: 19 times
Been thanked: 25 times

Re: How Start an Open Source project to create a replacement for RME Totalmix fx

Post by sjzstudio »

Fantastic!!

If that works, then goodbye to Windows in my studio completely definitively. There will definitely be a donation. The name you could still consider, BrutalMix would almost be a statement in the RME direction :D
User avatar
Be.
Established Member
Posts: 55
Joined: Mon Mar 16, 2015 4:51 am
Been thanked: 6 times

Re: How Start an Open Source project to create a replacement for RME Totalmix fx

Post by Be. »

The cheapest iPad on eBay arrived and I got it working with my Babyface Pro. I just happen to have a battery that can power the Babyface Pro using the DC barrel connector because I got it to use my Babyface Pro with my Pinephone. Strangely, if I power the Babyface Pro by plugging it into a combination battery pack/powered USB hub and plug that into the iPad, the iPad still says that it has insufficient power. Neither way charges the iPad. Requiring this oddly specific setup with an external battery and iOS camera connection kit, plus the caveat that the iPad can't be charged, makes it feel even stranger to me that RME went through the trouble to create class compliant mode specifically so these devices can be used with iPads. This wouldn't be an especially convenient setup to carry around, though it could fit in a backpack easily. Anyway, at least audio works with Linux in class compliant mode.

I tried several MIDI monitoring applications on the iPad (Protokol, MIDI Wrench, MIDI Scope) and they could all show me incoming MIDI messages from the Babyface Pro to the iPad. Unfortunately, I'm not sure iOS lets applications show outgoing MIDI messages to hardware unless the application sending the MIDI data exposes a virtual MIDI port, which TotalMix FX does not. There are sysex messages sent from the Babyface Pro to the iPad at a high frequency. I don't know what data is in those or if it's important. I'm more interested in the outgoing data though. So I may need a hardware USB analyzer after all. Anyone have suggestions for one that costs less than $1000 and doesn't require proprietary software? Ideally I'd like to find a USB analyzer that records to pcap so I can load the recordings in Wireshark and use Wireshark's filters to analyze the data.

This would be easy if iOS could run in an emulator...
Last edited by Be. on Tue Apr 26, 2022 6:46 pm, edited 1 time in total.
User avatar
bluzee
Established Member
Posts: 338
Joined: Mon Nov 30, 2020 11:43 pm
Has thanked: 18 times
Been thanked: 88 times

Re: How Start an Open Source project to create a replacement for RME Totalmix fx

Post by bluzee »

User avatar
sjzstudio
Established Member
Posts: 161
Joined: Fri Apr 10, 2020 11:24 pm
Has thanked: 19 times
Been thanked: 25 times

Re: How Start an Open Source project to create a replacement for RME Totalmix fx

Post by sjzstudio »

There are something about Totalmix midi messages https://forum.rme-audio.de/viewtopic.php?id=24437
mrjulius
Established Member
Posts: 3
Joined: Mon May 30, 2022 8:13 pm
Has thanked: 1 time
Been thanked: 3 times

Re: How Start an Open Source project to create a replacement for RME Totalmix fx

Post by mrjulius »

Hi Be.,

Did some reading and your idea of writing in Rust makes perfect sense to me now.

Have you seen Tauri? https://tauri.studio
It allows writing applications with a Rust backend and JS frontend. This would allow us to make both the local (=desktop app) and remote (=web) GUI using the same code.

If you'd like company (mainly for the gui part as I'm not skilled with Rust), we could have a video meeting and try to do a basic setup we can build on (git repo + test app with backend and frontend). For this I'd suggest saturday 11th or 18th (of june), any time between 11 and 15 CET. I'd send a link to a browser based video meeting (chromium-based browsers preferred), where we can share screen as needed. Please let me know if this corresponds to how you'd like to proceed. You're the chief.

The biggest prices for me would be the ability to
A) Use the main features of Totalmix in Linux (= not having to use Windows to host Totalmix anymore)
B) Use RME hardware with even a simple SBC (single board computer) as a digital mixer, controllable on browser.
Basslint
Established Member
Posts: 1511
Joined: Sun Jan 27, 2019 2:25 pm
Location: Italy
Has thanked: 382 times
Been thanked: 298 times

Re: How Start an Open Source project to create a replacement for RME Totalmix fx

Post by Basslint »

mrjulius wrote: Mon May 30, 2022 8:59 pm Hi Be.,

Did some reading and your idea of writing in Rust makes perfect sense to me now.

Have you seen Tauri? https://tauri.studio
It allows writing applications with a Rust backend and JS frontend. This would allow us to make both the local (=desktop app) and remote (=web) GUI using the same code.

If you'd like company (mainly for the gui part as I'm not skilled with Rust), we could have a video meeting and try to do a basic setup we can build on (git repo + test app with backend and frontend). For this I'd suggest saturday 11th or 18th (of june), any time between 11 and 15 CET. I'd send a link to a browser based video meeting (chromium-based browsers preferred), where we can share screen as needed. Please let me know if this corresponds to how you'd like to proceed. You're the chief.

The biggest prices for me would be the ability to
A) Use the main features of Totalmix in Linux (= not having to use Windows to host Totalmix anymore)
B) Use RME hardware with even a simple SBC (single board computer) as a digital mixer, controllable on browser.
Wow, Tauri is really cool! I think Gtk.rs is solid enough for GUI work but (by my own estimate) there are more frontend developers around than GTK or Qt coders and there are some very cool GUI libraries like https://github.com/retejs/rete that make trivial things that are not very common in desktop GUI toolkits.
The community of believers was of one heart and mind, and no one claimed that any of his possessions was his own, but they had everything in common. [Acts 4:32]

Please donate time (even bug reports) or money to libre software 🎁

Jam on openSUSE + GeekosDAW!
User avatar
sjzstudio
Established Member
Posts: 161
Joined: Fri Apr 10, 2020 11:24 pm
Has thanked: 19 times
Been thanked: 25 times

Re: How Start an Open Source project to create a replacement for RME Totalmix fx

Post by sjzstudio »

On the Rme forum, someone has made the Fireface400 device work using the FFADO mixer and is able to use the device like Totalmix. Could it be useful for developing a new application for controlling these USB devices?
User avatar
sjzstudio
Established Member
Posts: 161
Joined: Fri Apr 10, 2020 11:24 pm
Has thanked: 19 times
Been thanked: 25 times

Re: How Start an Open Source project to create a replacement for RME Totalmix fx

Post by sjzstudio »

https://hexler.net/touchosc

So it seems that Touch osc has desktop app for Linux. Would it be possible to use it like Totalmix replacement in Linux world? If we use firefaces on CC mode.

Post Reply