omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


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

    Pythonista
    sounds sound stopeffe
    2
    4
    3213
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • laszlo.j.hermann
      laszlo.j.hermann last edited by

      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)

      1 Reply Last reply Reply Quote 0
      • JonB
        JonB last edited by

        did this not happen in 1.5?

        1 Reply Last reply Reply Quote 0
        • laszlo.j.hermann
          laszlo.j.hermann last edited by

          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?

          1 Reply Last reply Reply Quote 0
          • JonB
            JonB last edited by

            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.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Powered by NodeBB Forums | Contributors