Skip to content

Instantly share code, notes, and snippets.

@Skoddiethecat
Last active December 20, 2017 18:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Skoddiethecat/6d3581beee3be35b388c634aceb5c439 to your computer and use it in GitHub Desktop.
Save Skoddiethecat/6d3581beee3be35b388c634aceb5c439 to your computer and use it in GitHub Desktop.
Transitional Entropy
##########################################################################
#Initialization
##########################################################################
notering = (ring :F3, :C4, :Eb4, :A4, :A3, :F3, :Eb4, :C5, :A4, :Eb5, :F4, :C4, :A3)
rhythmring = (ring 12, 11, 9, 10, 8, 5, 7, 6)
lowermultiplier = 32
stringstep = (ring 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
sspeed = 0.15
fspeed = 0.149
use_random_seed 0
##########################################################################
#Definitions
##########################################################################
##Non-Phased w/o effects
##########################################################################
define :mid do |notes, sleeptime, rhythm, pulses, rel, pan, rot|
use_synth :hollow
(pulses * 2).times do
play notes.tick(:melodytick), release: rel, cutoff: 110, norm: 1, amp: 0.1, noise: 2, pan: pan if spread(rhythm, pulses, rotate: rot).tick(:rhythmtick)
#play notes.tick(:melodytick2, step: 2), release: rel, cutoff: 110, norm: 1, amp: 0.1, noise: 2, pan: pan if spread(rhythm, pulses, rotate: rot).tick(:rhythmtick2)
sleep sleeptime
end
end
define :upper do |notes, sleeptime, rel|
use_synth :hollow
use_octave +2
use_random_seed 24
play notes.tick, release: rel, noise: 0, pan: rrand(-0.7, 0.7)
play notes.tick(step: 2), release: rel, noise: 0, pan: rrand(-0.7, 0.7)
sleep sleeptime
end
define :lower do |notes, sleeptime, rel, pan|
use_synth :tb303
use_octave -2
play notes.tick, release: rel, wave: 1, pulse_width: 0.1, pan: pan
sleep sleeptime
end
define :strings do |notes, sleeptime, sus, pan, step|
use_synth :blade
use_octave -1
play notes.tick(step: step), sustain: sus, pan: pan, vibrato_rate: sleeptime / 2 , vibrato_delay: 0.1, vibrato_depth: 0.1, attack: sleeptime / 8
sleep sleeptime
end
define :bell do
use_synth :pretty_bell
use_octave 1
with_fx :reverb, room: 1 do
with_fx :gverb do
in_thread do
play notering
end
end
end
end
##########################################################################
##Phased Structures
##########################################################################
define :midphase do |times, pulsenum, rotation|
with_fx :reverb, mix: 0.5, room: 0.8, amp: 1.3 do
in_thread do
times.times do
mid notering, sspeed, rhythmring.tick(:slowrtick, step: rand_i(8)), pulsenum, 0.1, -0.5, 0
end
end
in_thread do
times.times do
mid notering, fspeed, rhythmring.tick(:fastrtick, step: rand_i(8)), pulsenum, 0.1, 0.5, rotation.tick
end
end
end
end
define :upperphase do |times|
with_fx :reverb, amp: 2.3, room: 1 do
with_fx :echo, mix: 0.5, phase: 0.15 do
in_thread do
times.times do
upper notering, sspeed, 0.12
end
end
end
with_fx :echo, mix: 0.5, phase: 0.149 do
in_thread do
times.times do
upper notering, fspeed, 0.12
end
end
end
end
end
define :lowerphase do |times|
with_fx :reverb, amp: 0.7, room: 0.8 do
with_fx :compressor do
with_fx :octaver, mix: 0.3, super_amp: 0.5 do
with_fx :ixi_techno, phase: sspeed * 4 * lowermultiplier, cutoff_min: 80, cutoff_max: 110, res: 0.8 do
with_fx :slicer, phase: sspeed, invert_wave: 1, smooth: sspeed / 1.9 do
in_thread do
times.times do
lower notering, sspeed * lowermultiplier, 0.12 * lowermultiplier, 0.6
end
end
end
end
with_fx :slicer, phase: fspeed, invert_wave: 1, smooth: fspeed / 1.9 do
with_fx :ixi_techno, phase: sspeed * 4.5 * lowermultiplier, cutoff_min: 80, cutoff_max: 110, res: 0.8 do
in_thread do
times.times do
lower notering, fspeed * lowermultiplier, 0.12 * lowermultiplier, -0.6
end
end
end
end
end
end
end
end
define :stringphase do |times|
with_fx :gverb, amp: 0.4, room: 10 do
with_fx :flanger, phase: sspeed * lowermultiplier * 4, wave: 3, depth: 10 do
in_thread do
times.times do
strings notering, sspeed * lowermultiplier, 0.16 * lowermultiplier, 0.4, 0
end
end
in_thread do
times.times do
strings notering, fspeed * lowermultiplier, 0.16 * lowermultiplier, -0.4, stringstep.tick(offset: 2)
end
end
in_thread do
times.times do
strings notering, sspeed * lowermultiplier, 0.16 * lowermultiplier, 0.7, stringstep.tick(offset: 1)
end
end
in_thread do
times.times do
strings notering, fspeed * lowermultiplier, 0.16 * lowermultiplier, -0.7, stringstep.tick(offset: 3)
end
end
end
end
end
##########################################################################
#Main
##########################################################################
## Section 1
## Should run just under 10 minutes, mid and upper should end [slightly] before lower
lowerphase 125 + 4
sleep sspeed * lowermultiplier * 4 - 0.1
midphase 167, 12, (ring 0)
upperphase 167 * 24
sleep sspeed * lowermultiplier * 8
stringphase 117
sleep sspeed * lowermultiplier * 117
## Section 2
## Should run just under 10 minutes, mid and upper should end [slightly] before lower
bell
lowerphase 125
stringphase 125
midphase 167, 12, (ring 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11)
upperphase 167 * 24
sleep sspeed * lowermultiplier * 125
## Section 3
## Lower doubles tempo
## Euclidean base changes to 5
## Melody changes to a shorter pattern
## Should run almost exactly 4 minutes
notering = (ring :F3, :C5, :Eb4, :A3, :F4)
rhythmring = (ring 3, 4, 2, 5, 1)
lowermultiplier = 16
use_random_seed 83
bell
lowerphase 125
stringphase 125
midphase 200, 5, (ring 0)
upperphase 200 * 10
sleep sspeed * lowermultiplier * 100
## Section 4
## Gradually decelerate
bell
15.times do
sspeed = sspeed + 0.006
fspeed = fspeed + 0.0118
sleep sspeed * lowermultiplier
end
## Section 5
## Melody changes to a rising pattern
## Lower will end first
notering = (ring :F3, :C4, :Eb4, :A4, :C5)
bell
10.times do
sspeed = sspeed + 0.006
fspeed = fspeed + 0.0118
sleep sspeed * lowermultiplier
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment