A cross-browser way to play MIDI on a web page

Asked byfibrowitch

For one project, I needed to play midi-files on a page. This should work naturally on most browsers (well, I don’t take into account already). But, as far as I understood, either QuickTime plug-in, which is not on every machine, is needed, or Flash, which judging by what Google told me, does not know how to work with midi, or the audio tag, which is far from being implemented in FF for example, midi is also not friendly.
In general, I am surprised. The format is old, actively used (in the circles of musicians), and with support tight. Does anyone have any options how to insert midi playback on the page?


anne duncan
with the embed tag
<embed src="http://YOUR URL.mid" autostart="true" controls="smallconsole" loop="true">

here are examples and variations

checked works in Chrome, FF, Safari
Yes, I tried it (FF and Opera under Linux). It did not start. I was modestly offered to download Quicktime. Or is it just in Linux such a disaster, but in Windows everything is built? - nilesh
I checked on Win and MacOS works in the browsers listed - dennis m
Thank you. So linuksoids (along with me) will put plugins =) - bortalexander
Chrome did not start, quicktime is required in quickfox, it works in opera. Although, most likely, in the opera he was already standing.
Win, microsoftware synthesizer. - natasha di angelo
shane indeglia
MIDI is not a format, it is an interface for transferring data. MIDI is not in all sound cards. And if only MIDI content will not be formed somehow randomly, or online, then at least you need to render these, your, midish tunes in WAV. This can be done with any midi editor or sequencer. For example, the same FL Studio.

At the expense of playing MIDI, I will not say anything 100%, but I repeat, for example, I have an external professional card WITHOUT midi. And acc. My PC does not know how to play MIDI hardware.
Ok, get better. File format SMF, extension .mid, .midi.
So clear?
Software midi-synthesizer that plays these files in Windows, for example, is by default, in Linux it is put in two clicks. Nobody said anything about hardware. - icikas
Not the point! This is not a format. This is an interface. This is in the file system format concept. And I am 99.9% sure that it will not be possible to reproduce midi. - chris fish
“Unlike other formats, this is not a digitized sound, but sets of commands (played notes, references to playing instruments, values ​​of changeable sound parameters) that can be played differently depending on the playback device.” - Minus, you can die, but fact is fact. That's why this format is popular with musicians, because they are just teams, and in 99% they are just notes. - fran
“MIDI files are a set of commands for a synthesizer (sequencer) installed on a computer, but they do not carry audio data ready for playback.” - so that it becomes clear. - roma klyukin
How, then, do midi files on a computer with built-in sounds play? =)
Teach materiel. Yes, midi is an interface through which messages like “set up channel 10 to channel 3 are transmitted. Take a note up to the first octave. release the note before. "etc. But the same messages are perfectly saved to a file, from which they are then sent to a software synthesizer, which reads data from a file, and not via a hardware MIDI interface. And these files used to be the only way to play music, they forgot the .mid files for old ones, for example. and in 3310, so in general the editor was. And now the same files are also often used, but already when creating music. In the same FL in the Piano Roll, click File and see the Import MIDI File line. And this import works without midi hardware support. - ash ellis
FL Studio is a sex detector, it can soft a lot of things :) I said that the browser 100% cannot reproduce this, because I am sure there is no soft way (especially cross-browser), but MIDI synth is necessary for sound in hardware.

In general, you are so famously minus without understanding the essence. And by and large, why do you need MIDI ??? Is it generated online or stupidly lazy to convert? - heather schuenemann
Well, I kind of know what MIDI is. Moreover, I studied the format specifications, since it was necessary to generate musical scores based on the file. But I already wrote above that synthesizers are on 99% of computers. Accordingly, it will play on 99% of computers. Profit? - anne kennedy
Hell, I forgot about DirectX. There is a software synth. But again, for example, on my card in dxdiag.exe there is no MIDI interface test. You just started to write, they say KT does not roll, Flash, too, html5 all the more, I thought that you were looking for a native way. And you are cons at once. Strange people. - partha barua
Minus because there are midi files - this is a fact, they are played on 99% of computers - this is a fact, and you start telling me about their structure.
Yes, generation occurs online. And load the server by converting midi - & gt; mp3 does not feel like when the client can and play midi.
With browsers, the problem is that with audio playback, they basically have problems, using plug-ins, QuickTime, for example. If there is no plug-in in the system, the browser will not read the audio. Before the introduction of the audio tag in browsers there were no built-in players. But with all this, they are aiming, naturally at mp3, ogg, wav. There was a desire to use flash, but he just doesn’t have a synthesizer himself, nor can he use a system synthesizer, so he disappears. So it turns out that I haven’t yet found a single cross-browser solution.
By the way, in the opera with the help of the audio tag I could play the midi-file. - jace ferguson
Well, purely already for interest:
 - do you have a built-in codec?
 - Do you have a midi test in dxdiag? - ebony nichole
built-in codec: see software Microsoft GW Wavetable Synthesizer.
Creative Audigy: sound card hardware synthesizers visible
Sound card for 150 rubles Genius Soundmaker PCI: see software from Microsoft and primitive, but Genius FM Synthesizer - mary kate
embedded on the sound card In Windows, I don’t remember, everything seemed to work without direct x. As I understand it, through the "Software sound synthesizer." At least the windows media player plays .midi files.
I installed Timidity in Linux and the sound also appeared.
Tests are not watched. Now under Linux I sit, there dx is absent. - megan baxter
It is clear. Well, I do not see this test at all on my prof.kart. Before that, of course, there was Creative Live - everything was there. On the built-in codecs did not sit. Lagged behind life, but in any case, the vehicle initially did not arrange QT, and now this is the “right answer”. Somehow it is not logical. Well, glad that he found his solution. - ladonna
The logic is that under Windows and Macs, as it turned out, everything works. In QT poppies - by default, I’ll look at the Windows one of these days, maybe there is another plugin, but it’s also built-in. There are problems in Linux, but 1% of computers are in general, and there are even fewer musicians among them. My situation allows us to donate them, especially since I’ll do research on a suitable plugin right from Linux itself.
Of two evils, as they say ...
Minus for comment compensated by a plus in karma. Although still the comment was off topic;) - patrick mak
Comment was on the topic just because I thought I needed a native solution. In the end, I’m bad, I’m playing softly, I’m playing quick, and the problem has been solved. Later, of course, I came up from a rough musical point of view, and I forgot about software synths in DX and analogs, probably, in other OSs. - hui jing
There is a midi as a protocol, and there is a general midi - an agreement on standard instruments that most synthesizers support from embedded sound systems to workstations for a couple of thousand dollars. Microsoft sound synthesizers or microsoft eat * .mid files with similar information. - victoria dvorak
sean lockley
No matter how ridiculous it sounds, but it is easier to convert it into another sound format.
Yes, I wanted to do midi generation entirely on the client side. It's a shame that it turns out to generate, but not to reproduce. - mccall carter
What is the list of basic books in mathematics? :: Advise a three-dimensional engine for working with augmented reality :: Account without long activity - delete or not delete? :: Why does the q & a rating of the article appear immediately, but in posts you need to “merge” a voice? :: Advise good books on Python'u focused on web development
Leave Repply forA cross-browser way to play MIDI on a web page
Useful Links