1 (edited by thomas.dubreuil 2024-02-23 03:55:43)

Topic: ADI-2 Pro Volume Control with a Wheel

Follow-up to my post in "ADI-2 remote application" thread.
This is an open thread to share ideas, how to implement simple volume control with a wheel.
My solution(s) is perfectible.

Since few years now, I am using a wheel to control the volume of my ADI-2 Pro (FsR BE)
This is very useful in studio work, near the mouse.

I have a Microsoft Surface Dial (bluetooth).
and a "generic" USB wheel (Google like: "USB Volume knob")
I got the black/metal one with blue light (image here: cubeupload.com/im/qrP722m4/3OwTrr.png)
Both are working wonderfully.

It was a scratch in the head how to do that, and over the years I found various ways.
I share them here hoping someone with more skills can find the perfect solution

1) ADI-2 Pro FSr Volume control through Broadlink RM-4 Pro using Home Assistant.

Since ADI-2 Pro FsR already has a remote, I tought it would be cool if I could "pilote" this remote, or another universal remote.
I found it was possible with Broadlink RM4 Pro universal remote, and a bit of work...
Broadlink RM4 Pro is natively integrated in Home Assistant : an open-source software for home automation and more, running on Debian (Linux OS).
So, you need to have Home Assistant installed, either on a VM or a dedicated device.
When integrated your RM4 Pro in Home Assistant, you can easily learn your ADI-2 Pro remote commands.
Using developper tools and calling "Learn command" service with your RM4 as target.
https://u.cubeupload.com/qrP722m4/l1bmGB.png
This will put the RM4 in "learn mode" .
Then you simply press the button you want to learn on your remote and it will write the IR data to a file in .storage folder
/homeassistant/.storage/broadlink_remote_YOUR-RM4-MAC-Address_codes
example of data:

"Rme Adi2 Pro": { "Power Toggle": "JgBYAAABJpYRFBE5EhQRFBE6ERQRFBIUERQRFBI5ERQROhE5ERQSFBITERQSFBEUERQSOREUEjkRORE6ETkRORI5ERQSOREUEQAFigABKEsSAAxXAAEnSxEADQU=" }

Then you can run the commands from Home assistant, using the data or creating a script in scripts.yaml file like this:

volume_up:
  alias: adi_2_volume_up
  sequence:
  - service: remote.send_command
    data:
      device: Rme Adi2 Pro
      command: Power Toggle
#This is the command you created/named while learning it (you can also rename it editing the file in .storage folder)
    target:
      device_id: your_device_id
#This is your RM4 device ID

Then with HASS.Agent : a Windows Service to control Home Assistant from your PC.
I just set up "fast actions" to run the script from a simple keyboard shortcut.
https://u.cubeupload.com/qrP722m4/Q334z4.png

Finally I customize wheel settings with my shortcuts.
The ways are different for Surface dial or Usb wheel, but it's not difficult at all.

Conclusion:
Until now this is the best way for me because I haven't found another way to implement the "volume push"  (= changing selected volume output" ) .
With a wheel click I can toggle between Speakers volume or Headphone volume and  I set volume +or- turning knob left or right.

Problems with this solutions:
- You need universal remote (Broadlink RM4)
- You need Home Assistant, so either a local VM or dedicated device (mini PC running VM, or raspberry Pi)
- You need to install a service on your computer to send commands from your computer (Hass Agent) to Home Assistant.

2) ADI-2 volume control, sending midi sysex commands
Since ADI-2 Remote application release, I saw ADI-2 Pro can be controlled with midi sending sysex.

In the topic mentioned above (adi-2 remote), they provide a .ods (excel) file with a map for every midi controlable function (first post : rme-audio.de/downloads/adi2remote_midi_protocol.zip ). Very cool !!!
The problem is, the mathematics behind functions, bytes, hex, sysex is not totally understandable for me...
A bit of explanation is provided here...
https://www.audiosciencereview.com/foru … st-1733035
But I could'nt get past the device id...too difficult to calculate.

So, I found the easiest solution would be, again, to learn the command (instead of hits and misses for monthes...)

I found those two small command line applications (github.com/gbevin/ReceiveMIDI)
and the other one called sendmidi, as its name says...(github.com/gbevin/SendMIDI)

The cool thing is, this tool is multi-platform, so you might be able to make it work with different devices/os

First you will list your available midi ports :

receivemidi list

Second you will write the commands to the console

receivemidi dev "ADI-2 Pro Midi Port 1" syx

(the device name is the one you got from receivemidi list commands)
Here, you can either use the adi-2 pro, or the remote buttons and it will write the sysex commands on the console.
You just have to copy the code provided and find a way to send the commands, here is an example for me:

This commands set Output 1-2 to -41.5 db:

sendmidi dev "ADI-2 Pro Midi Port 1" system-exclusive hex 00 20 0D 72 02 1B 1C61

From my understanding, everyone should have 00 20 0D (manufacture), 72 is device ID (ADI-2 Pro) 02 is "sending command", for the rest I don't get it totally I'd need a formula.
Note that those values are PARTICULAR for my device, you need to learn the one from yours if you don't have ADI-2 Pro Fs.
The Device ID is provided in .ods map in adi-2 pro remote topic : rme-audio.de/downloads/adi2remote_midi_protocol.zip

I wrapped all this into 2 batch scripts to be able to set volume level +0.5 and -0.5
You create a .bat or .cmd file and put sendmidi.exe next to it.

Output 1-2 : increment volume by +0.5db

@echo off
set "sendmidi=%~dp0\sendmidi.exe"
set "volume_sensor_folder=%~dp0\VolumeLevel_ADI"
set "default_volume=1C61"
if not exist "%volume_sensor_folder%" ( mkdir "%volume_sensor_folder%" >nul 2>&1 )
cd /d "%volume_sensor_folder%"
for %%a in ("%volume_sensor_folder%\*") do ( set "current_volume=%%~na")
if "%current_volume%"=="" (set "current_volume=%default_volume%")
set /a "decimal_volume=0x%current_volume%"
set /a "new_volume=%decimal_volume%+5"
cmd /C exit %new_volume%
set "new_hex_volume=%=ExitCode:~-4%"
set "val1=%new_hex_volume:~0,2%"
set "val2=%new_hex_volume:~-2%"
cd /d "%volume_sensor_folder%"
del /f /s /q "%volume_sensor_folder%\*" >nul 2>&1
echo >"%volume_sensor_folder%\%new_hex_volume%"
"%sendmidi%" dev "ADI-2 Pro Midi Port 1" system-exclusive hex 00 20 0D 72 02 1B %val1% %val2%
goto :eof

Output 1-2 : Lower volume by -0.5db

@echo off
set "sendmidi=%~dp0\sendmidi.exe"
set "volume_sensor_folder=%~dp0\VolumeLevel_ADI"
set "default_volume=1C61"
if not exist "%volume_sensor_folder%" ( mkdir "%volume_sensor_folder%" >nul 2>&1 )
cd /d "%volume_sensor_folder%"
for %%a in ("%volume_sensor_folder%\*") do ( set "current_volume=%%~na")
if "%current_volume%"=="" (set "current_volume=%default_volume%")
set /a "decimal_volume=0x%current_volume%"
set /a "new_volume=%decimal_volume%-5"
cmd /C exit %new_volume%
set "new_hex_volume=%=ExitCode:~-4%"
set "val1=%new_hex_volume:~0,2%"
set "val2=%new_hex_volume:~-2%"
cd /d "%volume_sensor_folder%"
del /f /s /q "%volume_sensor_folder%\*" >nul 2>&1
echo >"%volume_sensor_folder%\%new_hex_volume%"
"%sendmidi%" dev "ADI-2 Pro Midi Port 1" system-exclusive hex 00 20 0D 72 02 1B %val1% %val2%
goto :eof

If you want smaller increment, for example 0.1, you just need to change the line

set /a "new_volume=%decimal_volume%+5

to

set /a "new_volume=%decimal_volume%+1

Conclusion:
The biggest problem with this method is we can't have the "volume push" to toggle between Output 1-2 or 3-4 for volume control.
It seems it hasn't been implemented in the remote and midi Sysex, as in the IR controls (in the real remote)
So I can either control Output 1-2 or Output/Phone 3-4.
For those understanding a bit of coding or coding logic, second caveheat is the scripting part.
Only working solution I found is:
Create a folder and set a default volume, to write "current volume" to a file.
That way the script can increment/lower from current volume. You only can set a value with that method, so to set a new value related to current value (+0.5db more), you need to write the current value to a file...
Also I have to toggle between decimal and hex value back and forth, not "optimal"

3) Broadlink Rm4 without Home Assistant with Python
As a reply of my initial post, user @bluetail posted that he developped a cool UI to control Broadlink RM4,
made on python and based on "python broadlink module" (github.com/mjg59/python-broadlink/tree/master)

Basically after installing Python and module you can send commands directly from your computer to Broadlink RM4 universal remote. 
Then just download those two files, broadlink_cli and broadlink discovery

Open CMD line and navigate to it:

cd /d "path_of_folder_containing_broadlink_discovery"

After that you need to discover your device, to get its ID and mac address

python broadlink_discovery --timeout 10 --dst-ip 192.168.1.61

(Replace with your own Broadlink RM4 IP)
It will echo something like this:
Manufacturer : Broadlink DeviceModel : RM4 pro DevType : 0x649b Host :  192.168.1.61 Mac : abcabcabc

Then you will need to learn commands (and saving to text for convenience)

python broadlink_cli --type 0x649b --host 192.168.1.61 --mac abcabcabc --learnfile volumepush.txt

Push the volume button (or the one you want to learn) on your remote
It will echo:
Saving to volumepush.txt

Do the same for volume+ and volume- or any command you'd like to record...

Finally, you can send commands using also broadlink_cli

python broadlink_cli --type 0x649b --host 192.168.1.61 --mac MAC -send DATA

Where MAC is the mac address of your RM4
Where DATA is the data you wrote to (and copy from) .txt file

Then, you can do a simple shortcut script like this (putting broadlink_cli next to the script)

@echo off
cd /d "%~dp0"
python broadlink_cli --type 0x649b --host 192.168.1.61 --mac MAC --send DATA
goto :eof

4) I'm sure someone with few skills can provide an easy (and multi platform) tool.
For RME devs, this might perhaps be simple, as setting basic shortcuts for vol+ vol- 
(I'm using alt+numeric value, but could be any shortcut which are not used in my daw),
or even different ways!!

For example, I use Elephant to control cutoff filter on some synths with my Surface Dial
(savethehuman5.com/elephant)
Let's make Surface Dial an universal audio volume controller for ADI-2 Pro!!!

If any day RME decided to make a dedicated (wireless) audio knob for ADI-2, I would buy right away.

2 (edited by HMANAZ 2024-02-24 19:36:49)

Re: ADI-2 Pro Volume Control with a Wheel

For this purpose, @drcwo has developed rooADI a remote extension for Roon that can control three very different controls. Including the Surface Dial, Nuimo, and Space Mouse. Check it out here —> https://community.roonlabs.com/t/rooadi … acs/258291

The system can control the remote independent of Roon.  If you are a Roon user, this is a no-brainer.  If you don’t have Roon, it’s worth a try.  Note: you will need a rooExtend SBC or a RPI.

Re: ADI-2 Pro Volume Control with a Wheel

Regarding setting volume through Home Assistant:
If one already uses Home Assistant maybe your also already familiar with the ESPHome integration? When that is the case, an alternative to Broadlink RM4 could be a cheap ESP device, for example a D1 Mini with an IR controller shield. Of course not exactly plug and play, but I wouldn't call Home Assistant plug and play. Something for the enthousiast! :-)

I use ESPHome myself to send IR commands to the RME ADI-2 DAC.

4 (edited by lyricalaloof 2024-03-06 04:36:10)

Re: ADI-2 Pro Volume Control with a Wheel

HMANAZ wrote:

For this purpose, @drcwo has developed rooADI a remote extension for Roon that can control three very different controls. Including the Surface Dial, Nuimo, and Space Mouse. Check it out here —> https://community.roonlabs.com/t/rooadi … acs/258291connections game

The system can control the remote independent of Roon.  If you are a Roon user, this is a no-brainer.  If you don’t have Roon, it’s worth a try.  Note: you will need a rooExtend SBC or a RPI.

ok I will try it

Re: ADI-2 Pro Volume Control with a Wheel

I could not find any way to send the Toggle remote via MIDI as well, did anybody find it?

On my ADI-2 Pro, as a dirty workaround, we can set the Toggle Ph / Line parameter which actually toggles the line/ph as a byproduct:
-set to 0 (off) to output only to the headphones (but it disables the Toggle button altogether on the device)
-set to 4 (all plugged) activates the line out (back to normal behaviour for the Toggle button)

In SysEx terms, that is the following commands:
F0 00 20 0D 72 02 61 20 00 F7 (deactivate Toggle, which enables headphones only)
F0 00 20 0D 72 02 61 20 04 F7 (reactivate Toggle, which enables the Line Out only)

Re: ADI-2 Pro Volume Control with a Wheel

Ah, found it!!
https://forum.rme-audio.de/viewtopic.ph … 72#p212972

"Page 3 (Device, address 12): Index 63, value 1 will do."

SysEx:
F0 00 20 0D 72 02 68 70 01 F7

Happy me...

7 (edited by Jolle 2024-03-22 15:53:19)

Re: ADI-2 Pro Volume Control with a Wheel

I registered on the forum to day to do exactly what you're trying with the midi sysex commands, controlling settings on the ADI that are already supported by the app, with a custom remote with a wheel through my Raspberry PI that is set up as a streamer using the USB interface.

I'll try out your scripts and add any new information I come up with!

8 (edited by Jolle 2024-03-27 07:10:57)

Re: ADI-2 Pro Volume Control with a Wheel

Just finished implementing a script for changing RME ADI volume up/down/mute with my BT remote and scroll wheel and Midi commands.

It's here for anyone who is interested:
https://github.com/JolleNo10/RmeAdiVolumeController/

Script can be used like this:

  • volcontrol.sh mute : Mutes the RME ADI unit. Concurrent triggers will toggle mute on and off.

  • volcontrol.sh down : Decreases volume by 0.2dB (configurable value).

  • volcontrol.sh up : Increases volume by 0.2dB (configurable value).

(more info on github)

I'm running it on my Raspberry Pi streamer with Volumio.
My controller is a Bluethooth Mini keyboard with a scroll wheel connected to the RP.

I'm calling the script with TriggerHappy, so playback control for next/prev/play/pause is sent to Volumio, while Volume up/down/mute is sent with Midi commands to the RME ADI. Each "click" of the scrollwheel triggers a call to the script.
Should be no issues calling the script in the same way with HomeAssistant.

Works without any issues for me until now. Might post a video of it later.

If anyone knows how to get the current volume from the returned status, please let me know, I couldn't really figure that out.

9 (edited by Bruno Z 2024-04-05 06:48:38)

Re: ADI-2 Pro Volume Control with a Wheel

I finally got around writing a Win app to control the volume and toggle speakers / headphones from global keyboard shortcuts, everything works just as expected.
As I understand it:
- to get the volumes, you need to first query the full ADI config (command 03 09) and read within that the various output volumes, iterate by blocks of 3 bytes until you find the following (the config dump is broken over multiple SysEx messages):
     * for Line Out, 1B XX YY with X <= 31 (top 3 bits 0), the volume in dB is (X*128+Y-4096)/10
     * for PH 3/4, 4B XX YY with X <= 31 (top 3 bits 0), the volume in dB is (X*128+Y-4096)/10
- to get which output is active, you wait for a Status message, bit 4 of the first byte means Line Out active, bit 6 means PH 3/4 active
- to set the volume, once you know which output is active, you send a 02 command with respectively 1B XX YY or 4B XX YY as constructed above

When toggling the output, the ADI actually sends a Volume info message (1B / 4B) after the switch, so if you are still listening for the Midi IN you get an updated volume as well.

Re: ADI-2 Pro Volume Control with a Wheel

It's done. My version of the wireless (infrared) volume control (WeMos D1 mini, rotary encoder, IR power module) with rotary knob for RME ADI-2 is ready. Volume up/down (RME ADI-2) and additional press (short/long) for pause/play and next track for my Node 2i streamer.
The volume is changed by +1/-1 dBr per step. I needed more IR power for the Node 2i streamer, because the IR receiver is very insensitive. Don't be alarmed, the case is just a prototype.

https://i.ibb.co/7G0PMHj/volume.png

11 (edited by thomas.dubreuil 2026-09-24 02:17:21)

Re: ADI-2 Pro Volume Control with a Wheel

Following up on this thread: back then I was experimenting with batch scripts, broadlink, and/or sendmidi.
Since then it grew into a full AutoHotkey script, and I've now turned that into a small, standalone "Windows" app (python wrapper).

Sharing it in case it's useful to others driving their ADI-2's volume from a wheel, a Surface Dial, an IR remote, a streamdeck, or just a keyboard shortcut.

ADI Series Volume Controller — volume control from any wheel/remote, via MIDI SysEx

What it does:
Controls the output volume(s) of an ADI-2 DAC / ADI-2 Pro / ADI-2/4 Pro SE over MIDI SysEx, triggered by hotkeys — works with any input device that can send a keystroke: USB volume wheels, the Microsoft Surface Dial, IR remotes through a receiver, or a plain keyboard combo. Deliberately minimal — not trying to be a full remote-control suite with Windows volume hook or network streaming features, just ADI-2 volume.

Features:
-Fast-spin detection: quick ticks use a bigger dB step than slow, deliberate turns.
-A "danger threshold": any move at/above a level you set resets to your default instead of applying, so an accidental wrong-way spin can't push the volume higher.
-Split mode: two independent controllers, one per output (Out 1/2 and Out 3/4), click = mute, long click = swap which controller is linked to which output.
-A guided "Set Hotkeys" wizard, with duplicate-key detection across both controllers.
-Background resync so changes made from the front panel or RME's own ADI-2 Remote app don't leave the app's state out of date.
-Optional Broadlink IR support: syncs the front-panel LCD's "volume select" indicator after switching outputs (codes calculated from RME's own IR documentation).
-Validated config.ini : Settings live in one plain-text file with inline explanations. A typo or an invalid value is reported with its exact line and reason instead of causing a crash or being silently ignored, and a badly broken file can be restored from a .bak copy automatically.
- Multiple setups. Named config files can be saved and loaded from the tray menu, for use across more than one room or system.
- Console hidden by default. Runs in the tray with no visible window. Setting show_console to true in config.ini displays a log window for troubleshooting.
-No admin rights needed.

Two ways to get it:
-Compiled release (.exe, no Python needed — Broadlink support is already included).
-Full source on GitHub, for reading/modifying the code or building it yourself.
The repo also includes the original AutoHotkey version as a lightweight alternative.

Requirements:
-Windows
-sendmidi / receivemidi (same author, two releases) — placed next to the app either way
-An ADI-2 DAC / Pro / Pro SE visible as a MIDI port
-Optional: a Broadlink IR hub for the LCD realignment (just the hardware — no extra software needed with the compiled release)

Protocol / credits:
Built on RME's own published MIDI protocol document (adi2remote_midi_protocol.ods, © Ralf Männel for RME GmbH). It's not an official public API — as MC noted elsewhere on this forum, mapping MIDI to it is "a task for someone else" — so this is best-effort, community-level support, not an official integration.

Repo: https://github.com/Thdub/adi-series-volume-controller
Direct download : https://github.com/Thdub/adi-series-vol … r/releases

Testing status:
Built and used on an ADI-2 Pro FS. The DAC / Pro SE device IDs come directly from RME's documentation but haven't been checked against real hardware. The Broadlink IR codes are calculated from RME's own IR documentation and confirmed working on this Pro FS + Broadlink hub; the DAC / Pro SE variants haven't been cross-checked.
If you try either (especially the Broadlink part, since a second working confirmation would validate the IR-code generator itself, not just this app), I'd genuinely love to hear how it goes.

Repo: https://github.com/Thdub/generate_rme_broadlink_ir
(mathematically calculate any code available in RME documentation instead of capturing remote)

Tools included:
-Original ahk implementation this app is based on, kept as a lightweight alternative.
Same feature set (hotkey-driven volume control via MIDI SysEx, split mode, optional Broadlink IR support), but hotkeys are edited directly in the script instead of captured through a wizard, and there is no tray icon or GUI.
Requires AutoHotkey v2 to run.
   
-RME_Sniff_SysEx.ps1 : listens to the device's MIDI port and decodes every SysEx parameter it sends live (channel vs. device "containers", address/index/value), based on RME's own MIDI protocol document (adi2remote_midi_protocol.ods, RME GmbH / Ralf Männel). This is how the channel/parameter mapping used by rme_app.py (output address, volume and mute indices) was derived and cross-checked.

-generate_broadlink_ir.py : turns an RME NEC IR command byte into the raw Broadlink hex payload, from RME's published IR command documentation.

New Devices:
No support yet for the new ADI-2 Pro EX — RME hasn't published .ods or device ID for it as far as I can tell.
Which brings up a mystery question, for Matthias if he's reading: will the ADI-2 Pro EX and the upcoming ADI-2/4 EX get 0x74 and 0x75, following the DAC/Pro/Pro SE sequence (0x71/0x72/0x73)?

12

Re: ADI-2 Pro Volume Control with a Wheel

The Device IDs are unchanged:

0x71    ADI-2 DAC, ADI-2 DAC EX
0x72    ADI-2 Pro series, ADI-2 Pro EX
0x73    ADI-2/4 Pro SE, ADI-2/4 Pro EX

The Pro is identical in functionality. The 2/4 Pro EX has digital input gain and RIAA-off option, plus input impedance choice. To know if SE or EX is connected the 'device revision' is used (status message byte 6). Updated MIDI tables will be published as soon as the 2/4 Pro EX is available.

Regards
Matthias Carstens
RME

13 (edited by thomas.dubreuil 2026-09-24 17:12:23)

Re: ADI-2 Pro Volume Control with a Wheel

Thanks for confirming the device IDs, that simplifies things.

One small thing, in case it's useful to you and the community: while building the IR side of the tool (calculating Broadlink codes from RME's published IR tables), as I reported here https://github.com/Thdub/generate_rme_b … rme-tables , I came across three rows where the hex and binary columns don't match:

ADI-2 DAC, Setup 7: hex 30, binary 3C (30 is already used for B-, so 3C looks like the intended value)
ADI-2 DAC, Setup 8: hex 3C, binary 3D (3D would follow the sequence)
ADI-2/4, Volume -: hex 61, binary A1 (61 matches the 0x6_ prefix the other ADI-2/4 commands use, so the binary column looks off here)

Not sure which column is authoritative in each case, so flagging in case it's worth a second look on your end...

14

Re: ADI-2 Pro Volume Control with a Wheel

Thanks for that feedback. The DAC Setups 7/8 (3C / 3D) and the  2/4 Pro Volume - (01100001) were corrected in the tables and uploaded. I also added a note on the former typos.

Regards
Matthias Carstens
RME