Hydrogenaudio Forums

Hosted Forums => foobar2000 => 3rd Party Plugins - (fb2k) => Topic started by: deus-ex on 2013-01-16 11:14:39

Title: foo_midi
Post by: deus-ex on 2013-01-16 11:14:39
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.
Title: foo_midi
Post by: kode54 on 2013-01-17 01:53:45
[quote author=deus-ex link=msg=820858 date=1358334879]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.[/quote]
I'll look into this.

[quote author=deus-ex link=msg=820858 date=1358334879]2. Shouldn't the ADLmidi options be grayed out unless ADLmidi is the selected output plug-in?[/quote]
And this.

[quote author=deus-ex link=msg=820858 date=1358334879]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.[/quote]
And this. You can take a look at my adlmidi repository (https://github.com/kode54/adlmidi) 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 author=deus-ex link=msg=820858 date=1358334879]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.[/quote]
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 author=deus-ex link=msg=820858 date=1358334879]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).[/quote]
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 author=deus-ex link=msg=820858 date=1358334879]6. AIL (Kasparov's Gambit) = file15: This was also used for the game GateWorld.[/quote]
You're welcome to add that to the generator, or I can add it.

[quote author=deus-ex link=msg=820858 date=1358334879]Q1: Shall I provide you with additional FM patches currently not available in Foo_MIDI?[/quote]
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.

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 author=deus-ex link=msg=820858 date=1358334879]Q2: What is the file programs.txt used for? Does it belong to the recently added FMmidi emulator?[/quote]
Yes, it's for fmmidi, which was lifted with very little modification from this program (http://milkpot.sakura.ne.jp/fmmidi/). 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 author=deus-ex link=msg=820858 date=1358334879]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.[/quote]
Fixed.
Title: foo_midi
Post by: deus-ex on 2013-01-17 10:40:56
Thank you for the update and taking my suggestions into account.

You can take a look at my adlmidi repository (https://github.com/kode54/adlmidi) 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.

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: [Select]
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.
If you think it is good enough to be included with your main distribution please fell free to do so.

Code: [Select]
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.
Title: foo_midi
Post by: kode54 on 2013-01-17 21:01:23
[quote author=deus-ex link=msg=820971 date=1358419256]1. I understand this is not trivial to implement, thus my alternative suggestion was to just use a simple text file.[/quote]
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 author=deus-ex link=msg=820971 date=1358419256]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.
If you think it is good enough to be included with your main distribution please fell free to do so.[/quote]
Cool, let's see here.

[quote author=deus-ex link=msg=820971 date=1358419256]· FM MIDI, a built-in Frequency Modulation emulator.
  Does not require any soundfont.[/quote]
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 author=deus-ex link=msg=820971 date=1358419256]· 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.[/quote]
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 author=deus-ex link=msg=820971 date=1358419256]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?[/quote]
Sure, I could do that.

[quote author=deus-ex link=msg=820971 date=1358419256]Q2: What does the adlmidi setting Chips exactly do?[/quote]
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 author=deus-ex link=msg=820971 date=1358419256]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.[/quote]
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 (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.
Title: foo_midi
Post by: deus-ex on 2013-01-18 00:07:25
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.
Here's the updated documentation for your convenience.

Code: [Select]
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


I usually get it from http://un4seen.com/stuff/bassmidi.zip (http://un4seen.com/stuff/bassmidi.zip)

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 (http://www.hydrogenaudio.org/forums/index.php?showtopic=98935&view=findpost&p=821059) is a small archive containing a few FM patches currently not available in adlmidi.
Title: foo_midi
Post by: Nahkranoth on 2013-02-20 14:39:44
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.

Title: foo_midi
Post by: kode54 on 2013-02-26 04:06:29
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.
Title: foo_midi
Post by: Nahkranoth on 2013-02-26 07:44:40
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  Thanks a bunch!
Title: foo_midi
Post by: kolen734 on 2013-04-08 07:03:31
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.
Title: foo_midi
Post by: kode54 on 2013-04-28 07:19:40
Yeah, I fixed that. Stupid of me to amend the change log without actually applying the necessary changes.
Title: foo_midi
Post by: Ligushka on 2013-05-09 06:23:54
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.
Title: foo_midi
Post by: kode54 on 2013-05-09 19:01:30
It would help if you could use this (http://www.dependencywalker.com/) 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.
Title: foo_midi
Post by: Ligushka on 2013-05-09 19:12:26
According to Dependency Walker, only SHARED.DLL and IESHIMS.DLL are missing for me.
Title: foo_midi
Post by: grimes on 2013-10-16 17:19:58
I want to report a bug with new foo_midi 1.215.
In nearly all of my midi files the last seconds were cut off during playback.
foobar2000 1.2.9, Win7
Title: foo_midi
Post by: kode54 on 2013-10-16 18:08:19
This should be fixed with 1.216.
Title: foo_midi
Post by: romor on 2013-10-20 19:46:03
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.


Kode54, is this really fixed, as I get error while playing karaoke midis, with latest to date, and prior version of foo_midi?
MidiBar and everything else that supports midis, plays them fine

This is the error I get in console:

Code: [Select]
Opening track for playback: "G:\income\media\karaoke\Necu_Necu_Dijamante.kar"
on_endofplayback
Decoding failure at 0:00.000 (Unsupported format or corrupted file):
"G:\income\media\karaoke\Necu_Necu_Dijamante.kar"
Title: foo_midi
Post by: kode54 on 2013-10-21 03:26:20
Then it is obviously not just a renamed .MID file.
Title: foo_midi
Post by: romor on 2013-10-22 05:02:20
for example: http://freemidis.net/midi/Ekv/Krug.rar (http://freemidis.net/midi/Ekv/Krug.rar)
Title: foo_midi
Post by: kode54 on 2013-10-22 05:18:42
That file works here.

Are you sure you even have basic MIDI support working? If you have BASSMIDI selected but no working SoundFonts configured, it will pop that decode error on file start. The same goes for using MUNT or an MT-32 MIDI file without the MT-32 or CM32-L patches configured.
Title: foo_midi
Post by: romor on 2013-10-22 06:02:24
That was it. I use Windows bassmidi driver that you and mudlord prepare and wasn't aware that it has no impact on foo_midi settings, where bassmidi groupbox was set in the past to now non-existing soundfont. So, not even regular midis were playable, which I assumed it's not the case.

Sorry
Title: foo_midi
Post by: kode54 on 2013-10-22 10:59:48
Yeah, foobar2000 components can't really use system synthesizers, because they usually direct their own audio output to the system in real-time. foobar2000 inputs need to be able to generate sample data internally, and on demand.

Actually, foo_midi came out before the drivers did.

Tip: If you want to keep foo_midi in sync with the SoundFont settings you use with the driver, point it to C:\Windows\bassmidi.sflist for port A, or C:\Windows\bassmidi_b.sflist for port B.
Title: foo_midi
Post by: n99 on 2013-10-25 23:03:36
Huge error in the latest update. I guess you changed the bass DLL and triggered its inbuilt anti-tampering mechanism.

It now gives this message: "This file has been tampered with and MAY BE INFECTED BY A VIRUS!"

This stops foobar2000 from working.

Title: foo_midi
Post by: kode54 on 2013-10-26 01:00:08
Update it again.
Title: foo_midi
Post by: johnsonlam on 2013-10-27 11:25:01
Just want to report ver 1.223 still have some MID file report as invalid, they can be played in my last version (should be 3 months ago).
Title: foo_midi
Post by: kode54 on 2013-10-27 12:49:59
I had a little problem with my new range checking code. I repeatedly made backwards range comparisons of if ((end - it) > the_size) return fail;, instead of checking < the_size. I caught most of them before committing the final work, but missed one in the Standard MIDI track processor, where it handles System Exclusive messages. Fixed now.
Title: foo_midi
Post by: Shuttleforce on 2013-10-27 13:09:46
johnsonlam's post me too...
I can not play MIDI files of some v1.223 update later
(http://imgz.co.za/images/2013/10/27/foomidibug.png)
Title: foo_midi
Post by: kode54 on 2013-10-27 13:34:42
You just missed the post where I said I fixed that with v1.224.
Title: foo_midi
Post by: Shuttleforce on 2013-10-27 13:50:10
You just missed the post where I said I fixed that with v1.224.

ThankYou! Kode54
Title: foo_midi
Post by: Melchior on 2013-11-06 00:16:47
Hey Kode is the VSTi search path:
{Preferences-->Advanced-->Midi Decoder-->VSTi search path:}

Is that Absolute or relative path or will it take either?
loi  =D

I am having no luck with quick Google searches for MUNT or BASSMIDI...
I found forum posts...  but what am I looking for...
Title: foo_midi
Post by: kode54 on 2013-11-07 03:58:26
The search path is absolute. I can try to make it relative to the profile path later, if you insist.

MUNT: MT-32 / CM-32L simulator library.
BASSMIDI: Ian Luck's SoundFont MIDI synthesizer library, an extension to his existing BASS sound library.
Title: foo_midi
Post by: Melchior on 2013-11-07 19:00:52
The search path is absolute. I can try to make it relative to the profile path later, if you insist.

MUNT: MT-32 / CM-32L simulator library.
BASSMIDI: Ian Luck's SoundFont MIDI synthesizer library, an extension to his existing BASS sound library.


Thanks for the Info Kode54  =D 

well it could hurt to have it function both ways as an added improvement to your already amazing extensions ;D

are there packages of either type that don't require install.... loi I kinda already have a installed Midi Player called

- Yamaha soft-synthesizer s-yxg50 (http://img97.echo.cx/img97/1341/softsynth14or.png)

the college I was at had it on all the PCs and I grabbed a copy years later...
I never was able to find out where the wave tables were stored though..... anyway I have been following your work with foo_midi so I can listen to the hand full of midi files I have from those college days (2001-2002, lol only had floppy discs back then so no way I could do MP3s lol) from within  Foobar2000 =D


Title: foo_midi
Post by: kode54 on 2013-11-07 22:59:45
If you locate a handy copy of the S-YXG50 VSTi, hopefully modified to support non-Yamaha VSTi hosts, you can use it with this component.
Title: foo_midi
Post by: Melchior on 2013-11-08 18:55:14
If you locate a handy copy of the S-YXG50 VSTi, hopefully modified to support non-Yamaha VSTi hosts, you can use it with this component.


ooh O_o Cool hopeful there is some out there somewhere...
Title: foo_midi
Post by: johnsonlam on 2013-11-16 01:26:38
I had a little problem with my new range checking code. I repeatedly made backwards range comparisons of if ((end - it) > the_size) return fail;, instead of checking < the_size. I caught most of them before committing the final work, but missed one in the Standard MIDI track processor, where it handles System Exclusive messages. Fixed now.


I've double checked, problem gone, thank you!
Title: foo_midi
Post by: n99 on 2015-07-22 21:46:23
foobar2000 says this MIDI file is corrupted, but it plays fine in other players (MPC-HC for example): http://keygenmusic.net/music/phrozencrew/P...izerXP1.0nfo.7z (http://keygenmusic.net/music/phrozencrew/PHROZENCREW-CustomizerXP1.0nfo.7z)
Title: foo_midi
Post by: kode54 on 2015-07-23 04:02:07
Contains a bunch of MT-32 SysEx messages that claim it's an MT-32 file, so you'll need to install some MT-32 control/PCM ROMs (or CM32-L).
Title: foo_midi
Post by: ELP on 2015-09-22 21:17:05
Hello kode54,

Foo-Midi 1.245

SYSEX dumps for MUNT is now broken.
External dump  &  for mt32 MIDI files that already include SYSEX dump

(Crash location:
Module: foo_midi
Offset: 3CA48h)


foo-midi 1.243 works fine


Greetings

EDIT:
PS
At your Git, I just saw that there was some MUNT changes within 1.244.
I do not have this version, so i can´t test this.
Maybe the error refers at these changes!?

- Version is now 1.244
- Fix MUNT by updating to the latest version and correcting how its API is used

-         _synth->playSysex( start, sequence_end - start + 1 );
+         _synth->playSysexNow( start, sequence_end - start + 1 );

etc.pp

As i said, foo-midi 1.243 MUNT and SYSEX dumps works fine.
Title: foo_midi
Post by: kode54 on 2015-09-23 02:01:52
Please let me know if this build fixes it for you:

http://kode54.foobar2000.org/foo_midi.fb2k-component (http://kode54.foobar2000.org/foo_midi.fb2k-component)
Title: foo_midi
Post by: ELP on 2015-09-23 10:13:48
Please let me know if this build fixes it for you:

http://kode54.foobar2000.org/foo_midi.fb2k-component (http://kode54.foobar2000.org/foo_midi.fb2k-component)


No it doesn´t, kode54

No matter which of my many mt32 MIDI files.

If i load an mt32 file that dont include any Lib. SYSEX Dump and or without dump external it plays normal but then of course over BASSMIDI and not with the MUNT Emu.

Illegal operation:
Code: C0000005h, flags: 00000000h, address: 0159C9A8h
Access violation, operation: read, address: 00000000h
Last win32 error: 38
(ERROR_HANDLE_EOF
    38 (0x26)
    Reached the end of the file.
(

Call path:
playback_process entry=>input_decoder::run

Registers:
EAX: 061F9A58, EBX: 061F9A58, ECX: 00000000, EDX: 017CD630
ESI: 00000004, EDI: 00000000, EBP: 0612F4D0, ESP: 0612F4A8

Crash location:
Module: foo_midi
Offset: 3C9A8h

------

V-1.243 MUNT works fine
x86(XP) and with x64 WIN7

Greetings
Title: foo_midi
Post by: ELP on 2015-09-23 11:44:19
EDIT:

is has really to do with the MUNT Synth and not only with SYSEX because

if i force SUPER MUNT to play any MIDI File it (V1.245/46) instantly crash and always with the same error code 38.
with all other synth Emu´s like adl,fm, opl, bass and emu de- no problem.

I have to add that i test this with the older XP x86 audio/midi machine.
Title: foo_midi
Post by: kode54 on 2015-09-24 01:58:59
And I expect you to submit your crash reports to the tracker so that I can see them, including the minidump (.dmp) that is generated. I don't see any recent crashes, except for one from July from someone running a foo_midi release from 2012.
Title: foo_midi
Post by: ELP on 2015-09-24 03:30:30
And I expect you to submit your crash reports to the tracker so that I can see them, including the minidump (.dmp) that is generated. I don't see any recent crashes, except for one from July from someone running a foo_midi release from 2012.

It is the same with an fresh portable 1.38 with minimal needed third components(only foomidi and Asio support) installation.
I send the report to the foo tracker. The Super-MUNT mode / foo_midi 1.245 & 1.246 crash foobar 1.3.8 ; Super-MUNT 1.243  do not crash.

I have added also an link to my dropbox with the foobar Report and the Mini Dump

Crash-Report (https://www.dropbox.com/s/2psca3xfy761b5z/crash%20reports.7z?dl=0)


Greetings
Title: foo_midi
Post by: kode54 on 2015-09-24 08:46:12
I can't reproduce it on anything newer than Windows XP. Looks like I'm downgrading Visual Studio to 2010 and dropping this whole XP SDK nonsense.
Title: foo_midi
Post by: kode54 on 2015-10-04 10:08:10
Try now, from http://kode54.foobar2000.org/foo_mid.fb2k-component (http://kode54.foobar2000.org/foo_mid.fb2k-component)
Title: foo_midi
Post by: Master_E on 2015-10-06 06:29:52
I feel like such a dunce for not fixing this issue I'm having by myself, but I exported an .sflist from XMplay's MIDI decoder and it isn't loading any instruments from other .sf2 files other than the latest instrument I assigned a soundfont to.

It's behaving as if I just popped an .sf2 file in regularly and I want it to load instruments from other soundfonts like it does in XMplay. Mind giving me any hints on how to resolve this?

While I'm here, I love your work kode54. Until I started browsing that Japanese f2k .dll library, I used to have ALL your plugins. Still do have most of 'em. Thanks for all you've done.
Title: foo_midi
Post by: ELP on 2015-10-07 00:37:56
1.247, released on 2015-10-06

Now, the mt32 mode works again, kode54.
No problems anymore, great.
 



BTW nothing special but i wonder why you use the older bass wavpack version 2.4.4.0 within foo-midi, if there is an newer official
BASSWV 2.4.5.1
Title: foo_midi
Post by: kode54 on 2015-10-08 01:19:06
Because there is no update notifier to tell me there are newer releases, and I never bother to check for them manually.
Title: foo_midi
Post by: worldlinerai on 2015-11-27 04:50:46
Hi,

I just want to report that the S-YXG50 VSTi does not work well with the newest version of foo_midi.

For some reason, it runs the S-YXG50 in default setting every time I play a midi file. The default setting puts the S-YXG50 at 32-Note polyphony meaning that most of my MIDI files are not playing properly (dropped notes, frequent muting, silent tracks).

I tried using the configuration option in the preferences menu to increase it to 128 Note Polyphony, but it is still causing the same problem.

It used to work fine before, but it started happening when I reinstalled the foobar2000 program + foo_midi plugin. Is there any way to fix it or get the vsthost32.exe to accept VST settings?
Title: foo_midi
Post by: zackoftrades333 on 2015-12-11 00:57:07
I've been playing around with the Super MUNT GM and I've been noticing a couple problems.

1)The sierra/kings quest 6 set doesn't seem to be made for GM that well. Some instruments are getting replaced by REALLY annoying noises or just don't play at all.

(although when compatible, I usually prefer how it sounds over the Roland set, but not always.)

Not sure how difficult it is to (if you can) edit the set to replace said instruments with working ones from the Roland set?

2)Some of the MIDI files I own are making a bunch of crackling sounds like a corrupted audio file when I play them with MUNT, but with a roland Hyper Canvas VST for example, it sounds fine on the other output plug-ins.

It also sounds fine if I render it to WAV with another Foobar plugin.

Not sure why it's doing that when I have a pretty capable CPU and all...
Title: foo_midi
Post by: zackoftrades333 on 2015-12-11 01:24:56
Ok nvrm about the crackling, apparently my buffer was set really low.

still though, I understand if the sounds are sound effects or something to be compatible with the sierra midis, but if there could be a 3rd mixed option it would be great.

(Still have no idea how feasible that is though, so its okay if you can't.)
Title: Re: foo_midi
Post by: deus-ex on 2016-11-21 15:56:53
Hi Kode54,

I hope you are doing well. Today I tried your most recent release of foo_midi v2.0, only to find that it won't load any MIDI file at all, throwing the error message "Unsupported format or corrupted file". Going back to v1.256 I found that version to behave all the same. Going further back to the then previous release v1.254 everything is working well again. Perhaps this issue is related to the switch from MSVC 2015 in v1.254 to MSVC 2010 with release v1.256? Using Windows 10 Pro 64-bit here.
Title: Re: foo_midi
Post by: kode54 on 2016-11-23 00:43:06
Same OS here, works as expected. Check your configuration.
Title: Re: foo_midi
Post by: deus-ex on 2016-11-23 15:34:55
Same OS here, works as expected. Check your configuration.
I did that, I also tried with a fresh setup. Every output plug-in (Emu de MIDI, adlmidi, fmmidi, etc.) of MIDI player  is working, except for BASSMIDI. The bass.dll appears to get not loaded although all required files are available in the folder of the plugin. Simply overwriting foo_midi.dll, vsthost32.exe and vsthost64.exe with the files from the v1.254 release fixes the issue, BASSMIDI is working fine again.

EDIT:
I just tried with a vanilla installation of foobar2000 v1.3.13 and foo_midi v1.2.56 as the only additional plug-in. Again all output options of foo_midi work, except for BASSMIDI. Replacing the foo_midi files with the v1.254 versions BASSMIDI is working again.
Title: Re: foo_midi
Post by: kode54 on 2016-11-24 01:20:54
I didn't even change anything BASS/BASSMIDI related. Well, except for the new SFLIST parser. I'll need to see your sflist files, even if only privately.
Title: Re: foo_midi
Post by: deus-ex on 2016-11-24 16:12:25
Hi Kode54,

please find my SoundFonts.sflist enclosed in a RAR archive attached below.
Title: Re: foo_midi
Post by: kode54 on 2016-11-25 00:50:56
I realize it's not very helpful, but have you tried adding the files back to the sflist one at a time until it stops working? I do eventually need to add error reporting for the sflist parser, down to the line number where it fails. Of course, this won't be terribly useful, as it'll be parsed into JSON first.

So maybe a report of exact failure file instead.
Title: Re: foo_midi
Post by: arch21 on 2016-11-25 11:49:12
@kode54 any reason why all of your components removed from foobar2000 site?
Title: Re: foo_midi
Post by: kode54 on 2016-11-25 19:29:39
Drama that I'd rather not get into here. I'm taking a break from things.
Title: Re: foo_midi
Post by: deus-ex on 2016-11-25 21:20:54
Drama that I'd rather not get into here. I'm taking a break from things.
I'm really sorry to hear that. I hope you and the related person(s) can sort out the issue and you can find an agreement that allows you to continue where you left off. You have my gratitude for all the valuable content you have contributed over the many years, without asking for anything in return.

I still owe you an answer regarding the following:
I realize it's not very helpful, but have you tried adding the files back to the sflist one at a time until it stops working?
Thank you for the hint! I did that and managed to get the MIDI player to fully work again as expected. The issue was not related to any of the Soundfonts or MIDI files, but to the SoundFont.sflist itself. Recreating this list Soundfont by Soundfont from scratch and then comparing the final working result to the old one I found the following difference:

(http://i.imgur.com/ifIrVxi.png)

The hexadecimal representation of the difference is EF BB BF. This additional content is not visible when viewing or editing the file in text mode, and I have no idea how it ended up in the file. Anyway, your new Soundfont.sflist parser obviously chocked on it while the old one ignored these extra values.
Title: Re: foo_midi
Post by: KDDLB on 2016-11-25 21:48:04
EF BB BF is the byte order mark (https://en.wikipedia.org/wiki/Byte_order_mark) for Unicode. Apparently the new SFList parser is choking on that...

And I have yet to make the SFList JSON editor...
Title: Re: foo_midi
Post by: deus-ex on 2016-11-25 22:13:19
Hi KDDLB,

thanks for the clarification. Yes indeed my SoundFont.sflist file is saved in Unicode format, so is the one I just recreated. Yet the new one does not carry that extra values. Probably my text editor Notepad++ or the then used plug-in NppTextFX added the value at a  certain occasion without me recognizing it.
Title: Re: foo_midi
Post by: kode54 on 2016-11-25 23:58:48
This is fixed in source now, as well as the sflist public gist.
Title: Re: foo_midi
Post by: Brazil2 on 2016-11-28 09:05:57
I'm taking a break from things.
Not a good reason to punish us by removing all of your components IMHO.
We have done nothing wrong.
Title: Re: foo_midi
Post by: deus-ex on 2016-11-28 10:27:34
I'm taking a break from things.
Not a good reason to punish us by removing all of your components IMHO.
We have done nothing wrong.

The way you are quoting Kode54 puts his message out of context. His full post was:
Drama that I'd rather not get into here.  I'm taking a break from things.
Which means we do not know the reason for his motivation at all, so we have no basis to judge upon.

Title: Re: foo_midi
Post by: kode54 on 2016-11-29 02:25:46
It has everything to do with IRC drama, and nothing to do with my user base. Guess who gets hurt by it? Unfortunately, it's my user base.

I'll probably restore things back to the way they were, and get rid of this uniquely identified download system.
Title: Re: foo_midi
Post by: Melchior on 2016-11-30 00:37:34
It has everything to do with IRC drama, and nothing to do with my user base. Guess who gets hurt by it? Unfortunately, it's my user base.

I'll probably restore things back to the way they were, and get rid of this uniquely identified download system.
I'm sorry to hear you are having IRC trouble... :(
I hope it all works out some how..
I was worried when all your work disappeared...
Title: Re: foo_midi
Post by: Chibisteven on 2016-11-30 01:41:36
Nuclear option?  This all of sudden showed up.
Title: Re: foo_midi
Post by: kode54 on 2016-11-30 02:11:07
Nuclear Option = Nuked emu opl coupled with the two MIDI players that were otherwise only available as Windows drivers. One of them is the DMX / Doom / etc sound system with every bank set I could find, and the other is a port or recreation of the MSOPL.DRV, down to the flaws. (See: pitch wheel underflows/wraps on D_OPENIN.MUS and ROBOCREP.MID, etc.)

I chose to enable the "extended" mode for both of these drivers, which I created myself. An inaccuracy in the most accurate OPL3 emulator: Sinusoidal panning control over any of the running channels, through a proprietary register switch to activate it, and another register to control the panning position of a given channel, which is activated and controlled by the two drivers when extp is set enabled. Otherwise, they both hard pan according to their original panning dead zones.
Title: Re: foo_midi
Post by: Chibisteven on 2016-11-30 02:46:48
I'm wondering how close the OPL3 emulation comes to that Windows 95 driver.  Dusts off S&K Collection MIDIs.
Title: Re: foo_midi
Post by: deus-ex on 2016-11-30 21:04:20
I'll probably restore things back to the way they were, and get rid of this uniquely identified download system.
I am relieved to see that you made all your plug-ins publicly available again. Thank you for the turn-around.
Title: Re: foo_midi
Post by: Chibisteven on 2016-11-30 21:37:31
Sinusoidal panning control over any of the running channels, through a proprietary register switch to activate it, and another register to control the panning position of a given channel, which is activated and controlled by the two drivers when extp is set enabled. Otherwise, they both hard pan according to their original panning dead zones.

An option to turn it off would be nice.  Can't seem to find it.
Title: Re: foo_midi
Post by: kode54 on 2016-12-01 02:46:35
You want hard panned stereo? OK, I'll add a checkbox for that. Done.
Title: Re: foo_midi
Post by: Chibisteven on 2016-12-02 05:43:00
You want hard panned stereo? OK, I'll add a checkbox for that. Done.

Thank you!
Title: Re: foo_midi
Post by: arch21 on 2017-01-10 09:16:39
BassMidi VSTi (http://falcosoft.hu/softwares.html#bassmidi_vsti) doesn't work. Will you support for this? thanks.
Title: Re: foo_midi
Post by: kode54 on 2017-01-10 18:44:30
BassMidi VSTi (http://falcosoft.hu/softwares.html#bassmidi_vsti) doesn't work. Will you support for this? thanks.
This is unlikely to ever work unless I remove my own BASSMIDI support from the component, since we're both importing conflicting versions of the BASS and BASSMIDI libraries. Not like you're seeing any benefit to using it as a VSTi under this player, since you can't access the real time editor of any playing instance.
Title: Re: foo_midi
Post by: arch21 on 2017-01-11 07:53:00
Okay, I understand. I guess it's better not to change anything. Thank you. :)
Title: Re: foo_midi
Post by: attachmentDownload on 2017-02-14 15:08:32
Hi all, just a quick question: what is the maximum polyphony of the BASSMIDI option in foo_midi?
Title: Re: foo_midi
Post by: jeremynsl on 2017-04-23 20:18:32
Hey,

I'm trying to get MIDIs from the DOS game Gateway 1 to play with adlib emulation.  It works, but the instrumentation is way off.  Here is what it should sound like (from Dosbox)
https://www.youtube.com/watch?v=9ct5aJFl30M

Is it possible to extract instruments from the game somehow?  I got the MIDIs from here:
http://www.mirsoft.info/gmb/music_info.php?id_ele=MTM0MTE=

I thought at first it makes more sense to play from the original game files using foo_adplug but the .mus files in the game folder won't be accepted by the plugin.  Any ideas?
Title: Re: foo_midi
Post by: kode54 on 2017-06-03 03:55:21
The .MUS files included with the game are just multi-file banks containing standard MIDI files. The instrument data is presumably in one of the game's data files or executables.
Title: Re: foo_midi
Post by: arch21 on 2017-06-24 23:25:48
hi, kode54
Does foo_midi actually support midi type 2? I just happened to know this type of midi from here (http://www.vogons.org/viewtopic.php?f=24&t=48207&sid=03bbc61fad10c6aad3e4ebd892139cc5&start=460#p591941).
Regards.
Title: Re: foo_midi
Post by: kode54 on 2017-06-24 23:38:19
It separates type 2 files into individual sub-songs.
Title: Re: foo_midi
Post by: bennetng on 2017-07-08 13:52:36
Hi kode54,

Does foo_midi support multi-port MIDI files? Those files have 0x21 port info already and can be correctly played by TMIDI Player with my SC-D70 for example.

BTW before I post this I did google for the solution, and accidentally I saw you mentioned SC-VA in another forum, but I can say it doesn't always sound like the real thing. Maybe they should hire you to fix those pathetic bugs.

https://forum.cockos.com/showpost.php?p=1861656&postcount=12
Title: Re: foo_midi
Post by: kode54 on 2017-07-09 02:38:31
Yes, multiple ports are supported, up to three ports at this time. Ports are allocated not by port number, since some files use port names and have a unique port name on each track. Rather, they are allocated by each unique track using the same channel as another track that has a different port identifier.
Title: Re: foo_midi
Post by: VEG on 2017-07-25 09:06:39
bassopus.dll, basswv.dll, bass_mpc.dll, bassflac.dll
Why does foo_midi include all these files? It seems that they are not required for playing MIDI.
Title: Re: foo_midi
Post by: KDDLB on 2017-07-25 09:18:16
They're used if you have soundfonts with audio compression.
Title: Re: foo_midi
Post by: garbanzo.bean on 2017-08-11 14:29:53
Can someone please help me understand what I need in order to play these files?

https://drive.google.com/file/d/0B2uObEBH_jRHUGRXZFRQSHIzd3M/view

There are two folders - it's the CM-32L files that I'm struggling with. They generate an "Invalid MIDI File" error when I try to play them. I have CM-32L PCM and Control ROMs referenced under the MUNT data path in the foo_midi settings.

Thanks!
Title: Re: foo_midi
Post by: kode54 on 2017-10-05 20:49:18
Sorry I took so long to respond to that one report, it's a weird one though. Running status for SysEx commands. Basically, a F0 command, length, and unterminated sequence (no F7), then a delay, then an F7 command, with the rest of the SysEx sequence following it, terminated by another F7. Apparently, this was sort of normal in some MIDI files? Anyway, it's now supported.
Title: Re: foo_midi
Post by: bennetng on 2017-10-14 19:25:07
Apparently, this was sort of normal in some MIDI files?
The files are definitely abnormal. I am not familiar with pre-GM stuff but it could be caused by real time recording through physical MIDI interfaces and cables, or some buggy ripping software.

Sometimes buggy MIDI files can hang my synthesizer and I needed to power cycle it.
Title: Re: foo_midi
Post by: kode54 on 2017-10-15 01:07:03
My library will read those sort of files, but will automatically normalize the SysEx messages into single whole message blocks.
Title: Re: foo_midi
Post by: bennetng on 2017-10-16 13:53:43
My library will read those sort of files, but will automatically normalize the SysEx messages into single whole message blocks.
Can you elaborate a bit more? I read some of your codes but I am not sure if I understand them correctly.

Take the attached song as example. myTool.txt is an incomplete tool I wrote to extract SysEx data. It simply gets the bytes according to the reported length after "F0". As you can see, there are some illegal values in delta time 2040.

sonar.txt: the stuff that Sonar read from that SysEx entry.

reaper.txt: Reaper gave up and stopped to parse the file just before that entry.

How do you use the logic of running status to read SysEx? What SysEx values did you get from foo_midi? Thanks.
Title: Re: foo_midi
Post by: kode54 on 2017-10-18 01:22:20
F0 <running length, in this case, 255> <255 bytes follow> <another delta tick count> F7 <running length, remainder of SysEx> <specified length follows, ends with F7>

If you use my tomid/2mid tool linked with this latest version of midi_processing, it can normalize these split up SysEx messages, padding them on the end with the extra tick counts that surrounded the continuation blocks.
Title: Re: foo_midi
Post by: bennetng on 2017-10-18 06:30:57
Thanks for the explanation.
Title: Re: foo_midi
Post by: bennetng on 2018-02-24 15:27:50
Hi kode54, I updated my tool so that it supports multi-part SysEx messages, but I found foo_midi cannot read some files (attached).

These files are totally fine in other MIDI players and sequencers. I think I found a foo_midi bug.
Title: Re: foo_midi
Post by: kode54 on 2018-02-25 04:18:23
Those are either encoded incorrectly, or SysEx is even weirder than I thought. MF2T decodes those SysEx sequences as "Arb" arbitrary data. They are encoded with a 0xF7 <length> header for the only block of data, with the 0xF0 inside the data sequence.

My library only handles sequences that start with a 0xF0 <length> sequence, followed by 0xF7 <length> sequences. I suppose I can change it to accept 0xF7 started sequences that are missing a 0xF0 started sequence, so long as they start with 0xF0 in the data. But then they'll have to separate the sequences by checking for a 0xF7 on the end of any arbitrary block. Or worse, in the middle of a block, followed by another 0xF0. Ugh.
Title: Re: foo_midi
Post by: bennetng on 2018-02-25 07:06:42
Both Sonar and Reaper don't show any SysEx in their event list, but they don't show any error and simply treat them as MIDI files without SysEx data.  MPC-HC and vanBasco also play the files and all of them have the same duration and timecode so they just ignore the offending messages and proceed to the next delta tick.
Title: Re: foo_midi
Post by: Lynxen on 2018-05-20 03:56:51
Hey Kode54, any chance you could update this plugin to use the latest Nuked OPL version?
Title: Re: foo_midi
Post by: kode54 on 2018-05-21 03:09:54
Done. And I also slip in my own modifications, which are published in the foo_midi repository. Only one simple modification: A special register to allow panning of the (up to) 18 channels of the chip.
Title: Re: foo_midi
Post by: Lynxen on 2018-05-22 09:05:52
Awesome, that was quick, thank you.

Why is it that extracted dos midi music sounds a bit off compared to Dosbox ECE, which uses the same Nuked emulation? I guess there's more to it than just emulating the chip accurately? I'm out of my depth with this stuff.
Title: Re: foo_midi
Post by: kode54 on 2018-05-23 00:38:02
Dosbox resamples it from 49716Hz to whatever rate you have set, using a running average resampler. I resample using a sinc resampler.

It also depends on which Adlib emulator you're using. The "Nuclear Option" drivers use Nuked OPL3, while AdPlug uses the Dosbox "fast" emulator, mainly because it defaults to using 10 instances at once.
Title: Re: foo_midi
Post by: warren_d on 2018-08-27 03:27:31
Hi kode54,

The latest version of foo_midi (2.1.3) has garbled/choppy playback of MIDI files when using the fmmidi plug-in.  All of the other plug-ins play files just fine, and fmmidi playback was fine in previous versions (as far as I can remember).  This is using foobar2000 1.4 on Windows 10 version 1803, for what it's worth.
Title: Re: foo_midi
Post by: kode54 on 2018-08-28 13:29:58
This should be fixed now. It was due to some synthesis crap I added that didn't really have much benefit, and was apparently super slow.
Title: Re: foo_midi
Post by: arch21 on 2018-08-28 21:46:35
version 2.1.4, won't open midi preference page once vsti is set
Title: Re: foo_midi
Post by: kode54 on 2018-08-29 09:31:39
Cannot reproduce. It has to enumerate the plugins installed first before it can display the preferences page, so you'll have to wait for it to finish, assuming you have a lot of VST plugins. It has to scan them all, to determine which ones are instruments.
Title: Re: foo_midi
Post by: arch21 on 2018-08-29 10:01:46
I have only one VSTi plugin, with just a dll atm. I also try with fresh portable, foobar2000 becomes not responding when open midis page.
Title: Re: foo_midi
Post by: kode54 on 2018-08-29 11:24:24
That was fast. Another update, to undo something I was told to fix. Apparently, I really do need a message pump within the VSTi enumerator, or else the whole process deadlocks. foobar2000 1.4.1 is also supposed to include a fix for preferences pages including their own message pump, so that users can't swap prefpanes while one is still loading, causing a bug reported earlier.

Guess what? Neither of these things causes bugs in Wine. Isn't FOSS wonderful?
Title: Re: foo_midi
Post by: arch21 on 2018-08-29 16:10:03
the component is still listed as 2.1.4 on website, the file itself is correct. thanks for fix it. :)
Title: Re: foo_midi
Post by: kode54 on 2018-08-29 22:58:34
Fixed that version listing, too.
Title: Re: foo_midi
Post by: arch21 on 2018-09-28 09:08:50
adlmidi uses a lot of cpu power. I use default settings. Is there kind of midi that I should not play with it? I try with some classic musics.
Title: Re: foo_midi
Post by: Thundik81 on 2018-09-28 15:47:49
Fixed that version listing, too.

Not yet on your site :P
(JSON's listing (https://kode54.net/fb2k/json.php) is obsolete?)
Title: Re: foo_midi
Post by: kode54 on 2018-09-29 01:13:41
The JSON doesn't contain version numbers. Also, the indexes for the web site are server side generated now, so they'll populate search engines.
Title: Re: foo_midi
Post by: LoadingScreen on 2018-09-29 17:25:21
adlmidi uses a lot of cpu power. I use default settings. Is there kind of midi that I should not play with it? I try with some classic musics.
I made an account to ask about this exact issue. I don't know the exact cause (Because I'm not a programmer), but the CPU usage does drop dramatically if you lower the number of emulated chips from 10 to 5. Of course, this causes some other problems. What's odd is that before now, adlmidi worked fine with 10 emulated chips, so this must be a new issue.
Title: Re: foo_midi
Post by: kode54 on 2018-09-30 00:43:19
The new issue is that the new library defaults to using Nuked OPL3 emulator instead of the much faster and mostly as accurate Dosbox OPL3 core. I should add an option, but the preferences dialog is already crammed, so I'll just make Dosbox the default and add an Advanced Preferences option to change it to either of the other Nuked versions provided.
Title: Re: foo_midi
Post by: arch21 on 2018-09-30 10:40:45
I see you have uploaded the new version (2.1.7) on your website and that resolve this issue. Now its much faster with Dosbox OPL3 as emulator core. Thanks :)
Title: Re: foo_midi
Post by: betr on 2018-11-18 17:40:00
Sorry if this is an old topic, but I'd really love foo_midi to provide a separate volume control for MIDI output - at least a volume slider on the Preferences page.

There are two reasons: 1) the various MIDI playback methods can be drastically different in volume, which means our MIDI playback may be significantly louder or quieter than normal, and we may want to adjust the volume at the same time we select our MIDI options. 2) Unlike PCM audio, we can't batch-adjust gains on MIDI files.

Personally, I find Secret Sauce (my main playback option) so extremely quiet I need to turn up the system volume for certain songs to be sufficiently loud. I would prefer being able to mix MIDI and non-MIDI files in a playlist without having to worry about volume.
Title: Re: foo_midi
Post by: sfried on 2019-01-25 12:38:23
Hello. I joined Hydrogenaudio because I need help partaining to this plugin.

I have MUNT fully installed and working, but I can't seem to get foobar to recognize the data path for some reason. I can play midi straight from MUNTs own frontend just fine, but when I use Super MUNT GS, foobar gives me an error saying the file is unsupported or corrupt.

I previously used BASSMIDI and soundfonts to play MIDI music, but I always did want an authentic Roland MT-32 playback.
Title: Re: foo_midi
Post by: Nahkranoth on 2019-01-25 16:46:24
You need to configure the data path in Preferences->Playback->Decoding->MIDI Player. Hope that helps.

[EDIT]: And you don't need to select Super MUNT GM as an output plugin, for MT-32 midi automatically plays using MUNT, once correctly configured.
Title: Re: foo_midi
Post by: kode54 on 2019-01-25 23:15:39
Also, this plugin does not use external installations of MUNT, so any paths you have configured there will not be used. You must configure your ROM path manually in the Advanced section of Preferences.
Title: Re: foo_midi
Post by: sfried on 2019-01-26 03:36:36
You need to configure the data path in Preferences->Playback->Decoding->MIDI Player. Hope that helps.

[EDIT]: And you don't need to select Super MUNT GM as an output plugin, for MT-32 midi automatically plays using MUNT, once correctly configured.
Also, this plugin does not use external installations of MUNT, so any paths you have configured there will not be used. You must configure your ROM path manually in the Advanced section of Preferences.
So the data path must point directly to the folder containing the ROMs, correct?

Also, if I don't have to select Super MUNT GM, what it the default option to utilize MT-32 midi? Will the plug-in be fmmidi or something else?
Title: Re: foo_midi
Post by: Nahkranoth on 2019-01-26 10:39:22
So the data path must point directly to the folder containing the ROMs, correct?

Yes, That's correct.
Also, if I don't have to select Super MUNT GM, what it the default option to utilize MT-32 midi? Will the plug-in be fmmidi or something else?
What you've selected (fmmidi or other) will be used for everything other than MT-32 midi. MUNT will be used automatically for MT-32 midi only. MT-32 midi must contain corresponding reset message at the beginning of the file. In that case it will contain the following string in the Properties->Details of the file: "MIDI_TYPE: MT-32"
Title: Re: foo_midi
Post by: Slender on 2019-01-26 16:30:23
Speaking of the MT-32, here is a MIDI that I found that seems to be silent, even though it's apparently an MT-32 MIDI. I believe this file played in previous foo_midi versions. https://www.dropbox.com/s/vrf69c3vi1udfpk/PHROZEN%20CREW%20-%20Customizer%20XP%201.0%20nfo.mid?dl=1
Title: Re: foo_midi
Post by: Nahkranoth on 2019-01-26 22:22:32
It's silent in my Foobar, MUNT and Falcosoft Midi Player using MUNT as output too.
Title: Re: foo_midi
Post by: arch21 on 2019-01-27 15:55:23
the silent with file above started from 2.0.23
Title: Re: foo_midi
Post by: kode54 on 2019-01-28 04:19:41
According to the SysEx messages in that file, it's an MT-32 file. And that's Wrong.
Title: Re: foo_midi
Post by: Slender on 2019-01-28 17:48:44
So it's falsely stating that it's an MT-32 file but there's nothing specific to the MT-32 in it?
Title: Re: foo_midi
Post by: kode54 on 2019-01-29 02:29:52
The only thing specific to the MT-32 which is in it is an MT-32 reset message. The entire file occupies channels which, upon reset, do not route anywhere.
Title: Re: foo_midi
Post by: arch21 on 2019-01-29 03:57:25
Your recent release is listed as 2.1.6 on foobar2000 component page, component version is 2.1.8 now. :)
Title: Re: foo_midi
Post by: kode54 on 2019-01-29 23:54:40
Again, oops.
Title: Re: foo_midi
Post by: arch21 on 2019-02-08 07:02:42
Is there a program to create sfogg soundfont? Is it faster than using sf2pack FLAC?
Title: Re: foo_midi
Post by: kode54 on 2019-02-09 08:26:31
It is no faster, and in fact possibly slower, than using sf2pack FLAC. I only enabled it because there is a published SoundFont bank that uses it. It is in fact the sf2pack format, using Ogg Vorbis. And the author who employed it said that it sounds possibly broken if you use anything less than quality level 10 when compressing the SoundFont bank. It figures, since Ogg Vorbis is meant to be gapless only on the ends of the whole stream, and sf2pack requires the entire block of sample data to be compressed as one long stream.
Title: Re: foo_midi
Post by: kode54 on 2019-02-25 04:32:07
Update: Secret Sauce now works with 64 bit cores. Please be sure to report your core version and MD5 sum if it isn't recognized.
Title: Re: foo_midi
Post by: arch21 on 2019-03-05 17:04:51
this midi (http://usahakujualanku.weebly.com/uploads/5/4/0/8/5408510/48canon-rock-in-d104825.mid) has an error when converting to FLAC, no problem when trying with WavPack, ALAC, MP3. Tried with BASSMIDI

Message on console
Writing tags to encoded file failed: Unsupported format or corrupted file
An error occurred while finalizing the encoding process (Unsupported format or corrupted file)

I'm curious what happens here as other midi seems fine.

Title: Re: foo_midi
Post by: Case on 2019-03-05 18:24:57
The encoding doesn't fail but transferring tags does. There's something weird with the metadata in TRACK_NAME_01 field, it's invisible in foobar properties but when converted to for example WAV it shows up as some binary mess.
Title: Re: foo_midi
Post by: Peter on 2019-03-06 10:54:29
Thanks for reporting.

Added a fix in fb2k 1.4.3b5 so converting such file to FLAC no longer fails, problematic metadata fields will simply not be transferred.
Title: Re: foo_midi
Post by: Slender on 2019-03-06 13:09:07
In Secret Sauce preferences, is 885 in the flavor list the SC-8820?
Title: Re: foo_midi
Post by: kode54 on 2019-03-07 02:19:16
I guess? Also don't forget those are overrides. otherwise, it just passes on all supported reset commands to the core.
Title: Re: foo_midi
Post by: Slender on 2019-04-19 21:49:41
Hi kode54. I'm wondering where the sflist JSON format for loading SFZ files in to foo_midi is documented? I remember you saying that there was info about it on GitHub somewhere, but I can't quite seem to find anything so far.
Title: Re: foo_midi
Post by: KDDLB on 2019-04-19 21:51:11
https://gist.github.com/kode54/a7bb01a0db3f2e996145b77f0ca510d5
Title: Re: foo_midi
Post by: Slender on 2019-04-19 22:46:54
Thanks for that. :)
Title: Re: foo_midi
Post by: Slender on 2019-04-20 05:01:12
Is there a way to see any errors in the JSON syntax? I've been trying to figure out how to prioritize soundfonts and SFZs but I'm having issues doing that at the moment, and I can't seem to find any errors in the console.
Title: Re: foo_midi
Post by: Slender on 2019-04-20 23:43:02
Update. It seems that I was making things needlessly complicated, I realized that I could just add the SFZ name to an sflist and edit the SFZ to reflect the new path for the instrument samples, since I have SFZ instruments stored as a separate subfolder in my soundfont collection.
Title: Re: foo_midi
Post by: Slender on 2019-06-05 10:12:54
I found an odd glitch when using Secret Sauce with some 64-bit cores. It seems that it does recognize that the core is 64-bit and scpipe64.exe runs, but the Secret Sauce option does not appear in the plugins list when the 64-bit core is selected. Using core version 1.03, MD5 F16B5EB9C7E204DE7F9B3A829D2D5500.
Title: Re: foo_midi
Post by: kode54 on 2019-06-06 00:38:32
That's because the preferences page only appears if the configured path points to a folder containing a whitelisted MD5. I've only whitelisted the few that I've personally encountered. I'll add this MD5 to my list, since I never needed to add 64 bit versions back when I had 1.03.

I added 64 bit support and container/piping, because it solves two issues. One, that the Roland rental service store only offers 64 bit versions as far as I can tell. Two, that I can create multiple instances without duping the file around to the temp folder like the official plugin does, and thus also start up way faster as a result. Three, if it ever finds a crash bug, those crashes won't take out the main player, they'll just kill playback.

E: I'll need the file size, too. For now, I can only add 1.0.7 64 bit, since that's another version I have available.

E2: Never mind, that's the other 64 bit version I do have on hand.

E3: Added, enjoy.
Title: Re: foo_midi
Post by: Slender on 2019-06-06 09:03:09
Works now, thanks for the quick fix :).
Title: Re: foo_midi
Post by: Slender on 2019-06-15 21:44:01
Another foo_midi question. How exactly is EMIDI device track exclusion implemented? Does the component always mute the FM tracks, or does it exclude and add them as needed? For example, say I choose adlmidi with the Duke Nukem 3D bank, will it then play the FM tracks and exclude the normal ones, or will it just let the bank handle the instruments?
Title: Re: foo_midi
Post by: kode54 on 2019-06-16 00:07:09
The EMIDI FM tracks are the same channels as the GM tracks of the same name, only they have different instruments. And usually, these instruments are hand tailored to exactly the Duke Nukem 3D bank. You should disable that override option, as usually the FM tracks will take effect first.
Title: Re: foo_midi
Post by: Slender on 2019-06-16 20:01:15
Which override option? EMIDI device track exclusion when playing EMIDI files with FM?
Title: Re: foo_midi
Post by: kode54 on 2019-06-16 23:05:04
Yes, that one. I'd have to specially modify the filter to support filtering to just the FM tracks specifically for FM output, since it requires manual configuration to use the Duke Nukem 3D bank anyway.
SimplePortal 1.0.0 RC1 © 2008-2019