-
Notifications
You must be signed in to change notification settings - Fork 29
Fix issue #166 (synthesizing scores with pickup measures) #167
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
Conversation
Codecov ReportBase: 80.53% // Head: 81.17% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## develop #167 +/- ##
===========================================
+ Coverage 80.53% 81.17% +0.63%
===========================================
Files 63 63
Lines 10313 10488 +175
===========================================
+ Hits 8306 8514 +208
+ Misses 2007 1974 -33
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
|
||
Potential extensions | ||
-------------------- | ||
* allow for bpm to be a callable or an 2D array with columns (onset, bpm) |
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.
This pull request implements these extensions (now as part of the performance_notearray_from_score_notearray
method below)
partitura/io/exportaudio.py
Outdated
semitones, while "natural" will use natural ratios within an octave. | ||
Otherwise it uses a callable. See `midi_pitch_to_natural_frequency` | ||
and `midi_pitch_to_frequency` for more info on the "equal_temperament" | ||
and "natural" tuning. |
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.
natural temperament is based on the reference pitch of A, this choice is not clearly documented and gives wrong results for many pieces where the base note should be different. I see two ways of fixing this, 1) using the midi_pitch_to_tempered_frequency
function instead or 2) clearly documenting that this renders a version based on reference pitch A with interval ratios given in NATURAL_INTERVAL_RATIOS
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.
I added a symmetric 5-limit temperament table FIVE_LIMIT_INTERVAL_RATIOS
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.
The new changes reflect both suggestions:
- The function
midi_pitch_to_tempered_frequency
is now used instead ofmidi_pitch_to_natural_frequency
iftuning="natural"
- The docstring explicitly states that the function computes intervals with respect to a reference pitch and that the
FIVE_LIMIT_INTERVAL_RATIOS
are used by default.
This pull request contains the following changes
synthesize
functionperformance_note_array_from_score_note_array
which allows for more flexibility converting score-like note arrays to performance-like note arrays (including adding extra features for non-constant tempo and velocity inperformance_from_part
)