MeeBlip / meeblip-triode

MeeBlip triode monophonic MIDI synthesizer
GNU General Public License v3.0
48 stars 9 forks source link

Midi channels above 4 are not restored #2

Closed oO closed 8 years ago

oO commented 8 years ago

When I set the midi channel to 8, the triode reverts to channel 0 / omni mode on power up.

The initialize code checks for midi channel < 5 but we can now pick values from 1-8 as valid midi channels?

initialize.inc line 223

cpi     r16, 5                  
brlo    LOAD_MIDI_CHANNEL       ; If stored MIDI Channel is not Channel 1-4, set synth into MIDI OMNI mode.
ldi     r16, 0

Seems that you should check for values less than 16 instead, and worry about how many channel the synth supports somewhere else.

In the future, you could check for a change in the state of a switch to toggle between midi 1-8 and 9-16 and support setting the synth to any channel. and not just the lower 8 channels.

jgrahame commented 8 years ago

This should be an easy fix. Will implement in the next release.

jgrahame commented 8 years ago

Added MAXMIDI variable. Synth now restores channel 1-8 after being powered down.

oO-Zam commented 8 years ago

@jgrahame what's the process to update the firmware? I'm assuming the .hex file is updated to 1.01, so I can just fire up AVRDUDE and flash it? ( don't think you have the onboard programming pins exposed on the synth, right? )