From cb086044ff07c52e8212fdf242323e85ec345b4c Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sun, 19 Aug 2018 20:24:47 +0200 Subject: export midi --- client/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'client/index.js') diff --git a/client/index.js b/client/index.js index 9db4e32..f51f9da 100644 --- a/client/index.js +++ b/client/index.js @@ -173,7 +173,7 @@ function play(index, duration){ duration = duration || 60000 / Tone.Transport.bpm.value if (! exporting) { midi.playNote(note, "all", { duration }) - // midi.sendPitchBend(cents, "all") + midi.sendPitchBend(cents, "all") } } else { kalimba.play(freq) @@ -317,9 +317,9 @@ function export_pattern_as_midi(){ midi_track.setTempo(nx.tempo.value) for (let i = 0, len = count; i < len; i++) { notes = play_fn(i)[1] - if (timing.length) note_time = 't' + timing[i % timing.length] + if (timing.length) note_time = timing[i % timing.length] else note_time = timing - midi_track.addEvent(new MidiWriter.NoteEvent({ pitch: notes, duration: note_time })) + midi_track.addEvent(new MidiWriter.NoteEvent({ pitch: notes, duration: 't' + note_time })) } const writer = new MidiWriter.Writer([midi_track]) const blob = dataURItoBlob(writer.dataUri()) -- cgit v1.2.3-70-g09d2