Skip to content

Commit

Permalink
adds more voice harmonics
Browse files Browse the repository at this point in the history
  • Loading branch information
jackhumbert committed Apr 22, 2016
1 parent a808612 commit a718c53
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
19 changes: 16 additions & 3 deletions quantum/audio/voices.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,27 @@ float voice_envelope(float frequency) {
break;
case duty_fifth_down:
note_timbre = 0.5;
if ((envelope_index % 5) == 0)
if ((envelope_index % 3) == 0)
note_timbre = 0.75;
break;
case duty_fourth_down:
note_timbre = 0.0;
if ((envelope_index % 12) == 0)
note_timbre = 0.75;
if (((envelope_index % 12) % 4) != 1)
note_timbre = 0.75;
break;
case duty_third_down:
note_timbre = 0.5;
if ((envelope_index % 5) == 0)
note_timbre = 0.75;
break;
case duty_fifth_third_down:
note_timbre = 0.5;
if ((envelope_index % 5) == 0)
note_timbre = 0.75;
if ((envelope_index % 3) == 0)
note_timbre = 0.25;
else
note_timbre = 0.5;
break;

default:
Expand Down
2 changes: 2 additions & 0 deletions quantum/audio/voices.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ typedef enum {
duty_octave_down,
duty_fifth_down,
duty_fourth_down,
duty_third_down,
duty_fifth_third_down,
number_of_voices // important that this is last
} voice_type;

Expand Down

0 comments on commit a718c53

Please sign in to comment.