diff --git a/docs/ControllerChangeEvent.html b/docs/ControllerChangeEvent.html index 299d4c8..4176c68 100644 --- a/docs/ControllerChangeEvent.html +++ b/docs/ControllerChangeEvent.html @@ -24,7 +24,7 @@
@@ -238,7 +238,7 @@
Returns:

diff --git a/docs/CopyrightEvent.html b/docs/CopyrightEvent.html index 1411b7b..c04fc90 100644 --- a/docs/CopyrightEvent.html +++ b/docs/CopyrightEvent.html @@ -24,7 +24,7 @@
@@ -238,7 +238,7 @@
Returns:

- Generated by JSDoc 3.6.4 on Tue Feb 02 2021 20:32:31 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.4 on Tue Jun 29 2021 20:57:48 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/CuePointEvent.html b/docs/CuePointEvent.html index 483c0ee..834052c 100644 --- a/docs/CuePointEvent.html +++ b/docs/CuePointEvent.html @@ -24,7 +24,7 @@
@@ -238,7 +238,7 @@
Returns:

- Generated by JSDoc 3.6.4 on Tue Feb 02 2021 20:32:31 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.4 on Tue Jun 29 2021 20:57:48 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/EndTrackEvent.html b/docs/EndTrackEvent.html index b1dce76..a60ab23 100644 --- a/docs/EndTrackEvent.html +++ b/docs/EndTrackEvent.html @@ -24,7 +24,7 @@
@@ -186,7 +186,7 @@
Returns:

- Generated by JSDoc 3.6.4 on Tue Feb 02 2021 20:32:31 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.4 on Tue Jun 29 2021 20:57:48 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/HeaderChunk.html b/docs/HeaderChunk.html index 9278633..a873db4 100644 --- a/docs/HeaderChunk.html +++ b/docs/HeaderChunk.html @@ -24,7 +24,7 @@
@@ -238,7 +238,7 @@
Returns:

- Generated by JSDoc 3.6.4 on Tue Feb 02 2021 20:32:31 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.4 on Tue Jun 29 2021 20:57:48 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/InstrumentNameEvent.html b/docs/InstrumentNameEvent.html index 542ca5e..6336f48 100644 --- a/docs/InstrumentNameEvent.html +++ b/docs/InstrumentNameEvent.html @@ -24,7 +24,7 @@
@@ -238,7 +238,7 @@
Returns:

- Generated by JSDoc 3.6.4 on Tue Feb 02 2021 20:32:31 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.4 on Tue Jun 29 2021 20:57:48 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/KeySignatureEvent.html b/docs/KeySignatureEvent.html index 3a87872..25f0ae7 100644 --- a/docs/KeySignatureEvent.html +++ b/docs/KeySignatureEvent.html @@ -24,7 +24,7 @@
@@ -186,7 +186,7 @@
Returns:

- Generated by JSDoc 3.6.4 on Tue Feb 02 2021 20:32:31 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.4 on Tue Jun 29 2021 20:57:48 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/LyricEvent.html b/docs/LyricEvent.html index 50cd947..c34536c 100644 --- a/docs/LyricEvent.html +++ b/docs/LyricEvent.html @@ -24,7 +24,7 @@
@@ -238,7 +238,7 @@
Returns:

- Generated by JSDoc 3.6.4 on Tue Feb 02 2021 20:32:31 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.4 on Tue Jun 29 2021 20:57:48 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/MarkerEvent.html b/docs/MarkerEvent.html index 187e930..e41583a 100644 --- a/docs/MarkerEvent.html +++ b/docs/MarkerEvent.html @@ -24,7 +24,7 @@
@@ -238,7 +238,7 @@
Returns:

- Generated by JSDoc 3.6.4 on Tue Feb 02 2021 20:32:31 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.4 on Tue Jun 29 2021 20:57:48 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/NoteEvent.html b/docs/NoteEvent.html index 5e682be..c4e7150 100644 --- a/docs/NoteEvent.html +++ b/docs/NoteEvent.html @@ -24,7 +24,7 @@
@@ -346,7 +346,7 @@
Returns:

