[4017] Midiconfig by devicename (commited r4017)

Here you can discuss the development of patches.

[4017] Midiconfig by devicename (commited r4017)

Postby rcblanke » 2015-8-26 @ 17:38

Hi all,

Since it gets more and more problematic to have any influence on the midi device numbering in Windows, and adding and removing midi devices can alter the ordering of the devices in unpredictable ways, I thought it might be handy to also allow mididevice selection with DOSBox by using its name (or part of its name) in addition to its number/id. Please see the attached patch and compiled Windows executable. It works like in this example:

Code: Select all
Z:\mixer /listmidi
 0        "Microsoft GS Wavetable Synth"
 1        "E-MU XMidi1X1 Tab"
 2        "UM-1G"

Z:\midiconfig=1
(Status window shows: MIDI:win32 selected E-MU XMidi1X1 Tab MIDI:Opened device:win32)

Z:\midiconfig=um
(Status window shows: MIDI:win32 selected UM-1G MIDI:Opened device:win32)

Z:\midiconfig=xmidi
(Status window shows: MIDI:win32 selected E-MU XMidi1X1 Tab MIDI:Opened device:win32)


I hope someone will find this useful.

Regards,
Ronald
You do not have the required permissions to view the files attached to this post.
User avatar
rcblanke
Oldbie
 
Posts: 1305
Joined: 2005-4-01 @ 09:44
Location: Round 42

Re: Midiconfig by devicename

Postby IIGS_User » 2015-8-29 @ 15:55

Thanks, this patch is very appreciated.
Klimawandel.
User avatar
IIGS_User
Oldbie
 
Posts: 877
Joined: 2007-3-14 @ 19:59
Location: native_lang=ger

Re: Midiconfig by devicename

Postby Yesterplay80 » 2017-1-27 @ 12:55

I'd also like to thank you for your patch! I have implemented it in my DOSBox ECE build.
My full-featured DOSBox SVN builds (without debugger) for Windows: Vanilla DOSBox and DOSBox ECE (Enhanced Community Edition)
User avatar
Yesterplay80
Member
 
Posts: 257
Joined: 2016-2-23 @ 11:02
Location: Germany

Re: Midiconfig by devicename

Postby citrixscu » 2017-1-29 @ 17:38

Very useful, indeed. Thanks and thanks to Yesterplay for adding the patch to ECE.
User avatar
citrixscu
Newbie
 
Posts: 22
Joined: 2013-9-18 @ 05:37

Re: Midiconfig by devicename

Postby KainXVIII » 2017-2-01 @ 09:05

So i use mixer /listmidi command and nothing happens :confused: (Dosbox ECE)
User avatar
KainXVIII
Member
 
Posts: 219
Joined: 2015-5-20 @ 15:04
Location: Yaroslavl

Re: Midiconfig by devicename

Postby rcblanke » 2017-2-01 @ 16:11

FWIW, works just fine here using ECE.
User avatar
rcblanke
Oldbie
 
Posts: 1305
Joined: 2005-4-01 @ 09:44
Location: Round 42

Re: Midiconfig by devicename

Postby KainXVIII » 2017-2-01 @ 17:00

Strange, can't use ECE because of that bug (i wonder where to get older version?) :confused:
User avatar
KainXVIII
Member
 
Posts: 219
Joined: 2015-5-20 @ 15:04
Location: Yaroslavl

Re: Midiconfig by devicename

Postby Dominus » 2017-2-01 @ 20:33

Screenshot or it didn't happen :)
User avatar
Dominus
DOSBox Moderator
 
Posts: 7299
Joined: 2002-10-03 @ 09:54
Location: Vienna

Re: Midiconfig by devicename

Postby KainXVIII » 2017-2-01 @ 20:39

Dominus wrote:Screenshot or it didn't happen :)

Sorry!
You do not have the required permissions to view the files attached to this post.
User avatar
KainXVIII
Member
 
Posts: 219
Joined: 2015-5-20 @ 15:04
Location: Yaroslavl

Re: Midiconfig by devicename

Postby Dominus » 2017-2-01 @ 20:42

hmm, for me neither... with svn on OS X

Edit: well, it's not supposed to work on Linux/OS X :)
User avatar
Dominus
DOSBox Moderator
 
Posts: 7299
Joined: 2002-10-03 @ 09:54
Location: Vienna

Re: Midiconfig by devicename

Postby KainXVIII » 2017-2-01 @ 20:51

Windows 10 64 bit (Russian) here
User avatar
KainXVIII
Member
 
Posts: 219
Joined: 2015-5-20 @ 15:04
Location: Yaroslavl

Re: Midiconfig by devicename

Postby Dominus » 2017-2-01 @ 21:05

and it's the same when you are not in the NC shell?
User avatar
Dominus
DOSBox Moderator
 
Posts: 7299
Joined: 2002-10-03 @ 09:54
Location: Vienna

Re: Midiconfig by devicename

Postby KainXVIII » 2017-2-01 @ 21:26

Dominus wrote:and it's the same when you are not in the NC shell?

Yes, i specially checked it without NC.
Last edited by KainXVIII on 2017-2-01 @ 21:56, edited 1 time in total.
User avatar
KainXVIII
Member
 
Posts: 219
Joined: 2015-5-20 @ 15:04
Location: Yaroslavl

Re: Midiconfig by devicename

Postby Dominus » 2017-2-01 @ 21:28

And of course: does it work with lock stock DOSBox 0.74?
User avatar
Dominus
DOSBox Moderator
 
Posts: 7299
Joined: 2002-10-03 @ 09:54
Location: Vienna

Re: Midiconfig by devicename

Postby KainXVIII » 2017-2-01 @ 21:57

Dominus wrote:And of course: does it work with lock stock DOSBox 0.74?

Proof :happy:
You do not have the required permissions to view the files attached to this post.
User avatar
KainXVIII
Member
 
Posts: 219
Joined: 2015-5-20 @ 15:04
Location: Yaroslavl

Re: Midiconfig by devicename

Postby collector » 2017-2-01 @ 23:47

Works for me on Win7, both regular build and flac build.
User avatar
collector
l33t
 
Posts: 4016
Joined: 2003-1-15 @ 10:39

Re: Midiconfig by devicename

Postby Dominus » 2017-2-02 @ 00:14

Does it work if you use the new build without any autoexec commands or other commands? Asking to make sure you haven't accidentally another mixer program interfering
User avatar
Dominus
DOSBox Moderator
 
Posts: 7299
Joined: 2002-10-03 @ 09:54
Location: Vienna

Re: Midiconfig by devicename

Postby KainXVIII » 2017-2-02 @ 08:57

Holy cow! I finally found the cause of why this patch is not working for me - i need to delete mt-32 roms from dosbox folder (and i even don't use builtin MT-32 emulation, only external MUNT)
User avatar
KainXVIII
Member
 
Posts: 219
Joined: 2015-5-20 @ 15:04
Location: Yaroslavl

Re: Midiconfig by devicename

Postby rcblanke » 2017-2-02 @ 13:21

The mt-32 roms have nothing to do with this patch, the origin of this problem/conflict lies most likely in another patch included in ECE.
User avatar
rcblanke
Oldbie
 
Posts: 1305
Joined: 2005-4-01 @ 09:44
Location: Round 42

Re: Midiconfig by devicename

Postby Dominus » 2017-2-02 @ 13:35

Yes, probably something like "if roms in folder x -> midi=mt32emu" to have less config settings but screwing up everything else. Or mt32 emu is enabled by default and failing without the roms and thus enabling normal midi again.
User avatar
Dominus
DOSBox Moderator
 
Posts: 7299
Joined: 2002-10-03 @ 09:54
Location: Vienna

Next

Return to DOSBox Patches

Who is online

Users browsing this forum: No registered users and 3 guests