Skip to content
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

refactor midi_to_object() to allow setting of ticks_per_beat #3

Open
CrumpLab opened this issue Feb 13, 2024 · 1 comment
Open

refactor midi_to_object() to allow setting of ticks_per_beat #3

CrumpLab opened this issue Feb 13, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@CrumpLab
Copy link
Owner

midi_to_object() could be refactored to allow setting of ticks_per_beat.

Suggestion to use pyramidi::MidiFramer$new()

#Initialize new pyramidi object
new_pyramidi_object <- pyramidi::MidiFramer$new()
# update ticks per beat
new_pyramidi_object$ticks_per_beat <- 96L

Then, import a midi file into the MidiFramer object. This should allow the ticks_per_beat to be set, and updated across the internal elements.

@CrumpLab CrumpLab added the enhancement New feature or request label Feb 13, 2024
@CrumpLab
Copy link
Owner Author

pyramidi::MidiFramer$new("file.mid") can be used to import .mid files too, but it will fail when the .mid file does not have tempo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant