Last active
July 9, 2016 16:20
-
-
Save mgalushka/5c477c97688aaf5bf8236b2dcea1efeb to your computer and use it in GitHub Desktop.
Cosmos composition
This file contains hidden or 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
ls =[:E, :E, :D, :D, :A, :A, :F, :F, :G, :G, :B, :B, :C, :C, :A, :A ].ring | |
phases = [ | |
[1, 0, 0, 0], | |
[0.8, 1, 0, 0], | |
[0.8, 0.5, 1, 0], | |
[0.8, 0.5, 0.8, 1], | |
[0.8, 0.5, 1, 1.5], | |
[0.8, 0.7, 1, 1], | |
[0.8, 1, 0, 0.7], # to do zatuhanie in last | |
[1, 0, 0, 0.1], | |
[1, 0, 0, 0], | |
] | |
phase_len = [ | |
8, | |
8 + 8, | |
8 + 8 + 28, | |
8 + 8 + 28 + 32, | |
8 + 8 + 28 + 32 + 32, | |
8 + 8 + 28 + 32 + 32 + 32, | |
8 + 8 + 28 + 32 + 32 + 32 + 8, | |
8 + 8 + 28 + 32 + 32 + 32 + 8 + 16, | |
8 + 8 + 28 + 32 + 32 + 32 + 8 + 16 + 16, | |
] | |
phase = 0 | |
played = 0 | |
crazy = 0 | |
counter = 0 | |
live_loop :main_loop do | |
ph_data = phases[phase] | |
#use_synth :piano | |
use_bpm 100 | |
counter = (inc counter) | |
if counter == phase_len[phase] | |
phase = phase + 1 | |
end | |
if phase == 7 or phase == 8 | |
zatuh = zatuh - 0.05 | |
else | |
zatuh = ph_data[3] | |
end | |
sample :tabla_tun2, beat_stretch: 2, amp: ph_data[0] | |
sample :sn_dub, beat_stretch: 0.2, amp: ph_data[1] | |
use_synth :piano | |
with_fx :ixi_techno do | |
play ls[counter], amp: ph_data[2] | |
end | |
use_synth :prophet | |
with_fx :echo do | |
play ls[counter], amp: ph_data[3] | |
end | |
if phase == 3 or phase == 5 or phase == 7 | |
if played == 0 | |
with_fx :ixi_techno do | |
sample :misc_cineboom, pitch: 0.8, amp: 4 | |
end | |
played = 1 | |
end | |
else | |
played = 0 | |
end | |
if phase == 4 or phase == 6 | |
if crazy == 0 | |
with_fx :ixi_techno do | |
sample :ambi_dark_woosh , pitch: 0.5, amp: 8 | |
end | |
crazy = 1 | |
end | |
else | |
crazy = 0 | |
end | |
sleep 0.5 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment