Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
midi [2023/02/15 20:43] – [Playing a midi on a webpage!] melonmidi [2023/04/06 15:52] – [Now you can play midis on your site using these JavaScript commands!] melon
Line 11: Line 11:
 ===== Playing a midi on a webpage! ===== ===== Playing a midi on a webpage! =====
  
-Often you'll want to convert the midi to a compressed mp3 using your preferred reinstatement set: a great free program is GSXCC, this is a program that emulates a Famicom (NES) or SCC sound chip in order to play MIDIs. It can make any MIDI file into chiptunes! You can [[https://meme.institute/gxscc/|download it here]]!+Melon's Mini Music Player! 
 +Melon created a little premade scrip that played midi's, if you just want a simple copy-paste solution, [[https://forum.melonland.net/index.php?topic=1235.msg10638#msg10638|have a look here]]! 
 + 
 +==== Midi JS ==== 
 + 
 +Often you'll want to convert the midi to a compressed mp3 using your preferred instrument set: a great free program is GSXCC, this is a program that emulates a Famicom (NES) or SCC sound chip in order to play MIDIs. It can make any MIDI file into chiptunes! You can [[https://meme.institute/gxscc/|download it here]]!
  
 You can also embed midis directly into a browser using [[https://www.midijs.net/|MIDIjs]]: You can also embed midis directly into a browser using [[https://www.midijs.net/|MIDIjs]]:
  
-**Include the MIDIjs script on your web page**. You can download the script to your site or use this hotlink:+**Include the MIDIjs script on your web page (put this in the head)**. You can download the script to your site or use this hotlink:
 <code> <code>
 <script src="https://www.midijs.net/lib/midi.js"></script> <script src="https://www.midijs.net/lib/midi.js"></script>
 </code> </code>
-**Load a MIDI file to play**. You can use the MIDIjs.loadFile() function to load a MIDI file from a URL. For example, you can use this code to load a MIDI file named "song.mid": + 
-<code> +==== Now you can play midis on your site using these JavaScript commands! ==== 
-MIDIjs.loadFile("song.mid"); +
-</code>+
 **Play or stop the MIDI file**. You can use the MIDIjs.play() and MIDIjs.stop() functions to play or stop the MIDI file. For example, you can use this code to play the MIDI file: **Play or stop the MIDI file**. You can use the MIDIjs.play() and MIDIjs.stop() functions to play or stop the MIDI file. For example, you can use this code to play the MIDI file:
 <code> <code>
-MIDIjs.play();+MIDIjs.play("song.mid");
 </code> </code>
 And this code to stop the MIDI file: And this code to stop the MIDI file: