Anyone Have an Example Glissando in Sonic Pi?

Before I program my own Glissando, does anyone have a ready made example they have lying around that I could repurpose?

I would be forever in your debt! I’m trying to cover a super complex song, and out of all the problems so far, I figured this would be the one someone has experience with.

I have an idea in my head about how I want to do it, but I want to see what others have, and see if it lines up with how I perceive it happening.

Edit: I have the intro to the song done already, and it is pretty recognizable if you watch anime, so I’m not gonna spoil the surprise. I’ll post a snippet of what I have on soundcloud when I get home and post it here. <3

Here is what I have sketched down:

1.) Originally, I was going to loop over it like I have been with all my other songs. I’m not super musically literate, and am translating Midi’s to Sonic Pi, so I haven’t been using chord shorthands, etc. If the chord is a C chord, i’m still making the array with the notes in it and parsing it. V1 of it was to put all the keys I want to run in a huge array and just run through it. But I know sonic pi isn’t the biggest fan of looping through arrays super fast, so without testing, I came up with a second idea.

2.) Instead of programming all the notes in, just use the scales shorthands that are predefined, and just drop them them through the octaves I want to run though.

Which one of these approaches do you guys think would work “best” performance wise.

I feel like #1 gives me more flexibility with notes should I want it, but #2 gives me the ease of use option, which, when working on complex song, would be a blessing cause it’s one less problem I have to focus on.

The Glissando was going to be all improv anyway, so I can just play with the scales instead of just putting in random notes til I’m happy.

Hi,

here is an example from a sketch I have been working on, which points to what you might want to do:

  live_loop :sliding_chords do
    use_synth :fm
    use_synth_defaults attack: 3, release: 48
    with_fx :distortion, distort: 0.75, amp: 0.75 do
      s = play (ring 93, 91, 88), amp: 0.75, cutoff: 90
      sleep 12
      control s, note: (ring 93, 91, 88) + 2, note_slide: 1
      sleep 6
      control s, note: (ring 93, 91, 88) - 2, note_slide: 0.5
      sleep 8
      control s, note: (ring 93, 91, 88), note_slide: 0.5
      sleep 1
      control s, note: (ring 93, 91, 88) - 0.5, note_slide: 0.5
      sleep 1
      control s, note: (ring 93, 91, 88), note_slide: 0.5, amp: 1.25, amp_slide: 4
    end
    sleep 32
  end
2 Likes

So basically, have the ring/array with whatever “scale” i want to use, then just control the variable and continue to slide it down the octaves?

Yeah, the key is to use a control statement. You can even slide from 3 notes to 1 (or so) and the other way round. Just make some experiments…

1 Like

Very cool. I didn’t think about that. It will probably deal with the slide better then the “iterating through an array” solution I had.

Also, I don’t have much experience with it, so now is my chance to learn.

Thanks a ton for your help so far! :slight_smile: I’ll post what I’ve done later tonight when I’m home.

Also, as I said, I’ll be posting the clip of the intro in about an hour too.

This is going to be the hardest song I’ve done yet, but it’s my most requested, and I can’t wait to get it done.

Hi Skelly,

I had to go look up what a glissando was, before replying.

I think this might help… its a police siren from a track made
here on the forums…

slider = 4
wails =(ring 2, 3)



live_loop :siren do
  use_synth_defaults amp: 0.25
  siren = synth :fm,  note: :d6, note_slide: slider,
  sustain: slider * wails.look * 2
  wails.look.times do
    control siren, note: :d7
    sleep slider / 2
    control siren, note: :d6
    sleep slider
    control siren, amp: 0.5, note: :d7
    sleep slider
    control siren, amp: 0.5, note: :d6
    sleep slider
    control siren, amp: 0
    wails.tick
  end
end

Eli…

1 Like

Thanks Eli. I’ll look at it when I get home for good.

Also, as promised, here is the taste of the song.

Guess that Pokemon!

1 Like

Also, had this lying around. This was made in the same session, because I saw how big the song above was going to be.

Just need to finish it out with some windchimes and other horror things, to make it 3spooky (Right now it is at a 2spooky4me)

Here is the start of the Dr Who theme (which has perhaps one of the most famous glissandos)
EDITED to run continously

#sample glissando start of Dr Who theme
use_bpm 60

#define glissando function
#p1=first note  p2 = target note, d1 duration first note
#d2 duration second note, slideFrac fraction of d2 to slide.
#relFrac sets release/sustain fractions
define :plgliss do |p1,p2,d1,d2,slideFrac=0.4,relFrac=0.1|
  k=play p1,sustain: d1+d2*(1-relFrac),release: d2*relFrac
  sleep d1
  control k,note: p2,note_slide: d2*slideFrac
  sleep d2
end


with_fx :reverb,room: 0.8 do
  with_synth :zawa do
    live_loop :gl do
      plgliss(:b4,:c6,0.5,0.5,0.5)
      play :b5,sustain: 3,release: 3*0.1
      sleep 3
      plgliss(:b5,:b4,0.5,0.5,0.7)
    end
  end
end
2 Likes

Thanks Robin! Forgot about the Doctor Who theme. I love that, and I found a really easy midi for the intro.

Looks like I’m adding that to my covers I’m working on.

Also, update on my WIP:
So, if you couldn’t guess, the song I posted was my start of the cover of Cruel Angel’s Thesis, the opening to one of my favorite animes, Evangelion, and my most requested cover.

It is…difficult to say the least. A lot of variation, a lot of accounting for weird pauses with the vocals, and I haven’t even gotten to the solo yet, and to make it all swing on top of that?

This is why I needed the Glissando. To connect the intro part to the chorus.