Permalink
Browse files

Moved a bunch of shit into a folder called other_shit. This is stuff …

…I'm not using for Burning

Man but have used in the past and might need later. (In fact the ambient files I'm probably moving
back out of other_shit again.)

Also created very simple ambient music file which does nothing except tour the circle of fifths.
  • Loading branch information...
1 parent a906853 commit 3eedd6f366f722c7a92ed2eb236d672bcb0cc490 @gilesbowkett committed Aug 21, 2008
View
8 db_drum_definition.rb
@@ -1,4 +1,6 @@
-$clock.bpm = 5
+$clock.bpm = 170
+$mutation = L{|measure| 0 == (measure - 1) % 2}
+$measures = 4
probabilities = {}
@@ -44,9 +46,9 @@ def note(midi_note_number)
notes << Drum.new(:note => note(midi_note_number),
:when => L{|beat| false},
# :number_generator => L{0.3},
- # :next => L{|queue| queue[queue.size - 1]},
+ :next => L{|queue| queue[queue.size - 1]},
:number_generator => L{rand},
- :next => L{|queue| queue[rand(queue.size)]},
+ # :next => L{|queue| queue[rand(queue.size)]},
:probabilities => probabilities[midi_note_number] || probabilities[:none])
end
notes
View
6 eval_style.rb
@@ -1,11 +1,13 @@
require 'lib/archaeopteryx'
$clock = Clock.new(170)
+$mutation = L{|measure| 0 == (measure - 1) % 2}
+$measures = 4
@loop = Arkx.new(:clock => $clock, # rename Arkx to Loop
- :measures => 4,
+ :measures => $measures,
:logging => false,
:evil_timer_offset_wtf => 0.2,
:generator => Rhythm.new(:drumfile => "db_drum_definition.rb",
- :mutation => L{|measure| 0 == (measure - 1) % 2}))
+ :mutation => $mutation))
@loop.go
View
57 harmonic_cycle.rb
@@ -0,0 +1,57 @@
+$clock.bpm = 30
+$mutation = L{|measure| true}
+$measures = 4
+
+next_midi_note_number = OCTAVES[3].to_a[SCALE[CIRCLE_OF_FOURTHS.next]]
+puts next_midi_note_number
+
+def note(midi_note_number)
+ Note.create(:channel => 2,
+ :number => midi_note_number,
+ :duration => 3.00,
+ :velocity => 100 + rand(27))
+end
+
+notes = []
+notes << Drum.new(:note => note(next_midi_note_number),
+ :when => L{|beat| false},
+ # :number_generator => L{0.9},
+ :next => L{|queue| queue[queue.size - 1]},
+ :number_generator => L{rand},
+ # :next => L{|queue| queue[rand(queue.size)]},
+ :probabilities => [1.0] + [0.0] * 15)
+notes
+
+#
+#
+# probabilities = {}
+#
+# probabilities[36] = [1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0]
+# probabilities[37] = [0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0]
+# probabilities[38] = [0.2, 0.0, 0.3, 0.0, 0.3, 0.1, 0.3, 0.4, 0.0, 0.0, 0.2, 0.0, 0.4, 0.0, 0.0, 0.0]
+# probabilities[39] = [0.3, 0.0, 0.2, 0.6, 0.1, 0.0, 0.4, 0.1, 0.35, 0.15, 0.0, 0.0, 0.2, 0.0, 0.1, 0.0]
+# probabilities[40] = [0.0, 0.0, 0.2, 0.0, 0.4, 0.0, 0.0, 0.0, 0.2, 0.0, 0.3, 0.0, 0.3, 0.1, 0.3, 0.4]
+# probabilities[41] = [0.76, 0.0, 0.23, 0.0, 0.0, 0.0, 0.67, 0.0, 0.15, 0.0, 0.15, 0.0, 0.49, 0.0, 0.15, 0.0]
+# probabilities[42] = [0.75, 0.0, 0.13, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.13, 0.0, 0.23, 0.0, 0.0, 0.35, 0.0]
+# probabilities[43] = [0.9] * 16
+# probabilities[44] = [0.65] * 16
+# probabilities[45] = [0.85, 0.35] * 8
+#
+# def note(midi_note_number)
+# Note.create(:channel => 2,
+# :number => midi_note_number,
+# :duration => 0.25,
+# :velocity => 100 + rand(27))
+# end
+#
+# notes = []
+# (36..45).each do |midi_note_number|
+# notes << Drum.new(:note => note(midi_note_number),
+# :when => L{|beat| false},
+# # :number_generator => L{0.9},
+# :next => L{|queue| queue[queue.size - 1]},
+# :number_generator => L{rand},
+# # :next => L{|queue| queue[rand(queue.size)]},
+# :probabilities => probabilities[midi_note_number] || probabilities[:none])
+# end
+# notes
View
2 lib/archaeopteryx.rb
@@ -12,6 +12,8 @@
lib/mix
lib/bassline
+ lib/pitches
+
lib/infinite_stream
lib/infinite_beats
lib/feigenbaum
View
4 lib/arkx.rb
@@ -2,7 +2,7 @@ module Archaeopteryx
class Arkx
def initialize(attributes)
@generator = attributes[:generator]
- @measures = attributes[:measures] || 32
+ # @measures = attributes[:measures] || 32
@beats = attributes[:beats] || 16
@evil_timer_offset_wtf = attributes[:evil_timer_offset_wtf]
@midi = LiveMIDI.new(:clock => @clock = attributes[:clock], # confusion!!!!!!!!!!
@@ -13,7 +13,7 @@ def play(music)
end
def go
generate_beats = L do
- (1..@measures).each do |measure|
+ (1..$measures).each do |measure|
@generator.mutate(measure)
(0..(@beats - 1)).each do |beat|
play @generator.notes(beat)
View
29 lib/pitches.rb
@@ -36,19 +36,28 @@
MINOR_SCALE = [0, 2, 3, 5, 7, 8, 10]
# higher-resolution nomenclature exists but I won't have time to use it
-CIRCLE_OF_FIFTHS = %w{C, G, D, A, E, B, F#, C#, G#, D#, A#, F}
+CIRCLE_OF_FIFTHS = %w{C G D A E B F# C# G# D# A# F}
# relative minor is always x + 3
# this data structure is of course a ring
CIRCLE_OF_FOURTHS = CIRCLE_OF_FIFTHS.reverse
-[CIRCLE_OF_FIFTHS, CIRCLE_OF_FOURTHS].each do |array|
- class << array
- def next
- @current ||= -1
- @current += 1
- @current = 0 if @current >= size
- self[current]
- end
+# [CIRCLE_OF_FIFTHS, CIRCLE_OF_FOURTHS].each do |array|
+# class << array
+# def next
+# @current ||= -1
+# @current += 1
+# @current = 0 if @current >= size
+# self[@current]
+# end
+# end
+# end
+# this makes them into ring structures. I may need to do this for all these arrays.
+
+class Array
+ def next
+ @current ||= -1
+ @current += 1
+ @current = 0 if @current >= size
+ self[@current]
end
end
-# this makes them into ring structures. I may need to do this for all these arrays.
View
5 lib/rhythm.rb
@@ -1,11 +1,12 @@
module Archaeopteryx
class Rhythm
def initialize(attributes)
- @mutation = attributes[:mutation]
+ # @mutation = attributes[:mutation]
@drumfile = attributes[:drumfile]
reload
end
def reload
+ puts "\a" # flash the screen ; only valid on my box and similarly configured machines!
@drums = eval(File.read(@drumfile))
end
def notes(beat)
@@ -16,7 +17,7 @@ def notes(beat)
drums
end
def mutate(measure)
- if @mutation[measure]
+ if $mutation[measure]
reload # reloading can kill mutations!
@drums.each {|drum| drum.mutate}
end
View
0 ambient.rb → other_shit/ambient.rb
File renamed without changes.
View
0 ambient_high.rb → other_shit/ambient_high.rb
File renamed without changes.
View
0 ambient_low.rb → other_shit/ambient_low.rb
File renamed without changes.
View
0 def_ambient.rb → other_shit/def_ambient.rb
File renamed without changes.
View
0 def_techno.rb → other_shit/def_techno.rb
File renamed without changes.
View
0 doc_ock.rb → other_shit/doc_ock.rb
File renamed without changes.
View
12 other_shit/hacktastic.rb
@@ -0,0 +1,12 @@
+require 'lib/archaeopteryx'
+
+@loop.flush if @loop
+@loop = Arkx.new(:clock => Clock.new(90),
+ :measures => 4,
+ :logging => false,
+ :evil_timer_offset_wtf => 0.2,
+ :generator => MetacircularEvaluator.new("eval_style.rb"))
+@loop.go
+
+# if you move mutation definition into drum file you can alternate between 16-bar long loops
+# and 2-bar fills.
View
0 incr_drum_definition.rb → other_shit/incr_drum_definition.rb
File renamed without changes.
View
0 incrementing_style.rb → other_shit/incrementing_style.rb
File renamed without changes.
View
0 pulse.rb → other_shit/pulse.rb
File renamed without changes.
View
0 rubyfringe.rb → other_shit/rubyfringe.rb
File renamed without changes.
View
0 san_francisco.rb → other_shit/san_francisco.rb
File renamed without changes.
View
0 techno_drum_definition.rb → other_shit/techno_drum_definition.rb
File renamed without changes.
View
0 techno_eval.rb → other_shit/techno_eval.rb
File renamed without changes.
View
18 temple.rb
@@ -0,0 +1,18 @@
+# cycle through the circle of fifths
+
+require 'lib/archaeopteryx'
+
+$clock = Clock.new(60)
+$mutation = L{|measure| 0 == (measure - 1) % 2}
+$measures = 4
+
+@loop = Arkx.new(:clock => $clock, # rename Arkx to Loop
+ :measures => $measures,
+ :logging => false,
+ :evil_timer_offset_wtf => 0.2,
+ :generator => Mix.new(:rhythms => [Rhythm.new(:drumfile => "harmonic_cycle.rb",
+ :mutation => $mutation)]))
+@loop.go
+
+
+# also, play random atmospheric samples

0 comments on commit 3eedd6f

Please sign in to comment.