-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:tiagovaz/radiopyo
- Loading branch information
Showing
2 changed files
with
139 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
#!/usr/bin/env python | ||
# encoding: utf-8 | ||
|
||
from pyo import * | ||
|
||
################### USER-DEFINED VARIABLES ################### | ||
### READY is used to manage the server behaviour depending ### | ||
### of the context. Set this variable to True when the ### | ||
### music is ready for the radio. TITLE and ARTIST are the ### | ||
### infos shown by the radio player. DURATION set the ### | ||
### duration of the audio file generated for the streaming.### | ||
############################################################## | ||
READY = True # Set to True when ready for the radio | ||
TITLE = "The Absurd Hat" # The title of the music | ||
ARTIST = "JT Hutton (hipnofoo)" # Your artist name | ||
DURATION = 240 # The duration of the music in seconds | ||
##################### These are optional ##################### | ||
GENRE = "Electronic" # Kind of your music, if there is any | ||
DATE = 2015 # Year of creation | ||
|
||
####################### SERVER CREATION ###################### | ||
if READY: | ||
s = Server(duplex=0, audio="offline").boot() | ||
s.recordOptions(dur=DURATION, filename="radiopyo.ogg", fileformat=7) | ||
else: | ||
s = Server(duplex=0).boot() | ||
|
||
|
||
##################### PROCESSING SECTION ##################### | ||
# global volume (should be used to control the overall sound) | ||
fade = Fader(fadein=0.001, fadeout=10, dur=DURATION).play() | ||
|
||
|
||
######### The Absurd Hat ############ | ||
|
||
# Init ########## | ||
ff = Fader(fadein=5, fadeout=5, dur=DURATION, mul=1, add=0).play() | ||
tpo = 8.0 | ||
# delay ########## | ||
vo = Linseg([(0,1), (tpo,0)], loop=True, initToFirstVal=False) .play() | ||
sl = SineLoop(freq=Randh(20,120,tpo), feedback=.3, mul=.5*vo, add=0) | ||
gl = Port(Randh(min=.01, max=.4, freq=.125), .1, .1) | ||
bh = Port(RandInt(max=2, freq=1/tpo, mul=1), .01, .01) | ||
dd = Delay(sl, delay=gl, feedback=.97, mul=bh) | ||
co = Compress(dd, thresh=-10, ratio=50, mul=1, add=0) | ||
cd = Clip(co, min=-.8, max=.8, mul=1, add=0) | ||
|
||
|
||
# pulsar ########### | ||
lf = Port(Randh(min=.1, max=.9, freq =5), .01, .01) | ||
w = SawTable(order=2, size=8192) | ||
e = HannTable() | ||
fr = Xnoise(dist=6, freq=2/tpo, x1=3, mul=30, add=20) | ||
gh = Port(RandInt(max=2, freq=2/tpo, mul=1),.01, .01) | ||
a = Pulsar(table=w, env=e, freq=fr, frac=lf, mul=gh) | ||
|
||
# blit pulse ######### | ||
cl = Cloud(2, poly=2) .play() | ||
lfo = Port(TrigRand(cl, min=9, max=100, init=20),.01,.01) | ||
b = Blit(freq=[9.5,7], harms=lfo, mul=Abs(1-gh)) | ||
|
||
# mix ############### | ||
mx = Mix((a+b+cd)/3.0, voices=2, mul=ff*2) .out() | ||
# end ############### | ||
|
||
#################### START THE PROCESSING ################### | ||
s.start() | ||
if not READY: | ||
s.gui(locals()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
#!/usr/bin/env python | ||
# encoding: utf-8 | ||
|
||
from pyo import * | ||
|
||
################### USER-DEFINED VARIABLES ################### | ||
### READY is used to manage the server behaviour depending ### | ||
### of the context. Set this variable to True when the ### | ||
### music is ready for the radio. TITLE and ARTIST are the ### | ||
### infos shown by the radio player. DURATION set the ### | ||
### duration of the audio file generated for the streaming.### | ||
############################################################## | ||
READY = True # Set to True when ready for the radio | ||
TITLE = "Separation" # The title of the music | ||
ARTIST = "JT Hutton (hipnofoo)" # Your artist name | ||
DURATION = 220 # The duration of the music in seconds | ||
##################### These are optional ##################### | ||
GENRE = "Electronic" # Kind of your music, if there is any | ||
DATE = 2015 # Year of creation | ||
|
||
####################### SERVER CREATION ###################### | ||
if READY: | ||
s = Server(duplex=0, audio="offline").boot() | ||
s.recordOptions(dur=DURATION, filename="radiopyo.ogg", fileformat=7) | ||
else: | ||
s = Server(duplex=0).boot() | ||
|
||
##################### PROCESSING SECTION ##################### | ||
# global volume (should be used to control the overall sound) | ||
fade = Fader(fadein=0.001, fadeout=10, dur=DURATION).play() | ||
|
||
|
||
########## Separation ########### | ||
|
||
ff = Fader(fadein=5, fadeout=10, dur=DURATION, mul=1, add=0) .play() | ||
|
||
########## rhythmic cloud (trigs) using percent | ||
|
||
tpo = .25 | ||
m = Metro(time=tpo, poly=3) .play() | ||
mpc = Percent(m, [100/2.,100/4.,300/4.]) # even divisions | ||
env = TrigLinseg(mpc, [(0,0),(.005,1),(.01,0)], mul=.9, add=0) | ||
aa = Sine([540,720,120], mul=env) | ||
dd = Delay(aa, delay=0.5, feedback=.25, maxdelay=1, mul=1, add=0) | ||
|
||
####### pulses through waveguide ######### | ||
|
||
m2= Metro(time=tpo, poly=2) .play() | ||
mp2 = Percent(m2, [100/12.,100/8.,100/12.,100/8.]) | ||
t = LinTable(list=[(0,0),(20,0),(21,1),(50,0),(1000,0)],size=1000) | ||
a2 = TrigEnv(mp2, table=t, dur=.2, interp=1, mul=1) | ||
fq = [120,135,180,217] | ||
wg = Waveguide(a2, freq=fq, dur=3, minfreq=20, mul=.7) | ||
|
||
######### resonant filter ############ | ||
|
||
nn = Noise(mul=.7) | ||
lfo = LFO(freq=[1/8.,1/12.,1/16.,1/24.], sharp=1, type=2, mul=.5, add=.5) .play(delay=15) | ||
lfp = Port(lfo, 2, 1) | ||
fr = [360,405,720,868] | ||
f = Resonx(nn, freq=fr, q=20, stages=4, mul=lfp*5) | ||
|
||
######## out ########## | ||
pan = Pan((dd+wg+f)/3., pan=.5, mul=ff) .out() | ||
#### end ############## | ||
|
||
#################### START THE PROCESSING ################### | ||
s.start() | ||
if not READY: | ||
s.gui(locals()) |