- Generated by JSDoc 3.6.4 on Tue Feb 02 2021 20:32:31 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.4 on Tue Jun 29 2021 20:57:48 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/NoteOffEvent.html b/docs/NoteOffEvent.html index eba4540..c037cdc 100644 --- a/docs/NoteOffEvent.html +++ b/docs/NoteOffEvent.html @@ -24,7 +24,7 @@
@@ -504,7 +504,7 @@
Returns:

- Generated by JSDoc 3.6.4 on Tue Feb 02 2021 20:32:31 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.4 on Tue Jun 29 2021 20:57:48 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/NoteOnEvent.html b/docs/NoteOnEvent.html index 7d9ea89..2866099 100644 --- a/docs/NoteOnEvent.html +++ b/docs/NoteOnEvent.html @@ -24,7 +24,7 @@
@@ -504,7 +504,7 @@
Returns:

- Generated by JSDoc 3.6.4 on Tue Feb 02 2021 20:32:31 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.4 on Tue Jun 29 2021 20:57:48 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/ProgramChangeEvent.html b/docs/ProgramChangeEvent.html index 336120c..2dd025a 100644 --- a/docs/ProgramChangeEvent.html +++ b/docs/ProgramChangeEvent.html @@ -24,7 +24,7 @@
@@ -238,7 +238,7 @@
Returns:

- Generated by JSDoc 3.6.4 on Tue Feb 02 2021 20:32:31 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.4 on Tue Jun 29 2021 20:57:48 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/TempoEvent.html b/docs/TempoEvent.html index d7090ed..6a9d263 100644 --- a/docs/TempoEvent.html +++ b/docs/TempoEvent.html @@ -24,7 +24,7 @@
@@ -238,7 +238,7 @@
Returns:

- Generated by JSDoc 3.6.4 on Tue Feb 02 2021 20:32:31 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.4 on Tue Jun 29 2021 20:57:48 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/TextEvent.html b/docs/TextEvent.html index 01168b5..ab57968 100644 --- a/docs/TextEvent.html +++ b/docs/TextEvent.html @@ -24,7 +24,7 @@
@@ -238,7 +238,7 @@
Returns:

- Generated by JSDoc 3.6.4 on Tue Feb 02 2021 20:32:31 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.4 on Tue Jun 29 2021 20:57:48 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/TimeSignatureEvent.html b/docs/TimeSignatureEvent.html index 29cdc80..6ba6d8c 100644 --- a/docs/TimeSignatureEvent.html +++ b/docs/TimeSignatureEvent.html @@ -24,7 +24,7 @@
@@ -186,7 +186,7 @@
Returns:

- Generated by JSDoc 3.6.4 on Tue Feb 02 2021 20:32:31 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.4 on Tue Jun 29 2021 20:57:48 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/Track.html b/docs/Track.html index 2b01026..b398450 100644 --- a/docs/Track.html +++ b/docs/Track.html @@ -24,7 +24,7 @@
@@ -3110,7 +3110,7 @@
Returns:

- Generated by JSDoc 3.6.4 on Tue Feb 02 2021 20:32:31 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.4 on Tue Jun 29 2021 20:57:48 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/TrackNameEvent.html b/docs/TrackNameEvent.html index e5fa656..97ac2b0 100644 --- a/docs/TrackNameEvent.html +++ b/docs/TrackNameEvent.html @@ -24,7 +24,7 @@
@@ -238,7 +238,7 @@
Returns:

- Generated by JSDoc 3.6.4 on Tue Feb 02 2021 20:32:31 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.4 on Tue Jun 29 2021 20:57:48 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/Utils.html b/docs/Utils.html index 314043c..be01c01 100644 --- a/docs/Utils.html +++ b/docs/Utils.html @@ -24,7 +24,7 @@
@@ -2350,7 +2350,7 @@
Returns:

- Generated by JSDoc 3.6.4 on Tue Feb 02 2021 20:32:31 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.4 on Tue Jun 29 2021 20:57:48 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/Writer.html b/docs/Writer.html index 2743b9b..da47085 100644 --- a/docs/Writer.html +++ b/docs/Writer.html @@ -24,7 +24,7 @@
@@ -538,141 +538,6 @@
Returns:
-
- - -
- - - -

saveMIDI(filename)

- - - - - -
- Save to MIDI file -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
filename - - -string - - - - - - -
- - - - - - - - - - - - - - - -
@@ -796,7 +661,7 @@
Returns:

- Generated by JSDoc 3.6.4 on Tue Feb 02 2021 20:32:31 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.4 on Tue Jun 29 2021 20:57:48 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/constants.js.html b/docs/constants.js.html index 5b3f2ef..c5c0bda 100644 --- a/docs/constants.js.html +++ b/docs/constants.js.html @@ -24,7 +24,7 @@
@@ -83,7 +83,7 @@

constants.js


- Generated by JSDoc 3.6.4 on Tue Feb 02 2021 20:32:31 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.4 on Tue Jun 29 2021 20:57:48 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/global.html b/docs/global.html index 8715e9e..9acf16a 100644 --- a/docs/global.html +++ b/docs/global.html @@ -24,7 +24,7 @@
@@ -354,7 +354,7 @@
Returns:

- Generated by JSDoc 3.6.4 on Tue Feb 02 2021 20:32:31 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.4 on Tue Jun 29 2021 20:57:48 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/header-chunk.js.html b/docs/header-chunk.js.html index 1e42008..04de185 100644 --- a/docs/header-chunk.js.html +++ b/docs/header-chunk.js.html @@ -24,7 +24,7 @@
@@ -75,7 +75,7 @@

header-chunk.js


- Generated by JSDoc 3.6.4 on Tue Feb 02 2021 20:32:31 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.4 on Tue Jun 29 2021 20:57:48 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/index.html b/docs/index.html index 7ecf0f5..e0f1c47 100644 --- a/docs/index.html +++ b/docs/index.html @@ -24,7 +24,7 @@
@@ -50,7 +50,8 @@

♬ MidiWriterJS

npm version -Build Status

+Build Status +Try midi-writer-js on RunKit

MidiWriterJS is a JavaScript library providing an API for generating expressive multi-track MIDI files.

Note that the master branch is in active development so if you're looking for a tried and true stable version please use the latest release.

Source Documentation

@@ -222,7 +223,7 @@

VexFlow Integration


- Generated by JSDoc 3.6.4 on Tue Feb 02 2021 20:32:31 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.4 on Tue Jun 29 2021 20:57:48 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/meta-events_controller-change-event.js.html b/docs/meta-events_controller-change-event.js.html index e9b5d18..22a9c87 100644 --- a/docs/meta-events_controller-change-event.js.html +++ b/docs/meta-events_controller-change-event.js.html @@ -24,7 +24,7 @@
@@ -68,7 +68,7 @@

meta-events/controller-change-event.js


- Generated by JSDoc 3.6.4 on Tue Feb 02 2021 20:32:31 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.4 on Tue Jun 29 2021 20:57:48 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/meta-events_copyright-event.js.html b/docs/meta-events_copyright-event.js.html index 1cc1839..d0b8e4b 100644 --- a/docs/meta-events_copyright-event.js.html +++ b/docs/meta-events_copyright-event.js.html @@ -24,7 +24,7 @@
@@ -76,7 +76,7 @@

meta-events/copyright-event.js


- Generated by JSDoc 3.6.4 on Tue Feb 02 2021 20:32:31 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.4 on Tue Jun 29 2021 20:57:48 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/meta-events_cue-point-event.js.html b/docs/meta-events_cue-point-event.js.html index e489fd9..7583104 100644 --- a/docs/meta-events_cue-point-event.js.html +++ b/docs/meta-events_cue-point-event.js.html @@ -24,7 +24,7 @@
@@ -76,7 +76,7 @@

meta-events/cue-point-event.js


- Generated by JSDoc 3.6.4 on Tue Feb 02 2021 20:32:31 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.4 on Tue Jun 29 2021 20:57:48 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/meta-events_end-track-event.js.html b/docs/meta-events_end-track-event.js.html index 72ca246..22b2a1a 100644 --- a/docs/meta-events_end-track-event.js.html +++ b/docs/meta-events_end-track-event.js.html @@ -24,7 +24,7 @@
@@ -71,7 +71,7 @@

meta-events/end-track-event.js


- Generated by JSDoc 3.6.4 on Tue Feb 02 2021 20:32:31 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.4 on Tue Jun 29 2021 20:57:48 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/meta-events_instrument-name-event.js.html b/docs/meta-events_instrument-name-event.js.html index 654a92e..99abb6e 100644 --- a/docs/meta-events_instrument-name-event.js.html +++ b/docs/meta-events_instrument-name-event.js.html @@ -24,7 +24,7 @@
@@ -76,7 +76,7 @@

meta-events/instrument-name-event.js


- Generated by JSDoc 3.6.4 on Tue Feb 02 2021 20:32:31 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.4 on Tue Jun 29 2021 20:57:48 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/meta-events_key-signature-event.js.html b/docs/meta-events_key-signature-event.js.html index b9bec5d..517297d 100644 --- a/docs/meta-events_key-signature-event.js.html +++ b/docs/meta-events_key-signature-event.js.html @@ -24,7 +24,7 @@
@@ -117,7 +117,7 @@

meta-events/key-signature-event.js


- Generated by JSDoc 3.6.4 on Tue Feb 02 2021 20:32:31 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.4 on Tue Jun 29 2021 20:57:48 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/meta-events_lyric-event.js.html b/docs/meta-events_lyric-event.js.html index 5a01aa2..982afed 100644 --- a/docs/meta-events_lyric-event.js.html +++ b/docs/meta-events_lyric-event.js.html @@ -24,7 +24,7 @@
@@ -76,7 +76,7 @@

meta-events/lyric-event.js


- Generated by JSDoc 3.6.4 on Tue Feb 02 2021 20:32:31 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.4 on Tue Jun 29 2021 20:57:48 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/meta-events_marker-event.js.html b/docs/meta-events_marker-event.js.html index 9546a49..da9f1bc 100644 --- a/docs/meta-events_marker-event.js.html +++ b/docs/meta-events_marker-event.js.html @@ -24,7 +24,7 @@
@@ -76,7 +76,7 @@

meta-events/marker-event.js


- Generated by JSDoc 3.6.4 on Tue Feb 02 2021 20:32:31 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.4 on Tue Jun 29 2021 20:57:48 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/meta-events_pitch-bend-event.js.html b/docs/meta-events_pitch-bend-event.js.html index c32f691..7d00744 100644 --- a/docs/meta-events_pitch-bend-event.js.html +++ b/docs/meta-events_pitch-bend-event.js.html @@ -24,7 +24,7 @@
@@ -82,7 +82,7 @@

meta-events/pitch-bend-event.js


- Generated by JSDoc 3.6.4 on Tue Feb 02 2021 20:32:31 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.4 on Tue Jun 29 2021 20:57:48 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/meta-events_program-change-event.js.html b/docs/meta-events_program-change-event.js.html index 5867e79..317f4a2 100644 --- a/docs/meta-events_program-change-event.js.html +++ b/docs/meta-events_program-change-event.js.html @@ -24,7 +24,7 @@
@@ -68,7 +68,7 @@

meta-events/program-change-event.js


