IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
foo_midi, decoder for General MIDI files
deus-ex
post Jan 16 2013, 12:14
Post #1





Group: Members
Posts: 255
Joined: 9-September 04
From: Earth
Member No.: 16882



Hi Kode54,

I was checking out the newly introduced ADLmidi emulator lately and I have a few comments/suggestions:

1. Suggestion to rearrange the foo_midi decoder configuration page in order gain more space for the FM patch drop down list, thus the entire FM patch strings are readable.
    I.e. exchange the location of the BASSMIDI and MUNT options with ADLmidi options. This way the width of the FM patch drop down list can be greatly increased.

2. Shouldn't the ADLmidi options be grayed out unless ADLmidi is the selected output plug-in?

3. Suggestion to sort the FM patch entries in alphabetical order, i.e. sort first by AIL, OP3, SB, TMB, Bisqwit, then by the game titles.
    Even better would be to have a list made of the game titles only, omitting the leading AIL, OP3, SB etc.. This list would be alphabetical sorted, showing only one game title per row which makes it quite easier to find a particular game entry.

4. Could an logic be implemented to predefine which FM patch is to be used for certain MIDI files? Like via an optional setting stored to the foobar playlist, or a config file (like <soundfont>.sflist) stored with the MIDI files.

5 AIL (Star Control 3, Albion, Empire 2, Sensible Soccer, Settlers 2, many others) = standard bank: This was the default patch file used in the AIL/MSI setup distributions (Fatman.opl).
   I suggest to add "default" in front of the game titles (default, Albion, Empire 2, ...). Also was used for the game Time Commando (developer of Little Big Adventure).

