[Csnd] Clicking slider with Tkinter
Date | 2019-01-15 19:05 |
From | Beinan Li |
Subject | [Csnd] Clicking slider with Tkinter |
Attachments | tonegen.csd bug-slider-glitch.py |
Hello Csound, Running Homebrew Csound version 6.10 (double samples) Dec 21 2017 on macOS Mojave. I'm testing to control a Csound oscillator gain via an external Tkinter (Python 3.7) slider. I hear clicking when moving the slider however I tweak my ksmp and the slider resolution. Given such a simple case, I don't believe it's a CPU issue. I didn't use the bundled FLTK in order to decouple the frontend from the synth backend. In the past I didn't have glitches with those. See the attached minimal code, please. Repro:
You should hear the clicking. I'd appreciate tips. I hope I don't need to do things like interpolating slider output by hand ... Thanks, Beinan |
Date | 2019-01-15 19:13 |
From | Beinan Li |
Subject | Re: [Csnd] Clicking slider with Tkinter |
The code uses OSC and has a dependency: pip install python-osc Thanks, Beinan On Tue, Jan 15, 2019 at 2:05 PM Beinan Li <li.beinan@gmail.com> wrote:
|
Date | 2019-01-16 09:21 |
From | Rory Walsh |
Subject | Re: [Csnd] Clicking slider with Tkinter |
Have you tried smoothing the signal of the slider with a low-pass filter? a1 poscil ampdb(tonek(gkgaindb, 10)), gkfreq, 1 On Tue, 15 Jan 2019 at 19:14, Beinan Li <li.beinan@gmail.com> wrote:
|
Date | 2019-01-16 09:46 |
From | Richard van Bemmelen |
Subject | Re: [Csnd] Clicking slider with Tkinter |
I have used sliders with succes with PySimpleGUI. This is based on tkinter, but much easier to use. But I used ctcsound to start the csd and normal channels, not via OSC. It might be that the use of OSC is causing the glitches. Have you tried it with direct channels? Richard Op di 15 jan. 2019 om 20:06 schreef Beinan Li <li.beinan@gmail.com>:
|
Date | 2019-01-16 16:25 |
From | Beinan Li |
Subject | Re: [Csnd] Clicking slider with Tkinter |
Thanks, Rory! That works. Now I'll pay more attention to the k-rate opcodes for massaging non-audio input signals. Cheers, Beinan On Wed, Jan 16, 2019 at 4:21 AM Rory Walsh <rorywalsh@ear.ie> wrote:
|
Date | 2019-01-16 16:32 |
From | Beinan Li |
Subject | Re: [Csnd] Clicking slider with Tkinter |
hmm, I doubt that it was OSC, because a for-loop ramping of the gain through OSC didn't click. In fact, I tried to drag the slider more slowly, the clicking was reduced, too, so most probably a smoothing issue. Rory's LPF solution is short and sweet for this sake. I loved PySimpleGUI btw, it has great potential, especially how much work the author puts into the doc, yet after a while I decided to wait and watch it grow for now. Thanks, Beinan On Wed, Jan 16, 2019 at 4:52 AM Richard van Bemmelen <zappfinger@gmail.com> wrote:
|