The Funkinator

JohnRohde

Skal lyttes til med gode hovedtelefoner ellers taber den halvdelen af funk'en.

# The Funkinator

define :foxmike do |fm|
  n = rand_i(10) # Larger number for less octave jumps
  if n == 0
    ch = chord(:e6, :major)
    #ch = scale :e6, :major, num_octaves: 1
  elsif n == 1
    ch = chord(:e4, :major)
    #ch = scale :e4, :major, num_octaves: 1
  else
    ch = chord(:e5, :major)
    #ch = scale :e5, :major, num_octaves: 1
  end
  
  # Random note in chord
  if fm == 1
    use_synth :fm
    play choose(ch), release: 0.7, cutoff: rrand(60, 130),
      amp: rrand(0.4, 0.7), pan: rrand(-0.5, 0.5),
      divisor: dice(3), depth: dice(4)
  else
    use_synth :blade
    #use_synth :beep
    #use_synth :saw
    play choose(ch), release: 0.7, cutoff: rrand(60, 105),
      amp: rrand(1, 2), pan: rrand(-0.5, 0.5),
      divisor: dice(8), depth: dice(8)
  end
end

# ---------------------------

define :squeek do
  notes = (ring :e1, :e2, :e3, :e4, :e5, :e4, :e5)
  play notes.tick, release: 0.6, cutoff: rrand(70, 130),
    res: 0.95, wave: 1, amp: 0.06, phase: 1,
    pan: rrand(-0.5, 0.5)
end

# ---------------------------

define :mainbeat do
  cue :beat
  cue :start
  sample :drum_cymbal_closed, amp: 1.6
  sample :drum_cowbell, amp: 0.2
  sample :bd_808, amp: 6
  sleep 0.5
  sample :drum_cymbal_closed, amp: 1.6
  sample :drum_cowbell, amp: 0.2
  sleep 0.5
  
  cue :beat
  sample :drum_cymbal_closed, amp: 1.6
  sample :sn_dub, amp: 0.6
  sleep 0.5
  sample :drum_cymbal_closed, amp: 1.6
  sample :drum_cowbell, amp: 0.2
  sample :bd_808, amp: 6
  sleep 0.5
  
  cue :beat
  sample :drum_cymbal_closed, amp: 1.6
  sample :bd_808, amp: 6
  sleep 0.5
  sample :drum_cymbal_closed, amp: 1.6
  sample :bd_808, amp: 6
  sleep 0.5
  
  cue :beat
  sample :drum_cymbal_closed, amp: 1.6
  sample :sn_dub, amp: 0.6
  sleep 0.5
  sample :drum_cymbal_closed, amp: 1.6
  sleep 0.5
end

# ---------------------------

define :breakbeat do
  sample :drum_cymbal_closed, amp: 1.6
  sample :bd_808, amp: 6
  sample :sn_dub, amp: 1.2
  sleep 0.5
  sample :drum_cymbal_closed, amp: 1.6
  sleep 0.5
  
  sample :drum_cymbal_closed, amp: 1.6
  sample :bd_808, amp: 6
  sample :sn_dub, amp: 1.2
  sleep 0.5
  sample :drum_cymbal_closed, amp: 1.6
  sleep 0.5
  
  sample :drum_cymbal_closed, amp: 1.6
  sample :sn_dub, amp: 1.2
  sleep 0.5
  sample :drum_cymbal_closed, amp: 1.6
  sample :bd_808, amp: 6
  sleep 0.5
  
  sample :drum_cymbal_closed, amp: 1.6
  sample :sn_dub, amp: 1.2
  sleep 0.5
  sample :drum_cymbal_closed, amp: 1.6
  sample :bd_808, amp: 6
  sleep 0.5
end


# ---------------------------

use_bpm 132

with_fx :compressor, pre_amp: 2 do
  
  # Intro, comment out after launch
  #mainbeat
  #breakbeat
  
  # Acid bass, adapted from Sams book
  use_synth :tb303
  
  with_fx :reverb, room: 0.8 do
    live_loop :space_scanner do
      with_fx :slicer, phase: 0.25, amp: 0.06 do
        play :e1, cutoff: rrand(70, 90), release: 5, attack: 1,
          cutoff_attack: 3, cutoff_release: 3, res: 0.95,
          pan: rrand(-0.5, 0.5)
        sleep 5
      end
    end
    
    live_loop :squelch do
      sync :beat
      squeek
    end
  end
  
  
  # Random melody, now with extra FUNK!!!
  with_fx :reverb, room: 0.8 do
    live_loop :lyrics do
      sync :beat
      foxmike 1
      sleep 0.5
      foxmike 1 if !one_in(6)
    end
  end
  
  
  # Drummer loop, drives beat cue
  live_loop :drummer do
    8.times do
      mainbeat
    end
    breakbeat
  end
end


Retur til StartSide

TheFunkinator (last edited 2021-03-28 09:32:36 by JohnRohde)