Welcome, Guest
Username: Password: Remember me
This is the optional Forum header for the Suggestion Box.

TOPIC:

Volume display 4 years 3 weeks ago #37251

  • JRotzinger
  • JRotzinger's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 2
  • Thank you received: 0
Hi together, I am using DDRC-24 (miniDSP 2x4 HD) as preamplifier for my 2.1 system. It is working fine and I can handle evrything with my harmony remote control. Only one point is missing. I have no feedback of the current volume setting.

Is there any possibility to access the master volume level and display it without adding the measurement equipment when listening to the musik?

Thank you!
Br Jens

Please Log in or Create an account to join the conversation.

Volume display 4 years 2 weeks ago #37302

  • markubiak
  • markubiak's Avatar
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 47
  • Thank you received: 15
Check out my Volumio plugin

I have my 2x4 HD (no Dirac but I don't think the protocol is different) connected to a Raspberry Pi running Volumio and this plugin. Then the output goes to a 14 segment display I got from Adafruit. Works great.

Mark
The following user(s) said Thank You: devteam, Neocortex

Please Log in or Create an account to join the conversation.

Volume display 3 years 10 months ago #38159

  • Neocortex
  • Neocortex's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 10
  • Thank you received: 2
Hey,

I just bought a DDRC24 after finding out that the SHD is about 1000 AUD more, and I was searching for a way to display the volume in -dB. I see that you said your plugin can display volume level to a 14 segment display, but I'm not entirely sure how it is supposed to work. Does the display show the volumio volume level? Or does it access the minidsp volume somehow?

Thanks either way for coming up with the plugin!

Please Log in or Create an account to join the conversation.

Volume display 3 years 10 months ago #38164

  • markubiak
  • markubiak's Avatar
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 47
  • Thank you received: 15
Good questions! I have not had the time to document this as much as I'd like to so feel free to put some of the steps you took on this thread if you get it working, or ask me if you don't.

To start off, no the plug-in isn't tied to Volumio. It gets all of its information from the 2x4 HD itself and isn't tied to Volumio in any way. I've just chosen to package it with Volumio because I know a lot of people run it but here is the base JavaScript plugin . It at all times displays the current volume level in dB (ex. -17.5), will flash the new input for 2 seconds if you change inputs, and will flash MUTE and the volume every 2s if the device is muted. The app also allows for some controls by writing to /tmp/minidsp-control but that's poorly implemented and not documented right now (sorry, feel free to dig thru the source if you wanna use it).

As for the display, grab one of these . There's instructions on wiring it and connecting it to the pi. Should be the default i2c address of 0x70 (I think). End of the day you should have 4 connectors to the pi (all on the top left corner for i2c) and the 2x4 HD plugged in on the USB port.

As a side note I've used this with great results for about a year now and it's incredibly useful and stable on my 2x4 HD. If I understand MiniDSP control software it should theoretically work but I've obviously been unable to test. Good luck!

Mark
The following user(s) said Thank You: devteam, Neocortex

Please Log in or Create an account to join the conversation.

Last edit: by markubiak. Reason: DDRC qualifier

Volume display 3 years 10 months ago #38170

  • Neocortex
  • Neocortex's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 10
  • Thank you received: 2
WOW! This is exactly what I'm looking for, and seems pretty polished.

If you don't mind me asking, Where did you find out how to interface with the minidsp? I've seen people do some cool stuff like display input levels, and I was thinking of possibly doing something like that myself.

Please Log in or Create an account to join the conversation.

Volume display 3 years 10 months ago #38171

  • markubiak
  • markubiak's Avatar
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 47
  • Thank you received: 15
Most of the work in the protocol was done by Matthieu Rene. I don't know how he did it to be honest. You could totally do a live digital volume meter, check out his GitHub page for node-minidsp (my project minidsp-control uses my form of his project with some bug fixes). There's a command for watching input levels via the terminal but I forgot what it was.
The following user(s) said Thank You: devteam, Neocortex

Please Log in or Create an account to join the conversation.

Volume display 3 years 9 months ago #38356

  • andrejg
  • andrejg's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 16
  • Thank you received: 11
Hi, the node.js app by Mathieu Rene wouldn't work with the DDRC-24, the USB VID and PID are different and the plugin also sends different commands than the 2x4HD. I've used a USB sniffer to map the following commands:

unmute
03 17 00 1a
response
01 17 00 10

mute
03 17 00 1b
response
01 17 01 10

dirac off
03 3f 01 43
response
01 3f 01 10

dirac on
03 3f 00 42
response
01 3f 00 10

set input to analog
03 34 00 37
response
01 34 00 10
05 05 ff a9

set input to toslink
03 34 01 38
response
01 34 01 10
05 05 ff a9

set input to usb
03 34 02 39
response
01 34 02 10
05 05 ff a9

activate config1
04 25 00 02 2b ff
05 05 ff e5 01 ef
05 05 ff e0 01 ea
05 05 ff da 02 e5
07 45 a1 03 00 00 02 f2
response
02 ab 00 02 3e 59 03 c3 3e 59 03 c3

activate config2
04 25 01 02 2c ff
05 05 ff e5 01 ef
05 05 ff e0 01 ea
05 05 ff da 02 e5
07 45 a1 03 00 00 02 f2
response
02 ab 01 02 43 68 03 c3 43 68 03 c3

activate config3
04 25 02 02 2d ff
05 05 ff e5 01 ef
05 05 ff e0 01 ea
05 05 ff da 02 e5
07 45 a1 03 00 00 02 f2
response
02 ab 02 02 54 56 03 c3 54 56 03 c3

activate config4
04 25 03 02 2e ff config 4
05 05 ff e5 01 ef
05 05 ff e0 01 ea
05 05 ff da 02 e5
07 45 a1 03 00 00 02 f2
response
02 ab 03 02 ab 67 03 c3 ab 67 03 c3

set volume
03 42 8a cf
response
01 42 8a 10
The actual volume is at offset 2 (i.e. the value 8a). Above it's set to -69 dB, calculated as per the docs in mrene's nodejs app (69*2 = 138 = 8a in HEX)

get input levels
0c 14 00 10 xx xx yy yy aa aa bb bb
yy yy input 1 level
bb bb input 2 level
xx and aa: unknown
This one is the HEX used im mrene's _getMasterStatus() method.

My goal is controlling the DDRC-24 with an Arduino and a USB Host shield (and expanding its I/O capabilities with muxers and demuxers). As far as controlling the device the above is as far as I've managed (no experience whatsoever in USB communication). The I/O stuff is comparatively easy, even a S/PDIF switcher :). I could control the device with an IR transmitter, but it's messy and doesn't always work.

A question to the devteam, if I may: is it possible to get the device status (volume level, active configuration, selected input, dirac status) without e.g. setting the volume first?

edit: the DDRC-24 PID is 0x0044, the vendor ID is the same.
The following user(s) said Thank You: devteam, Juoigâ, markubiak

Please Log in or Create an account to join the conversation.

Last edit: by andrejg.

Volume display 3 years 9 months ago #38357

  • markubiak
  • markubiak's Avatar
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 47
  • Thank you received: 15
Very nice!! Do you mind me asking how you did the USB sniffing?

I'd appreciate if you'd add your findings to my actively(-ish) maintained fork of node-minidsp: github.com/markubiak/node-minidsp

I'd just try both the VID/PID of the 2x4HD and DDRC-24 and fork the code based on which one works. In my head, the cleanest solution would be to change constants.js to constants_2x4hd.js and make a constants_ddrc-24.js. device.js would load the correct one based on the board that was identified by VID/PID. For example, devices.js would go from:

setMute(value) {
return this.sendCommand([ 0x17, value ? 0x01 : 0x00 ]);
}

to

setMute(value) {
return this.sendCommand(muteCommand);
}

where muteCommand would be defined in constants_<board>.js. Thoughts?

Please Log in or Create an account to join the conversation.

Volume display 3 years 9 months ago #38364

  • andrejg
  • andrejg's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 16
  • Thank you received: 11

Very nice!! Do you mind me asking how you did the USB sniffing?


Nothing fancy. I googled for USB sniffers, downloaded a bunch of them and stopped at the one I could figure out - Device Monitoring Studio . It's supposedly free, it activates a 14 day full trial though. You then select the appropriate device, choose what you'd like to capture (RAW data) and fire it up. From then on it's just a matter of pattern recognition, I think. You do something in the DDRC interface and watch what gets sent over USB.
Here's a screenshot of what happens when Dirac Live is enabled:



You can also color code whatever pattern you like so that changes can be easily spotted. A nice tool, al in all.

I'd appreciate if you'd add your findings to my actively(-ish) maintained fork of node-minidsp: github.com/markubiak/node-minidsp


I'm more versed in C# (work, eh) but I'll see what I can do. It's probably a good excuse to learn node.js :).

I'd just try both the VID/PID of the 2x4HD and DDRC-24 and fork the code based on which one works. In my head, the cleanest solution would be to change constants.js to constants_2x4hd.js and make a constants_ddrc-24.js. device.js would load the correct one based on the board that was identified by VID/PID. For example, devices.js would go from:

setMute(value) {
return this.sendCommand([ 0x17, value ? 0x01 : 0x00 ]);
}

to

setMute(value) {
return this.sendCommand(muteCommand);
}

where muteCommand would be defined in constants_<board>.js. Thoughts?


That would seem the cleanest way, yes. Where does the board actually get identified, though? As far as I understand the vendor and product ID that are hardcoded in constants.js are just used in the USBTransport constructor (usb.js) to establish a connection. What does the probe method do? Does it actually check if a device with a specific VID and PID is connected? I don't have a Linux machine handy to check, at the moment and trying to run this on Windows was an exercise in futility. I'll see if I can spin up a Linux VM or set it up on a Raspberry Pi.

Please Log in or Create an account to join the conversation.

Volume display 3 years 9 months ago #38459

  • devteam
  • devteam's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9055
  • Thank you received: 1381
Dear All:

Below are the commands to get the device status:

Master volume and Mute:

05 05 ff da 02 e5

response
06 05 ff da <vol> <mute>

volume in dB = vol * -0.5
mute = {0 for unmuted , 1 for muted}

Preset/config selection:

05 05 ff d8 01 e2

response
05 05 ff d8 <preset number>

Input source selected:

05 05 ff d9 01 e3

response
05 05 ff d9 <source number>

Dirac status:

05 05 ff e0 01 ea

response
05 05 ff e0 <status>

status = {0 for On, 1 for Off}

Hope this info helps.

DevTeam
miniDSP, building a DSP community one board at a time.
The following user(s) said Thank You: Juoigâ, andrejg, HansVanEijsden, markubiak

Please Log in or Create an account to join the conversation.

Volume display 3 years 9 months ago #38484

  • markubiak
  • markubiak's Avatar
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 47
  • Thank you received: 15

Hope this info helps.


It certainly does!! Thank you very much; I'll get this implemented if I can find the time...

Please Log in or Create an account to join the conversation.

Volume display 3 years 6 months ago #39821

  • stones
  • stones's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 1
  • Thank you received: 0
Hi,
I want to control the volume of my minidsp hd with a raspberry.
Is it normal that the program node-minidsp takes so long to respond? minidsp -h takes about 8s to respond.
Otherwise it works fine. Have already tested several new installations with stretch.

Best regards
Manuel

Please Log in or Create an account to join the conversation.

Volume display 3 years 6 months ago #39865

  • andrejg
  • andrejg's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 16
  • Thank you received: 11
It responds instantaneously on a "normal" computer. It might be a Raspberry Pi quirk.

Please Log in or Create an account to join the conversation.

Volume display 3 years 6 months ago #39915

  • markubiak
  • markubiak's Avatar
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 47
  • Thank you received: 15

Hi,
I want to control the volume of my minidsp hd with a raspberry.
Is it normal that the program node-minidsp takes so long to respond? minidsp -h takes about 8s to respond.
Otherwise it works fine. Have already tested several new installations with stretch.

Best regards
Manuel


It definitely takes quite awhile to spin up. I think the biggest delay is loading libraries and setting up initial communication with the board. That's why my minidsp-control project sets up the connection then calls the underlying device.js, significantly faster for repeated queries.

Please Log in or Create an account to join the conversation.

Volume display 3 years 1 month ago #42140

  • henrylar
  • henrylar's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 27
  • Thank you received: 2
this is an interesting approach, that might solve what I am looking for. I deliver that I can make the raspberry work, but a noob question - what if I want to also use the USB connection, am I left with using it only own the raspberry Pi /( like Volumio, Roon, Moode etc.?

Please Log in or Create an account to join the conversation.

Moderators: devteam