r/midi
•
u/mmontag
•
Dec 23 '19
•
1
A web-based MIDI player
Hi MIDI crew, this is my side project gone out of control, Chip Player JS.
https://mmontag.github.io/chip-player-js/browse
It started out as a player for chiptunes, but I also had a lot of MIDI files that I wanted to listen to, and there's not many MIDI players out there for macOS. I like to hear MIDI reproduced by something other than Microsoft GM/GS softsynth or Quicktime. This is the result.
A few things might appeal to MIDI connoisseurs:
3 MIDI playback engines
SoundFont synthesis with 30 SoundFonts included
Adlib/OPL3 FM synthesis powered by libADLMIDI
WebMIDI output for external devices or routing to softsynths
Built in catalog of some 64,000 MIDI files. Notable curation efforts:
MIDI: this folder is a collection of "pop" MIDI files cleaned and renamed from the Lakh MIDI Dataset.
Piano E-Competition MIDI: sorted by competition year, with the winners annotated in filenames. This is a collection of some truly exquisite solo piano MIDI. Pairs beautifully with Pianoteq or other dedicated piano synths.
Sound Canvas MIDI Collection: downloaded from archive.org, cleaned up/extracted from LHA archives. I have translated about 2,700 Japanese production notes to English.
Demo MIDI: various "showcase" sets, such as the MIDI files distributed with Windows and various other MIDI hardware and software.
Classical MIDI: if you're into that sort of thing.
Supports media keys in Chrome (a must-have for me, personally)
Drag & drop files, adjust speed, mute channels, visualizer, etc.
2
u/_zaphod77_ Mar 09 '24 edited Mar 09 '24
Some files contain both "basic midi" and "extended midi" this was an old win 3.0 standard.
all such mid files have a special marker in them. canyon.mid, ballade.mid, jazz.mid, and reggae.mid are all examples of this.
"It turned out all of the files contain a totally undocumented Sequencer specific meta event (0x7f) with a 3 byte data value of '00 00 41'."
The player should look for the marker, and if that marker is found, auto mute tracks 11-16.
2
u/mmontag Mar 13 '24
Hmm. Thank you for this. Could this be the explanation for files like Even More Incredible Machine (Windows, 1996) - 06. Rock.MID? Sounds like a drum track playing through a piano.
1
u/_zaphod77_ Mar 14 '24
yes, that's exactly it.
these drums are always on channel 16, where a BASIC midi driver expects them to be.
1
u/_zaphod77_ Mar 13 '24
needs an mt-32 soundfont, btw. does't currently have one that I can see.
also needs the old voyetra mt-32 fm 2-op sound bank. good luck finding that one, though.
1
u/mmontag Mar 13 '24
needs an mt-32 soundfont
I added one, Phoenix MT-32. It sounds good to me, but I never owned an MT-32.
2
u/_zaphod77_ Mar 14 '24 edited Mar 14 '24
well right now fluidsynthlite is playing everything too high pitched for some unaccountable reason.
i'm using chrome. libadlmidi is perfect.
also tested in edge and firefox. fluidite is an entire octave too high throughout.
okay. figured it out. your player is making assumptions about windows sample rate. when i dropped to 48k instead of 192k the player starts working as expected.
1
u/_zaphod77_ Mar 14 '24
btw where do i report misidentified midi files? lol
https://gifx.co/music/MIDI/Trans-X/Living%20on%20Video.mid
is actually this..
Pin-occhio - Tu Tatuta Tuta Ta
1
u/mmontag Mar 15 '24
You can file as a github issue, I see you've already found it :) https://github.com/mmontag/chip-player-js/issues
It's the best way to keep track of problems.
1
u/_zaphod77_ Mar 15 '24
for those who don't know how to tell, that song has notes 8 and 9 swapped in the riff. and the filename was definitely original tutata.mid, as the text inside it says.
also, there's a sweet dreams in the wrong section. one of the two under la bouche is actually the Eurythmics song. :)
btw, the other famous living_on_video.mid file is based on, but not the same as, cardenia's hyperspace mix. (Gimme Gimme Gimme Gimme Gimme Gimme Gimme Gimme Gimme Gimme Gimme Gimme life, gimme action!) haven't found that one on your player, though.
1
u/_zaphod77_ Nov 16 '23 edited Nov 16 '23
how do i upload midis to this for others to hear?
i just got the win95 aladdin soundtrack, and believe it to have been composed for fatman 2 op opl, which this midi player actually managed to do.
Also, is there away to enable looping? i think i found it, but it doesn't seem to work, at least with drag and drop midi files.
also there are some semi standard ways to defien midi loop points. final fantasy seven midis, for exampe, do have them, and they often loop to points other than the very start. famous examples include intro-bombing mission, and still more fighting.
1
u/mmontag Nov 16 '23
Thanks for the feedback!
Supporting MIDI loop points is an open issue: https://github.com/mmontag/chip-player-js/issues/55
As an aside, I did some similar work to allow playback of MIDI files extracted from Nintendo 64 games (i.e. Goldeneye 007 - Runway.mid). The N64 MIDI format allows per-track loops and I do a loop-unrolling pass before starting playback.
Uploading is a more difficult question... others have requested a local file import option as enhancement to drag & drop. https://github.com/mmontag/chip-player-js/issues/112
1
u/_zaphod77_ Nov 16 '23
the final fantasy seven midis from pc are a proper example of loopStart/loopEnd markers to test with. I'd like an option for number of loops. use the "YGM" ones to test with and an xg soundfont.
I'm impressed that the adlibmidi actually understand portmenteau controller, which i don't remember ever working on win95. The polyphony seems greater as well.
What does the auto synth engine switching actually do? it doesn't seem to catch the aladdin midi files as fatman 2 op, which i'm reasonably sure they actually ARE by my testing on your player, and the fact that it was an early win95 game back when such things were common..
1
u/mmontag Nov 17 '23
Auto engine switching is some hacky logic that switches based on file name matching - a file containing "FM" switches to libADLMIDI, for example. There are some DOS games like Doom, Descent, Heretic, etc. that activate special banks included in libADLMIDI. These are hardcoded.
Beyond these OPL banks, I think some games also had custom playback logic differing slightly from standard MIDI, so playback is not guaranteed to be accurate. DOSBox/VGM rips will be more accurate.
It would be cool if the bank data could be encoded in a MIDI metadata or picked up from external files, but there is no standard for this and I think there are higher priority items to work on.
1
u/_zaphod77_ Nov 17 '23 edited Nov 17 '23
you can reliably detect a bit more that you are now i think.
For example, if you actually see a GS reset sysex in the midi file itself, you can reasonably assume that you should probably be using sc-55 soundfont. Because GS really means "composed for sound canvas". :) You see, GS implies a certain set of patch dynamics, and a true GS soundfont will playback anything composed to them well. The specs of GS (and XG) may say that stuff is implementation defined , and not guaranteed consistent, but if it actually has the GS logo on it, it's supposed to do a good job on midis composed for sound canvas. :)
it's very well known that sierra stuff has always been intended as either mt-32 or sc55. Most Roland GS stuff tries to detect mt-32 mdis, and remap themselves to that automatically. It wont' always get it right, but as long as its' default mt-32 patches, things will be convincing enough. again, you can watch for mt-32 sysex, and do a switch to an mt-32 fake soundfont. this won't be enough for everything, but it will help a lot.
And if you see XG commands, you probably want an XG soundfont. If it's a single track midi that says Mixdown as it's track name, it's almost certainly an XG midi composed for db50xg.
I do recall that Doom had some special logic for Gravis Ultrasound as well. So autodetection can and very much does fail to account for what people will remember.
And the midi logic was actually CHANGED at one point for FM on doom. a bwong that never existed before on the title screen music started happening at one version.
1
u/_zaphod77_ Nov 17 '23
Okay... libadlbmidi support portmenteau controllers... and fluidsynthlite DOESN'T?!?!
This is actually still pretty amazing for playing back FM composed midis, but setting up sw50xg vsti as a system synth or using foobar2000 is the better option for dealing with actual XG stuff. And ms midi driver usually does fine for GS midis that don't mess with filters and stuff.
1
u/mmontag Mar 13 '24
Oh, that's interesting. Can you point to some file(s) that have obvious portamento, in case I am able to work on this?
If i find that fluidsynth supports this but fluidlite does not, I might just switch over. I have already spent a lot of time dealing with fluidlite edge cases.
1
u/_zaphod77_ Mar 14 '24
baby baby by corona is one example of a midi files with portmanteau.
https://gifx.co/music/MIDI/Corona/Baby%20Baby.mid
you know where it goes "woooooooooooooooooooooooooooooooooooooooooooaaah"
1
u/mmontag Mar 14 '24
Thanks, confirmed & verified "woooooooooah" at 1:57.3141592
2
u/_zaphod77_ Mar 14 '24
there's one much earlier one in the file, but that's the one everyone knows about in the real song. where the pitch rises slowly, and it repeats every time it does in the real song.
the first "wooooooooooo-ooooo-oah" is at 30 seconds. there are some sweeps down that you can hear right off the bat on libadlmidi as well.
3
u/flyingmax Dec 23 '19
Very great work !!
This would impress a lot of people who uses midi-like devices.
2
2
2
u/_zaphod77_ Nov 16 '23
oh damn. this player is GOOD.
it even understand my crazy modified iNES midi rips of old nes game tunes. (they have TRUCKLOADS of aftertouch and pitch wheel messages, and the player copes beautifully!)
2
1
1
1
2
u/[deleted] Dec 24 '19
This is ridiculously impressive. Also thank you for building something that works fine cross browser. Getting sick of people just developing for Chrome.
If you havent already, should definitely submit to DJ Tech Tools and Create Digital Music.