Stellar Battle using _slide options

I’ve always liked the _slide options in Sonic Pi. Felt the urge to do some zapping this afternoon.
Here is the result.

#Stellar Battle by Robin Newman
#This code makes use of the _slide options available in Sonic Pi
#A rapdily falling pitched note is generated, which is also shifted
#rapidly in pan value. Add some gverb and you have the recipie
#for a mega battle.


define :kapow do |n,o=24,p=1|
  use_synth [:beep,:tri,:pulse,:zawa,:square].choose
  d=[0.1,0.15,0.2,0.25,0.5].choose
  #create a note and store reference to it in k
  k = play note: n+o,release: d,pan: -p,amp: rand(1.5)+0.2
  #control the note via k and slide note and pan values
  control k,note: n,note_slide: d,pan: p,pan_slide: d
  sleep d
end

with_fx :gverb, room: 25,mix: 0.8 do
  live_loop :pow do
    kapow scale(:e2,:minor_pentatonic,num_octaves: 3).choose,[12,18,24,30,36].choose,-1
    sleep rand(1.5)
  end
  
  live_loop :pow2,delay: 2 do
    kapow scale(:c3,:minor_pentatonic,num_octaves: 2).choose,[12,18,24,30,36].choose,1
    sleep rand(1)
  end
end
2 Likes

One of the first things I ever did with SP was a video add for a friends
space-comic website… lots of sound effects, but the gun battle between
the ]Space Marines’ and the Raiders was neat…

Eli…

live_loop :do_laser_fight_1, auto_cue:false  do
  sleep 1
  with_fx :ixi_techno, mix: 0.5, phase: 0.8 do
    this_rate = [ 0.5, 1, 1.5].choose
    this_sample = :elec_filt_snare
    sample this_sample, amp: 5, rate: this_rate
    sleep sample_duration(this_sample)*this_rate
  end
end

Yes that sounds cool.ixi_techno is a great effect.