Skip to content

Commit

Permalink
Stuff and new lives
Browse files Browse the repository at this point in the history
  • Loading branch information
Psykopear committed Aug 21, 2018
1 parent f444a6b commit 8cfd425
Show file tree
Hide file tree
Showing 12 changed files with 196 additions and 27 deletions.
15 changes: 15 additions & 0 deletions 2018-07-15.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FoxDot.start
from FoxDot import *
Clock.clear()
Scale.default=Scale.phrygian
Root.default=var(P[0,-2,1,3], 16)
m = Master()


s1 >> feel(var([0,1,3],[12,2,2]), chop=P[4,2,1,2].shuffle().mirror().shuffle().mirror(), shape=0.2, room=0.5, mix=(0,1))
b1 >> evilbass(s1.degree, sus=0.2, dur=0.25, amp=(PEuclid(10,16)*2, 0.3), lpf=0, mix=(0,1), room=0.7, lpr=1)
d1 >> play("-", sample=PRand(list(range(8))), pan=PWhite(-0.8,0.8), dur=0.25, amp=PEuclid(9,16), mix=(0,1), room=1)
k1 >> play("X-", sample=2, amp=2)
d2 >> play("( h)(h )o( [hh])", sample=1, room=0.5, mix=0.3, amp=0.7, shape=(0,0.2))

m.hpf=0;m.hpr=0;m.room=0;m.mix=0;
13 changes: 13 additions & 0 deletions 2018-07-17.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FoxDot.start
from FoxDot import *
Clock.clear()
Scale.default=Scale.phrygian
Root.default=var(P[0], 1)
m = Master()

s1 >> feel(PRand([0,1,2,3,4,0,0]), dur=(1,2,4), amp=1/3)
s2 >> sitar(s1.degree, dur=0.25, sus=0.2, amp=PEuclid(P[11,14,9,7].shuffle().mirror(),16)*0.7)
b1 >> evilbass(s1.degree[0], dur=0.25, amp=PEuclid(12,16), delay=0.5, sus=0.7)
d1 >> play("-", sample=PRand(list(range(6))), pan=PWhite(-1,1), dur=0.25, amp=PEuclid(P[10,11,12,14,13,15,16].shuffle(),16))
d2.reset() >> play(" o ", echo=(0), amp=0.7)
k1 >> play("X-", amp=1, shape=(0,0.1), sample=2).every(8, 'stutter', PRand([4,2,1]))
6 changes: 6 additions & 0 deletions 2018-07-25.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FoxDot.start
from FoxDot import *
Clock.clear()
Scale.default=Scale.phrygian
Root.default=var(P[0], 1)
m = Master()
34 changes: 34 additions & 0 deletions 2018-07-28.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
FoxDot.start
from FoxDot import *
Clock.clear()
Scale.default=Scale.phrygian
Root.default=var(P[0], 1)
m = Master()

s1 >> klank((0,var([3,2,1,7],16)), dur=0.25, formant=sinvar([0,1],16), shape=sinvar([0.5,0],16), chop=PRand([1,2]), amp=0.8)
s2 >> pluck(s1.degree[1] + P[-1,-2,-3,1,0,0,0,0,0,0].shuffle(), dur=0.25, amp=PEuclid(P[7,8,9,10],16))
b1 >> bass(s2.degree, sus=0.25, dur=0.25, amp=PEuclid(P[7,8,9,10],16)*1.0, shape=(0,0.1), hpf=0, lpf=0)#expvar(100,1000,1/4), lpr=0.3)
d2 >> play(" (h )o ", room=0.4, mix=(0,0.4))
k1 >> play("X ", sample=2, shape=(0,0.1), formant=(0,0.1), hpf=(0,0), hpr=0.3, echo=(0,0.1)).every(8, 'stutter', PRand([1,2,2])),

Group(k1,b1,s1,s2,d1,d2).stop()
mix = Group(s1,s2,d1,d2,k1,b1)
mix.hpf=300;mix.hpr=0.1;mix.mix=0.6;mix.room=0.4;

Clock.bpm=134
Root.default=var([0,3],8)
(
k2 >> play("X--", amp=1, dur=1/3, room=(0,0.4), mix=(0,0.4), sample=2),
d4 >> play("hhOh", amp=1),
d1 >> play("<-><h>", delay=PRand([0.01,0.02,-0.01,-0.02,0]), sample=list(range(5)), pan=PWhite(-1,1), dur=1/3, amp=PEuclid(9,12)*PWhite(0.8,1)).stop(),
b2 >> sawbass(s4.degree + P[1,0,0,0,3,0,0,0,2,0,0,0,4,0,0,0], dur=1/3, sus=0.1, amp=2),
s3 >> sitar(b2.degree, amp=PEuclid(P[5,8,9],12)*1, hpf=PWhite(0,1000), hpr=0.3, sus=0.2, echo=0.0, dur=1/3, chop=0),
s4 >> fuzz(0, shape=(0.8,0), amp=2, chop=P[0,1,2,3,4], hpf=4000).stop(),
)
mix = Group(k2,d1,s4,s3)
mix.solo()
drums = Group(k2,d4,d1)
drums.amplify=var([1,0],28,4)

m.hpf=300;m.hpr=0.1;m.mix=0.2;m.room=0.4;
m.hpf=0;m.hpr=0;m.mix=0;m.room=0;
60 changes: 60 additions & 0 deletions 2018-07-29.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
FoxDot.start
from FoxDot import *
Clock.clear()
Scale.default=Scale.phrygian
Scale.default=Scale.locrian

Root.default=var(P[0], 1)
m = Master()
m.hpf=0

s1 >> klank((b1.degree,b1.degree+P[5,3,1,1]), dur=2, hpf=sinvar([1000,4000],16), formant=sinvar([0,1],16), shape=(sinvar([0,1],16))).stop()
d1 >> play("-", sample=PRand(list(range(5))), dur=0.25, pan=PWhite(-0.8,0.8), amp=PEuclid(13,16)*PWhite(0.8,1.2))
k1 >> play("Xh", sample=2, hpf=0, hpr=0.2, amp=1)
d2 >> play("(h{--[--]}) (h )O(= -)", amp=0.7, mix=0.3, room=0.3)
b1 >> evilbass(var([0,0,1,0],8), dur=PRand([0.25,0.5]), amp=1.3, sus=0.4)
b1.stop()


group = Group(s1,k1,b1)
group.hpf=1700;group.hpr=0.3;group.mix=0.4;group.room=0.4

Clock.bpm=134


d2 >> play("-", dur=1/3, echo=(0,0.2), mix=(0,0.6), room=(0,0.6), formant=(sinvar([1,0],16), PWhite(0,1))).stop()
(
b2 >> evilbass(s3.degree, dur=2/4, sus=0.4, amp=PEuclid(P[9,8,7,6],12)*1.2),
s3 >> pluck(var([0,1],8), dur=PRand([1/4,2/4]), amp=1.2),
s4 >> ambi((s3.degree, s3.degree + 4), chop=2, shape=(0,0.5), formant=(0.5,0)),
k3 >> play("X ", dur=1/4, sample=2, shape=(0,0.2)).every(16, 'stutter', PRand([2,1])),
)
m.hpf=0;m.hpr=0.3;m.mix=0;m.room=0;m.formant=0;m.shape=0,

Group(b2,k2).amplify=var([1,0],[28,4])

Group(k2,b2).solo()

m = Master()


m.hpf=800;m.hpr=0.3;m.mix=0;m.room=0;m.formant=sinvar([0,1],16);m.shape=sinvar([0,0.5],16)


Clock.bpm=180

Root.default=var([0,0],16)

s1 >> pluck(var([0,0,0,1],8), dur=1/4, sus=0.2, amp=PEuclid(11,16))
s2 >> ambi((s1.degree, s1.degree + 2), dur=4, chop=(8), formant=sinvar([0,1],16))
d1 >> play("-=h(i )", dur=1/2, amp=PEuclid(1,2)*PWhite(0.8,1), pan=PWhite(-0.80.8))
b1 >> evilbass(s1.degree, dur=PRand([1/3]), sus=0.5, lpf=0, lpr=0.9, dist=(0,0.2))
k1 >> play("X--",dur=5/7, sample=4, shape=(0,0.3), amp=1.5).every(PRand([8,4]), 'stutter', PRand([1,2,4]))

f1 >> fuzz(s1.degree, chop=4, amp=1, shape=(0,0.4))

d2 >> play("Vidhn", echo=0.1, hpf=PWhite(200,4000), hpr=0.3, dur=0.25, mix=0.4, room=0.4)

Group(k1,b1).amplify=var([1,0], [28,4])
Group(b1,s1,s2).solo()
s2.stop()
21 changes: 21 additions & 0 deletions 2018-08-02.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FoxDot.start
from FoxDot import *
Clock.clear()
Scale.default=Scale.phrygian
Root.default=var(P[0,0,0], 8)
m = Master()


s1 >> klank((0, P[7,3,1,2]), dur=1, chop=4)
s2 >> sitar(PRand([0,0,0,0,0,1,3]), dur=0.25, sus=0.2, amp=PEuclid(11,16)*0.9, hpf=PWhite(200,3000), chop=0)
(
d1 >> play("-", dur=0.25, amp=PEuclid(11,16), sample=PRand(list(range(5)))),
d2 >> play(" (ho)(oh) ", mix=0.4, room=(0,0.4)),
k1 >> play("X ", sample=2, hpf=0, mix=(0,1), room=(0,0.3), amp=0.9),

)
b1 >> evilbass(s2.degree, sus=0.5, amp=PEuclid(P[9,11,13],16)*1.2, dur=0.25)


m.hpf=sinvar([200,3000],16);m.hpr=0.3;m.room=0;m.mix=0
m.hpf=0;m.hpr=0.3;m.room=0;m.mix=0
9 changes: 9 additions & 0 deletions 2018-08-06.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FoxDot.start
from FoxDot import *
Clock.clear()
Scale.default=Scale.phrygian
Root.default=var(P[0], 1)
m = Master()


s1 >> evilbass(oct=5, dur=4, sus=4, amp=2)
18 changes: 18 additions & 0 deletions 2018-08-11.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FoxDot.start
from FoxDot import *
Clock.clear()
Scale.default=Scale.phrygian
Root.default=var(P[0], 1)
m = Master()
Clock.bpm=120
Root.default=5

(
d1 >> play("= (ho)(o -)", echo=(0,0.1), hpf=(0,sinvar([100,3000],20)), room=(0,0.4), mix=(0,0.5), amp=(1,0.7)),
k1 >> play("= ", sample=2, shape=(0,0.1), amp=0.7),
d2 >> play("-", dur=0.25, pan=PWhite(-1,1), sample=PRand(list(range(5))), delay=PRand([0.01,0.02,-0.02,-0.01,0,]), amp=PEuclid(P[11,14,9,12],16)*PWhite(1,0.8)),
s1 >> sitar(var([0], 4)+PRand([0,0,0,0,0]), chop=0, shape=(0,0.1), oct=(4,5), sus=0.2, dur=0.25, amp=PEuclid(P[11,14,9,12],16)*0.7),
)


Group(k1,s1).solo()
4 changes: 2 additions & 2 deletions drums_patterns.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
k1.degree = "V="

d1 >> play()
d1.degree = "[--]"
d1.dur=0.5
d1.degree = "-"
d1.dur=Fraction(1,3)
d1.sample=3

d2 >> play()
Expand Down
2 changes: 1 addition & 1 deletion ideas.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Scale.default=Scale.phrygian
b1 >> evilbass(var([0,0,3,1,-1], [4,4,4,2,2]), dur=PRand([0.5,0.25]), sus=s1.dur, shape=(0,0.2))
b1 >> evilbass(var([0,0,3,1,-1], [4,4,4,2,2]), dur=PRand([0.5,0.25]), sus=0.5, shape=(0,0.2))
k1 >> play("x-", sample=5, echo=(0,0.25), amp=(1,0.2), hpr=0.3, hpf=(0,PWhite(200,1000)))
7 changes: 3 additions & 4 deletions livetech.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from FoxDot import *
from FoxDot import *

k1 >> play("X-", amp=4)

Expand All @@ -15,8 +15,7 @@

Clock.bpm = 134

b1 >> bass(P[0, 0, PRand([0]*10+[2,-1,0,1])], dur=Fraction(1,4), sus=0.2, lpf=2000, lpr=0.2, amp=[0,1,1,0, 0.5,1,0,1, 0,1,1,0, 0.5,1,1,0])

b1 >> evilbass(P[0, 0, PRand([0]*10+[2,-1,0,1])], dur=Fraction(1,4), sus=0.5, lpf=2000, lpr=0.2, amp=[0,1,1,0, 0.5,1,0,1, 0,1,1,0, 0.5,1,1,0])
n1 >> sitar(PRand([b1.degree]*8+[b1.degree + 1, b1.degree + 2, b1.degree + 3]), oct=6, dur=0.5, sus=0.6, amp=0.4, hpf=linvar([100, 1000], 32), chop=3)

n1.stop()
Expand All @@ -35,7 +34,7 @@
print(SynthDefs)


a1 >> varsaw((0, 0.01, 3), dur=32, sus=32, oct=(3,4), amp=0.8)
a1 >> varsaw((0, 0.01, 3) + b1.degree, dur=32, sus=32, oct=(3,4), amp=0.8)

d1 >> play("X [--]", sample=3)

Expand Down
34 changes: 14 additions & 20 deletions startenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,32 @@
from subprocess import Popen, PIPE


LIVE_DIR = '/home/docler/src/foxdot-lives'
INIT_DATA = '''\
FoxDot.start
from FoxDot import *
Clock.clear()
Scale.default=Scale.phrygian
Root.default=var(P[0], 1)
m = Master()
'''


def is_zero_file(fpath):
return not os.path.isfile(fpath) or os.path.getsize(fpath) == 0


if __name__ == '__main__':
env = os.environ.copy()
env['HOME'] = '/home/docler/.emacs-test-home'
env['WORKON_HOME'] = '/home/docler/.virtualenvs'

timestr = time.strftime("%Y-%m-%d")

filename = f'/home/docler/Music/foxdot/{timestr}.py'

init_data = '''from FoxDot import *
Clock.clear()
Scale.default=Scale.phrygian
Root.default=var(P[0], 1)
m = Master()
'''
filename = f'{LIVE_DIR}/{timestr}.py'

if is_zero_file(filename):
with open(filename, 'w') as f:
f.write(init_data)
f.write(INIT_DATA)

# Open emacs starting sclang right away
os.chdir('/home/docler/Music/foxdot')
os.chdir(LIVE_DIR)
Popen(
["/usr/bin/emacs", "-sclang", filename],
stdout=PIPE,
Expand All @@ -38,9 +38,3 @@ def is_zero_file(fpath):
bufsize=1,
universal_newlines=True,
)

# with Popen(["sclang"], stdout=PIPE, stdin=PIPE, bufsize=1, universal_newlines=True) as p:
# for line in p.stdout:
# print(line, end='')
# if line.startswith("*** Welcome to SuperCollider 3.9.3. ***"):
# p.stdin.write('FoxDot.start\n')

0 comments on commit 8cfd425

Please sign in to comment.