From 3c9c453832c8a5c44d53dd299dec4a3099dc910b Mon Sep 17 00:00:00 2001 From: Serge Bazanski <q3k@q3k.org> Date: Sun, 13 Aug 2023 15:10:35 +0200 Subject: [PATCH] py: harmonic,melodic: revert to non-fm synth This is a hotfix for the 1.0.0 release because otherwise the two demos sound very, very broken. Do not merge back into main! --- python_payload/apps/demo_harmonic/__init__.py | 6 ++---- python_payload/apps/demo_melodic/__init__.py | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/python_payload/apps/demo_harmonic/__init__.py b/python_payload/apps/demo_harmonic/__init__.py index bc9fd69b2b..3ab5e1b775 100644 --- a/python_payload/apps/demo_harmonic/__init__.py +++ b/python_payload/apps/demo_harmonic/__init__.py @@ -26,19 +26,17 @@ class HarmonicApp(Application): self.color_intensity = 0.0 self.chord_index = 0 self.chord: List[int] = [] - self.synths = [blm.new(bl00mbox.patches.tinysynth_fm) for i in range(5)] + self.synths = [blm.new(bl00mbox.patches.tinysynth) for i in range(5)] self.cp_prev = captouch.read() for i, synth in enumerate(self.synths): synth.signals.decay = 500 - synth.signals.waveform = -32767 + synth.signals.waveform = 0 synth.signals.attack = 50 synth.signals.volume = 0.3 * 32767 synth.signals.sustain = 0.9 * 32767 synth.signals.release = 800 - synth.signals.fm_waveform = -32767 synth.signals.output = blm.mixer - # synth.fm = 1.5 self._set_chord(3) self.prev_captouch = [0] * 10 diff --git a/python_payload/apps/demo_melodic/__init__.py b/python_payload/apps/demo_melodic/__init__.py index cf6d405e43..b6813904aa 100644 --- a/python_payload/apps/demo_melodic/__init__.py +++ b/python_payload/apps/demo_melodic/__init__.py @@ -10,7 +10,7 @@ from st3m.ui.view import ViewManager from ctx import Context octave = 0 -synths: List[bl00mbox.patches.tinysynth_fm] = [] +synths: List[bl00mbox.patches.tinysynth] = [] scale = [0, 2, 4, 5, 7, 9, 11] @@ -79,7 +79,7 @@ def run(input: InputController) -> None: def init() -> None: global synths for i in range(1): - synth = blm.new(bl00mbox.patches.tinysynth_fm) + synth = blm.new(bl00mbox.patches.tinysynth) synth.signals.output = blm.mixer synths += [synth] for synth in synths: -- GitLab