algorave/nave.py

268 lines
5.2 KiB
Python

In [85]: Scale.default = Scale.minorPentatonic
In [86]: Root.default = "A"
In [87]: Clock.bpm = 130
In [88]: var.bass_prog = var([0, 0, 0, 0, 2, 2, 1, 1], 2)
In [89]:
In [89]: def grow(to, how_long=32, fr=0):
...: return linvar([fr, to], [how_long, inf], start=now)
...:
In [90]:
In [90]: c1 >> dirt(var.bass_prog + [0, 0, 7, 0, 0, 7, 0, 6], amp=grow(0.7
...: ), dur=1/2, room=0.3).spread()
Out[90]: <c1 - dirt>
In [91]:
In [91]: c2 >> dbass(var.bass_prog, amp=0.4, dur=1, drive=0.03)
Out[91]: <c2 - dbass>
In [92]:
In [92]: x1 >> play("V ", dur=.5, amp=.5)
Out[92]: <x1 - play2>
In [93]:
In [93]: x2 >> play(" |n2|", dur=.5, amp=.5)
Out[93]: <x2 - play2>
In [94]:
In [94]: p1 >> blip([0,1,2,3], amplify=var([1,0],[28,4]))
Out[94]: <p1 - blip>
In [95]:
In [95]: s3 >> pluck(var.bass_prog + [4, 5, 7, 4, 2, 0, 7, 0], dur=1/2, am
...: p=grow(1))
Out[95]: <s3 - pluck>
In [96]:
In [96]: aa >> arpy(amp=linvar([.9,2]), dur=PDur(3,8)*(1,2), sus=var([2,6]
...: ), hpf=linvar([122, 4000]), chop=8)
Out[96]: <aa - arpy>
In [97]:
In [97]: ~p1 >> blip(P[0,2,4,6,8,10], slide=linvar([0,.6]), oct=[4,6], sus
...: =.5).every(6.5, "jump", cycle=8)
Out[97]: <p1 - blip>
In [98]:
In [98]: x3 >> play(" |*1|", dur=1, amp=.5)
Out[98]: <x3 - play2>
In [99]:
In [99]: c2 >> dbass(dur=PDur(5,9), oct=[3,5,4],
Out[99]: <c2 - dbass>
In [100]:
In [100]: ~za >> zap(PSum(1,2), oct=linvar([4,4.3
...: vib=2)
Out[100]: <za - zap>
In [101]:
In [101]: s3 >> pluck(var([0, 3, 2, 4, 1], 8), pa
...: n=linvar([-1,1],8), dur=[1,1/4,1/4,1/2]
...: ) + (0, 2, 4)
Out[101]: <s3 - pluck>
In [102]:
In [102]: ~za >> zap(PSum(1,2), oct=linvar([4,4.3
...: ]), amp=3, dur=PDur(8,8), vib=2).stop()
...:
Out[102]: <za - zap>
In [103]:
In [103]: x_all.stop()
In [104]:
In [104]: s3 >> karp([0,2,[4,6,7],[3,5,1],(4,2,0)
...: ], dur=PDur(3,9), sus=2, chop=4, oct=[4
...: ,5])
Out[104]: <s3 - karp>
In [105]:
In [105]: p1.stop()
Out[105]: <p1 - blip>
In [106]:
In [106]: p3 >> blip(P[0,2,4,6,8,10], slide=linva
...: r([0,.6]), oct=[4,6], sus=.5).every(6.5
...: , "jump", cycle=8)
Out[106]: <p3 - blip>
In [107]:
In [107]: x1 >> play("V ", dur=.5, amp=.5)
Out[107]: <x1 - play2>
In [108]: x2 >> play(" |n2|", dur=.5, amp=.5)
Out[108]: <x2 - play2>
In [109]: x3 >> play(" |*1|", dur=1, amp=.5)
Out[109]: <x3 - play2>
In [110]: aa >> arpy(amp=linvar([.9,2]), dur=PDur
...: (3,8)*(1,2), sus=var([2,6]), hpf=linvar
...: ([122, 4000]), chop=8).stop()
Out[110]: <aa - arpy>
In [111]:
In [111]: p1 >> sinepad(amp=linvar([.9,2]), dur=P
...: Dur(3,8)*(1,2), sus=var([2,6]), hpf=lin
...: var([122, 4000]), chop=8)
Out[111]: <p1 - sinepad>
In [112]:
In [112]: p2 >> dbass(dur=PDur(5,9), oct=[3,5,4],
...: amp=.4)
Out[112]: <p2 - dbass>
In [113]:
In [113]: ~p2 >> dbass(dur=PDur(5,9), oct=[3,5,4]
...: , amp=.6)
Out[113]: <p2 - dbass>
In [114]:
In [114]: p3 >> nylon(dur=PDur(5,8)*(1,2), sus=va
...: r([2,6]), hpf=linvar([122, 4000]), chop
...: =8)
Out[114]: <p3 - nylon>
In [115]:
In [115]: p3 >> nylon(amp=.4, dur=PDur(5,8)*(1,2)
...: , sus=var([2,6]), hpf=linvar([122, 4000
...: ]), chop=8)
Out[115]: <p3 - nylon>
In [116]:
In [116]: p2 >> jbass(dur=PDur(7,9), oct=[3,5,4])
...: .slider()
Out[116]: <p2 - jbass>
In [117]:
In [117]: p3 >> nylon(amp=.2, dur=PDur(5,8)*(1,2)
...: , sus=var([2,6]), hpf=linvar([122, 4000
...: ]), chop=8)
Out[117]: <p3 - nylon>
In [118]:
In [118]: b1 >> dirt(oct=5, dur=PDur(5,9)*2, amp=
...: .5)
Out[118]: <b1 - dirt>
In [119]:
In [119]: b1 >> dirt(oct=5, dur=PDur(5,9)*2, amp=
...: .7)
Out[119]: <b1 - dirt>
In [120]:
In [120]: nextBar(p3.stop)
Out[120]: <function FoxDot.lib._futureBarDecorato
r.<locals>.switch(*args, **kwargs)>
In [121]:
In [121]: b1 >> dirt(oct=5, dur=PDur(5,8), amp=.7
...: )
Out[121]: <b1 - dirt>
In [122]:
In [122]: nextBar(p2.stop)
Out[122]: <function FoxDot.lib._futureBarDecorato
r.<locals>.switch(*args, **kwargs)>
In [123]:
In [123]: nextBar(px.stop)
Out[123]: <function FoxDot.lib._futureBarDecorato
r.<locals>.switch(*args, **kwargs)>
In [124]:
In [124]: nextbar(s3.stop)
-------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-124-4db479b5a968> in <module>
----> 1 nextbar(s3.stop)
TypeError: 'ChildTimeVar' object is not callable
In [125]:
In [125]: nextBar(s3.stop)
Out[125]: <function FoxDot.lib._futureBarDecorato
r.<locals>.switch(*args, **kwargs)>
In [126]:
In [126]: s3 >> pluck(var.bass_prog + [4, 5, 7, 4
...: , 2, 0, 7, 0], dur=1/2, amp=grow(1))
Out[126]: <s3 - pluck>
In [127]:
In [127]: s1 >> pads(var.bass_prog + [-1, 0, 2, 4
...: ], dur=4, spin=4, amp=1.2, chop=[8, 16]
...: , hpf=linvar([500, 2000], 16), hpr=0.2)
...: .every(8, 'shuffle').spread()
Out[127]: <s1 - pads>
In [128]:
In [128]: nextBar(p1.stop)
Out[128]: <function FoxDot.lib._futureBarDecorato
r.<locals>.switch(*args, **kwargs)>
In [129]:
In [129]: nextBar(x_all.stop)
Out[129]: <function FoxDot.lib._futureBarDecorato
r.<locals>.switch(*args, **kwargs)>
In [130]:
In [130]: b1.stop()
Out[130]: <b1 - dirt>
In [131]:
In [131]: nextBar(Clock.clear)
Out[131]: <function FoxDot.lib._futureBarDecorato
r.<locals>.switch(*args, **kwargs)>
In [132]:
In [132]: