Renato Fabbri wrote:
> Hi all,
>
> I am trying to output some audio through jack using the sndobj library. I get only a short beep..
>
> Usind the sndobj library on python, pysndobj, here is a simple case of what, in my head, should output a left channel sinusoid for 3s:
>
> ___
> from sndobj import *
> import time
>
> tab = HarmTable()
> osc = Oscili(tab, 440,16000)
>
> jack = SndJackIO('theremin')
>
> jack.SetOutput(1, osc)
>
> osc.DoProcess()
>
> jack.Write()
>
> time.sleep(3)
>
> del jack
> del osc
>
> _________
>
> help?
> renf
>
Ciao Renato,
your code doesn't work here, either.
I think you should use a thread, like it's explained in the SndOsc manual.
Here's a modified version of your code. I've tested it and it works:
from sndobj import *
import time
tab = HarmTable()
osc = Oscili(tab, 440,16000)
jack = SndJackIO('theremin')
jack.SetOutput(1, osc)
thread = SndThread()
thread.AddObj(osc)
thread.AddObj(jack, SNDIO_OUT)
thread.ProcOn()
time.sleep(3)
thread.ProcOff()
Ciao,
c.
-- http://www.cesaremarilungo.comReceived on Thu Dec 7 20:15:02 2006
This archive was generated by hypermail 2.1.8 : Thu Dec 07 2006 - 20:15:02 EET