Questions tagged [midi.js]

MIDI.js is a library for MIDI sequencing and playback in Javascript.

MIDI.js is a library for MIDI sequencing and playback in Javascript.

It supports multiple simultaneous instruments and perfect timing.

Includes a library to program synesthesia into your app for memory recognition or for creating trippy effects.


Useful links

13 questions
6
votes
1 answer

Loading midi.js soundfonts dynamically

I just started using midi.js and so far it seems really neat. I am currently loading all of my sounds fonts at once like so: MIDI.loadPlugin({ soundfontUrl: "js/MIDI/soundfont/FluidR3_GM/", instrument: instruments, callback:…
Mike2012
  • 7,629
  • 15
  • 84
  • 135
3
votes
2 answers

how do I use midi.js and jasmid.js?

I'm trying to create a variation of the color piano site at http://mudcu.be/piano/ and am really struggling to find a good working example of how to parse a MIDI file, drawing graphical elements and playing MIDI notes. Does anyone know how the…
lawrencehagman
  • 471
  • 1
  • 3
  • 16
2
votes
1 answer

Soundfonts play MIDI file without decay

I've been building a music notation application in Flask. On the backend I'm using Midiutil to generate midi files and Midi.js on the front end to play the files. I recorded and built my soundfont using Polyphone and converted from sf2 to JS with…
Mark Berry
  • 91
  • 9
2
votes
1 answer

How to send data from a javascript function to MIDI.noteOn() in the MIDI.js API

I am familiar with C++ and MIDI protocol but I am a beginner with javascript. I have successfully run the example Basic.html https://github.com/mudcube/MIDI.js/blob/master/examples/Basic.html from git hub below:
2
votes
1 answer

Arrays / loops with midi.js

I am looking to use a playsound function in midi.js to loop an array, with chords that i select, maybe 4 diff ones. But i can't figure it out. I can get it to do a single array, but not multiple, and it does not loop, only plays the amount of time I…
mopfunk
  • 21
  • 4
1
vote
1 answer

setTimeout triggers too late in MIDI.js

I'm using MIDI.js to play a MIDI file with several musical instruments. The following things execute too late, how can I fix that? First notes of the song. Like all notes, they are scheduled via start() of an AudioBufferSourceNode here. MIDI…
root
  • 1,812
  • 1
  • 12
  • 26
1
vote
0 answers

Playing chords with Midi.js using a parsed midi file for asynchronous playing

I´m trying to basically play piano midi files asynchronously (When a key is pressed I want to advance throughout the midi file notes, basically to play it note by note. I´ve managed to play a midi file that way but the parsed midi file is throwing…
1
vote
0 answers

Multiple MIDI.js Players on single page?

Is it possible to have two or more MIDI.js Player's on a page? This seems to create and then populate only one MIDI object, regardless of how many elements of class nmidiplayer there are: $(document).ready(function() { …
brownian
  • 435
  • 3
  • 13
1
vote
0 answers

How to stop playing all notes

I am using MIDI.js library and I want to stop playing all notes which are activated with following code. function myPlayer(myMid){ var delay = 0; // play one note every quarter second var start = 0; var note = 36; // the…
zuro
  • 71
  • 2
  • 12
1
vote
1 answer

Why does no sound emit from this soundfont midi player replication?

I am attempting to replicate the functionality of this soundfont based midi file player with verbatim javascript and html. Despite no errors (except a favicon 404 error), no sounds emit when playing a midi file. However, events are displayed in the…
ballade4op52
  • 2,142
  • 5
  • 27
  • 42
1
vote
2 answers

How to implement MIDI player of MIDI.js for notes sequence

I am using MIDI.js in my project, here is my code for playing sequence of MIDI notes for (var repeat = 0; repeat < melodyrepititions; repeat++) { for (var i = 0; i < composition.length; i++) { for (var…
0
votes
0 answers

Error in audioDetect.js of MIDI.js (midicube)

I'm trying to use MIDI.js (because I don't know how else to play MIDI files smoothly when the browser tab is not in focus). More specifically, I'm trying a new version of MIDI.js called midicube. Like in the readme, I do
root
  • 1,812
  • 1
  • 12
  • 26
0
votes
1 answer

Getting the wrong tempo when playing a MIDI file with MIDI.js

I am trying to play this midi song. But the tempo is all wrong. I am simply doing: MIDI.loadPlugin({ soundFontUrl: "./soundfont/", onsuccess: function(){ console.log('loaded'); …
João Abrantes
  • 4,772
  • 4
  • 35
  • 71