• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

RME ADI-2 REMOTE APP RACE - for the best alternative software - was started today

weme

Member
Joined
Mar 2, 2021
Messages
72
Likes
64
Location
Germany
The race for the best alternative RME ADI-2 REMOTE APP - which is also still usable under Windows 7 or Linux - was opened today (2023-10-02) by @MC_RME:

->
For developers the MIDI protocol is available here:

MIDI port could access failed:
 
Last edited:

DrCWO

Active Member
Audio Company
Forum Donor
Joined
Nov 14, 2020
Messages
269
Likes
371
Hi guys,
I updated my ADI-2 Pro firmware so I can successful use the the ADI-2 Remote software on windows.

Now I like to change the volume setting of ADI-2 Pro by a Linux-Script.
In Linux there is a command called amidi the can handle Midi via USB.

Connecting my ADI-2 Pro to linux and writing amidi -l I see two ports
Dir Device Name IO hw:1,0,0 ADI-2 Pro (55790015) Port 1 IO hw:1,0,1 ADI-2 Pro (55790015) MIDI 2

Now I have two questions:
- Which of the two ports have to be used to send the "Change Volume" command?
- What have I to send via this post with amidi -p hw:1,0,x -S "xx xx xx xx xx ... xx" to set the volume?

Any ideas?
Best DrCWO

Edit:
I read the protocol spec but this did not answer my questions :(
 

danadam

Addicted to Fun and Learning
Joined
Jan 20, 2017
Messages
996
Likes
1,546
Which of the two ports have to be used to send the "Change Volume" command?
For me it's port 0. But to me they identify as "MIDI 1" and "MIDI 2".

What have I to send via this post with amidi -p hw:1,0,x -S "xx xx xx xx xx ... xx" to set the volume?
There's an example in the specs's spreadsheet, in the "Examples" tab. The only thing you have to change is the device id, because the example is for ADI-2/4 (id=73) and you (and I) have ADI-2 Pro (id=72). So this:
Code:
amidi -p hw:1,0,0 -S 'F0 00 20 0D 72 02 4B 1F 1C F7'
sets headphones volume to -10 dB, in my case.

The meaning, AFAICT:
Code:
F0, F7 - seems like delimiters in MIDI protocol

00 20 0D - SysEx header
72 -  device id: ADI-2 Pro
02 - command id: Send Parameter(s)

4B 1F 1C - parameters-transfer

bit number: 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
               4       B       1       F       1       C
            +-----+ +-----+ +-----+ +-----+ +-----+ +-----+
value:      0 1 0 0 1 0 1 1 0 0 0 1 1 1 1 1 0 0 0 1 1 1 0 0
              +-----+ +----   --+ +--------   ------------+
                 A      B      B     C             C

A - address:           1001 =    9, means: Phones 34 Channel Settings
B -   index:         0 1100 =   12, means: Volume
C -   value: 1111 1001 1100 = -100, means: -10.0 dB
 
Last edited:

DrCWO

Active Member
Audio Company
Forum Donor
Joined
Nov 14, 2020
Messages
269
Likes
371
Code:
bit number: 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
               4       B       1       F       1       C
            +-----+ +-----+ +-----+ +-----+ +-----+ +-----+
value:      0 1 0 0 1 0 1 1 0 0 0 1 1 1 1 1 0 0 0 1 1 1 0 0
              +-----+ +----   --+ +--------   ------------+
                 A      B      B     C             C

A - address:           1001 =    9, means: Phones 34 Channel Settings
B -   index:         0 1100 =   12, means: Volume
C -   value: 1111 1001 1100 = -100, means: -10.0 dB
Thank you, this is really helpful for me :):):) The other things I already figured out during the last hour :facepalm:
Here it's getting evening now and I decided to do the bit tinkering tomorrow but your input saves me a lot of time. Thank you!!!
 

danadam

Addicted to Fun and Learning
Joined
Jan 20, 2017
Messages
996
Likes
1,546
Here's a bash script (remove .txt extension) to set a user provided volume on Phones 3/4 output:
Code:
]$ adimidi.sh -h
Usage: adimidi.sh VOLUME [-h]
    VOLUME          - an integer from -114 to 6
    -h | --help     - this help message

]$ adimidi.sh -20
+ amidi -p hw:1,0,0 -S 'F0 00 20 0D 72 02 4b 1e 38 F7'

It uses the first "ADI" entry from "amidi -l" output as the MIDI port.

You have to change "device_id" variable if you have something other than ADI-2 Pro:
Code:
# 0x71 - ADI-2 DAC
# 0x72 - ADI-2 Pro
# 0x73 - ADI-2/4 Pro SE
device_id=0x72
That could be automated by parsing "amidi -l" output but it is left as an exercise for the reader ;-)

You can play with "command_id", "address", "index" and "value" variables to try to modify things other than volume on Phones 3/4 output.
 

Attachments

  • adimidi.sh.txt
    1.8 KB · Views: 59
Last edited:

PianoReeves

New Member
Joined
Oct 30, 2023
Messages
2
Likes
0
Apologies for digging out this thread, but I was wondering if there is a was a way to pass an incremental volume, instead of an absolute value?
For example, I would want to increase the current volume by -3db, if I pass the command above it results in an absolute -3db volume setting. Any ideas?
 

danadam

Addicted to Fun and Learning
Joined
Jan 20, 2017
Messages
996
Likes
1,546
Apologies for digging out this thread, but I was wondering if there is a was a way to pass an incremental volume, instead of an absolute value?
When you use '-r FILENAME' or '-d' command line options to amidi, then it will store the response from the device in the file or will print it to the output. In the document describing the protocol it says, that the response contains (among others):
Code:
  Byte
 7..10 IOStatus1 (4x7=28 bit-word), detailed description follows
11..14 IOStatus1 (4x7=28 bit-word), detailed description follows
Maybe it contains the current volume, but I'm not sure where exactly that description is.

There is also a command in the examples to request full settings from the device. The current volume should be somewhere there.

With the current volume known it should be possible to do relative change, but IMO parsing those responses to extract the current volume may be a bit too involved for a bash script :)
 

PianoReeves

New Member
Joined
Oct 30, 2023
Messages
2
Likes
0
Thanks for your reply!
I was hoping for a single-command solution, as I intend to use a StreamDeck+ to control the volume via dial. OOTB, it can only send simple SysEx commands, so more complex scripting and workarounds are required to a) fetch the current volume and b) calculate the increment. It also appears that reverse-engineering of the IOStatus messages is necessary to get the information for a).
Hopefully, there is another FW update or parameter to allow this!
 

DrCWO

Active Member
Audio Company
Forum Donor
Joined
Nov 14, 2020
Messages
269
Likes
371
I like to give you a short update regarding my work on a Roon Extension (will call it rooADI) for the ADI-2 device family.
This is what I now can control with rooADI directly from the Roon GUI:
  • Volume
  • Mute
  • Input Selection
Currently I finished it for the ADI-2 Pro and ADI-2/4 Pro devices. Mid of next week I get an ADI-2 DAC and will implement this also for the ADI-2 DAC.
Here some Screenshots from of the current state:

In Roon Settings/Extensions you will see the discovered Device Type, the an CC Mode and the Basic Mode after the device got discovered. if you change the Basic mode manually at the device this will be reflected in this status line.
1698688394860.png


Opening the settings of rooADI you will have a dropdown to specify how the volume slider of Roon will affect the ADI-2(/4) Pro volume settings. The Volume in Ronn and in the device will be kept in sync no matter if you change volume in Roon or rotate the device knob to change volume.
1698688472493.png


A second dropdown will allow you to select the input channel according to possibilities available in the current Basic- and CC Mode settings.
1698688550763.png


In A/D-D/A Mode you will get two input select dropdowns.
1698689287731.png


Mute is transparent so if you turn it on in Roon the ADI-2 device will also be muted.

To use rooADI you have to select it in the device settings of your ADI-2 device as a volume control.
1698688717333.png


The advantage of Device Volume control for ADI-2 is, that you can use the ADI-2(/4) "Auto Ref Level". In this case you loose less DAC bits till volume gets below -24dB. The other advantage is that you get a blue (lossless) dot in the Roon GUI instead of the green one you see using DSP volume.

Best DrCWO
 
OP
W

weme

Member
Joined
Mar 2, 2021
Messages
72
Likes
64
Location
Germany
Maybe it contains the current volume, but I'm not sure where exactly that description is.
The volume can be read out:

RME-ADI-2-Serie-VOL-COMP_-10-to-13dB.png

937 bytes read
amidi -p hw:1,0,0 -S "F0 00 20 0D 71 03 09 F7" -r ADI-2-AK4493-10dB -t 1

937 bytes read
amidi -p hw:1,0,0 -S "F0 00 20 0D 71 03 09 F7" -r ADI-2-AK4493-13dB -t 1

If necessary, create a file several times to get the same file size.
 
OP
W

weme

Member
Joined
Mar 2, 2021
Messages
72
Likes
64
Location
Germany
MIDI commands for ADI-2 DAC / PRO can be generated very easily (Examples for OS Linux)

Since the MIDI interface informs you immediately about manual changes to the unit, you can also have the desired commands generated. And it works like this:

1. Device ADI-2-DAC/-PRO is connected via USB
Control (ADI-2 DAC in my case):
amidi -l
Dir Device Name
IO hw:1,0,0 ADI-2 DAC (nnnnnnnn) MIDI 1
(nnnnnnnn) = Serial number

2. Display incoming messages of the MIDI interface *1)
amidi -p hw:1,0,0 -d

3. Make a manual change on the unit ADI-2-DAC/-PRO
The last output of a sequence of bytes on the monitor is the command sequence you are looking for:
e.g. changing the volume for the Line Output.
F0 00 20 0D 71 01 1B 1A 71 F7^C (Cancel with Ctrl c) (-65.5)
71:=: ADI-2 DAC

To test a command, the 01 in the 6th byte is replaced by 02 and sent to the ADI-2, e.g.:
amidi -p hw:1,0,0 -S "F0 00 20 0D 71 02 1B 1A 71 F7"
-> Line Output (-65.5)

Information:
No MIDI feedback on changed values for LCD Brightness - but of course I haven't tried out all the settings.

Now continue to enjoy the wonderful ADI-2-DAC/-PRO units - perhaps also with a Special pastas from Felice.



*1)
With my ADI-2 DAC (Firmware: USB=81, DSP=59) I got different outputs:

(A) Output only after changes to the unit ADI-2 DAC:
F0 00 20 0D 71 01 1B 1A 71 F7
F0 00 20 0D 71 01 1B 1A 6C F7
...

(B) Or sometime later a continuous, longer byte sequence with e.g. these values:
F0 00 20 0D 71 07 04 30 7E 04 08 00 00 01 00 00 01 00 F7
F0 00 20 0D 71 07 04 30 7E 04 08 00 00 01 00 00 01 00 F7^C (Cancel with Ctrl c)
or
F0 00 20 0D 71 01 18 20 01 30 20 01 48 20 01 61 70 02 F7
F0 00 20 0D 71 01 18 20 00 30 20 00 48 20 00 61 70 01 F7^C (Cancel with Ctrl c)

When I exit the termial programme, unplug the USB and then plug the USB and start the termial programme again, I keep (so far) the short, helpful output (A).
 

DEF

Member
Joined
Oct 27, 2021
Messages
56
Likes
18
It works poorly. A Broadlink RM4 Pro works far better.
You can of course also use a SwitchBot.
Heres what I use since some years:

Plus, there are already the remote codes for the ADI-2.

Especially input switching does only seem to work with the remote (my broadlink UI application does that far better!)

Volumes seem to work.

# 24.5db amidi -p hw:2,0,0 -S "F0 00 20 0D 71 02 1B 1E 0B F7"
# -65.5db amidi -p hw:2,0,0 -S "F0 00 20 0D 71 02 1B 1A 71 F7"
# +6dB amidi -p hw:2,0,0 -S "F0 00 20 0D 71 01 1B 17 07 F7"
 
Last edited:

JolleNo

New Member
Joined
Mar 26, 2024
Messages
2
Likes
3
Just finished implementing my own script for changing RME ADI volume up/down/mute with my BT remote and scroll wheel and Midi commands. Huge thanks go danadam for his amidi script! Saved me alot of time.

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 to my script and 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.
 
Last edited:

danadam

Addicted to Fun and Learning
Joined
Jan 20, 2017
Messages
996
Likes
1,546
but IMO parsing those responses to extract the current volume may be a bit too involved for a bash script :)
Well, I did it anyway :facepalm:

The bash script "rmeadi.showsettings.sh" is on github: https://github.com/danadam/rme_adi_midi

To be upfront, it's not too fast, as per readme:
It may not be too optimal for interactive use because it is quite slow. It takes about 1.5 to 2 seconds. Using --filter option helps only a bit, e.g., parsing and printing only Volume still takes about 1 second.

An example to only get Volume from all outputs:
Code:
]$ rmeadi.showsettings.sh --filter=3:12,6:12,9:12

1769 bytes read
WARNING: SysEx stream desynchronized, got 0xf0 in state: read_sysx_header. Re-synchronizing.
Line Out Settings: Volume: -39.5
Phones 12 Settings: Volume: -96.5
Phones 34 Settings: Volume: -18.0
Setup: 1:        Setup 1
Setup: 2:        Setup 2
Setup: 3:        Setup 3
Setup: 4:        Setup 4
Setup: 5:        Setup 5
Setup: 6:        Setup 6
Setup: 7:        Setup 7
Setup: 8:        Setup 8
Setup: 9:        Setup 9
DONE
If you're not interested in Setups' names, you can modify line 477 to ignore those messages:
Code:
  05) # Send EQ-Preset name or Device-Setup name to remote
-     state=read_name_index
+     state=ignore_sysx_message
  ;;
Or you can always use "grep" :)
 

JolleNo

New Member
Joined
Mar 26, 2024
Messages
2
Likes
3
Well, I did it anyway :facepalm:

The bash script "rmeadi.showsettings.sh" is on github: https://github.com/danadam/rme_adi_midi

To be upfront, it's not too fast, as per readme:


An example to only get Volume from all outputs:
Code:
]$ rmeadi.showsettings.sh --filter=3:12,6:12,9:12

1769 bytes read
WARNING: SysEx stream desynchronized, got 0xf0 in state: read_sysx_header. Re-synchronizing.
Line Out Settings: Volume: -39.5
Phones 12 Settings: Volume: -96.5
Phones 34 Settings: Volume: -18.0
Setup: 1:        Setup 1
Setup: 2:        Setup 2
Setup: 3:        Setup 3
Setup: 4:        Setup 4
Setup: 5:        Setup 5
Setup: 6:        Setup 6
Setup: 7:        Setup 7
Setup: 8:        Setup 8
Setup: 9:        Setup 9
DONE
If you're not interested in Setups' names, you can modify line 477 to ignore those messages:
Code:
  05) # Send EQ-Preset name or Device-Setup name to remote
-     state=read_name_index
+     state=ignore_sysx_message
  ;;
Or you can always use "grep" :)

Wow, that's very nice, will go through the code once I have some time off during the easter break!
The byte parsing stuff is a bit new to me.
Highly appreciate you taking the time to write this, hope you also had some fun doing it.
 
Top Bottom