- Generated by JSDoc 3.6.4 on Tue Feb 02 2021 20:32:31 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.4 on Tue Jun 29 2021 20:57:48 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/meta-events_tempo-event.js.html b/docs/meta-events_tempo-event.js.html index 39418f3..11b2d77 100644 --- a/docs/meta-events_tempo-event.js.html +++ b/docs/meta-events_tempo-event.js.html @@ -24,7 +24,7 @@
@@ -76,7 +76,7 @@

meta-events/tempo-event.js


- Generated by JSDoc 3.6.4 on Tue Feb 02 2021 20:32:31 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.4 on Tue Jun 29 2021 20:57:48 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/meta-events_text-event.js.html b/docs/meta-events_text-event.js.html index 20b1963..05b28da 100644 --- a/docs/meta-events_text-event.js.html +++ b/docs/meta-events_text-event.js.html @@ -24,7 +24,7 @@
@@ -76,7 +76,7 @@

meta-events/text-event.js


- Generated by JSDoc 3.6.4 on Tue Feb 02 2021 20:32:31 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.4 on Tue Jun 29 2021 20:57:48 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/meta-events_time-signature-event.js.html b/docs/meta-events_time-signature-event.js.html index 8c4c3a5..aacdcfa 100644 --- a/docs/meta-events_time-signature-event.js.html +++ b/docs/meta-events_time-signature-event.js.html @@ -24,7 +24,7 @@
@@ -76,7 +76,7 @@

meta-events/time-signature-event.js


- Generated by JSDoc 3.6.4 on Tue Feb 02 2021 20:32:31 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.4 on Tue Jun 29 2021 20:57:48 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/meta-events_track-name-event.js.html b/docs/meta-events_track-name-event.js.html index 4163dbf..ef1411b 100644 --- a/docs/meta-events_track-name-event.js.html +++ b/docs/meta-events_track-name-event.js.html @@ -24,7 +24,7 @@
@@ -76,7 +76,7 @@

meta-events/track-name-event.js


- Generated by JSDoc 3.6.4 on Tue Feb 02 2021 20:32:31 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.4 on Tue Jun 29 2021 20:57:48 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/note-events_note-event.js.html b/docs/note-events_note-event.js.html index 0be7dde..6a83159 100644 --- a/docs/note-events_note-event.js.html +++ b/docs/note-events_note-event.js.html @@ -24,7 +24,7 @@
@@ -211,7 +211,7 @@

note-events/note-event.js


- Generated by JSDoc 3.6.4 on Tue Feb 02 2021 20:32:31 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.4 on Tue Jun 29 2021 20:57:48 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/note-events_note-off-event.js.html b/docs/note-events_note-off-event.js.html index b33396d..d8169c1 100644 --- a/docs/note-events_note-off-event.js.html +++ b/docs/note-events_note-off-event.js.html @@ -24,7 +24,7 @@
@@ -111,7 +111,7 @@

note-events/note-off-event.js


- Generated by JSDoc 3.6.4 on Tue Feb 02 2021 20:32:31 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.4 on Tue Jun 29 2021 20:57:48 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/note-events_note-on-event.js.html b/docs/note-events_note-on-event.js.html index e3ddfab..649a21d 100644 --- a/docs/note-events_note-on-event.js.html +++ b/docs/note-events_note-on-event.js.html @@ -24,7 +24,7 @@
@@ -125,7 +125,7 @@

note-events/note-on-event.js


- Generated by JSDoc 3.6.4 on Tue Feb 02 2021 20:32:31 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.4 on Tue Jun 29 2021 20:57:48 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/track.js.html b/docs/track.js.html index ab97650..c1aa21c 100644 --- a/docs/track.js.html +++ b/docs/track.js.html @@ -24,7 +24,7 @@
@@ -383,7 +383,7 @@

track.js


- Generated by JSDoc 3.6.4 on Tue Feb 02 2021 20:32:31 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.4 on Tue Jun 29 2021 20:57:48 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/utils.js.html b/docs/utils.js.html index 2154551..6aa4a9e 100644 --- a/docs/utils.js.html +++ b/docs/utils.js.html @@ -24,7 +24,7 @@
@@ -303,7 +303,7 @@

utils.js


- Generated by JSDoc 3.6.4 on Tue Feb 02 2021 20:32:31 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.4 on Tue Jun 29 2021 20:57:48 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/vexflow.js.html b/docs/vexflow.js.html index c31fb66..8431c73 100644 --- a/docs/vexflow.js.html +++ b/docs/vexflow.js.html @@ -24,7 +24,7 @@
@@ -48,14 +48,14 @@

vexflow.js

* Support for converting VexFlow voice into MidiWriterJS track * @return MidiWriter.Track object */ - trackFromVoice(voice) { + trackFromVoice(voice, options={addRenderedAccidentals: false}) { const track = new Track(); let wait = []; voice.tickables.forEach(tickable => { if (tickable.noteType === 'n') { track.addEvent(new NoteEvent({ - pitch: tickable.keys.map(this.convertPitch), + pitch: tickable.keys.map((pitch, index) => this.convertPitch(pitch, index, tickable, options.addRenderedAccidentals)), duration: this.convertDuration(tickable), wait })); @@ -81,9 +81,31 @@

vexflow.js

/** * Converts VexFlow pitch syntax to MidiWriterJS syntax * @param pitch string + * @param index pitch index + * @param note struct from Vexflow + * @param addRenderedAccidentals adds Vexflow rendered accidentals */ - convertPitch(pitch) { - return pitch.replace('/', ''); + convertPitch(pitch, index, note, addRenderedAccidentals=false) { + // Splits note name from octave + const pitchParts = pitch.split('/'); + + // Retrieves accidentals from pitch + // Removes natural accidentals since they are not accepted in Tonal Midi + let accidentals = pitchParts[0].substring(1).replace('n', ''); + + if (addRenderedAccidentals) { + note.getAccidentals()?.forEach(accidental => { + if (accidental.index === index) { + if (accidental.type === 'n') { + accidentals = ''; + } else { + accidentals += accidental.type; + } + } + }); + } + + return pitchParts[0][0] + accidentals + pitchParts[1]; } /** @@ -91,18 +113,25 @@

vexflow.js

* @param note struct from VexFlow */ convertDuration(note) { - switch (note.duration) { + return 'd'.repeat(note.dots) + this.convertBaseDuration(note.duration) + (note.tuplet ? 't' + note.tuplet.num_notes : ''); + } + + /** + * Converts VexFlow base duration syntax to MidiWriterJS syntax + * @param duration Vexflow duration + * @returns MidiWriterJS duration + */ + convertBaseDuration(duration) { + switch (duration) { case 'w': return '1'; case 'h': - return note.isDotted() ? 'd2' : '2'; + return '2'; case 'q': - return note.isDotted() ? 'd4' : '4'; - case '8': - return note.isDotted() ? 'd8' : '8'; + return '4'; + default: + return duration; } - - return note.duration; } } @@ -119,7 +148,7 @@

vexflow.js


- Generated by JSDoc 3.6.4 on Tue Feb 02 2021 20:32:31 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.4 on Tue Jun 29 2021 20:57:48 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/writer.js.html b/docs/writer.js.html index c3d659e..c6bb5ee 100644 --- a/docs/writer.js.html +++ b/docs/writer.js.html @@ -24,7 +24,7 @@
@@ -98,18 +98,6 @@

writer.js

stdout() { return process.stdout.write(new Buffer(this.buildFile())); } - - /** - * Save to MIDI file - * @param {string} filename - */ - saveMIDI(filename) { - const fs = require('fs'); - const buffer = new Buffer.from(this.buildFile()); - fs.writeFile(filename + '.mid', buffer, function (err) { - if(err) throw err; - }); - } } export {Writer}; @@ -125,7 +113,7 @@

writer.js


- Generated by JSDoc 3.6.4 on Tue Feb 02 2021 20:32:31 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.4 on Tue Jun 29 2021 20:57:48 GMT-0700 (Pacific Daylight Time) using the Minami theme.