1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-23 17:30:17 +01:00

From Pokechu22: Rename gain to velocity on note tracks

"Velocity" is the technical term, and it's the term that's used everywhere.
"Gain" was probably only used because "gain" is used on wave tracks; since
note tracks aren't wave tracks (and shouldn't be treated as them) the
corresponding variables should be named velocity.
This commit is contained in:
Paul Licameli
2017-03-28 15:50:07 -04:00
parent c20a3526a6
commit 80984c9f1d
5 changed files with 12 additions and 12 deletions

View File

@@ -3790,7 +3790,7 @@ void AudioIO::OutputEvent()
data1 = mNextEvent->get_pitch();
if (mNextIsNoteOn) {
data2 = mNextEvent->get_loud(); // get velocity
int offset = mNextEventTrack->GetGain();
int offset = mNextEventTrack->GetVelocity();
data2 += offset; // offset comes from per-track slider
// clip velocity to insure a legal note-on value
data2 = (data2 < 0 ? 1 : (data2 > 127 ? 127 : data2));