diff --git a/firmware/synth.c b/firmware/synth.c index 9e62124..57189f2 100644 --- a/firmware/synth.c +++ b/firmware/synth.c @@ -6,7 +6,7 @@ enum { WAVE_OFF, WAVE_PULSE, WAVE_SAW, WAVE_NOISE }; enum { channel_count = 3, - tick_length = 600, + tick_length = 800, row_length = 4, pattern_length = 16 }; @@ -36,9 +36,9 @@ typedef struct { static const synth_instrument_t instruments[] = { { 1<<15, 255, 8 }, { 0, 255, 8 }, - { 0, 0, 5 }, - { 1<<14, 0, 0, 3 }, - { 1<<14, 0, 10, 3 }, + { 0, 200, 5 }, + { 1<<13, 0, 0, 2 }, + { 1<<13, 0, 10, 2 }, }; static const uint8_t wave_table[][2] = { @@ -49,7 +49,7 @@ static const uint8_t wave_table[][2] = { { 256 - 4, 0xff }, { 0, WAVE_NOISE }, - { 0, WAVE_SAW }, + { 0, WAVE_PULSE }, { 0xff, 0xff }, { 0, WAVE_PULSE }, @@ -64,6 +64,7 @@ static const uint8_t wave_table[][2] = { static const uint8_t patterns[][pattern_length][2] = { + {}, { { 33 - 12, 0 }, { 0xff, 1 }, @@ -101,46 +102,86 @@ static const uint8_t patterns[][pattern_length][2] = { { 0xff, 1 }, }, { - { 69, 2 }, - { 0, 0 }, - { 57 - 24, 2 }, - { 0, 0 }, - { 0xff, 0 }, - { 45, 2 }, - { 0, 0 }, - { 0xff, 0 }, - { 45+3, 2 }, - { 0, 0 }, - { 45+7, 2 }, - { 0, 0 }, - { 0xff, 0 }, + { 0, 0 }, + { 0, 0 }, + { 0, 0 }, + { 0, 0 }, + { 0, 0 }, + { 0, 0 }, + { 0, 0 }, + { 0, 0 }, + { 57, 3 }, }, { - { 0, 0 }, - { 0, 0 }, - { 0, 0 }, - { 0, 0 }, - { 57, 3 }, + { 0, 0 }, + { 0, 0 }, + { 0, 0 }, + { 0, 0 }, + { 0, 0 }, + { 0, 0 }, + { 0, 0 }, + { 0, 0 }, + { 57, 4 }, + }, + + + { + { 60, 2 }, }, { - { 0, 0 }, - { 0, 0 }, - { 0, 0 }, - { 0, 0 }, - { 57, 4 }, - } + { 0, 0 }, + { 0, 0 }, + { 0, 0 }, + { 0, 0 }, + { 57, 2 }, + { 0, 0 }, + { 0, 0 }, + { 0, 0 }, + { 0, 0 }, + { 0, 0 }, + { 0, 0 }, + { 0, 0 }, + { 55, 2 }, + { 0, 0 }, + { 57, 2 }, + { 0, 0 }, + }, + { + { 55, 2 }, + }, + { + { 0, 0 }, + { 0, 0 }, + { 0, 0 }, + { 0, 0 }, + { 0, 0 }, + { 0, 0 }, + { 0, 0 }, + { 0, 0 }, + { 0, 0 }, + { 0, 0 }, + { 0, 0 }, + { 0, 0 }, + { 57, 2 }, + }, + { + { 55-3, 2 }, + }, + + + }; static const uint8_t pattern_table[][channel_count] = { - { 0, 2, 3 }, - { 0, 2, 3 }, - { 0, 2, 3 }, - { 0, 2, 3 }, - { 1, 2, 4 }, - { 1, 2, 4 }, - { 1, 2, 4 }, - { 1, 2, 4 }, + { 1, 0, 5 }, + { 1, 3, 0 }, + { 1, 0, 7 }, + { 1, 3, 6 }, + { 2, 0, 7 }, + { 2, 4, 8 }, + { 2, 0, 9 }, + { 2, 4, 0 }, }; enum { pattern_table_length = sizeof(pattern_table) / sizeof(pattern_table[0])