1. |
||||
2. |
||||
//***BLUE HERON: AMINO ACID LULLABY***\\
/*
Follow the below steps to run Blue Heron. Amino Acid Cycles have variable intervals built into their patterns, so each cycle should be given time to run before starting the next one.
Users will have to have the ProteinBioSynthesis external library installed to run pattern cycles: https://github.com/supercollider-quarks/ProteinBioSynthesis
1. Run SynthDef
2. Run Cycle 1
3. Run Cycle 2
4. " " 3
5. " " 4
6. Within the SynthDef, slowly change the impulse time number pairs within the .range(x, y) parameters. Suggested number pairs are listed next to it. Once you have changed the number pairs, run the code block again and the changes will take place.
*/
//SYNTHDEF init.
(
SynthDef("amino", { arg out, freq=440, sustain=0.25, pan, p, amp=0.1;
var u;
u = Line.kr(1, 0, sustain, doneAction:2) *
SinOsc.ar(
freq, SinOsc.ar(
freq * p, 0, BrownNoise.kr(pi/2)
)
* Pulse.ar(
LFNoise0.kr(1).range(2, 20) //impulse_time-- live coding: (2, 20) orig. (1, 5) --> (0.1, 1) --> (0.01, 0.1) --> (0.001, 0.01)
)
);
Out.ar(
out, Pan2.ar(u, pan, amp)
);
}).store;
)
//CYCLE 1
(
var pat;
pat = AminoacidPattern("gatggatgcgatcggcttaggggctagcgatcgggatcg", inf);
Pbind(
\instrument, \amino,
\degree, pat - 1,// 10
\stepsPerOctave, 5,
\dur, pat *10, //10
\p, pat / 2,
\legato, Prand([2, 1, 1, 7, 5, 1], inf) * 1.4,
\pan, pat / 10 - 1,
\amp, Pbrown(0.01, 0.05, 0.05, inf)
).play;
)
//CYCLE 2
(
var pat;
pat = AminoacidPattern("tatgatggggctagcgattcattccag", inf);
Pbind(
\instrument, \amino,
\degree, pat - 1, // 10
\stepsPerOctave, 5,
\dur, pat *20, //20
\p, pat / 1,
\legato, Prand([9, 5, 10, 7, 15, 10], inf) * 1.4,
\pan, pat / 10 - 1,
\amp, Pbrown(0.01, 0.05, 0.09, inf)
).play;
)
//CYCLE 3
(
var pat;
pat = AminoacidPattern("atgatgattgctagctattcagtccag", inf);
Pbind(
\instrument, \amino,
\degree, pat - 1,
\stepsPerOctave, 12,
\dur, pat *0.25,
\p, pat / 1,
\legato, Prand([9, 5, 10, 7, 15, 10], inf) * 1.4,
\pan, pat / 10 - 1,
\amp, Pbrown(0.01, 0.10, 0.05, inf)
).play;
)
//CYCLE 4
(
var pat;
pat = AminoacidPattern("catactgatctccatagccatcaggtc", inf);
Pbind(
\instrument, \amino,
\degree, pat - 1,
\stepsPerOctave, 12,
\dur, pat *0.1,
\p, pat / 1,
\legato, Prand([1, 2, 1, 4, 1, 3], inf) * 1.4,
\pan, pat / 10 - 1,
\amp, Pbrown(0.01, 0.10, 0.05, inf)
).play;
)
|
||||
3. |
0xA - lullaby_in.c
06:49
|
|||
https://gitlab.com/0xa/lullaby_in-c/blob/master/lullaby_in.c
|
||||
4. |
||||
play{{({|i|x=i+1;SinOsc.ar(77*(x/2)+LFNoise2.ar(0.1).range(-2,2),0,LFNoise2.ar(0.5)*(Line.ar(0,0.1,99.rand)/(x*0.2)))}!rrand(9,28)).sum}!2}
|
||||
5. |
||||
SynthDef(
\growSynth,
{ | freq = 900 |
var wave = LPF.ar(Pulse.ar(freq,0.10,0.30), 300);
var noise = PinkNoise.ar(0.02);
Out.ar(0, wave ! 2);
Out.ar(0, noise ! 2);
}).play;
SynthDef(
\lowSynth,
{ | freq = 1800 |
var wave = LPF.ar(Pulse.ar(freq,0.10,0.30), 300);
var noise = WhiteNoise.ar(0.0000000000000000001);
Out.ar(0, wave ! 2);
Out.ar(0, noise ! 2);
}).play;
SynthDef(\Ring,
{arg freq = 440, dec = 1.0;
var sin = SinOsc.ar(freq, 0, 0.25) * EnvGen.kr(Env.perc(0.01, dec), doneAction:
2);
Out.ar(0, sin ! 2);}).play;
~drone = Pbind(
\instrument, "\lowSynth",
\scale, [0,2,5],
\random, Pwhite(80, 100),
\amp, Pseq([0.000000000000000000000000000000000000000000000000000000005],
inf),
\midinote, Pfunc({|event|
event.at(\random).nearestInScale(event.at
(\scale));
}),
\dur, Pfunc({|event|
var midinote, degree, scale;
midinote = event.at(\midinote);
scale = event.at(\scale);
degree = midinote.keyToDegree(scale, 12) %
scale.size + 1;
if (degree%2==0,
{0.2},
{1}
)
})
).play;
~ring = Pbind(
\instrument, "\Ring",
\scale, [0,2,4,5],
\random, Pwhite(80, 100),
\amp, Pseq([0.00000000000000000000000000005], inf),
\midinote, Pfunc({|event|
event.at(\random).nearestInScale(event.at
(\scale));
}),
\dur, Pfunc({|event|
var midinote, degree, scale;
midinote = event.at(\midinote);
scale = event.at(\scale);
degree = midinote.keyToDegree(scale, 12) %
Page 1
Untitled
scale.size + 1;
if (degree%2==0,
{0.2},
{1}
)
})
).play;
(
Task({
~ring.play;
20.wait;
~drone.play;
45.wait;
}).play;
)
s.makeGui;
Page 2
|
||||
6. |
||||
(def the-stars (dark-ambience))
(def nebula (growl [:head bass-g] :amp 0.0 :beat-trg-bus (:beat
time/beat-16th) :beat-bus (:count time/beat-16th) :note-buf
nebula-note-buf))
(def hydrogen (shrill-pong [:head voice-g] :amp 1.2 :note-buf
hydrogen-note-buf :duration-bus hydrogen-dur-buf))
(def helium (shrill-pong [:head voice-g] :amp 1.2 :note-buf
helium-note-buf :duration-bus helium-dur-buf))
(def supernova (shrill-pong [:head voice-g] :amp 0.1 :note-buf
supernova-note-buf :duration-bus supernova-dur-buf))
(def stellar-wind (pulsar :note-buf stella-wind-note-buf :amp 0.7))
(def metallicity (fizzy-pulsar [:head backing-voice-g] :amp 0.6
:note-buf metallicity-note-buf :duration-bus supernova-dur-buf))
|
||||
7. |
||||
8. |
||||
9. |
||||
10. |
||||
'Yo GABA GABA
'by David Jason Snow
'Sept. 16, 2014
'Language: HiSoft BASIC for the Atari Falcon030 computer
defint a-z
library "gemaes","gemdos"
randomize(timer)
CONST steps_per_quarternote=96
WINDOW OPEN
2,"",PEEKW(SYSTAB+58),PEEKW(SYSTAB+60),PEEKW(SYSTAB+62),PEEKW(SYSTAB+6
4),0
gosub initialize
do
scale=int(rnd*4)
iterations=(int(rnd*13)+4)*8
if int(rnd*100)>49 then
tempo=int(rnd*72)+112
gosub set_tempo
else
transposition=int(rnd*12)-6
end if
for index=0 to 7
A!(index)=1+(rnd*1)/10
base_velocity(index)=(int(rnd*3)+1)*24
span(index)=(int(rnd*5)+1)*7+1
register(index)=int(rnd*(36-span(index)))
if int(rnd*100)>64 then
active_voice(index)=1
else
active_voice(index)=0
end if
next
for pulse=1 to iterations
for index=0 to 7
note(index)=pitch(scale,(X!(index)+1.5)*(span(index)/3)+register(index))
+transposition
velocity(index)=(Y!(index)+.4)*(24/.8)+base_velocity(index)
+velocity_scale(velocity_index(index))
velocity_index(index)=(velocity_index(index)+1) mod 64
new_X!(index)=Y!(index)+1.0-(A!(index)*(X!(index)*X!(index)))
new_Y!(index)=B!*X!(index)
X!(index)=new_X!(index)
Y!(index)=new_Y!(index)
next
gosub play_note
if FNabort then
exit loop
end if
next
loop
mouse 0
gosub save_midi file
system
DEF FNabort
if inp(-2)<>-1 then
FNabort=0
else
if inp(2)=27 then
FNabort=1
else
FNabort=0
end if
end if
END DEF
SUB note_off(channel,pitch)
SHARED smf_buffer&,smf_index&
out 3,128+channel
out 3,pitch
out 3,64
gosub delta_conversion
pokeb smf_buffer&+smf_index&,128+channel
incr smf_index&
pokeb smf_buffer&+smf_index&,pitch
incr smf_index&
pokeb smf_buffer&+smf_index&,64
incr smf_index&
END SUB
SUB note_on(channel,pitch,velocity)
SHARED smf_buffer&,smf_index&
out 3,144+channel
out 3,pitch
out 3,velocity
gosub delta_conversion
pokeb smf_buffer&+smf_index&,144+channel
incr smf_index&
pokeb smf_buffer&+smf_index&,pitch
incr smf_index&
pokeb smf_buffer&+smf_index&,velocity
incr smf_index&
END SUB
play_note:
for index=0 to 7
if active_voice(index) then
note_on channel(index),note(index),velocity(index)
end if
next
delta_time&=steps_per_unit
delay!=timer+unit_duration!
while delay!>timer: wend
for index=0 to 7
if active_voice(index) then
note_off channel(index),note(index)
end if
next
return
initialize:
mouse -1
window fullw
cls
restore mode_data
dim combination_mode(3)
for index&=0 to 3
read word$
pokew varptr(combination_mode(0))+index&*2,val(word$)
next
restore sysex_data
dim sysex(73)
for index=0 to 73
read word$
pokew varptr(sysex(0))+index*2,val(word$)
next
dim channel(7)
dim X!(7)
dim Y!(7)
dim new_X!(7)
dim new_Y!(7)
for index=0 to 7
channel(index)=index
X!(index)=0
Y!(index)=0
new_X!(index)=0
new_Y!(index)=0
next
B!=0.3
dim pitch(3,36)
restore scale_1_data
for index=0 to 6
read pitch(0,index)
pitch(0,index+7)=pitch(0,index)+12
pitch(0,index+14)=pitch(0,index)+24
pitch(0,index+21)=pitch(0,index)+36
pitch(0,index+28)=pitch(0,index)+48
next
pitch(0,35)=96
restore scale_2_data
for index=0 to 6
read pitch(1,index)
pitch(1,index+7)=pitch(1,index)+12
pitch(1,index+14)=pitch(1,index)+24
pitch(1,index+21)=pitch(1,index)+36
pitch(1,index+28)=pitch(1,index)+48
next
pitch(1,35)=96
restore scale_3_data
for index=0 to 6
read pitch(2,index)
pitch(2,index+7)=pitch(2,index)+12
pitch(2,index+14)=pitch(2,index)+24
pitch(2,index+21)=pitch(2,index)+36
pitch(2,index+28)=pitch(2,index)+48
next
pitch(2,35)=96
restore scale_4_data
for index=0 to 6
read pitch(3,index)
pitch(3,index+7)=pitch(3,index)+12
pitch(3,index+14)=pitch(3,index)+24
pitch(3,index+21)=pitch(3,index)+36
pitch(3,index+28)=pitch(3,index)+48
next
pitch(3,35)=96
dim velocity_index(7)
for index=0 to 7
velocity_index(index)=int(rnd*64)
next
restore velocity_data
dim velocity_scale(63)
for index=0 to 63
read velocity_scale(index)
next
gosub sysex_dump
drive_no=FNdgetdrv
getdir$=space$(128)
getdir&=sadd(getdir$)
dgetpath getdir&,0
index=0: while peekb(getdir&+index)<>32: index=index+1: wend
path$=chr$(drive_no+65)+":"+left$(getdir$,index-1)
midi file_path$=path$+"\*.MID"
buffer_size&=fre(0)-&h20000
dim smf_buffer(buffer_size&\2)
smf_buffer&=varptr(smf_buffer(0))
'SET UP SMF HEADER CHUNK
pokeb smf_buffer&,asc("M")
pokeb smf_buffer&+1,asc("T")
pokeb smf_buffer&+2,asc("h")
pokeb smf_buffer&+3,asc("d")
pokel smf_buffer&+4,6 'length of header
pokew smf_buffer&+8,0 'SMF format 0
pokew smf_buffer&+10,1 '1 track
pokew smf_buffer&+12,steps_per_quarternote
'SET UP TRACK CHUNK
pokeb smf_buffer&+14,asc("M")
pokeb smf_buffer&+15,asc("T")
pokeb smf_buffer&+16,asc("r")
pokeb smf_buffer&+17,asc("k")
pokel smf_buffer&+18,0 'dummy track length
smf_index&=22
tempo=int(rnd*72)+112
beat_division=4
gosub set_tempo
transposition=int(rnd*12)-6
print "PRESS <ESC> TO ABORT."
return
set_tempo:
steps_per_unit=STEPS_PER_QUARTERNOTE/beat_division
step_duration!=60/(tempo*steps_per_quarternote)
unit_duration!=steps_per_unit*step_duration!
smf_tempo&=(60/tempo)*1000000
smf_tempo_ptr&=varptr(smf_tempo&)
smf_buffer&=varptr(smf_buffer(0))
pokeb smf_buffer&+smf_index&,&h00 'delta time
incr smf_index&
pokeb smf_buffer&+smf_index&,&hff 'meta event
incr smf_index&
pokeb smf_buffer&+smf_index&,&h51
incr smf_index&
pokeb smf_buffer&+smf_index&,&h03
incr smf_index&
pokeb smf_buffer&+smf_index&,peekb(smf_tempo_ptr&+1)
incr smf_index&
pokeb smf_buffer&+smf_index&,peekb(smf_tempo_ptr&+2)
incr smf_index&
pokeb smf_buffer&+smf_index&,peekb(smf_tempo_ptr&+3)
incr smf_index&
return
'DELTA TIME VARIABLE-LENGTH QUANTITY CONVERSION
delta_conversion:
vlq_buffer&=0
vlq_pointer&=varptr(vlq_buffer&)
pokeb vlq_pointer&+3,delta_time& and &h7f
pointer_offset&=2
delta_time&=delta_time&\&h80
while delta_time&<>0
pokeb vlq_pointer&+pointer_offset&,delta_time& or &h80
decr pointer_offset&
delta_time&=delta_time&\&h80
wend
incr pointer_offset&
while pointer_offset&<4
pokeb smf_buffer&+smf_index&,peekb(vlq_pointer&+pointer_offset&)
incr smf_index&
incr pointer_offset&
wend
return
save_midi file:
beep
mouse 0
'APPEND END-OF-TRACK META-EVENT
delta_time&=0
gosub delta_conversion
pokeb smf_buffer&+smf_index&,&hff 'meta-event
incr smf_index&
pokeb smf_buffer&+smf_index&,&h2f
incr smf_index&
pokeb smf_buffer&+smf_index&,&h00
pokel smf_buffer&+18,smf_index&-22 'update sequence length
save_midi:
file_name$=""
fsel_input midi file_path$, file_name$,ok
if ok then
if file_name$="" then
alert$="[3][Are you sure you want|to discard MIDI file?][Yes|No]"
if FNform_alert(1,alert$)=2 then
goto save_midi
end if
else
mouse 2
index=len(midi file_path$)
while index>0 and mid$(midi file_path$,index,1)<>"\"
decr index
wend
exit_file$=left$(midi file_path$,index)+file_name$
BSAVE exit_file$,SMF_BUFFER&,SMF_INDEX&
mouse 0
end if
else
alert$="[3][Are you sure you want|to discard MIDI file?][Yes|No]"
if FNform_alert(1,alert$)=2 then
goto save_midi
end if
end if
RETURN
sysex_dump:
print "SET M1 TO MIDI GLOBAL CHANNEL 16 (press key to continue)"
keypress=inp(2)
for index=0 to 7
out 3,peekb(varptr(combination_mode(0))+index)
next
delay!=timer+.5
while delay!>timer:wend
for index=0 to 147
out 3,peekb(varptr(sysex(0))+index)
next
cls
return
mode_data:
DATA &hF042,&h3F19,&h4E00,&h10F7
scale_1_data:
DATA 48,50,51,55,55,56,60
scale_2_data:
DATA 48,50,52,55,55,57,60
scale_3_data:
DATA 48,50,51,53,55,56,59
scale_4_data:
DATA 48,50,52,53,55,57,59
velocity_data:
DATA 00,01,02,03,04,05,06,07,08,09,10,11,12,13,14,15
DATA 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31
DATA 32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17
DATA 16,15,14,13,12,11,10,09,08,07,06,05,04,03,02,01
sysex_data:
DATA
&hF042,&h3F19,&h4900,&h4368,&h616F,&h7320,&h2000,&h2020,&h2004,&h1601
DATA
&h6400,&h6412,&h1200,&h003F,&h0000,&h0200,&h0000,&h0006,&h0440,&h1500
DATA
&h1C1E,&h4A00,&h7A01,&h7D69,&h4800,&h0005,&h7F08,&h007F,&h017F,&h0075
DATA
&h4800,&h0000,&h057F,&h007F,&h0101,&h7F01,&h7F48,&h0000,&h0550,&h7F00
DATA
&h7F01,&h7F02,&h0700,&h4800,&h0005,&h7F00,&h7F0A,&h017F,&h0325,&h4800
DATA
&h0020,&h057F,&h007F,&h017F,&h0401,&h3148,&h0000,&h057F,&h0004,&h7F01
DATA
&h7F05,&h6548,&h0040,&h0005,&h7F00,&h7F01,&h7F02,&h0617,&h4800,&h0005
DATA &h7F08,&h007F,&h017F,&h07F7
|
||||
11. |
|
|||
12. |
Streaming and Download help
If you like nebularosa, you may also like:
Bandcamp Daily your guide to the world of Bandcamp