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

SetTempoEvent #76

Closed
Fabioclug opened this issue Nov 20, 2015 · 2 comments
Closed

SetTempoEvent #76

Fabioclug opened this issue Nov 20, 2015 · 2 comments
Labels

Comments

@Fabioclug
Copy link

Is there any example of how to use the SetTempoEvent? It seems it takes 2 parameters, but in the Standard MIDI Spec. (http://www.cs.cmu.edu/~music/cmsip/readings/Standard-MIDI-file-format-updated.pdf) the event takes a single parameter, so I didn't understand how to use it properly.

@vishnubob
Copy link
Owner

The SetTempoEvent provides a convenience attribute bpm that wraps the concrete attribute mpqn. mpqn, which stands for microseconds per quarter note, is the value that is actually encoded in the MIDI stream, but this is not the most convenient way to think about tempo. bpm, which stands for beats per minute, automatically converts the internal mpqn parameter for your convenience. In other words, you only need to set one, and the other will automatically reflect that value.

@Fabioclug
Copy link
Author

Thank you! I was trying to pass the value inside a "data" list, as I've seen in other examples, but passing it through a "bpm" parameter worked.

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

No branches or pull requests

2 participants