Binary Sweets, Jazz

@binarysweets this is great. Would you mind saying a bit about how you did it?

3 Likes

I’d be interested too!

The best I’ve managed is more like ‘Cool Jazz’…

Eli…

1 Like

I made this when the with_swing function was still working :

It’s broken now, I believe. Still have to file an issue on Github

1 Like

Well, the code is not much different from my Desktop Raver track really. I like to use standard template with structured tunes.

Basically, I started with some jazz loops from a sample pack. Bass, piano, sax. Then used a combination of rings, sample slice & rpitch, bools and echo fx to chop, pitch and arrange them. Echo was to ‘fake’ a sustain on the sample when it gets chopped abruptly.

Then it was a case of structuring and layering the samples, percussion, amen break etc :smiley:

Glad you like it :+1:

2 Likes

Very nice, I esp like it when the clave (click? whatever) comes in towards the end. I’ve not tried the with_swing function, I’ve been coding swing ‘manually’. It’s broken?

Thanks. Sample packs - must try that. Very different feel to the Desktop Raver, so that’s a good paradigm.

And the Amen break really? Get’s everywhere - actually I didn’t know it was in all these tune, clearly many more.

“Amen Break musician finally gets paid” https://www.bbc.co.uk/news/entertainment-arts-34785551

Also nice - more Pure Sonic Pi than using samples. No room for the Amen break, shame

Yes, it’s broken at the moment. I filed an issue yesterday on Github, so it might be fixed soon.

Just for you, Soxsa… :slight_smile:

Eli…

# Jazz Hands
# Eli...

use_bpm 90

key = note(:C4)
mode = :major

clarinet_notes = (ring :d3, :e3, :d3,:a3, :d3, :g3, :a3, :e4)
clarinet_rhythm = (ring 0.25, 0.75, 1, 0.75, 0.25, 0.5, 0.5).shuffle

fade_in1 = (line 0, 2, inclusive: true, steps: 20)
fade_out1 = (line 2, 0, inclusive: true, steps: 20)
fade_through1 = fade_in1 + fade_out1

clarinet_notes = (ring :d3, :e4, :d4,:g4, :f4, :g3, :a3, :e4)

chord_progression = [ :ii, :v, :i] # Jazz - ii-V-I
tune = [ :d, :r, :r, :a,:g5, :r, :a, :r, :d, :r, :r, :b, :g5, :r, :b, :r]

live_loop :fred do
  sample :loop_amen, start: 0, finish: 0.5, beat_stretch: 2, rate: 0.5
  sleep sample_duration(:loop_amen, start: 0, finish: 0.5, beat_stretch: 2, rate: 0.5)
end

live_loop :theme do
  with_fx(:reverb, room: 0.1, damp: 0.1) do |reverb1|
    use_synth_defaults release: [0.3,0.6].choose, amp: 0.6*fade_through1.tick
    with_synth :piano do
      if rand() > 0.75
        use_transpose +12
        play_pattern_timed tune, [0.25,0.5], amp: 0.6
      else
        tune=tune.shuffle
        play_pattern_timed tune, [0.5], amp: 0.6
        
      end
    end
  end
end

live_loop :clarinet do
  use_synth :fm
  if one_in(4)
    sleep 2
    next
  end
  
  if rand() > 0.75 then
    clarinet_notes = (ring :d3, :e4, :d4,:g4, :f4, :g3, :a3, :e4)
  else
    clarinet_notes = clarinet_notes.shuffle
  end
  deep = rrand(2,6)
  use_synth_defaults divisor: 0.5, depth: deep, attack: 0.05, sustain: 0.2, release: 0.2, amp: 0.2#*fade_through1.tick
  with_fx :reverb, room: 0.75, damp: 0.25 do
    play clarinet_notes.tick # look makes notes play in a row
    play clarinet_notes.look # look makes notes play in a row
    play clarinet_notes.look # look makes notes play in a row
  end
  sleep clarinet_rhythm.look
end

live_loop :prog do
  2.times do
    use_synth_defaults release: [1,1.5].choose, amp: 0.6
    use_synth :piano
    play (ring, chord(:c3, :M7), chord(:a2, :m7), chord(:d3, :m7), chord(:g2, :dom7)).tick, sustain: 1.25
    play (ring, chord(:c3, :M7), chord(:a2, :m7), chord(:d3, :m7), chord(:g2, :dom7)).look, sustain: 1.25
    sleep 2
  end
end
3 Likes

Here is a first attempt at jazz +walking bass

3 Likes

Hi Eli,

your clarinet synth is pretty nice :+1:

Cu.

1 Like

Thanks man,

I’ve got several variants I use.

One day perhaps I’ll rewrite it to include
slides… not sure if that would make it
sound better though.

Eli…

Hi Robbi,

Really like that walking bass… could I persuade you to post
the code for it, please?

Many thanks,

Eli…

Yeah no prob, sorry the code is super messy:

use_bpm 220
chords= ring(1,4,1,1,4,4,1,1,5,4,1,1)
live_loop :walkin2 do
  tick
  use_synth :subpulse
  
  x=(chord_degree chords.look, :c2, :major)[0]
  play x, amp: 0.5
  sleep 1
  y=(chord_degree chords.look, :c2, :major)[0]+ ring(+2, -2).choose
  play y, amp: 0.5
  sleep 1
  if x<y
    play (chord_degree chords.look, :c2, :major)[1], amp: 0.5
    sleep 1
  else
    play (chord_degree chords.look, :c2, :major)[0]-3, amp: 0.5
    
    sleep 1
    
  end
  play (chord_degree chords[look + 1], :c2, :major)[0] +(ring 1,-1).choose, amp: 0.7
  sleep 1
end


live_loop :chords  do
  
  chordProg= [:c4, :f4, :c4, :c4, :f4, :f4, :c4, :c4, :g4, :f4, :c4, :c4].ring.tick(:chordProg)
  chordext= [:mixolydian, :mixolydian, :mixolydian, :mixolydian].ring.tick(:chordext)
  
  use_synth :fm
  i= range(-1, 1).choose
  deg = [:i, :iii].ring.choose
  play chord_degree(deg, chordProg, chordext, 4, invert: i), amp: rrand(0.5,1), cutoff: rrand(80,120) if one_in(1.3)
  
  beat =(ring 0.66,1.66,3,3.66).choose
  sleep beat
  play chord_degree(deg, chordProg, chordext, 4, invert: i), amp: rrand(0.5,1), cutoff: rrand(80,120)
  print beat
  n = 4 - beat
  print n
  sleep n
  
end

define :hihat do
  use_synth :pnoise
  with_fx :hpf, cutoff: 120 do
    play release: 0.01, amp: 1
  end
end


live_loop :hihat_loop do
  hihat
  sleep 1
end

live_loop :hihat_loop2 do
  sleep 2
  
  if one_in 10
    sleep 0.66
    hihat
    sleep 0.33
  end
  sleep 1
end

# SNARE


live_loop :snare_loop do
  sleep 3
  with_fx :lpf, cutoff: 100 do
    
    sample :sn_dub, sustain: 0, release: 0.05, amp: 1 if one_in(2)
  end
  sleep 1
  
end



# BASSDRUM
define :bassdrum do
  use_synth :sine
  with_fx :hpf, cutoff: 100 do
    play amp: 1, release: 0.01
    
  end
  
end


live_loop :bassdrum_loop do
  bassdrum
  sleep 3.66
  bassdrum
  sleep 0.33
end
1 Like

Hey hey @robbilee - thanks for the code, interesting!

It’d be super helpful if you could add code formatting to your example - do you know how to do that?
(You can add an extra line before and after the code, and on these lines, place three back-ticks each: ` )

Awesome, thanks for the tip

1 Like