You can use the "null" mixer and a client listening for mixer events.
nkk64 wrote:Hi Maarten,
As for suggestions I think it would have been helpful if synchronator did log actual commands it sends - that way I'd have understood why it did not work from the very beginning
nkk64 wrote:Btw there is a project Mopidy and a plugin for it mopidy-nad. Development of that plugin is abandoned and currently you'll have to dive into python source code to make it work, but I liked their idea of calibrating volume comntrol. Here is how it could have been applied to synchronator: The number of volume positions of my NAD amp is known to be X=80 (I can count if necessary - X will become to be config parameter for various amps). So upon running synchronator you just run 'Main.Volume-' X times so you are sure that vol regulator now is at zero position. All you have to do in your code is to map 0-X range to 0%-100% range of mpd clients. This way you'll avoid that weird volume indicator jumps to 50%. Downside is that if someone adjusts volume manually one will have to restart synchronator.
nkk64 wrote:There is one more thing I'll have to solve. Good amps are power hungry even if they are idling (under 40w in my case). So I have to find way to put my NAD into standby (<0.5w). Unfortunately there seems no mute event in MPD so that I can not think how I can send standby/wake up commands (Main.Power=On/Off) based on MPD events. I think better way is to dive into linux's power management internals... Some udev rules maybe...
That's an interesting approach, hadn't thought of that. If you're willing to test it I can implement that. I'm not giving any timeframe on that though, but can I report here when there is something to test.
As for the manual volume adjustments: a possible fix could be that setting the volume to zero via MPD triggers the volume calibration. That process would take a few seconds (I guess) and can not be disrupted... so MPD volume control would be disfunctional for that period. Another option is, twice to zero in a second to trigger a calibration (I doubt that action can be triggered by accident).
nkk64 wrote:Btw similar approach can be adopted to create expect shell script that reacts on mixer events - volume up/down.
nkk64 wrote:Wow, I tried it with default setting and it works like a charm.
nkk64 wrote:As I mentioned somewhere above after installation on my ubuntu 16.04 system I had to manually create /var/run/synchronator folder - otherwise synchronator throws file not found error. Would be nice if it created the folder (if absent) without user intervention or at least mention it in install guide - had to seach for error source in source code.
nkk64 wrote:Both with Theremin (OS X client) and MPDroid (android client) default values are OK so I did not start playing with offsets or multipler/divisors.
nkk64 wrote:Recalibration works too - pause while MPD volume is not responsive is a bit too long, but you should not mess with vol control and you'll not need recalibration at all.
nkk64 wrote:The only setting I changed was query interval - just to have less trigger lines in log. I dont quite understand functionality of that trigger. Seems it allows synchronator to know about selected source on amp and also about power state. If that's right, here is how one could use it:
nkk64 wrote:I start synchronator when system starts. That means MPD is running but amp is still in standby state. So volume calibration will fail.
nkk64 wrote:Amp is waked up only upon the first Play event and this is a good moment to calibrate volume. So if synchronator can detect that amp was off when it (synchronator) started it could also delay volume calibration until Play event is fired for the 1st time. Ideally synchronator could control Amp state like that expect shell script I described. But it's not an ideal world, is it?
An example script can be found in the scripts folder.
in mpd.conf: add to audio_output with type 'alsa':
Nov 13 15:11 : config: option 'mixer_control' on line 53 was not recognized
Nov 13 15:11 : config: option 'mixer_device' on line 54 was not recognized
Nov 13 15:11 : config: option 'mixer_index' on line 55 was not recognized
Users browsing this forum: No registered users and 1 guest