Skip to content

Commit

Permalink
Constrain high hat decay value, for now
Browse files Browse the repository at this point in the history
  • Loading branch information
timchurches committed Oct 25, 2015
1 parent 1277579 commit 0afc927
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion peaks/drums/high_hat.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@ class HighHat {
}

void set_decay(uint16_t decay) {
vca_envelope_.set_decay(4065 + (decay >> 11));
uint16_t decay_value = 4065 + (decay >> 11) ;
if (decay_value > 4095) {
decay_value = 4095 ;
}
vca_envelope_.set_decay(decay_value);
}

void set_frequency_randomness(uint16_t frequency_randomness) {
Expand Down

0 comments on commit 0afc927

Please sign in to comment.