Skip to content

Commit

Permalink
Merge branch 'main' of github.com:bwhitman/tulipcc
Browse files Browse the repository at this point in the history
  • Loading branch information
bwhitman committed May 26, 2024
2 parents 36f0102 + 51f888a commit c10b4b9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion tulip/shared/py/juno6.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,12 @@ def setup_from_patch_number(patch_number):
global midi_channel
#print("resetting patch number to %d" % (patch_number))

music_map(midi_channel, patch_number, 4)
# See how many voices are allocated going in.
_, amy_voices = midi.config.channel_info(midi_channel)
#print("channel", midi_channel, "voices", amy_voices)
# Use no fewer than 4.
polyphony = max(4, len(amy_voices))
music_map(midi_channel, patch_number, polyphony)
_, amy_voices = midi.config.channel_info(midi_channel)
jp = juno.JunoPatch() #.from_patch_number(patch_number)
jp.set_voices(amy_voices)
Expand Down
4 changes: 2 additions & 2 deletions tulip/shared/py/midi.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,10 +388,10 @@ def control_change(self, control, value):
def ensure_midi_config():
global config
if not config:
# Tulip defaults, 4 note polyphony on channel 1
# Tulip defaults, 6 note polyphony on channel 1
# drum machine always on channel 10
config = MidiConfig(
voices_per_channel={1: 4, 10: 10},
voices_per_channel={1: 6, 10: 10},
patch_per_channel={1: 2},
)
tulip.midi_add_callback(midi_event_cb)
Expand Down

0 comments on commit c10b4b9

Please sign in to comment.