-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
fix #25010: added midi generation for guitar bends #25080
Conversation
@@ -932,7 +945,7 @@ void CompatMidiRender::createSlideOutNotePlayEvents(Note* note, NoteEventList* e | |||
int slideOn = NoteEvent::NOTE_LENGTH - totalSlideDuration; | |||
double velocity = !note->ghost() ? NoteEvent::DEFAULT_VELOCITY_MULTIPLIER : NoteEvent::GHOST_VELOCITY_MULTIPLIER; | |||
if (!hasTremolo) { | |||
el->push_back(NoteEvent(0, onTime, slideOn, velocity, !note->tieBack())); | |||
el->push_back(NoteEvent(0, onTime, slideOn - onTime, velocity, !note->tieBack())); |
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'm not 100% sure, but it seems NoteEvent m_len will always be 0 (slideOn-onTime). So this event makes no sense.
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.
slideOn - time when slide should start, it's calculated from the end of the duration. See the file in description, there was bug, maybe I've also missed smth
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.
-
Grace-bend should take its duration from previous not (not from the target one).
In this case it should be part of A note. In properties of the grace-bend diagram should reproduce actual previous not (A), which allows to make the grace-bend note as long as we want.
gracebend+bend+release.mscz.zip -
Bend after prebend ends on one point earlier that it should.
Last pitch change should be at the begin of the beat.
prebend+bend.mscz.zip -
Pitch of bends changes to less of pitch points (e.g. 8-9 for full bend instead of 10)
abariska.2024-10-10.at.18.08.21.mp4
- 3 pitch points change instead 2 to be used for slight-bend.
f854a69
to
ed7a7a8
Compare
ed7a7a8
to
bb53cf0
Compare
} else { | ||
GuitarBend* bendFor = note->bendFor(); | ||
if (bendFor) { | ||
collectGuitarBend(note, noteChannel, tick1, noteParams.graceOffsetOn, noteParams.previousChordTicks, pitchWheelRenderer, |
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.
How exactly will this work if the bend starts from a tied note? Right now bends don't work at all during normal playback if they start from tied notes (#21345). So I'm wondering if we have the same problem with MIDI export...
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.
any consequent combination of ties/bends is treated in 1 pass, and ignored if called again from another note of combination.
Rechecked, this combination also works. @abariska FYI
bb53cf0
to
47c19de
Compare
47c19de
to
ba73fb1
Compare
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.
There're some minor issues but they will be reported separately
Resolves: #25010
changes that affect other things in midi export than only
GuitarBend
:Duration of note with slide after grace note:
el->push_back(NoteEvent(0, onTime, slideOn - onTime, velocity, !note->tieBack()));
example:
grace+slide.gp.zip
Resetting pitchwheel to 0 as close to next note as possible.
With new implementation of bends we have 2 notes (instead of 1), so we skip sound ON of second note (adding more pitchbends to keep sound on the needed pitch), so if pitchbend should be dropped as close as possible to next note - not to have sound artifacts
example:
bend+note.mscz.zip