def _setup(self): self.ictus = Ictus() self.rhythms = [] self.glissando = Glissando(amt=0.05) route(self.glissando, self) for pitch in self.get_chord(): r = Rhythm(pitch=pitch, beat=0.15) self.rhythms.append(r)
def test3(): echo = effects.Echo() route(echo, midi) midi.setSustain(True) velocity = 100 for x in range(1000): pitch = 60 + x echo.note(pitch, 0.1, velocity) time.sleep(0.15)
def _start(self): self.polys = [] for _ in range(5): p = Polycrystalline(60) #p.front_chord = [-3+octave*12 for octave in 1,2,7,8] p.front_chord = [0 + octave * 12 for octave in 1, 2, 7, 8] p.back_chord = [0 + octave * 12 for octave in 1, 2, 7, 8] p.pitch_map = PitchMap(p.front_chord, variance=50) route(p, self.fader) self.polys.append(p) p.play()
def _start(self): self.polys = [] for _ in range(5): p = Polycrystalline(60) #p.front_chord = [-3+octave*12 for octave in 1,2,7,8] p.front_chord = [0+octave*12 for octave in 1,2,7,8] p.back_chord = [0+octave*12 for octave in 1,2,7,8] p.pitch_map = PitchMap(p.front_chord, variance=50) route(p,self.fader) self.polys.append(p) p.play()
def _start(self): for pitch in 24, 48, 84, 96: midi.lockPitch(pitch, 'rhythm') r = Rhythm(pitch=pitch, beat=0.125) r.loud = 50 r.quiet = 20 route(r, self.fader) self.rhythms.append(r) self.fader.fade(1.5, 1., 10) for r in self.rhythms: r.start()
def _start(self): for pitch in 24,48,84,96: midi.lockPitch(pitch, 'rhythm') r = Rhythm(pitch=pitch, beat=0.125) r.loud = 50 r.quiet = 20 route(r, self.fader) self.rhythms.append(r) self.fader.fade(1.5, 1., 10) for r in self.rhythms: r.start()
def _start(self): self.fader.fade(0., 1., 15) self.octaves = Octaves(span=2) route(self.fader, self.octaves) route(self.octaves, midi) self.polys = [] events.listen('facing_back', self.chord_change) events.listen('facing_front', self.chord_change) for _ in range(4): p = Polycrystalline(60) route(p, self.fader) self.polys.append(p) p.play()
def _play(self): midi.setSustain(True) route(self.echo, self.humanize) route(self.humanize, self.gain) route(self.gain, midi) note_choices = [x + octave*12 for x in (4,5,7,11,12) for octave in (1,2,3,4,5,6,7,8)] while self.playing: t = time.time() self.echo.note(random.choice(note_choices), 0.15,40) time.sleep(random.choice((0.2,0.4)) - time.time() + t)
def _play(self): midi.setSustain(True) route(self.echo, self.humanize) route(self.humanize, self.gain) route(self.gain, midi) note_choices = [ x + octave * 12 for x in (4, 5, 7, 11, 12) for octave in (1, 2, 3, 4, 5, 6, 7, 8) ] while self.playing: t = time.time() self.echo.note(random.choice(note_choices), 0.15, 40) time.sleep(random.choice((0.2, 0.4)) - time.time() + t)
def echos(): print 'echoing' midi.setSustain(True) humanize = Humanize(delay_max = 0.01, velocity_max = 20) echo = Echo(decay=0.85, delay=0.2, decay_variability=0.1) gain = Gain() gain.fade(0,1,10) route(echo, humanize) route(humanize, gain) route(gain, midi) note_choices = [x + octave*12 for x in (4,5,7,11,12) for octave in (1,2,3,4,5,6,7,8)] print note_choices while True: t = time.time() echo.note(random.choice(note_choices), 0.15,60) time.sleep(random.choice((0.4,0.6)) - time.time() + t)
def echos(): print 'echoing' midi.setSustain(True) humanize = Humanize(delay_max=0.01, velocity_max=20) echo = Echo(decay=0.85, delay=0.2, decay_variability=0.1) gain = Gain() gain.fade(0, 1, 10) route(echo, humanize) route(humanize, gain) route(gain, midi) note_choices = [ x + octave * 12 for x in (4, 5, 7, 11, 12) for octave in (1, 2, 3, 4, 5, 6, 7, 8) ] print note_choices while True: t = time.time() echo.note(random.choice(note_choices), 0.15, 60) time.sleep(random.choice((0.4, 0.6)) - time.time() + t)
def _setup(self): events.listen('facing_front', self.front_shift) events.listen('facing_back', self.back_shift) self.fader = Gain() self.fader.vel_multiplier = 0.5 route(self.fader, midi)
def _setup(self): self.fader = Gain() route(self.fader, midi) self.rhythms = []