Windows Media Player Volume Slider Doesn't Affect VMS's Volume

Posts: 71
Joined: October 14, 2016 - 03:20
Windows Media Player Volume Slider Doesn't Affect VMS's Volume

I like to use WMP because how simplistic it is, but there's one thing that bothers me, the volume slider doesn't affect the volume of midis being played by VMS, not even pressing the mute button changes the volume, every time I want to reduce the volume I have to open the mixer and change it with the master slider, it's just inconvenient.

Even Microsoft GS Wavetable Synth gets affected by the volume slider and you can even mute it completely so I don't see why this shouldn't work on VMS, the volume slider on other programs like vanbasco's karaoke player do work

Posts: 71
Joined: September 25, 2013 - 16:38
Re: Windows Media Player Volume Slider Doesn't Affect VMS's Volume

There's already a topic/bug report about this problem:

https://coolsoft.altervista.org/en/forum/thread/506

The explanation is not so difficult: WMP's volume control sets the waveout level of the WMP process. But in VMS 2.x the actual sound rendering happens in another process (VirtualMIDISynth.exe).

In this regard VMS 2.x resembles an external (hardware) synth whose sound output is independent from the player software. WMP's sound control does not work with any external synths that is attached to a real midi out port (including Sound Blaster cards HW based Soundfont synths in Vista/7/8/10).

MS GM/GS Soft Synth works since it is an inprocess dll. Also WMS 1.x was an inprocess dll (so WMP's volume control worked) but this inprocess architrcture had other more serious compatibility problems.

Like this:

https://www.vogons.org/viewtopic.php?f=24&t=47840&start=20#p614338

Vanbasco works with VMS 2.0 since the volume slider does not set the player's wavout level but sends Channel Volume midi controller messages (CC# 7). This method can also have some drawbacks (as described in the first link above). In case of bassmidi based synths like VMS the best method is sending GM Master Volume SysEx messages (like FSMP does).

Posts: 1492
Joined: March 25, 2012 - 01:19
Re: Windows Media Player Volume Slider Doesn't Affect VMS's Volume

@falcosoft: thanks for your help and linking to the old thread ;)
Will add a FAQ on this topic.

I also like to find a workaround for this because that's what the user expects when a volume slider is available.
Multimedia players should disable it when playing MIDI (and they're not able to set MIDI volume properly), but that's another story.

The first way that comes to my mind is to let VMS driver DLL (that runs in WMP process space) intercept/read "analog" volume changes, notify the synth part (VirtualMIDISynth.exe) and "emulate" volume changes by moving the corresponding Master mixer knob.
I don't know the newer Audio API but, if there's no way for a process to read the volume of another, this seems to be the only way to do it.
Or, maybe, there's some window message to be informed about other processes volume changes and then, after some message filtering, will be able to replicate volume changes to synth side.

It seems an interesting challenge; I've added it to the TODO list, can't promise anything ;)

Posts: 71
Joined: October 14, 2016 - 03:20
Re: Windows Media Player Volume Slider Doesn't Affect VMS's Volume
falcosoft wrote:
There's already a topic/bug report about this problem:
https://coolsoft.altervista.org/en/forum/thread/506
The explanation is not so difficult: WMP's volume control sets the waveout level of the WMP process. But in VMS 2.x the actual sound rendering happens in another process (VirtualMIDISynth.exe).
In this regard VMS 2.x resembles an external (hardware) synth whose sound output is independent from the player software. WMP's sound control does not work with any external synths that is attached to a real midi out port (including Sound Blaster cards HW based Soundfont synths in Vista/7/8/10).
MS GM/GS Soft Synth works since it is an inprocess dll. Also WMS 1.x was an inprocess dll (so WMP's volume control worked) but this inprocess architrcture had other more serious compatibility problems.
Like this:
https://www.vogons.org/viewtopic.php?f=24&t=47840&start=20#p614338
Vanbasco works with VMS 2.0 since the volume slider does not set the player's wavout level but sends Channel Volume midi controller messages (CC# 7). This method can also have some drawbacks (as described in the first link above). In case of bassmidi based synths like VMS the best method is sending GM Master Volume SysEx messages (like FSMP does).

Thanks for your explanation m8, I knew it had to be because some kind of midi limitation

coolsoft wrote:
The first way that comes to my mind is to let VMS driver DLL (that runs in WMP process space) intercept/read "analog" volume changes, notify the synth part (VirtualMIDISynth.exe) and "emulate" volume changes by moving the corresponding Master mixer knob.
I don't know the newer Audio API but, if there's no way for a process to read the volume of another, this seems to be the only way to do it.

I actually had a very similar idea of somehow syncing the volume slider of wmp with the master of the mixer after reading @falcosoft post, but I was waiting for you to respond, and I also though about this

It should be a optional feature, why? idk, maybe you don't want to have both sliders sync up, it would be annoying to some people if you had VMS open with master at max volume, but last time you had WMP open it was a half volume so the mixer also gets changed to half and they don't know this feature exist and they notice the midi it's not very loud, so maybe add a "make other processes able to change VMS volume by syncing mixer's master volume slider" check box or something like that or maybe a "list of processes that control mixer's master volume slider" check list

Idk if this will be useful but, I've been playing with cheat engine to check the values it changes in volume slider changes and I actually found 2 volume percentage values from WMP, if you could intercept these values I think you should be able to do it, here's a video of me moving the slider on wmp

The values are 072A32A4 4 bytes and 09DD2FCC Float

https://www.youtube.com/watch?v=QY8nSSEiOZs&feature=youtu.be

Unfortunately these addreses seem to change every time you open WMP

warning

Warning, JavaScript is disabled!

JavaScript is not available, maybe because you disabled it globally into your browser settings or you are using an addon like NoScript.

We do not have any dangerous JavaScript running here.
Please enable JavaScript; if you're using NoScript this image will help you adding CoolSoft to your whitelist.

Thanks for your comprehension and enjoy CoolSoft.