Greetings and a little 7/8 gift from bavaria

Hi everybody,

my name is Jochen and I have joined the forum a couple of weeks ago. I am based in Munich (Germany) and my job is teaching computer science and data analysis at the university. But more important, I love music and used to play guitar in a couple of rock and jazz bands. Recently, one of my students introduced me to Sonic Pi and I immediately got drawn into it.

Since then, I experimented with various music styles and created a list of pieces that allow me to play along with my guitar(s). Some of those I already contributed to this forum.

For quite some years there has been an idea on my mind, which is a 7/8 piece of music. We tried to play it in the band, but we were not up to getting it grooving. If it sounds just like math because people concentrate on counting, something is wrong.

But here comes the solution. Thanks to Sonic Pi and live programming, I was able to tweak the patterns played by piano, bass and tabla to build a rythm section that got it grooving somehow. Of course, if very good musicians would take it up from here, the result would be even better.

The chord progression has got a subtle change between F major and D minor. Essentially, it is the bass line that expresses the key changes. The rhythm patterns are all adjusted to get this mix of a latin groove with a slight waltz feeling integrated. That was my initial idea, to turn a 7/8 rythm into a 4+3 latin-waltz feeling. If you want to follow the ryhthm, just count
one-and-two-and-three-and-four-one-...
Omit the ‘and’ between four-one, which gives you the waltz feeling.

Enjoy!

# piece in 7/8
use_debug false
use_random_seed 4
use_bpm 70
st = 3.5

#######
# piano

chords = [chord(:D3, :minor7),
          chord(:Bb2, :major, invert: 1),
          chord(:C3, :major, invert: 1),
          chord(:F3, :major7),
          chord(:D3, :minor7, invert: 1),
          chord(:D3, :dim7, invert: 1),
          chord(:G2, :dom7, invert: 1),
          chord(:A2, :dom7, invert: 1),
          ]

with_fx :echo, phase: st/28, mix: 0.3, decay: st/14 do
  with_synth :piano do
    with_synth_defaults hard: 0.6, sustain: st/14, release: st/7 do
      live_loop :piano, auto_cue: false do
        ch = chords.tick
        puts note_info(ch[0])
        tick_set :x, 0
        14.times do |i|
          play ch,    amp: 1.0 if ("x---x----x----"[tick(:x)]=="x")
          play ch+12, amp: 1.0 if ("x-x--x-x--x-x-"[look(:x)]=="x")
          sleep st/14
        end
      end
    end
  end
end

######
# bass

scales = [scale(:D3, :melodic_minor_desc),
          scale(:Bb2, :mixolydian),
          scale(:C3, :mixolydian),
          scale(:F3, :ionian),
          scale(:D3, :melodic_minor_desc),
          scale(:D3, :diminished2),
          scale(:G2, :mixolydian),
          scale(:A2, :augmented2),
          ]


with_synth :fm do
  with_synth_defaults amp: 0.8, attack: 0.01, release: 0.1, divisor: 2 do
    live_loop :bass, auto_cue: false do
      sca = scales.tick
      if sca.length > 6
        notes = (knit sca[0], 4, sca[1], 2, sca[2], 4, sca[4], 4, sca[6]-12, 2).pick(14)
      else
        notes = (knit sca[0], 4, sca[1], 2, sca[2], 2, sca[4], 2).pick(14)
      end
      pat = (knit
             ["x-x-x-x-x-x-x-", st/8-0.1], 6,
             ["x-x-x--x-x--x-", st/8-0.1], 2,
             ["x-x--x-x-x--x-", st/8-0.1], 4,
             ["xx-x-xx--x-xx-", st/14-0.1], 2,
             ["x-xx-xx-xx-x-x", st/14-0.1], 2,
             ["x-x-xx-xx-xx-x", st/14-0.1], 1).choose
      tick_reset :n
      14.times do
        tick(:n)
        play notes.look(:n), sustain: pat[1] if (pat[0][look(:n)]=="x")
        sleep st/14
      end
    end
  end
end

#######
# tabla

define :p do |i|
  a = 0.8
  case i
  when 0
    sample :tabla_tas1, amp: a*0.9
  when 1
    sample :tabla_tas2, amp: a*1.0
  when 2
    sample :tabla_tas3, amp: a*0.9
  end
end

with_fx :reverb, mix: 0.6, room: 0.7 do
  live_loop :table, auto_cue: false do
    tick_reset
    var1 = one_in(6)
    14.times do |n|
      tick
      #         1 2 3 4 5 6 7
      p(0) if ("x---x---x---x-"[look]=="x")
      p(1) if ("x-x-----x-x---"[look]=="x") unless var1
      p(2) if ("---x-xx--x-xx-"[look]=="x") unless var1
      p(1) if ("x------x------"[look]=="x") and var1
      p(2) if ("-xxxxxx-xxxxxx"[look]=="x") and var1
      sleep st/14
    end
  end
end
3 Likes

I’m mainly a rhythm player (bass, but also comp on guitar and piano), and I hear this as an almost clave-esque groove. Writing it as 4/4 then 3/4, I feel it, not as |1-2-3-4-| |1-2-3-|, but as |1---2---| |1-2-3-|

Clave would be |-- x- x- -- | x- -x -- x- | , two heavy-feeling tacti then it moves along with those following three. If you feel yours as
|x- -- x- -- | x- x- x- |, then it’s two heavies followed by three that zip along. Maybe your musicians can get a feel for this and sustain it without having to count. I mean, I never count clave, I just go with it.

1 Like

Yes, that works well! Thanks!

Nice work. Sounds great