6. AIL (Kasparov's Gambit) = file15: This was also used for the game GateWorld.


Q1: Shall I provide you with additional FM patches currently not available in Foo_MIDI?
Q2: What is the file programs.txt used for? Does it belong to the recently added FMmidi emulator?

BTW, the Foo_MIDI component download page still holds a reference for FluidSynth to be built-in. And the link to the GIT hub is missing.

This post has been edited by deus-ex: Jan 16 2013, 12:15


--------------------
Best regards
deus-ex (MODLAND admin: ftp://modland.ziphoid.com)
Go to the top of the page
+Quote Post
kode54
post Jan 17 2013, 02:53
Post #2





Group: Admin
Posts: 4219
Joined: 15-December 02
Member No.: 4082



QUOTE (deus-ex @ Jan 16 2013, 03:14) *
1. Suggestion to rearrange the foo_midi decoder configuration page in order gain more space for the FM patch drop down list, thus the entire FM patch strings are readable.
    I.e. exchange the location of the BASSMIDI and MUNT options with ADLmidi options. This way the width of the FM patch drop down list can be greatly increased.

I'll look into this.

QUOTE (deus-ex @ Jan 16 2013, 03:14) *
2. Shouldn't the ADLmidi options be grayed out unless ADLmidi is the selected output plug-in?

And this.

QUOTE (deus-ex @ Jan 16 2013, 03:14) *
3. Suggestion to sort the FM patch entries in alphabetical order, i.e. sort first by AIL, OP3, SB, TMB, Bisqwit, then by the game titles.
    Even better would be to have a list made of the game titles only, omitting the leading AIL, OP3, SB etc.. This list would be alphabetical sorted, showing only one game title per row which makes it quite easier to find a particular game entry.

And this. You can take a look at my adlmidi repository and poke around in gen_adldata.cc, to see how to reorder the banks. Please do note that the Bisqwit 51 bank is hard coded to assume the instrument numbers that come from inserting all 51 of the previous banks in the exact order they're already in. The instruments are pruned for duplicates as they are inserted.

QUOTE (deus-ex @ Jan 16 2013, 03:14) *
4. Could an logic be implemented to predefine which FM patch is to be used for certain MIDI files? Like via an optional setting stored to the foobar playlist, or a config file (like <soundfont>.sflist) stored with the MIDI files.

I can look into this, but it does sound complicated, like I would need to define how certain settings can be stored in tag presets. I would probably implement it as something that is inserted into the tag database and read back on file open, and provide context menu options to save the current playback settings to the file, load settings from the file, and also clear the tagged settings.

QUOTE (deus-ex @ Jan 16 2013, 03:14) *
5 AIL (Star Control 3, Albion, Empire 2, Sensible Soccer, Settlers 2, many others) = standard bank: This was the default patch file used in the AIL/MSI setup distributions (Fatman.opl).
   I suggest to add "default" in front of the game titles (default, Albion, Empire 2, ...). Also was used for the game Time Commando (developer of Little Big Adventure).

Yes, and I also included another copy of the Fat Man set, both 2 and 4 operator versions, as bundled with Skunny 32-bit, among those OP3 sets. Yes, the generator does label that bank as a "standard" GM bank.

QUOTE (deus-ex @ Jan 16 2013, 03:14) *
6. AIL (Kasparov's Gambit) = file15: This was also used for the game GateWorld.

You're welcome to add that to the generator, or I can add it.

QUOTE (deus-ex @ Jan 16 2013, 03:14) *
Q1: Shall I provide you with additional FM patches currently not available in Foo_MIDI?

That would be great. If they're in formats already supported by the gen_adldata.cc in that repository, you only need to supply the bank files and information about them. If they're in different formats, it would be helpful if you could supply the format information so I can more easily write translators for them. Or you can write your own translators. biggrin.gif

The preferred data order a translator needs to load to is, first, 11 bytes of instrument data per 2 operator voice, in this register order:

{0x20,0x23,0x60,0x63,0x80,0x83,0xE0,0xE3,0x40,0x43,0xC0};

Optionally, a semitone finetune offset per 2 operator voice.

Then, applying to the whole instrument, be it two operator, coupled two operator, or four operator, an optional note number. Per Miles banks, the note number is treated as a positive offset if in the range of 0 - 19, a fixed note if 20 - 127, or a negative offset of 128 or greater. (Negative is applied as wanted note - offset - 128.)

It is best that the banks be supplied in their original format, or at least the smallest extracted files that contain them, with instructions or C++ code for extracting them from those files as necessary. See gen_adldata.cc, it contains a bunch of LoadSomeFormat() functions, which take relative paths to the bank files, bank numbers, and bank name prefixes, and load the data into the big table of instruments and instrument map.

QUOTE (deus-ex @ Jan 16 2013, 03:14) *
Q2: What is the file programs.txt used for? Does it belong to the recently added FMmidi emulator?

Yes, it's for fmmidi, which was lifted with very little modification from this program. The synthesizer does not actually appear to be designed after any particular FM chip, but rather implements a high level four operator sine wave based FM synthesizer, which is designed around a synthesizer class, containing instances of a channel class, which creates FM note generators from a note generator factory class. At initialization, the synthesizers are assigned a single note generator, and the instrument presets are loaded into the note generator.

QUOTE (deus-ex @ Jan 16 2013, 03:14) *
BTW, the Foo_MIDI component download page still holds a reference for FluidSynth to be built-in. And the link to the GIT hub is missing.

Fixed.
Go to the top of the page
+Quote Post
deus-ex
post Jan 17 2013, 11:40
Post #3





Group: Members
Posts: 255
Joined: 9-September 04
From: Earth
Member No.: 16882



Thank you for the update and taking my suggestions into account. smile.gif

QUOTE (kode54 @ Jan 17 2013, 02:53) *
You can take a look at my adlmidi repository and poke around in gen_adldata.cc

I already looked into bisqwit's adlmidi source before raising this thread, mainly to be able to read the entire FM patch strings.

QUOTE (kode54 @ Jan 17 2013, 02:53) *
I can look into this, but it does sound complicated, like I would need to define how certain settings can be stored in tag presets. I would probably implement it as something that is inserted into the tag database and read back on file open, and provide context menu options to save the current playback settings to the file, load settings from the file, and also clear the tagged settings.

1. I understand this is not trivial to implement, thus my alternative suggestion was to just use a simple text file. Upon loading a MIDI file foo_midi would need to check if such an text file, e.g. by the (hardcoded?) file name foo_mid.fmlst, does exist and load a predefined FM patch accordingly overriding current Foo_MIDI preferences. Each entry simply would look like this:

CODE
descent.mid, intmelo.bnk
credits.mid, rickmelo.bnk
...

2. In order to derive the internal FM patch filenames a meta field containing the currently used FM patch could be made available, which would be accessible from the file properties dialog upon playback . And/or simply provide the FM patch filenames in a documentation for the foo_midi plug-in.

3. Speaking of documentation I created one myself which I include in the foo_midi archive made available on MODLAND. Please have a look and let me know your thoughts, corrections, rejections and what not. smile.gif
If you think it is good enough to be included with your main distribution please fell free to do so.

CODE
MIDI Synthesizer Host, for Foobar2000 v1.1x
(c) Chris Moeller, http://kode54.foobar2000.org
https://github.com/kode54/foo_midi/commits/master
https://github.com/kode54/adlmidi
Emu de MIDI alpha by Mitsutaka Okazaki, VST Plug-in Technology by Steinberg.


Adds decoding support for General MIDI files and RIFF MIDI files as well as several
proprietary MIDI formats.


Plays through either one of the following:

· Emu de MIDI, a built-in "Chip tune"-like synthesizer (default).
   Does not require any soundfont.

· BASSMIDI, a BASS.DLL extension included with the plugin.
   Supports SF2 soundfonts. Additional soundfonts may be defined with a text file
   named <filename>.SFLIST, to be stored in the soundfonts folder. The text file
   is assumed to be UTF-8 encoded unless it contains an UTF-16LE byte order marker.
   You may copy the soundfont file names from Explorer and paste them into any
   unicode capable text editor (e.g. Notepad). The first defined soundfont is the
   base font, any following soundfonts add or replace instruments of the base font.

· Super MUNT GM, a built-in MT-32 emulator.
   Requires the PCM and control ROMs for either MT-32 or CM-32L to be located in
   the directory configured in preferences. The emulator will automatically be used
   to play any MIDI file containing MT-32 system exclusive messages, you don't need
   to select MUNT from the synthesizer list. Selecting MUNT only has an effect when
   playing non-MT-32 files in which case it automatically uploads a General MIDI
   emulation instrument set and enables an extended channel and polyphony mode to
   support the full 16 MIDI channels as well as 256 voices worth of polyphony.

· ADL MIDI, a built-in OPL3 emulator.
   Supports four-operator mode (FM synthesis) for playback of the proprietary MIDI
   formats AIL = Miles Sound System (MSI), DMX (Doom MIDI Extension), HMI (Human
   Machine Interfaces) and Creative IBK. Several built-in FM patches from a number
   of known PC games are selectable from the MIDI decoder configuration page.

· FM MIDI, a built-in Frequency Modulation emulator.
   Does not require any soundfont.

· VST instrument host.
   Plays through VST instruments installed to %programfiles%\Steinberg\VstPlugins,
   e.g. Edirol Hyper Canvas DXi VSTi. VST Instrument support requires a path to be
   configured in the Advanced section of Foobar2000's preferences before opening
   the regular MIDI decoder configuration page. It is recommended to only include
   instruments you may wish to use in this directory.


Supported formats:
.GMF .HMI, .HMP, .KAR, .LDS, .MDS, .MID, .MIDS, .MUS, .RMI, .XMI


Q1: Btw, the drop down list still isn't wide enough preventing several strings from being fully visible, so why not use the full width of the MIDI preferences screen?

Q2: What does the adlmidi setting Chips exactly do?

Q3: What do you think of my suggestion to omit leading text AIL, OP3, SB etc from the drop down list and provide an alphabetical sorted list just made of the game titles, showing one title per row/entry only? Each entry would be linked internally to the appropriate FM patch. Do you think it is feasible and convenient? If so I could edit the file gen_adldata.cc accordingly and send it to you.

Q4: Thankfully you often provide the latest release of bassmidi.dll with foo_midi (where do you get it from?). Then again included bass.dll is rather old, v2.4.7 from 2012-10-02. Is this for a reason? Btw, latest release of bass.dll I could get hold of is v2.4.9.16 from 2012-12-18.


--------------------
Best regards
deus-ex (MODLAND admin: ftp://modland.ziphoid.com)
Go to the top of the page
+Quote Post
kode54
post Jan 17 2013, 22:01
Post #4





Group: Admin
Posts: 4219
Joined: 15-December 02
Member No.: 4082



QUOTE (deus-ex @ Jan 17 2013, 02:40) *
1. I understand this is not trivial to implement, thus my alternative suggestion was to just use a simple text file.

I actually find the tag database easier to work with than searching for settings files on disk. The hard part is actually going to be interfacing a settings preset into the input. It would probably just involve either translating the global settings into a preset of variables, with overrides read from a binary tag structure.

You may be right that it would be a good idea to store a string or substring name for the bank, as the bank names and order could change. Well, maybe not. I was thinking that any bank additions would simply be appended to the existing list. Names could change, but bank numbers will not.

The new sorted bank list stuffs the bank numbers and their names into a list, then sorts it by the names. The configuration stores the internal bank number, not the sorted bank number.

QUOTE (deus-ex @ Jan 17 2013, 02:40) *
3. Speaking of documentation I created one myself which I include in the foo_midi archive made available on MODLAND. Please have a look and let me know your thoughts, corrections, rejections and what not. smile.gif
If you think it is good enough to be included with your main distribution please fell free to do so.

Cool, let's see here.

QUOTE (deus-ex @ Jan 17 2013, 02:40) *
· FM MIDI, a built-in Frequency Modulation emulator.
Does not require any soundfont.

Currently requires the programs.txt file, which is bundled. I may add an option to configure an alternate presets file, or even include an editor based on the one in fmmidi.

QUOTE (deus-ex @ Jan 17 2013, 02:40) *
· VST instrument host.
Plays through VST instruments installed to %programfiles%\Steinberg\VstPlugins,
e.g. Edirol Hyper Canvas DXi VSTi. VST Instrument support requires a path to be
configured in the Advanced section of Foobar2000's preferences before opening
the regular MIDI decoder configuration page. It is recommended to only include
instruments you may wish to use in this directory.

The program files path is misleading, as it no longer supports automatically reading VST instruments from that path. It explicitly requires a path to be configured before it will search for any instruments. It is not advised to use a path which will include too many DLL files, as it searches the entire path recursively, and a path containing a lot of files could take a long time to process.

QUOTE (deus-ex @ Jan 17 2013, 02:40) *
Q1: Btw, the drop down list still isn't wide enough preventing several strings from being fully visible, so why not use the full width of the MIDI preferences screen?

Sure, I could do that.

QUOTE (deus-ex @ Jan 17 2013, 02:40) *
Q2: What does the adlmidi setting Chips exactly do?

That controls how many emulated OPL3 chips are used per instance of the synthesizer. Each OPL3 chip supports 18 voices in 2 operator mode, but are actually configured for 4 voices in 4 operator mode and 10 voices in 2 operator mode. This limits the total polyphony of the synthesizer, depending on the types of instruments used.

4 operator instruments use 4 operator voices. 2 operator instruments use 2 operator voices. Pseudo 4 operator instruments (really pairs of 2 operator voices) like DMX banks use pairs of 2 operator voices.

And then full panning mode doubles the chip count and uses one set of chips for the left channel and another for the right channel.

QUOTE (deus-ex @ Jan 17 2013, 02:40) *
Q3: What do you think of my suggestion to omit leading text AIL, OP3, SB etc from the drop down list and provide an alphabetical sorted list just made of the game titles, showing one title per row/entry only? Each entry would be linked internally to the appropriate FM patch. Do you think it is feasible and convenient? If so I could edit the file gen_adldata.cc accordingly and send it to you.

Actually, separate/multiple individual titles per bank should probably be handled separate from gen_adldata.cc, or at least separately from the original bank list. It should be handled as a separate list, indexed with bank numbers and game/bank titles. It could also be pre-sorted in some arbitrary order.

I think the original bank list should remain as it is, or at least in the same order, so that Bisqwit 51 still works without modification. Or you can reorder things and remake that bank.

QUOTE
Q4: Thankfully you often provide the latest release of bassmidi.dll with foo_midi (where do you get it from?). Then again included bass.dll is rather old, v2.4.7 from 2012-10-02. Is this for a reason? Btw, latest release of bass.dll I could get hold of is v2.4.9.16 from 2012-12-18.

I usually get it from http://un4seen.com/stuff/bassmidi.zip. As for BASS itself, I don't actually use many of the features of BASS, and I hadn't known there was a new version to update to.
Go to the top of the page
+Quote Post
deus-ex
post Jan 18 2013, 01:07
Post #5





Group: Members
Posts: 255
Joined: 9-September 04
From: Earth
Member No.: 16882



QUOTE (kode54 @ Jan 17 2013, 22:01) *
The program files path is misleading, as it no longer supports automatically reading VST instruments from that path.

Right, I understand. I got that bit of information from the foo_midi component download page here on Hydrogenaudio. Looks like that page requires some more maintenance. smile.gif
Here's the updated documentation for your convenience.

CODE
MIDI Synthesizer Host, for Foobar2000 v1.1x
(c) Chris Moeller, http://kode54.foobar2000.org
https://github.com/kode54/foo_midi/commits/master
https://github.com/kode54/adlmidi
Emu de MIDI alpha by Mitsutaka Okazaki, VST Plug-in Technology by Steinberg.


Adds decoding support for General MIDI files and RIFF MIDI files as well as several
proprietary MIDI formats.


Plays through either one of the following:

· Emu de MIDI, a built-in "Chip tune"-like synthesizer (default).
   Does not require any soundfont.

· BASSMIDI, a BASS.DLL extension included with the plugin.
   Supports SF2 soundfonts. Additional soundfonts may be defined with a text file
   named <filename>.SFLIST, to be stored in the soundfonts folder. The text file
   is assumed to be UTF-8 encoded unless it contains an UTF-16LE byte order marker.
   You may copy the soundfont file names from Explorer and paste them into any
   unicode capable text editor (e.g. Notepad). The first defined soundfont is the
   base font, any following soundfonts add or replace instruments of the base font.

· Super MUNT GM, a built-in MT-32 emulator.
   Requires the PCM and control ROMs for either MT-32 or CM-32L to be located in
   the directory configured in preferences. The emulator will automatically be used
   to play any MIDI file containing MT-32 system exclusive messages, you don't need
   to select MUNT from the synthesizer list. Selecting MUNT only has an effect when
   playing non-MT-32 files in which case it automatically uploads a General MIDI
   emulation instrument set and enables an extended channel and polyphony mode to
   support the full 16 MIDI channels as well as 256 voices worth of polyphony.

· ADL MIDI, a built-in OPL3 emulator.
   Supports four-operator mode (FM synthesis) for playback of the proprietary MIDI
   formats AIL = Miles Sound System (MSI), DMX (Doom MIDI Extension), HMI (Human
   Machine Interfaces) and Creative IBK. Several built-in FM patches from a number
   of known PC games are selectable from the MIDI decoder configuration page.

· FM MIDI, a built-in Frequency Modulation emulator.
   Requires the file programs.txt, included with the plugin.

· VST instrument host.
   Plays through VST instruments, e.g. Edirol Hyper Canvas DXi VSTi. Requires a
   path to be configured in the Advanced section of Foobar2000's preferences BEFORE
   opening the regular MIDI decoder configuration page. Because the entire path is
   searched recursively it is recommended to only include instruments you may wish
   to use in this directory. A path containing a lot of files may take a long time
   to process.


Supported formats:
.GMF .HMI, .HMP, .KAR, .LDS, .MDS, .MID, .MIDS, .MUS, .RMI, .XMI


QUOTE (kode54 @ Jan 17 2013, 22:01) *

Ah, I see. I didn't have this ZIP file on my radar, I was only checking for updates of the EXE/DLL files in Ian's stuff folder. Bassmidi.dll was updated recently (2012-12-28), too.

And here is a small archive containing a few FM patches currently not available in adlmidi.


--------------------
Best regards
deus-ex (MODLAND admin: ftp://modland.ziphoid.com)
Go to the top of the page
+Quote Post
Nahkranoth
post Feb 20 2013, 15:39
Post #6





Group: Members
Posts: 57
Joined: 12-March 08
Member No.: 51973



Hi kode54!

I'd like to request such a thing:


If midi file is detected as XG then (if available) use Yamaha S-YXG50 .dll for playback (as in case with MT-32 midi files).

It's quite a hassle to switch between different player plugins as for now.

Go to the top of the page
+Quote Post
kode54
post Feb 26 2013, 05:06
Post #7





Group: Admin
Posts: 4219
Joined: 15-December 02
Member No.: 4082



I'm sorry, Dave, I'm afraid I can't do that.

Perhaps you can be satisfied with preset saving. Configure the synthesizer you want to use, select all the MIDI files you want it to be used with, then right click and select Save synthesizer preset, under the Utilities submenu. Remove preset will restore the selected files to using the configured default synthesizer.
Go to the top of the page
+Quote Post
Nahkranoth
post Feb 26 2013, 08:44
Post #8





Group: Members
Posts: 57
Joined: 12-March 08
Member No.: 51973



QUOTE (kode54 @ Feb 26 2013, 07:06) *
I'm sorry, Dave, I'm afraid I can't do that.

Perhaps you can be satisfied with preset saving. Configure the synthesizer you want to use, select all the MIDI files you want it to be used with, then right click and select Save synthesizer preset, under the Utilities submenu. Remove preset will restore the selected files to using the configured default synthesizer.


That's even better in my case w00t.gif Thanks a bunch!
Go to the top of the page
+Quote Post
kolen734
post Apr 8 2013, 07:03
Post #9





Group: Members
Posts: 1
Joined: 8-April 13
Member No.: 107570



Hello.

I just installed and trying to use this plugin.
When I try to open *.kar file I get "Unable to open item for playback (Unsupported file format):" message.
Am I missing anything? Could you please direct me to more information about this plugin?

Thanks in advance.
Go to the top of the page
+Quote Post
kode54
post Apr 28 2013, 07:19
Post #10





Group: Admin
Posts: 4219
Joined: 15-December 02
Member No.: 4082



Yeah, I fixed that. Stupid of me to amend the change log without actually applying the necessary changes.
Go to the top of the page
+Quote Post
Ligushka
post May 9 2013, 06:23
Post #11





Group: Members
Posts: 13
Joined: 5-October 09
Member No.: 73715



After updating to 1.209 automatically through foobar (1.2.6), I get: Failed to load DLL: foo_midi.dll, reason: The specified procedure could not be found.

The same appears after trying to manually install the plugin again.
Go to the top of the page
+Quote Post
kode54
post May 9 2013, 19:01
Post #12





Group: Admin
Posts: 4219
Joined: 15-December 02
Member No.: 4082



It would help if you could use this to indicate which libraries it is missing. Besides shared.dll and apparently ieshims.dll. It should be located under %appdata%\foobar2000\user-components\foo_midi, or under the same user-components directory inside the foobar2000 directory if you are using a portable installation.
Go to the top of the page
+Quote Post
Ligushka
post May 9 2013, 19:12
Post #13





Group: Members
Posts: 13
Joined: 5-October 09
Member No.: 73715



According to Dependency Walker, only SHARED.DLL and IESHIMS.DLL are missing for me.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 21st May 2013 - 20:07