def doNature(this): "Helper to run GardenBackground agents." nature = builtin.FadeInOutAgent(GardenBackground(0.0), 2, 60) # in front nc = this.new_channel_pan( stereo.compose(stereo.scalexy(1.2), stereo.shiftxy(0, 1.2))) this.sched_agent(nature, 0, nc) # behind nature = builtin.FadeInOutAgent(GardenBackground(60.0), 2, 60) nc = this.new_channel_pan( stereo.compose(stereo.scalexy(1.2), stereo.shiftxy(0, -1.1))) this.sched_agent(nature, 0, nc)
def run(self): nature = builtin.FadeInOutAgent(GardenBackground(0.0),60, 15) nc = self.new_channel_pan( stereo.compose(stereo.scalexy(1.2), stereo.shiftxy(0, 1.5))) # in front self.sched_agent(nature, 0, nc) nature = builtin.FadeInOutAgent(GardenBackground(60.0), 60, 15) nc = self.new_channel_pan( stereo.compose(stereo.scalexy(1.2), stereo.shiftxy(0, -1.5))) # behind self.sched_agent(nature, 0, nc) y = [-1.25, -1.2, -1.15, -1.1, -1.05, -1, 1, 1.05, 1.1, 1.15, 1.2] for i in xrange(10): bc = self.new_channel_pan( stereo.compose(stereo.scalexy(1.2), stereo.shiftxy(0, y[i]))) ag = Nightingales(0.0, 50 - 2 * i, 0.1, 0.4, 1.0) self.sched_agent(ag, 0, bc)
def run(self): nature = builtin.FadeInOutAgent(GardenBackground(0.0), 60, 15) self.sched_agent(manage.VolumeModulateAgent(nature, 0.75)) for _ in xrange(8): ag = CaMockingBirds(0.0, 60.0, 0.1, 0.2, 1.2) self.sched_agent(ag) ag = FlMockingBirds(0, 120, 0.1, 0.3, 1.2) self.sched_agent(ag)
def run(self): nature = builtin.FadeInOutAgent(GardenBackground(0.0), 60, 15) nc = self.new_channel_pan(stereo.shiftxy(0, 1.3)) # in front self.sched_agent(nature, 0, nc) nature = builtin.FadeInOutAgent(GardenBackground(60.0), 60, 15) nc = self.new_channel_pan(stereo.shiftxy(0, -1.3)) # in back self.sched_agent(nature, 0, nc) ag = Nightingales(0.0, 30, 0.1, 1.0, 1.3) self.sched_agent(ag) for i in xrange(10): y = 1 + i * 0.025 nc = self.new_channel_pan( stereo.compose(stereo.scalexy(1.4), stereo.shiftxy(0, y))) ag = Crickets( 0.0, 20.0, 0.1, 0.4, 1.4) self.sched_agent(ag, 0, nc)
def run(self): nature = builtin.FadeInOutAgent(GardenBackground(0.0), 60, 15) self.sched_agent(manage.VolumeModulateAgent(nature, 0.5)) for i in xrange(len(self.agents)): for j in xrange(8): start = 30 * i + 10 * j ag = self.agents[i]( start, 30 + start, # duration 0.075, 0.225, # volume 0.7 + j * 0.05) self.sched_agent(ag)
def run(self): nature = builtin.FadeInOutAgent(GardenBackground(0.0), 60, 15) nc = self.new_channel_pan( stereo.compose(stereo.scalexy(1.2), stereo.shiftxy(0, 1.5))) # in front self.sched_agent(nature, 0, nc) nature = builtin.FadeInOutAgent(GardenBackground(60.0), 60, 15) nc = self.new_channel_pan( stereo.compose(stereo.scalexy(1.2), stereo.shiftxy(0, -1.5))) # behind self.sched_agent(nature, 0, nc) y = [-1.5, -1.25, -1.125, 0, 1.125, 1.25, 1.5] for i in xrange(len(self.agents)): for j in xrange(5): bc = self.new_channel_pan( stereo.compose(stereo.scalexy(1.2), stereo.shiftxy(0, y[i]))) ag = self.agents[i]( 0, 120, # Duration 0.05, 0.65, # volume 1 + 0.1 * j # pan ) self.sched_agent(ag, j * 5, bc)
def run(self): nature = builtin.FadeInOutAgent(GardenBackground(0.0), 60, 15) nc = self.new_channel_pan( stereo.compose(stereo.scalexy(1.2), stereo.shiftxy(0, 1.5))) # in front self.sched_agent(nature, 0, nc) nature = builtin.FadeInOutAgent(GardenBackground(60.0), 60, 15) nc = self.new_channel_pan( stereo.compose(stereo.scalexy(1.2), stereo.shiftxy(0, -1.5))) # behind self.sched_agent(nature, 0, nc) for i in xrange(len(self.agents)): for j in xrange(8): # compute y using i and j # i = 0 approaches, i=1 no change, i=2 recedes y = (i - 1) * (1.6 - j * 0.05) bc = self.new_channel_pan( stereo.compose(stereo.shiftxy(0, y), stereo.scalexy(1.8))) ag = self.agents[i]( 0, 120, 0.25, 0.5, # volume 1.0 # pan ) self.sched_agent(ag, 0, bc)
def run(self): nature = builtin.FadeInOutAgent(GardenBackground(0.0), 60, 15) self.sched_agent(nature) ag = CaMockingBirds(5.0, 10.0, 0.1, 0.5, 1.0) self.sched_agent(ag) ag = CaMockingBirds(30.0, 60.0, 0.1, 0.4, 1.2) self.sched_agent(ag) ag = CaMockingBirds(60.0, 90.0, 0.1, 0.3, 1.5) self.sched_agent(ag) ag = FlMockingBirds(5.0, 30.0, 0.05, 0.3, 1.0) self.sched_agent(ag) ag = FlMockingBirds(30.0, 75.0, 0.1, 0.3, 1.2) self.sched_agent(ag) ag = FlMockingBirds(10.0, 120.0, 0.1, 0.4, 1.5) self.sched_agent(ag)