Re: [Sndobj-devel] Mixing objects
Status: Abandoned
Brought to you by:
veplaini
From: Victor L. <vic...@nu...> - 2007-07-28 19:49:36
|
Something like this: mix1 = Mixer() mix2 = Mixer() osc1 = Oscili(...) osc2 = Oscili(...) echo = Comb(0.5, 0.5, mix1) mix1.AddObj(osc1) mix1.AddObj(osc2) mix2.AddObj(mix1) mix2.AddObj(echo) t = SndThread() t.AddObj(osc1) t.AddObj(osc2) t.AddObj(mix1) t.AddObj(echo) t.AddObj(mix2) outp = SndRTIO(mix2) t.AddObj(mix2, SNDIO_OUT) t.ProcOn() etc... Victor > > > Hi! > Thanks for reply. Could you pass some example of how to do > that? I've been trying for 2 days to do what you've sad > but with no luck. Thanks. > > Bosko > > On 7/27/07, Victor Lazzarini <vic...@nu...> > wrote: > > > I think the best way of doing this is > > to use only one SndThread object (not > > a separate one for each SndObj). Then > > you can create mixers for each group > > of SndObjs that you want to mix together > > and one main mixer that mixes all the > > separate sub-mixes. > > > > Using several threads might not be the > > most efficient way of doing this, although > > each thread will end up being mixed with > > the others (depending on the OS, on Linux > > this might not happen). > > > > Victor > > > > > > > > > > > Hi! > > > > > > Here is the example code: > > > import sndobj > > > import time > > > > > > class Play(object): > > > def __init__(self, frq, amp): > > > self.frq = frq > > > self.amp = amp > > > self.tab = sndobj.HarmTable() > > > self.osc = sndobj.Oscili(self.tab, frq, amp) > > > self.outp = sndobj.SndRTIO(1) > > > self.outp.SetOutput(1,self.osc) > > > self.thread = sndobj.SndThread() > > > self.thread.AddObj(self.osc) > > > self.thread.AddObj(self.outp, > > > sndobj.SNDIO_OUT) def onOff(self,switch): > > > if switch == 'on': > > > self.thread.ProcOn() > > > elif switch == 'off': > > > self.thread.ProcOff() > > > > > > obj1 = Play(100,5000) > > > obj2 = Play(170,3000) > > > obj3 = Play(300,2000) > > > obj1.onOff('on') > > > obj2.onOff('on') > > > obj3.onOff('on') > > > time.sleep(5) > > > obj1.onOff('off') > > > obj2.onOff('off') > > > obj3.onOff('off') > > > > > > So it's a simple class and I made 3 object's from it. > > > How can I mix i.e. just 1st and 3rd object so I can > > > add some eff just on them? Thanks. > > > > > > Bosko > > > > > > > > > > > > > ---------------------------------------------------------- > > > --------------- This SF.net email is sponsored by: > Splunk Inc. Still grepping through log files to find > > > problems? Stop. Now Search log events and > > > configuration files using AJAX and a browser. Download > > > your FREE copy of Splunk now >> > > http://get.splunk.com/ > > > > > > > _______________________________________________ > > > Sndobj-devel mailing list > > > Snd...@li... > > > > > > https://lists.sourceforge.net/lists/listinfo/sndobj-devel > > > > |