sync marks work
This commit is contained in:
parent
1ebf85cb9d
commit
d4d494ae7b
@ -7,7 +7,7 @@ MCU=msp430g2553
|
|||||||
CFLAGS=-Wall -mmcu=$(MCU) -std=gnu99 -I $(TOOLCHAIN_PREFIX)/include -O1 -g0
|
CFLAGS=-Wall -mmcu=$(MCU) -std=gnu99 -I $(TOOLCHAIN_PREFIX)/include -O1 -g0
|
||||||
|
|
||||||
# for debugging
|
# for debugging
|
||||||
CFLAGS+= -g3 -ggdb -gdwarf-2
|
#CFLAGS+= -g3 -ggdb -gdwarf-2
|
||||||
|
|
||||||
LDFLAGS=-mmcu=$(MCU) -L $(TOOLCHAIN_PREFIX)/include
|
LDFLAGS=-mmcu=$(MCU) -L $(TOOLCHAIN_PREFIX)/include
|
||||||
|
|
||||||
|
@ -295,6 +295,8 @@ const t_tone tetris1[] = {
|
|||||||
{ .octave = e_O_4, .note = e_Gis, .length = e_L_1, .legato = false, .staccato = false },
|
{ .octave = e_O_4, .note = e_Gis, .length = e_L_1, .legato = false, .staccato = false },
|
||||||
|
|
||||||
{ .octave = e_O_Null, .note = e_Null, .length = e_L_SyncMark,.legato = false, .staccato = false },
|
{ .octave = e_O_Null, .note = e_Null, .length = e_L_SyncMark,.legato = false, .staccato = false },
|
||||||
|
|
||||||
|
{ .octave = e_O_Null, .note = e_Null, .length = e_L_EndMark, .legato = false, .staccato = false },
|
||||||
};
|
};
|
||||||
|
|
||||||
const t_tone tetris2[] = {
|
const t_tone tetris2[] = {
|
||||||
@ -533,6 +535,8 @@ const t_tone tetris2[] = {
|
|||||||
{ .octave = e_O_3, .note = e_E, .length = e_L_1, .legato = false, .staccato = false },
|
{ .octave = e_O_3, .note = e_E, .length = e_L_1, .legato = false, .staccato = false },
|
||||||
|
|
||||||
{ .octave = e_O_Null, .note = e_Null, .length = e_L_SyncMark,.legato = false, .staccato = false },
|
{ .octave = e_O_Null, .note = e_Null, .length = e_L_SyncMark,.legato = false, .staccato = false },
|
||||||
|
|
||||||
|
{ .octave = e_O_Null, .note = e_Null, .length = e_L_EndMark, .legato = false, .staccato = false },
|
||||||
};
|
};
|
||||||
|
|
||||||
const t_tone tetris3[] = {
|
const t_tone tetris3[] = {
|
||||||
@ -887,8 +891,9 @@ const t_tone tetris3[] = {
|
|||||||
{ .octave = e_O_3, .note = e_E, .length = e_L_1_8, .legato = false, .staccato = false },
|
{ .octave = e_O_3, .note = e_E, .length = e_L_1_8, .legato = false, .staccato = false },
|
||||||
|
|
||||||
{ .octave = e_O_Null, .note = e_Null, .length = e_L_SyncMark,.legato = false, .staccato = false },
|
{ .octave = e_O_Null, .note = e_Null, .length = e_L_SyncMark,.legato = false, .staccato = false },
|
||||||
};
|
|
||||||
|
|
||||||
|
{ .octave = e_O_Null, .note = e_Null, .length = e_L_EndMark, .legato = false, .staccato = false },
|
||||||
|
};
|
||||||
|
|
||||||
t_melodies tetrisTheme = {
|
t_melodies tetrisTheme = {
|
||||||
.melodies = { { .amplitude = 3, .tones = tetris1 }, { .amplitude = 3, .tones = tetris2 }, { .amplitude = 3, .tones = tetris3 } },
|
.melodies = { { .amplitude = 3, .tones = tetris1 }, { .amplitude = 3, .tones = tetris2 }, { .amplitude = 3, .tones = tetris3 } },
|
||||||
@ -896,7 +901,6 @@ t_melodies tetrisTheme = {
|
|||||||
.pace = 4
|
.pace = 4
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void melodyInit() {
|
void melodyInit() {
|
||||||
sequencerPlayMelodies(&tetrisTheme);
|
sequencerPlayMelodies(&tetrisTheme);
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ void sequencerInit() {
|
|||||||
void sequencerExec(void *handle) {
|
void sequencerExec(void *handle) {
|
||||||
t_melodies *melodies = (t_melodies*) handle;
|
t_melodies *melodies = (t_melodies*) handle;
|
||||||
|
|
||||||
for (uint8_t channel = 0; channel < MAX(NUM_OF_CHANNELS, melodies->numOfMelodies); channel++) {
|
for (uint8_t channel = 0; channel < melodies->numOfMelodies; channel++) {
|
||||||
t_melody *melody = &(melodies->melodies[channel]);
|
t_melody *melody = &(melodies->melodies[channel]);
|
||||||
|
|
||||||
switch (melody->state) {
|
switch (melody->state) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user