Turning boring piano exercises into music with Sonic Pi

Hi,

Joined the forum a few days ago, really excited about the possibilities of Sonic Pi! Here’s my first patch, not a masterpiece by any means, but a cool idea that can be explored further.

# Hanon Part 1 - Exercises 1-5

use_bpm 120

with_fx :reverb, room: 0.4, mix: 0.67, damp: 0.1 do
  with_fx :distortion, distort: 0.3, pre_amp: 0.5 do
    notes1 = (ring :C3, :E3, :F3, :G3, :A3, :G3, :F3, :E3)
    live_loop :ex1, sync: :bar do
      play notes1.tick, pitch:12+0.06, env_curve: 7, release: 0.5, amp: 0.6,  pan: 0.7
      sleep 0.25
    end
  end
  with_fx :distortion, distort: 0.3, pre_amp: 0.5 do
    notes2 = (ring :C3, :E3, :A3, :G3, :F3, :G3, :F3, :E3)
    live_loop :ex2, delay: 0.035  do
      play notes2.tick, pitch:12-0.06, env_curve: 7, release: 0.5, amp: 0.6,  pan: -0.8
      sleep 0.25
    end
  end
end

with_fx :octaver, super_amp: 0.2, subsub_amp: 0.4 do
  notes3 = (ring :C3, :E3, :A3, :G3, :F3, :E3, :F3, :G3).take(2)
  live_loop :ex3,  sync: :bar do
    play notes3.tick, pitch:12, env_curve: 6, release: 0.72, amp: 0.16, pan: 0.25
    sleep 0.333333
  end
end

with_fx :ping_pong, mix: 0.7 do
  with_fx :tanh, krunch: 6, pre_amp: 0.5 do
    notes4 = (ring :C3, :D3, :C3, :E3, :A3, :G3, :F3, :E3).reverse
    live_loop :ex4, sync: :bar  do
      ##| stop
      play notes4.tick, pitch:0, env_curve: 6, release: 0.7, amp: 0.18, pan: -0.25
      sleep 0.5
    end
  end
end

with_fx :rhpf, cutoff: 30, res: 0.3 do
  live_loop :ex5, sync: :bar do
    notes5 = (ring :C3, :A3, :G3, :A3, :F3, :G3, :E3, :F3).stretch(16)
    ##| stop
    play notes5.tick, pitch:-12, attack: 0.02, release: 0.68, amp: 0.78
    sleep 0.5
  end
end


live_loop :bar, delay: 0.01 do
  sample :bd_pure, amp: 2.4
  sleep 1
end

Tips: Comment out each live loop to build an arrangement. Play around with the methods for each ring, modifying sequences in real time. Multiplying/dividing note values also create interesting variations.

I also made a short video of it for instagram:

5 Likes

hi @ugokcen

As lots of piano pupils has to work this hanon method to improve their agility, maybe sonic pi is going to learn from it and develop its own piano agility :slight_smile:, a king of AI :slight_smile:

ps : some piano teachers consider this method as a wrong method because as you say boring and not very musical. It’s another topic !

When I was a kid learning the piano I dreaded the Hanon exercises but as I am getting back into the piano after 30 years I find it invaluable!

Playing around with Sonic Pi gave me a lot of ideas for making them more musical (and more challenging!). How about trying to play one exercise with the left hand and another one on the right? How about shifting the same pattern by one note on one hand but not the other? Or halving the note values on the left? Or triplets on the right against 8th notes on the left?

hi @ugokcen

this video argues against Hanon. But it’s a point of view. In french. “La risée des autres pays”

This pianist suggests to study Brahms exercices http://ks4.imslp.info/files/imglnks/usimg/b/b1/IMSLP23169-PMLP06574-BraWV,_S._520.pdf

Off topic about sonic pi :slight_smile: