Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Last revisionBoth sides next revision
midi [2023/04/06 15:51] – [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 27: Line 27:
 ==== Now you can play midis on your site using these JavaScript commands! ==== ==== Now you can play midis on your site using these JavaScript commands! ====
  
-**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> 
-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: