1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-02 20:30:00 +00:00

Clarifies meaning of scaling. Though it isn't yet applied.

This commit is contained in:
Thomas Harte 2020-04-17 22:30:10 -04:00
parent 0aceddd088
commit e58ba27c00
2 changed files with 6 additions and 6 deletions

View File

@ -23,7 +23,7 @@ void Operator::set_sustain_release(uint8_t value) {
}
void Operator::set_scaling_output(uint8_t value) {
scaling_level_ = value >> 6;
level_key_scaling_ = value >> 6;
attenuation_ = value & 0x3f;
}
@ -35,7 +35,7 @@ void Operator::set_am_vibrato_hold_sustain_ksr_multiple(uint8_t value) {
apply_amplitude_modulation_ = value & 0x80;
apply_vibrato_ = value & 0x40;
use_sustain_level_ = value & 0x20;
keyboard_scaling_rate_ = value & 0x10;
key_scaling_rate_ = value & 0x10;
frequency_multiple_ = value & 0xf;
}

View File

@ -102,9 +102,6 @@ class Operator {
/// level is hit, getting back to 0 regardless of an ongoing key-on.
bool use_sustain_level_ = false;
/// Provides a potential faster step through the ADSR envelope. Cf. p12.
bool keyboard_scaling_rate_ = false;
/// Indexes a lookup table to determine what multiple of the channel's frequency
/// this operator is advancing at.
int frequency_multiple_ = 0;
@ -112,8 +109,11 @@ class Operator {
/// Sets the current output level of this modulator, as an attenuation.
int attenuation_ = 0;
/// Provides a potential faster step through the ADSR envelope. Cf. p12.
bool key_scaling_rate_ = false;
/// Selects attenuation that is applied as a function of interval. Cf. p14.
int scaling_level_ = 0;
int level_key_scaling_ = 0;
/// Sets the ADSR rates. These all provide the top four bits of a six-bit number;
/// the bottom two bits... are 'RL'?