diff --git a/Source/synth/wav.c b/Source/synth/wav.c index 39f4430..abf8d07 100644 --- a/Source/synth/wav.c +++ b/Source/synth/wav.c @@ -147,6 +147,11 @@ void playNoteWav(void) { // Note on noteStatus[WAV].note = noteIndex; + rAUD3HIGH = AUDHIGH_RESTART; // retrigger + + rAUD3LOW = wavCurrentFreq; + rAUD3HIGH = wavCurrentFreq >> 8U; + // channel volume louder = smaller value: const uint8_t noteVelocity = valueByte & AUD3LEVEL_MASK; if (noteVelocity == 0x60) { @@ -156,12 +161,6 @@ void playNoteWav(void) { } else { rAUD3LEVEL = AUD3LEVEL_25; } - - // rAUD3HIGH = 0x00; // was in ASM, probably not needed? - - rAUD3LOW = wavCurrentFreq; - rAUD3HIGH = wavCurrentFreq >> 8U; - // Reset various counters and flags vibratoPosition[WAV] = 0; wavStepCounter = 0;