Add: MIDIfile save function and new requirement#3
Open
gregory-mc wants to merge 1 commit intoerinspace:masterfrom
Open
Add: MIDIfile save function and new requirement#3gregory-mc wants to merge 1 commit intoerinspace:masterfrom
gregory-mc wants to merge 1 commit intoerinspace:masterfrom
Conversation
erinspace
reviewed
Jun 14, 2021
Comment on lines
+170
to
+174
| if track_type not in ['single', 'multiple']: | ||
| raise ValueError('Track type must be single or multiple') | ||
|
|
||
| if track_type == 'single': | ||
| data = [data] |
Owner
There was a problem hiding this comment.
Hello @gregory-mc! Thank you SO much for the pull request! This functionality makes total sense! My only suggestion would be instead of copying and pasting a lot of the code from the write_to_midifile function, it might be nice to instead factor out the repeated bits so that any future change to how things work won't have to be made twice!
That being said, I'm also happy to merge as is and make the change later (if I can get to it!)
This was a fun hobby project, it's so cool to see other folks getting use out of it!!
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I added a function to save midifile that includes parts of play_midi_from_data( ) and write_to_midifile( ) I find this interesting when someone wants to sonify data with loops (76 items for example).
I also added a new requirement because numpy version 1.20 requires python 3.7.
I tried install sonify in a conda env with python 3.7 and I couldn't.