Drop automatic note length adjustment (#63) #2272
Open
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.
Previously, Hydrogen did change the length of notes with custom lengths when editing pitch in
PianoRollEditoras well as adjusted the length of a recorded note for the selected instrument based on its pitch.Probably the original motivation was to keep the ratio of total sample length to custom note length constant since pitch shifting within Hydrogen will affect the length of the rendered note. But it results in awkward UX, like yielding different lengths for all notes when recording a chord for the selected instrument, and gives the users a hard time when using the custom length feature to send both MIDI NOTE_ON and NOTE_OFF messages while dealing with different pitches.
The main reason for this inconsistency was that the note length displayed in the pattern editor was not the actual one.
Note::m_nLengthitself did not change when pitch-shifting a note. Instead, the scaling of the note length was done entirely within theSamplerand the pattern editor tried to indicate it.Now, the
Samplertakes the whole custom note length into account. Regardless of pitch and sample rate.Some audio test reference files had to be adjusted because they rendered a pitch-shifted (via instrument) note of custom length at the end.