MIDI Files in HTML/Javascript

O

outstretchedarm

How exactly does HTML/Javascript handle playing midi files?

Does it have a player imbedded in it?

Or does it borrow from the computer's midi player?

How could you make a webpage play certain chosen notes via midi?

Is there an existing library for such a thing?
 
A

ASM

outstretchedarm a écrit :
How exactly does HTML/Javascript handle playing midi files?

Browsers can't play midi files, they need a plug-in.
Only NetsCape (in old versions) came with an AudioLife plug-in
you could address to it via JS.
(only to start, stop, pause sound and/or play a file or an other one,
all files embedded in the page)

Today you have to do with a lot of plug-ins able to play midi.
One of them is QuickTime (with it's own js functions working sometimes).
Does it have a player imbedded in it?

No player in javascript.
(nothing at all in javascript to act on physical element (HD, system,
cook, car, boat, children, dog ...))
Or does it borrow from the computer's midi player?

Which computeur's midi player ? what does that mean ?
(hope you don't mean sound card ?)
How could you make a webpage play certain chosen notes via midi?

muy mucho difficult

I suppose you can create a special midi-file for this note
(which instrument ?)
then to play it in loop
(don't forget the console for pause start stop buttons)

Something not too much update :

<embed src="la.mid" height=60 width=154 autoplay=false
autostart=false control=true controller=true loop=true>
Is there an existing library for such a thing?

You have to know with what application (or plug-in) you want to work.
 
O

outstretchedarm

I'm trying to write a pretty basic HTML based application.

I would like to user to be able to push a button that says "C minor"
then have the browser sound the three notes in that chord: C, Eb, and G

or, if they want to put their own chords together, they could, then
press a button to audition the chord they have created.

What plugin would you recommend that could enable me to embed little
buttons in my page that could do this?
 
S

scriptguru

ASM напиÑав:
outstretchedarm a écrit :

Browsers can't play midi files, they need a plug-in.
Only NetsCape (in old versions) came with an AudioLife plug-in
you could address to it via JS.
<embed src="la.mid" height=60 width=154 autoplay=false
autostart=false control=true controller=true loop=true>
IE also can play MIDIs using <bgsound> tag.

Val Polyakh
http://trickyscripter.com
 
T

Trond Michelsen

ASM напиÑав:
IE also can play MIDIs using <bgsound> tag.

Although - if you're seriously considering playing background sounds on
your webpage, I'd recommend using history.back() instead. The end result
is the same, and your users will be far less annoyed.
 
A

ASM

(e-mail address removed) a écrit :
ASM напиÑав:
IE also can play MIDIs using <bgsound> tag.

Only IE <4.5 needs <bgsound> tag

<embed src="la.mid" height=60 width=154 autoplay=false
autostart=false control=true controller=true loop=true>
<bgsound>loop=true</bgsound>

<embed src="la.mid" height=60 width=154 autoplay=false
autostart=false control=true controller=true loop=true
name="s_la" javascritEnabled MASTERSOUND
mime-type="x-audio/midi" bgsound>

And never a tag could be enough to play a sound :)

Perhaps tomorrow in html 7 and IE.19/Fx.25
<guitar lang="fr">la</guitar>
<piano lang="fr" style="forte: 4$;">si</piano>

? ? ?
 
S

scriptguru

ASM напиÑав:
(e-mail address removed) a écrit :

Only IE <4.5 needs <bgsound> tag

<embed src="la.mid" height=60 width=154 autoplay=false
autostart=false control=true controller=true loop=true>
<bgsound>loop=true</bgsound>

<embed src="la.mid" height=60 width=154 autoplay=false
autostart=false control=true controller=true loop=true
name="s_la" javascritEnabled MASTERSOUND
mime-type="x-audio/midi" bgsound>

And never a tag could be enough to play a sound :)

It is enough for any IE to use only bgsound tag:
<bgsound src="/music/kelise.mid" loop="-1" />

And I'me sure Flash is the best solution to play sounds (but not MIDI
unfortunately :( )
I Java is good solution too (it can play MIDI)
Perhaps tomorrow in html 7 and IE.19/Fx.25
<guitar lang="fr">la</guitar>
<piano lang="fr" style="forte: 4$;">si</piano>
HTML 4.01 was a last HTML ever - now only XHTML evolves.
I hope that all browsers will be 200% standart compilant and have loads
of features in that versions, but we live in today, not tomorrow =)
 
A

ASM

(e-mail address removed) a écrit :
And I'me sure Flash is the best solution to play sounds (but not MIDI
unfortunately :( )

I love this little mp3 player DewPlayer that loads sound file(s) only on
demand (push button) :
1st version :
http://www.estvideo.net/dew/index/2005/02/16
versions 1.1 1.2 :
http://www.estvideo.net/dew/index/2005/12/03/603-dewplayer-reloaded
version 1.4 :
http://www.estvideo.net/dew/index/2006/02/13/645-dewplayer-14
http://www.estvideo.net/dew/index/2006/02/14/646-dewplayer-14-multi
version 1.5 :
http://www.estvideo.net/dew/index/2006/05/02/707-dewplayer-1-5
http://www.alsacreations.fr/?dewplayer
Pages are in french, but there is no real difficulty to code.

My problem is I don't find JS to drive Flash.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top