Forum Archive

Sound.stop_effect stops the sound with a hard "noise" since Last Update of Version 1.6

laszlo.j.hermann

Sound stop_effect stops the sound with a hard "noise" since Last Update of Version 1.6. See example code: If your touch is between 0.1-0.3 seconds, you can hear it. Is there any way to fix it?

from scene import *
import sound
import os

global keyid
class Sound (Scene):

def setup(self):
    sound.load_effect('Piano_F3')

def draw(self):
    pass

def touch_began(self, touch):
    global keyid
    keyid = sound.play_effect('Piano_F3')

def touch_ended(self, touch):
    global keyid
    sound.stop_effect(keyid)

run(Sound(), PORTRAIT)

JonB

did this not happen in 1.5?

laszlo.j.hermann

As I remember, the first version I had, was not "noisy" by stop_effect. The missing of fade out was not so disturbing the now. The stop_effect has a stronger characteristic of "switch off" noise. Maybe it is only my subjectiv impression.. I created a "88 key" piano app with 4 sec long sound patterns and I feel the low frequency sounds has a strong disturbing switch off noise by short touches. Do you have an other impression?

JonB

Not sure I used it in the past. I have had similar experiences when I was generating short wave files on the fly and stitching them together in near realtime, but my theory was that i just had no way of synchronizing the phase, so i expected a certain amount of clicking.