From 3f786a0fb27205460c88f4aca95dc6f9be824f16 Mon Sep 17 00:00:00 2001 From: Tim Stirrat Date: Wed, 25 Sep 2024 16:57:06 +1000 Subject: [PATCH] [Mod] Ignore WAV offset and note velocity --- Source/io/midi.c | 4 ++++ Source/screen/main.c | 4 ++-- Source/synth/wav.c | 16 ++++++++-------- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/Source/io/midi.c b/Source/io/midi.c index 8ccdbec..9050e16 100644 --- a/Source/io/midi.c +++ b/Source/io/midi.c @@ -46,6 +46,10 @@ void updateMidiBuffer(void) { asmEventMidiPB(); break; case MIDI_STATUS_CC: + // ignore WAV channel CC02 + if (statusByte == 0xB2 && addressByte == 0x02) { + break; + } asmEventMidiCC(); break; case MIDI_STATUS_NOTE_ON: diff --git a/Source/screen/main.c b/Source/screen/main.c index 6c060fc..2e353d0 100644 --- a/Source/screen/main.c +++ b/Source/screen/main.c @@ -9,7 +9,7 @@ #include "../synth/wav.h" #include "screen.h" -static const uint8_t VERSION_NUMBER[10] = "v.1.3.3 "; +static const uint8_t VERSION_NUMBER[] = "v.1.3.4-HustlaMod"; static const uint8_t HELP_DATA[10][18] = { "octave ", @@ -20,7 +20,7 @@ static const uint8_t HELP_DATA[10][18] = { "sustain cc64", "pan cc10", "preset cc05", - "wav offset cc02", + "wav offset nocc", // " ", }; diff --git a/Source/synth/wav.c b/Source/synth/wav.c index 39f4430..fffced2 100644 --- a/Source/synth/wav.c +++ b/Source/synth/wav.c @@ -148,14 +148,14 @@ void playNoteWav(void) { noteStatus[WAV].note = noteIndex; // channel volume louder = smaller value: - const uint8_t noteVelocity = valueByte & AUD3LEVEL_MASK; - if (noteVelocity == 0x60) { - rAUD3LEVEL = AUD3LEVEL_100; - } else if (noteVelocity == 0x40) { - rAUD3LEVEL = AUD3LEVEL_50; - } else { - rAUD3LEVEL = AUD3LEVEL_25; - } + // const uint8_t noteVelocity = valueByte & AUD3LEVEL_MASK; + // if (noteVelocity == 0x60) { + rAUD3LEVEL = AUD3LEVEL_100; // fixed max vol + // } else if (noteVelocity == 0x40) { + // rAUD3LEVEL = AUD3LEVEL_50; + // } else { + // rAUD3LEVEL = AUD3LEVEL_25; + // } // rAUD3HIGH = 0x00; // was in ASM, probably not needed?