Topic: Programmatic Change to Operational Mode and Gain Settings

I am using an RME Fireface UC as an audio interface for testing and want to run it in DAW mode with specific gain settings in the firefaceusb.exe settings. I'd like to be able to make these adjustments programmatically. I can load a Workspace programmatically, but if the Fireface isn't already in DAW mode, it will cause problems.

I've found the 'rme.totalmix.preferences.xml' file (which apparently isn't a real .xml file because it has two roots) with the Operation Mode preference (Line 20) with a value of 0 for Full Mode and a value of 1 for DAW Mode. However, when I change this value, I cannot get the system to switch whether I restart the software, power cycle the Fireface, etc. It will only switch between Modes if it is actually changed in the software itself.

As far as the firefaceusb.exe gain settings (prefer all of them set to +4dBu), I can't find any way to access that except in the program.

Any help would be appreciated. Thanks.

2 (edited by ramses 2022-06-17 10:06:40)

Re: Programmatic Change to Operational Mode and Gain Settings

Me and other gents on forum are happy to support you, if we can. But sorry, at the moment too many things are unclear to me. I would strongly recommend that you revise the text to make your points clear / understandable.

[ I assume that you may not have English as your mother tongue. If that is the case, I recommend you to use www.deepl.com as a translator, the translations are in many cases much better than those from e.g. google. But I recommend to review them to be on the safe side. ]

Please also describe the use case / background, so that people can better understand your demand / issue.
If you think you trapped a bug or issue, please describe exactly how this can be reproduced with the least amount of steps/efforts.

I had difficulties with the word "programmatic" alone. I think you just choosed the wrong word.

Furthermore, I suspect that you are simply not familiar with some basic principles of operation. But its just an impression, because all is not clear.

If you want a solution, then the problem or requirement must first be described in an understandable way and what the whole thing is good for.

Regarding gain settings (reference levels, input gain, output volume). As described in the manual, the reference levels can be set in the driver settings and in TotalMix FX (click on the tool symbol of a channel). Not everything in this device can be operated at the UC in stand-alone mode. But it has memory to remember last changes. See manual ch 21, standalone operation.

After all, settings are saved
a) on the PC: last operational state and in TM FX workspaces
b) on the device which has memory to store the last settings, useful for stand-alone operation

If you need a device which can be operated fully on the front / in stand-alone mode, then you need devices like UCX II, UFX II, UFX+. They are designed to have this capability. Also consider, the UC is a quite old unit from 2009. At that time you could already be happy that someting good like TotalMix FX was there. All other vendors didn't have something compareable. And this is still the case in 2022. TotalMix FX is still superior.

In this blog article I provide an Excel where you can compare the different recording interfaces for USB/Firewire/TB:
The blog article: https://www.tonstudio-forum.de/blog/Ent … B-MADIfac/
The direct link to the Excel: https://www.tonstudio-forum.de/attachme … 4-08-xlsx/

In the Excel you can see e.g. in line 81-83 what features the device has in regards to stand-alone operation.

BR Ramses - UFX III, 12Mic, XTC, ADI-2 Pro FS R BE, RayDAT, X10SRi-F, E5-1680v4, Win10Pro22H2, Cub13

Re: Programmatic Change to Operational Mode and Gain Settings

Hello bef5000,
if I understand you correctly, you want to change Operational Mode and Gain Settings in an automated test environment. Thus, this change needs to take place in code = programmatically.
Since it didn't work to change what you want in the settings file, I recommend trying GUI automation with e.g. Applescript. For Gain Settings, I checked with Accessibility Inspector, you can get and probably set the values of the gain sliders. For Operational Mode, getting the menu in TotalMix is easy.
Good Luck!

Re: Programmatic Change to Operational Mode and Gain Settings

Sorry bef5000, I noticed you are probably working on Windows, so my solution won't help you.

Re: Programmatic Change to Operational Mode and Gain Settings

soundflix wrote:

Hello bef5000,
if I understand you correctly, you want to change Operational Mode and Gain Settings in an automated test environment. Thus, this change needs to take place in code = programmatically.
Since it didn't work to change what you want in the settings file, I recommend trying GUI automation with e.g. Applescript. For Gain Settings, I checked with Accessibility Inspector, you can get and probably set the values of the gain sliders. For Operational Mode, getting the menu in TotalMix is easy.
Good Luck!

This is correct.

To add some detail, I'm developing production test software in MATLAB and it is important that I ensure that the Fireface UC is in the same state each time I open the application, whether or not somebody else has change settings in the background. I've figured out how to load a workspace via command line ('C:\Windows\System32 TotalMixFX.exe "myTemplate.tmws"'), and that works for either Full or DAW Mode, so changing that programmatically isn't completely necessary, however being able to define the Gain Settings is critical. I call them Gain Settings, because in the Fireface USB Settings window, there's a "Gain" tab with "Levels" for Line In, Line Out, and Phones, each with an option for -10dBV, +4dBu, and Lo Gain. I need to make sure every time that these are all set to +4dBu. I wasn't sure if there's something I can do from the command line, or if there's an .xml file that I can manipulate somewhere.

Re: Programmatic Change to Operational Mode and Gain Settings

Reference levels can also be configured in TotalMix FX and stored in snapshots, workspaces and workspace quick select slots.

Instead of saving the settings to disk as workspace file you can also make use of the workspace quick select slots.
30 slots are available which contain all settings and each can have again different recallable 8 snapshots.
Very easy in handling is to recall the Workspace quick select slots with the key combination ALT-1 .. ALT-0.

Also useful for you might be in the TM FX Preferences (F2) to recall the volume when changing to a different snapshot.
Or to stay with the current volume (-> snapshots: do not load "Main Volume").

BR Ramses - UFX III, 12Mic, XTC, ADI-2 Pro FS R BE, RayDAT, X10SRi-F, E5-1680v4, Win10Pro22H2, Cub13

Re: Programmatic Change to Operational Mode and Gain Settings

ramses wrote:

Reference levels can also be configured in TotalMix FX and stored in snapshots, workspaces and workspace quick select slots.

Instead of saving the settings to disk as workspace file you can also make use of the workspace quick select slots.
30 slots are available which contain all settings and each can have again different recallable 8 snapshots.
Very easy in handling is to recall the Workspace quick select slots with the key combination ALT-1 .. ALT-0.

Also useful for you might be in the TM FX Preferences (F2) to recall the volume when changing to a different snapshot.
Or to stay with the current volume (-> snapshots: do not load "Main Volume").


Can you point to where the reference levels are configured in TotalMixFX for a Fireface UC beyond input channels 3-4? Also, is there a way to load a Snapshot via command line, API, or some other programming language? Again, the test operator should not need to open TotalMixFX or the Fireface USB settings, I want it to happen in the background.

Re: Programmatic Change to Operational Mode and Gain Settings

bef5000 wrote:
ramses wrote:

Reference levels can also be configured in TotalMix FX and stored in snapshots, workspaces and workspace quick select slots.

Instead of saving the settings to disk as workspace file you can also make use of the workspace quick select slots.
30 slots are available which contain all settings and each can have again different recallable 8 snapshots.
Very easy in handling is to recall the Workspace quick select slots with the key combination ALT-1 .. ALT-0.

Also useful for you might be in the TM FX Preferences (F2) to recall the volume when changing to a different snapshot.
Or to stay with the current volume (-> snapshots: do not load "Main Volume").


1- Can you point to where the reference levels are configured in TotalMixFX for a Fireface UC beyond input channels 3-4?
2- Also, is there a way to load a Snapshot via command line, API, or some other programming language? Again, the test operator should not need to open TotalMixFX or the Fireface USB settings, I want it to happen in the background.

to 1) sorry, have no UC here, I can only tell you what I see with an UFX+.
   If it has been implemented this way, then you would find it behind the wrench symbol of that particular HW input.

to 2) Maybe via MIDI, see manual chapter 29.

BR Ramses - UFX III, 12Mic, XTC, ADI-2 Pro FS R BE, RayDAT, X10SRi-F, E5-1680v4, Win10Pro22H2, Cub13

Re: Programmatic Change to Operational Mode and Gain Settings

ramses wrote:
bef5000 wrote:
ramses wrote:

Reference levels can also be configured in TotalMix FX and stored in snapshots, workspaces and workspace quick select slots.

Instead of saving the settings to disk as workspace file you can also make use of the workspace quick select slots.
30 slots are available which contain all settings and each can have again different recallable 8 snapshots.
Very easy in handling is to recall the Workspace quick select slots with the key combination ALT-1 .. ALT-0.

Also useful for you might be in the TM FX Preferences (F2) to recall the volume when changing to a different snapshot.
Or to stay with the current volume (-> snapshots: do not load "Main Volume").


1- Can you point to where the reference levels are configured in TotalMixFX for a Fireface UC beyond input channels 3-4?
2- Also, is there a way to load a Snapshot via command line, API, or some other programming language? Again, the test operator should not need to open TotalMixFX or the Fireface USB settings, I want it to happen in the background.

to 1) sorry, have no UC here, I can only tell you what I see with an UFX+.
   If it has been implemented this way, then you would find it behind the wrench symbol of that particular HW input.

to 2) Maybe via MIDI, see manual chapter 29.


1. Understood. The UC has those reference gain levels for LI/LO and Phones in the driver settings (firefaceusb.exe)

2. I looked into commanding via MIDI a bit when I first started this exercise, but couldn't get it to work. Am I able to command via MIDI just over the USB connection to the computer, or do I have to have something plugged into the actual MIDI I/O port on the device?

I see the OUT1 light flashing consistently when I enable MIDI control and flip the MIDI In/Out Connection to UC MIDI Port 1 on the MIDI tab in the settings window. It flashes when I manipulate different values in TotalMix FX. However, I don't see any response when I try to read those MIDI messages, and I can't actually command the system to do anything.

Do you have any insight on "You should have this enabled too" or something to make it work?

Re: Programmatic Change to Operational Mode and Gain Settings

Sorry no, am not using MIDI for remote controlling TM FX.

BR Ramses - UFX III, 12Mic, XTC, ADI-2 Pro FS R BE, RayDAT, X10SRi-F, E5-1680v4, Win10Pro22H2, Cub13

Re: Programmatic Change to Operational Mode and Gain Settings

bef5000 wrote:

… and I can't actually command the system to do anything.

Do you have any insight on "You should have this enabled too" or something to make it work?

A lot can go wrong to start.
You don‘t need a physical midi connection, it can be virtual.
Also, you need to enable Midi control in TMFX and configure port and channels. On Mac this is menu Option > Settings tab MIDI.