From 49c62c9771c40a3407577199ef675061dd8d5c04 Mon Sep 17 00:00:00 2001 From: Dan Ellis Date: Sun, 26 Jan 2025 20:27:45 -0500 Subject: [PATCH] midi.py: config.add_synth() returns the new Synth object. --- tulip/shared/py/midi.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tulip/shared/py/midi.py b/tulip/shared/py/midi.py index 529a2031..3b2cdcb3 100644 --- a/tulip/shared/py/midi.py +++ b/tulip/shared/py/midi.py @@ -44,6 +44,8 @@ def add_synth(self, channel=1, patch_number=0, num_voices=6): self.release_synth_for_channel(channel) synth_object = Synth(num_voices=num_voices, patch_number=patch_number) self.add_synth_object(channel, synth_object) + # Return the newly-created synth object so client can tweak it. + return synth_object def insert_arpeggiator(self, channel, arpeggiator): if channel in self.synth_per_channel: