mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-16 18:30:32 +00:00
Pulls out common melodic update calls.
This commit is contained in:
parent
100fddcee1
commit
f19fd7c166
@ -180,16 +180,16 @@ void OPLL::setup_fixed_instrument(int number, const uint8_t *data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void OPLL::update_all_chanels() {
|
void OPLL::update_all_chanels() {
|
||||||
|
// Channels that are updated for melodic output regardless.
|
||||||
|
for(int c = 0; c < 6; ++ c) {
|
||||||
|
channels_[c].level = (channels_[c].update() * total_volume_) >> 14;
|
||||||
|
}
|
||||||
|
|
||||||
if(depth_rhythm_control_ & 0x20) {
|
if(depth_rhythm_control_ & 0x20) {
|
||||||
// Rhythm mode. Somehow?
|
// Rhythm mode. Somehow?
|
||||||
|
|
||||||
// Melodic channels. Easy!
|
|
||||||
for(int c = 0; c < 6; ++ c) {
|
|
||||||
channels_[c].level = (channels_[c].update() * total_volume_) >> 14;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
// All melody, all the time.
|
// All melody, all the time.
|
||||||
for(int c = 0; c < 9; ++ c) {
|
for(int c = 6; c < 9; ++ c) {
|
||||||
channels_[c].level = (channels_[c].update() * total_volume_) >> 14;
|
channels_[c].level = (channels_[c].update() * total_volume_) >> 14;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user