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:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user