Changing the volume curve

General discussion about RuneAudio. Do not post any support or feature requests here.

Changing the volume curve

Postby aquin43 » 02 Mar 2017, 21:05

I installed a HiFiBerry DAC + PRO with hardware volume control on a Raspberry Pi and came up against the problem that the volume range on the on screen graphic is not well mapped to the range on the DAC so that less than half of the range is usable.

In the file /var/www/assets/js/runeui.js I came across a function

// set volume with knob
function setvol(val) {
$('#volume').val(val, false).trigger('update');
GUI.volume = val;
$('#volumemute').removeClass('btn-primary');
sendCmd('setvol ' + val);
}

I was hoping that a simple remapping of val at this point would alter the characteristic, but no change to val at this point seems to affect the way the volume is set. Where, then, is the function that reads the volume control angle and sets the hardware volume?

Arthur
aquin43
 
Posts: 5
Joined: 26 Feb 2017, 16:40

Re: Changing the volume curve - solved

Postby aquin43 » 04 Mar 2017, 11:55

Further investigation using "amixer sset Digital xx%" shows that the knob is mapped to the level in dB at about 1 dB per digit change. This is an excellent mapping but, for me, the 100dB range is too much for a single volume control in a playback system.

editing /var/www/app/templates/playback.php to make a small addition to line 32
<input id="volume" value="100" data-width="230" ........
becomes
<input id="volume" value="100" data-min="50" data-width="230" ..........

causes the volume knob to work only from 50 to 100, so the range is 50 dB with 25 dB at the central point.
I find this more comfortable to use. Muting still works and the down volume step button can still reach an attenuation of greater than -50dB but the knob, of course, can't show it.

Arthur
aquin43
 
Posts: 5
Joined: 26 Feb 2017, 16:40

support RuneAudio Donate with PayPal


Return to General discussion

Who is online

Users browsing this forum: No registered users and 0 guests