Skip to content

Commit

Permalink
Merge pull request #368 from shorepine/juno6catch
Browse files Browse the repository at this point in the history
fix for similar thing as #366 for juno6
  • Loading branch information
bwhitman authored Sep 9, 2024
2 parents 36a469a + 9aea864 commit 197e355
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 39 deletions.
69 changes: 31 additions & 38 deletions tulip/shared/py/juno6.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,44 +537,37 @@ def update_patch_for_channel(channel, patch_num):
if channel == midi_channel:
patch_selector.set_value(patch_num)

# Midi key mappings now initialized in midi.py
param_map = {
midi.KNOB_IDS[0]: 'lfo_rate',
midi.KNOB_IDS[1]: 'lfo_delay_time',
#midi.KNOB_IDS[2]: 'dco_lfo',
midi.MOD_WHEEL: 'dco_lfo',
midi.KNOB_IDS[3]: 'dco_pwm',
midi.SLIDER_IDS[0]: 'dco_sub',
midi.SLIDER_IDS[1]: 'dco_noise',
midi.SLIDER_IDS[2]: 'vcf_freq',
midi.SLIDER_IDS[3]: 'vcf_res',
midi.KNOB_IDS[4]: 'vcf_env',
midi.KNOB_IDS[5]: 'vcf_lfo',
midi.KNOB_IDS[6]: 'vcf_kbd',
#
# Moved to midi.py
#midi.KNOB_IDS[7]: 'seq_bpm',
#
midi.SLIDER_IDS[8]: 'vca_level',
midi.SLIDER_IDS[4]: 'env_a',
midi.SLIDER_IDS[5]: 'env_d',
midi.SLIDER_IDS[6]: 'env_s',
midi.SLIDER_IDS[7]: 'env_r',
midi.BUTTON_IDS[0]: 'dco_range',
midi.BUTTON_IDS[1]: 'dco_pwm_mode',
midi.BUTTON_IDS[2]: 'Pls',
midi.BUTTON_IDS[3]: 'Saw',
midi.BUTTON_IDS[4]: 'hpf_freq',
midi.BUTTON_IDS[5]: 'vcf_pol',
midi.BUTTON_IDS[6]: 'vca_mode',
midi.BUTTON_IDS[7]: 'chorus_mode',
#
# Arpeggiator controls - moved to midi.py
#midi.BUTTON_IDS[9]: 'On',
#midi.BUTTON_IDS[10]: 'Hold',
#midi.BUTTON_IDS[11]: 'arp_mode',
#midi.BUTTON_IDS[12]: 'arp_rng',
}
try:
param_map = {
midi.KNOB_IDS[0]: 'lfo_rate',
midi.KNOB_IDS[1]: 'lfo_delay_time',
midi.MOD_WHEEL: 'dco_lfo',
midi.KNOB_IDS[3]: 'dco_pwm',
midi.SLIDER_IDS[0]: 'dco_sub',
midi.SLIDER_IDS[1]: 'dco_noise',
midi.SLIDER_IDS[2]: 'vcf_freq',
midi.SLIDER_IDS[3]: 'vcf_res',
midi.KNOB_IDS[4]: 'vcf_env',
midi.KNOB_IDS[5]: 'vcf_lfo',
midi.KNOB_IDS[6]: 'vcf_kbd',
midi.SLIDER_IDS[8]: 'vca_level',
midi.SLIDER_IDS[4]: 'env_a',
midi.SLIDER_IDS[5]: 'env_d',
midi.SLIDER_IDS[6]: 'env_s',
midi.SLIDER_IDS[7]: 'env_r',
midi.BUTTON_IDS[0]: 'dco_range',
midi.BUTTON_IDS[1]: 'dco_pwm_mode',
midi.BUTTON_IDS[2]: 'Pls',
midi.BUTTON_IDS[3]: 'Saw',
midi.BUTTON_IDS[4]: 'hpf_freq',
midi.BUTTON_IDS[5]: 'vcf_pol',
midi.BUTTON_IDS[6]: 'vca_mode',
midi.BUTTON_IDS[7]: 'chorus_mode',
}
except IndexError:
print("Warning: Not enough sliders and buttons defined in midi_cc_file.json to control Juno-6")
param_map = {}


def control_change(control, value):
value = value / 127.0
Expand Down
2 changes: 1 addition & 1 deletion tulip/shared/py/midi.py
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ def setup_global_midi_cc_bindings():
}

except IndexError: # custom midi cc file did not specify buttons or knobs that go this high
print("Warning: we need at least 13 buttons and 8 knobs defined to automatically assign MIDI cc mappings")
print("Warning: Not enough knobs and buttons defined in midi_cc_file.json to control arp and tempo")
GLOBAL_MIDI_CC_BINDINGS = {}


Expand Down

0 comments on commit 197e355

Please sign in to comment.