Doom Comic
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Source Ports > Windows 7 MIDI volume
Pages (2): [1] 2 »  
Author
All times are GMT. The time now is 08:52. Post New Thread    Post A Reply
Quasar
Moderator


Posts: 6092
Registered: 08-00


Seems the infinite wisdom of MS has dictated that MIDI volume shall be irreparably attached to the total process volume level in Windows Vista and 7. Is there a workaround for this yet? Has it been reported to SDL as a bug?

Using the music volume level slider in Eternity causes the digital sound volume to reduce by the same amount, making it completely useless.

Old Post 01-09-10 19:30 #
Quasar is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit || Quote
DaniJ
Senior Member


Posts: 2137
Registered: 08-03


I've not heard of a work around. We are having the same issue when using SDL for audio in Doomsday under Win7.

Old Post 01-10-10 12:34 #
DaniJ is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
GreyGhost
Why don't I have a custom title by now?!


Posts: 8782
Registered: 01-08


Looks like another reason to adopt *nix as my primary OS when XP's service packs reach the end of their support lifecycle.

Old Post 01-10-10 14:53 #
GreyGhost is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit || Quote
Quasar
Moderator


Posts: 6092
Registered: 08-00


Monster bump on the original thread for this issue to post about the solution I have finally devised to it:

http://mancubus.net/svn/eternity/tr...045236738c1f538

"MidiRPC" is a lightweight embedding of the SDL_mixer API inside an RPC - "Remote Procedure Call" - framework. This enables the MIDI player to run in a separate process, and via that, obtain the ability to independently set its MIDI volume level.

RPC is the simplest method for inter-process communication (IPC) on Windows, and isn't going anywhere any time soon considering it is the foundation upon which DCOM and COM+ are built. Plus, it just freaking works. It offers built-in synchronization and a high-level procedure-call-based interface.

See also the file i_midirpc.cpp for the client code:
http://mancubus.net/svn/eternity/tr...l/i_midirpc.cpp

Old Post 11-24-12 03:14 #
Quasar is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit || Quote
bradharding
Junior Member


Posts: 196
Registered: 08-12


Excellent! Great job in fixing this long-standing problem, Quasar! And Fraggle... any chance of implementing this in Chocolate DOOM? Please?

Old Post 11-24-12 03:51 #
bradharding is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit || Quote
esselfortium
A Major Doomworld Concern


Posts: 6625
Registered: 01-02


\o/

Thanks Quasar for come up with a functioning solution for this :) Hopefully it can get implemented into all the SDL ports soon.

I look forward to having music in Doom again.

Old Post 11-24-12 03:54 #
esselfortium is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit || Quote
Quasar
Moderator


Posts: 6092
Registered: 08-00


PS: Any other ports that adopt the code should be sure to generate their own UUID and rename the interface appropriately, to prevent any possibility of conflicts.

Old Post 11-24-12 04:41 #
Quasar is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit || Quote
andrewj
Senior Member


Posts: 1638
Registered: 04-02


This approach is a clever solution to a very dumb decision by Microsoft.

P.S. why use another interface name and UUID? I thought the nice thing about COM was that you could create an interface once, and multiple pieces of software could use it.

Old Post 11-24-12 06:34 #
andrewj is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
Quasar
Moderator


Posts: 6092
Registered: 08-00



andrewj said:
This approach is a clever solution to a very dumb decision by Microsoft.

P.S. why use another interface name and UUID? I thought the nice thing about COM was that you could create an interface once, and multiple pieces of software could use it.


Well I suppose but... if you're one of those crazy people that play multiple ports at the same time you might run into trouble, unless somebody rewrites this to be totally re-entrant and multithreadable :P

Old Post 11-24-12 06:52 #
Quasar is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit || Quote
printz
CRAZY DUMB ZEALOT


Posts: 8889
Registered: 06-06



GreyGhost said:
Looks like another reason to adopt *nix as my primary OS when XP's service packs reach the end of their support lifecycle.
What? You were willing to abandon Windows just because of its MIDI incompatibility? Heheheheheh.

__________________
Automatic Wolfenstein - Version 1.0 - also on Android

Old Post 11-24-12 08:57 #
printz is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit || Quote
Graf Zahl
Why don't I have a custom title by now?!


Posts: 7775
Registered: 01-03


I have stopped using Windows's internal MIDI player when I got my first Vista-computer 5.5 years ago.

It was not only the volume problem but the overall (lack of) quality it offered that made me ditch it.

IMO the whole thing has become completely useless and it might be better to have one software-synth based alternative available. Even something like ZDoom does with its external Timidity++ player is infinitely better than anything Windows has to offer by default.

I think it's quite obvious that for Microsoft this has become legacy baggage that's only barely maintained to avoid completely breaking older software that still need it.

Out of curiosity: What prevents SDL-based ports from using something like FluidSynth and mixing the music into their sound stream themselves?

Old Post 11-24-12 10:09 #
Graf Zahl is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit || Quote
Gez
Why don't I have a custom title by now?!


Posts: 11269
Registered: 07-07



Graf Zahl said:
Out of curiosity: What prevents SDL-based ports from using something like FluidSynth and mixing the music into their sound stream themselves?


Nothing. PrBoom+ supports FluidSynth.

Old Post 11-24-12 10:29 #
Gez is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
DaniJ
Senior Member


Posts: 2137
Registered: 08-03


Indeed, as does Doomsday (on Linux/Ubuntu/Unix). The current plan is to phase out SDL_mixer for music entirely, on all supported platforms.

Old Post 11-24-12 11:32 #
DaniJ is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
andrewj
Senior Member


Posts: 1638
Registered: 04-02



Graf Zahl said:
Out of curiosity: What prevents SDL-based ports from using something like FluidSynth and mixing the music into their sound stream themselves?

When I investigated FluidSynth (years ago), there was only one decent freely available soundfont, which was huge (127MB or so) and legally dubious.

Nowadays the size is less of an issue, but are there any soundfonts for it which are freely available, high quality, and without any legal concerns?


Quasar said: (regarding UUID)
Well I suppose but... if you're one of those crazy people that play multiple ports at the same time you might run into trouble, unless somebody rewrites this to be totally re-entrant and multithreadable :P

Hmmm I thought the UUID was to ensure the uniqueness of the interface (the ABI)? Or are you somehow locating the process to talk to via the UUID? (which doesn't seem necessary if you are creating the process yourself from a parent process, the engine)

Old Post 11-24-12 11:38 #
andrewj is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
printz
CRAZY DUMB ZEALOT


Posts: 8889
Registered: 06-06


I remember from IRC that Quasar was having lots of trouble trying to compile FluidSynth on Windows.

__________________
Automatic Wolfenstein - Version 1.0 - also on Android

Old Post 11-24-12 11:47 #
printz is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit || Quote
Graf Zahl
Why don't I have a custom title by now?!


Posts: 7775
Registered: 01-03



printz said:
I remember from IRC that Quasar was having lots of trouble trying to compile FluidSynth on Windows.



Yes, it's an utter mess. But it isn't really necessary because there's some compiled DLLs floating around, most notably Randy's own version available on zdoom.org.

Old Post 11-24-12 12:19 #
Graf Zahl is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit || Quote
Maes
I like big butts!


Posts: 12706
Registered: 07-06


From my understanding, the "volume control" present in Windows XP and before was more of a courtesy, if anything. AFAIK no OS has an API that presents a system-wide MIDI output volume control device that is independent of the MIDI events, at least one that does not rely on nasty hacks.

Even today, whenever a programmer asks how he could control MIDI output the most general method proposed is to directly manipulate MIDI events and scale the volume "at the source", with all the obvious drawbacks this method could have (not the least of which, is that volume might change randomly and at a whim). Apparently, there's no universal "master volume" method. Perhaps XP did a good job at disguising this, but M$, in their infinite wisdom, decided that this was a Bad Thing and not in line with the Power Of New Hardware, and so let it go.

This is to be expected, to a degree: most modern soundcards don't actually have a dedicated MIDI hardware section, not even an FM chip, and so there's no actual "final output" to control. Some MIDI drivers/emulators might do a better job at presenting a controllable and unambiguous "final volume", but again, there doesn't seem to be some OS-specific API for that, at least not anymore. Worse is better?

Old Post 11-24-12 13:34 #
Maes is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit || Quote
GhostlyDeath
Forum Retard


Posts: 1027
Registered: 08-05



Quasar said:
Monster bump on the original thread for this issue to post about the solution I have finally devised to it:

http://mancubus.net/svn/eternity/tr...045236738c1f538

"MidiRPC" is a lightweight embedding of the SDL_mixer API inside an RPC - "Remote Procedure Call" - framework. This enables the MIDI player to run in a separate process, and via that, obtain the ability to independently set its MIDI volume level.

RPC is the simplest method for inter-process communication (IPC) on Windows, and isn't going anywhere any time soon considering it is the foundation upon which DCOM and COM+ are built. Plus, it just freaking works. It offers built-in synchronization and a high-level procedure-call-based interface.

See also the file i_midirpc.cpp for the client code:
http://mancubus.net/svn/eternity/tr...l/i_midirpc.cpp



Sound server revival!

EDIT:

Win32 lacks AF_UNIX support, so a cross platform solution would need to use something like TCP but even then Windows screws that up too with all that Winsock garbage.

But, I phased out SDL_mixer a long time ago, sure I can't play MP3s and OGGs, but i'd rather lose those than have lock ups, crashes, and freezes constantly.


Maes said:
Stuff


ReMooD when playing Music just modifies the MIDI instruments directly, at least when it uses its own internal MUS2MID (which I wrote myself) which does live streaming.

Last edited by GhostlyDeath on 11-24-12 at 14:31

Old Post 11-24-12 14:24 #
GhostlyDeath is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit || Quote
Maes
I like big butts!


Posts: 12706
Registered: 07-06



GhostlyDeath said:
ReMooD when playing Music just modifies the MIDI instruments directly, at least when it uses its own internal MUS2MID (which I wrote myself) which does live streaming.


Which is exactly the level of control I said you often have: only relative volume (instruments), but not of the final absolute one.

Old Post 11-24-12 15:11 #
Maes is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit || Quote
Quasar
Moderator


Posts: 6092
Registered: 08-00


I considered several solutions before trying this one, including the "take over MIDI playing yourself" one (waaaay too much work), the "use a synth library" one (let me know when one appears that can actually successfully compile from source and doesn't require you to have GTK+ on the include path), etc.

This turned out to be a simpler thing I could knock out in the course of 24 hours, after doing the prerequisite research on MSRPC.

Old Post 11-24-12 17:16 #
Quasar is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit || Quote
entryway
Forum Staple


Posts: 2733
Registered: 01-04


https://www.crowproductions.de/repo...ortmidiplayer.c

Old Post 11-24-12 17:22 #
entryway is online now Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit || Quote
Dr. Sean
Green Marine


Posts: 30
Registered: 08-11



entryway said:
https://www.crowproductions.de/repo...ortmidiplayer.c


I used a bit of that code as the basis for the PortMidi player in Odamex. Unfortunately switching back and forth between SDL_Mixer and PortMidi still requires a little bit of hackery but it seems to be a working solution for us. ...at least until I can get around to submitting patches to SDL_Mixer and hoping for the best.

Old Post 11-26-12 02:19 #
Dr. Sean is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit || Quote
Quasar
Moderator


Posts: 6092
Registered: 08-00



Maes said:


Which is exactly the level of control I said you often have: only relative volume (instruments), but not of the final absolute one.


The volume control in every version of Windows prior to Vista worked fine. The problem in Vista itself is nothing to do with not properly scaling the volume of MIDI events. It has everything to do with Microsoft routing the output of the GS Software Synth through the process's mixer under the same channel as digital sound output and without implementing an independent volume control for it.

Don't try to make excuses for their poor engineering in the change-over to the Vista mixer model, and especially don't do it by making claims regarding previous versions of the OS that simply are not true. Revisionist history at best.

Old Post 11-26-12 17:30 #
Quasar is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit || Quote
Ralphis
IDL Founder


Posts: 3739
Registered: 09-02


The Vista/7 mixer pretty much ruined my process for creating music and I've had to re-adapt to the way 7's mixer works. The jump adversely affected my work and also made writing music much less enjoyable.

Old Post 11-26-12 19:49 #
Ralphis is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit || Quote
Doomkid
Senior Member


Posts: 1519
Registered: 06-08


I'm really sorry for bumping an ancient thread, but I'm having the same problem - MIDI is just blasting to the point where I cant hear SFX at all, and as stated, the MIDI volume slider also changes the SFX volume. Yes, I'm using Win7..

It looks like Quasar posted a helpful solution, but I might has well be attempting to read Chinese. How can youy average dumb Doomer get some decent sound levels these days? Is there some program I can run to fix this?

Playing without music blows arsehole, IMO.

Last edited by Doomkid on 07-25-14 at 04:29

Old Post 07-25-14 03:17 #
Doomkid is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit || Quote
VGA
Junior Member


Posts: 202
Registered: 05-14



Doomkid said:
I'm really sorry for bumping an ancient thread, but I'm having the same problem - MIDI is just blasting to the point where I cant hear SFX at all, and as stated, the MIDI volume slider also changes the SFX volume. Yes, I'm using Win7..

It looks like Quasar posted a helpful solution, but I might has well be attempting to read Chinese. How can youy average dumb Doomer get some decent sound levels these days? Is there some program I can run to fix this?

Playing without music blows arsehole, IMO.


Well, which port are you using?

A workaround would be to use a music pwad with mp3 versions of the doom music.

Old Post 07-25-14 12:14 #
VGA is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
Quasar
Moderator


Posts: 6092
Registered: 08-00



Doomkid said:
I'm really sorry for bumping an ancient thread, but I'm having the same problem - MIDI is just blasting to the point where I cant hear SFX at all, and as stated, the MIDI volume slider also changes the SFX volume. Yes, I'm using Win7..

It looks like Quasar posted a helpful solution, but I might has well be attempting to read Chinese. How can youy average dumb Doomer get some decent sound levels these days? Is there some program I can run to fix this?

Playing without music blows arsehole, IMO.


The solution here is only for the Eternity Engine. AFAIK, no other ports adopted this approach because they do other things (use FluidSynth, PortMIDI, etc). EE can also play hi-def music as an alternative to MIDI, but that's only good for mods that don't modify the music obviously.

Now that dotfloat has managed to create a version of FluidSynth that does not depend on glib at all, I may try to integrate it with EE.

Old Post 07-26-14 03:47 #
Quasar is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit || Quote
Beginner
Green Marine


Posts: 40
Registered: 10-12



Doomkid said:
I'm really sorry for bumping an ancient thread, but I'm having the same problem - MIDI is just blasting to the point where I cant hear SFX at all, and as stated, the MIDI volume slider also changes the SFX volume. Yes, I'm using Win7..

It looks like Quasar posted a helpful solution, but I might has well be attempting to read Chinese. How can youy average dumb Doomer get some decent sound levels these days? Is there some program I can run to fix this?

Playing without music blows arsehole, IMO.


I have had the same issue with prboom+ while using SDL for music. I've installed timidity and MIDI/SFX volume issue went away, here's some info how to do it.

Old Post 07-26-14 19:12 #
Beginner is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit || Quote
Doomkid
Senior Member


Posts: 1519
Registered: 06-08


Thanks a lot for the responses, everyone. It happens to me in Odamex, Doom Legacy and Doom95. I was wondering if there's a simple way to 'trick' Windows into allowing me to adjust MIDI volume from some place they forgot to dickishly cover up, but I suppose not.

Old Post 07-27-14 17:15 #
Doomkid is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit || Quote
Jaxxoon R
Member


Posts: 565
Registered: 03-14


If they were gonna deprecate MIDI support they could at least make it easy to replace/clean it up a bit. Why are big tech companies like Google and Microsoft doing such shitty jobs with what they do?

Old Post 07-28-14 03:56 #
Jaxxoon R is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit || Quote
All times are GMT. The time now is 08:52. Post New Thread    Post A Reply
Pages (2): [1] 2 »  
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Source Ports > Windows 7 MIDI volume

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.