コード例 #1
0
    def worker(gens, tick):
        while time.time() < started + (60 * 15):
            dsp.delay(dsp.stf(dsp.rand(2, 20)))

            if dsp.rand(0, 100) > 50:
                if dsp.rand(0, 100) > 80:
                    voice_id, generator_name = settings.add_voice("pp re qu")
                    dsp.log("")
                    dsp.log("starting pulsar voice %s" % voice_id)
                elif dsp.rand(0, 100) > 50:
                    voice_id, generator_name = settings.add_voice("ch re qu")
                    dsp.log("")
                    dsp.log("starting chirp voice %s" % voice_id)
                else:
                    voice_id, generator_name = settings.add_voice("bo re qu")
                    dsp.log("")
                    dsp.log("starting boone voice %s" % voice_id)

                playback_process = mp.Process(name=voice_id, target=rt.out, args=(gens[generator_name], tick))
                playback_process.start()

                dsp.delay(dsp.stf(dsp.rand(6, 35)))

                dsp.log("")
                dsp.log("stopping voice %s" % voice_id)
                settings.voice(voice_id, "loop", 0)
コード例 #2
0
ファイル: blue.py プロジェクト: hecanjog/nomadpalace-wmse
    def worker(gens, tick):
        while time.time() < started + (60 * 9):
            dsp.delay(dsp.stf(dsp.rand(2, 20)))

            if dsp.rand(0, 100) > 60:
                if dsp.rand(0, 100) > 60:
                    voice_id, generator_name = settings.add_voice('sh re qu')
                    dsp.log('')
                    dsp.log('starting shimmer voice %s' % voice_id)
                else:
                    voice_id, generator_name = settings.add_voice('dr re qu')
                    dsp.log('')
                    dsp.log('starting drone voice %s' % voice_id)


                playback_process = mp.Process(name=voice_id, target=rt.out, args=(gens[generator_name], tick))
                playback_process.start()

                dsp.delay(dsp.stf(dsp.rand(6, 35)))

                dsp.log('')
                dsp.log('stopping voice %s' % voice_id)
                settings.voice(voice_id, 'loop', 0)