-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
.midi Export #4319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
.midi Export #4319
Changes from 15 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
839718c
midi basic
Commanderk3 06a8fdf
basic midi
Commanderk3 cb95b82
clean up
Commanderk3 593d64d
data extraction success
Commanderk3 131b1ef
update
Commanderk3 1b164da
update 2
Commanderk3 80e20cd
update 3
Commanderk3 70810bd
instrument mapping
Commanderk3 a839828
drums added
Commanderk3 8db2c91
fix bugs
Commanderk3 d343fd1
bug fix
Commanderk3 7738baa
afterSaveMIDI
Commanderk3 6c875a0
Merge branch 'master' into midi
Commanderk3 59927ca
comments
Commanderk3 7f9f377
package
Commanderk3 4fa01dd
removed comment
Commanderk3 8588c94
space after comma
Commanderk3 83733c7
midi export
Commanderk3 08ad80b
Merge branch 'master' of https://github.com/Commanderk3/musicblocks i…
Commanderk3 bf3691b
resolve
Commanderk3 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -208,6 +208,7 @@ class Logo { | |
| this.collectingStats = false; | ||
| this.runningAbc = false; | ||
| this.runningMxml = false; | ||
| this.runningMIDI = false; | ||
| this._checkingCompletionState = false; | ||
| this.recording = false; | ||
|
|
||
|
|
@@ -231,6 +232,9 @@ class Logo { | |
| this.updatingStatusMatrix = false; | ||
| this.statusFields = []; | ||
|
|
||
| // Midi Data | ||
| this._midiData = {}; | ||
|
|
||
| // When running in step-by-step mode, the next command to run | ||
| // is queued here. | ||
| this.stepQueue = {}; | ||
|
|
@@ -796,6 +800,15 @@ class Logo { | |
| } | ||
| } | ||
|
|
||
| notationMIDI(note, drum, duration, turtle, bpm, instrument) { | ||
|
|
||
| if (!this._midiData[turtle]) { | ||
| this._midiData[turtle] = []; | ||
| } | ||
| if (drum) drum = drum[0]; | ||
| this._midiData[turtle].push({ note, duration, bpm, instrument, drum }); | ||
| } | ||
|
|
||
| // ======================================================================== | ||
|
|
||
| /** | ||
|
|
@@ -900,7 +913,7 @@ class Logo { | |
|
|
||
| this.activity.turtles | ||
| .ithTurtle(turtle) | ||
| .initTurtle(this.runningLilypond || this.runningAbc || this.runningMxml); | ||
| .initTurtle(this.runningLilypond || this.runningAbc || this.runningMxml || this.runningMIDI); | ||
| } | ||
|
|
||
| /** | ||
|
|
@@ -1690,7 +1703,11 @@ class Logo { | |
| // console.log("saving mxml output"); | ||
| logo.activity.save.afterSaveMxml(); | ||
| logo.runningMxml = false; | ||
| } else if (tur.singer.suppressOutput) { | ||
| } else if (logo.runningMIDI) { | ||
| logo.activity.save.afterSaveMIDI(); //save midi | ||
|
||
| logo.runningMIDI = false; | ||
| } | ||
| else if (tur.singer.suppressOutput) { | ||
| // console.debug("finishing compiling"); | ||
| if (!logo.recording) { | ||
| logo.activity.errorMsg(_("Playback is ready.")); | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add a space after the comma