# Hi from Italy \[with a Charles Mingus gift\]

**URL:** https://in-thread.sonic-pi.net/t/hi-from-italy-with-a-charles-mingus-gift/5233
**Category:** Introductions & Stories
**Created:** [March 8, 2021, 11:34am UTC](https://in-thread.sonic-pi.net/t/hi-from-italy-with-a-charles-mingus-gift/5233 "2021-03-08T11:34:34Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Prof1220](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/prof1220/32/1150_2.png) [@Prof1220](https://in-thread.sonic-pi.net/u/Prof1220)
#### Post date: [March 8, 2021, 11:34am UTC](https://in-thread.sonic-pi.net/t/hi-from-italy-with-a-charles-mingus-gift/5233/1 "2021-03-08T11:34:34Z")

</div>

Hi everybody,  
this is Leo from Bologna, Italy. I am a music teacher, musicologist, and guitar jazz player.  
I discover Sonic.pi talking with some collogue of mine and last year I attended a Sam Aaron workshop in Bologna. (it was great: thanks Sam!)  
I’m a completely _newbie_ in coding, so these are my first explorations in writing lines of code.  
I would like to thank you, everyone here, for your great support: in\_thread website is a great resource tool and this community is fantastic!  
Even if I am not at all a skilled user, this year I started a sonic.pi class in my school (11-13 years old students). Students are very enthusiastic about this software (eve if now we are working on-line because schools are closed during lockdown).  
As a starting gift, I am bringing here a little piece: a short arrangement of Charles Mingus’s _Freedom_. If you don’t know this recording, here is a [youtube link](https://www.youtube.com/watch?v=23sah6aWk3A).  
My aim was to render the subtle time fluctuations of the handclaps and percussion in Mingus’s ensemble: many people reaching the beat slightly out of synchro.  
I am sure that I could code it in a much more efficient way, but, at least, it sounds good enough to my ears! 😉  
Good listening!  
Leo

```ruby
#Coded by Leo Izzo
#An attempt to render the collective rhythmic
#effect of Charles Mingus's "Freedom"

live_loop :beat do #live_loop for rhythmic syncing
  cue :bar
  sleep 8
end

live_loop :drums do
  sample :bd_808
  sleep 1
  sample :drum_snare_soft
  sleep 1
end

# rhythmic ensemble: 7 finger-snaps and one snare hit together on the 8th beat
  # with subtile time-fluctuations
with_fx :reverb, mix: 0.7, room: 0.9, amp: 1 do
  live_loop :sn1 do
    sync :bar
    sleep 6
    sleep rrand(0.97, 1.2)
    sample :perc_snap, amp: rrand(0.5, 1), rate: 0.8, pan: 0.5
  end
  
  live_loop :sn2 do
    sync :bar
    sleep 6
    sleep rrand(0.97, 1.2)
    sample :perc_snap, amp: rrand(0.5, 1), rate: 1, pan: 0.2
  end
  
  live_loop :sn3 do
    sync :bar
    sleep 6
    sleep rrand(0.99, 1.1)
    sample :perc_snap, amp: rrand(0.5, 1), rate: 1.2, pan: 0
  end
  
  live_loop :sn4 do
    sync :bar
    sleep 6
    sleep rrand(0.97, 1.2)
    sample :perc_snap2, amp: rrand(0.5, 1), rate: 0.8, pan: -0.5
  end
  
  live_loop :sn5 do
    sync :bar
    sleep 6
    sleep rrand(0.97, 1.2)
    sample :perc_snap2, amp: rrand(0.5, 1), rate: 1, pan: -0.2
  end
  live_loop :sn6 do
    sync :bar
    sleep 6
    sleep rrand(0.99, 1.1)
    sample :perc_snap2, amp: rrand(0.5, 1), rate: 1.2, pan: 0
  end
  live_loop :snare do
    sync :bar
    sleep 6
    sleep rrand(0.99, 1.1)
    sample :drum_snare_hard, amp: rrand(0.5, 1), rate: 1.2, pan: 0
  end
end

8.times do #bass intro
  use_octave 2
  giro = [:Bb1, :Bb1, :C2, :C2, :Db2, :Db2, :C2, :C2].ring
  use_synth :hoover
  play giro.tick, amp: 0.4
  sleep 1
end

live_loop :bass do
  24.times do
    use_octave 2
    giro = [:Bb1, :Bb1, :C2, :C2, :Db2, :Db2, :C2, :C2].ring
    use_synth :hoover
    play giro.tick, amp: 0.4
    sleep 1
  end
  8.times do
    giro2 = [:Gb2, :Gb2, :F2, :F2, :Bb1, :Bb1, :Bb1, :Bb1].ring
    play giro2.tick, amp: 0.4
    sleep 1
  end
end

live_loop :melody do
  use_octave 1
  12.times do
    mel = [:Bb4, :Bb4, :Ab4, :F4, :Ab4, :Bb4].ring
    dur = [0.6, 2.4, 0.6, 0.4, 0.6, 3.4].ring
    rel = [0.5, 2.3, 0.5, 0.3, 0.5, 3.3].ring
    use_synth :dsaw
    use_octave 0
    play mel.tick, attack: 0.2, release: rel.look, amp: 0.5
    use_octave -1
    play mel.look, attack: 0.2, release: rel.look, amp: 0.3
    sleep dur.look
  end
  12.times do
    mel2 = [:Bb4, :Bb4, :Ab, :F4,
            :Ab4, :Bb4, :Bb3, :Db4,
            :E4, :Eb4, :Db4,
            :Bb3].ring
    dur2 = [0.6, 2.4, 0.6, 0.4,
            0.6, 2.4, 0.6, 0.4,
            0.6, 2.4, 1,
            4].ring
    rel2 = [0.5, 2.3, 0.5, 0.3,
            0.5, 2.3, 0.5, 0.3,
            0.6, 2.3, 1.0,
            3.0].ring
    use_synth :dsaw
    use_octave 0
    play mel2.tick, attack: 0.2, release: rel2.look, amp: 0.5
    use_octave -1
    play mel2.look, attack: 0.2, release: rel2.look, amp: 0.3
    sleep dur2.look
  end
end

```

---

<div class="post-metadata">

### Author: ![ethancrawford](https://avatars.discourse-cdn.com/v4/letter/e/a88e4f/32.png) [@ethancrawford](https://in-thread.sonic-pi.net/u/ethancrawford)
#### Post date: [March 8, 2021, 12:49pm UTC](https://in-thread.sonic-pi.net/t/hi-from-italy-with-a-charles-mingus-gift/5233/2 "2021-03-08T12:49:29Z")

</div>

Great stuff @Prof1220 😃 - I think you have done the slightly desynchronised percussion well!

(Welcome to in\_thread too - great to have you around 👍 )  
_Ah - you’ve already been around for a while_ 😉 well, welcome again 😄

---

<div class="post-metadata">

### Author: ![Prof1220](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/prof1220/32/1150_2.png) [@Prof1220](https://in-thread.sonic-pi.net/u/Prof1220)
#### Post date: [March 8, 2021, 2:55pm UTC](https://in-thread.sonic-pi.net/t/hi-from-italy-with-a-charles-mingus-gift/5233/3 "2021-03-08T14:55:37Z")

</div>

Thank you, Ethan.  
Very glad you like it!  
I just updated, adding some details: sliding nuances to the melody and enhanced stereo placement of percussions.

```ruby
live_loop :beat do #live_loop for rhythmic syncing
  cue :bar
  sleep 8
end

live_loop :drums do
  sample :bd_808
  sleep 1
  sample :drum_snare_soft
  sleep 1
end

# rhythmic ensemble: 7 finger-snaps and one snare hit together on the 8th beat
# with subtile time-fluctuations
with_fx :reverb, mix: 0.7, room: 0.9, amp: 1 do
  live_loop :sn1 do
    sync :bar
    sleep 6
    sleep rrand(0.97, 1.2)
    sample :perc_snap, amp: rrand(0.5, 1), rate: 0.8, pan: 0.9
  end
  
  live_loop :sn2 do
    sync :bar
    sleep 6
    sleep rrand(0.97, 1.2)
    sample :perc_snap, amp: rrand(0.5, 1), rate: 1, pan: 0.5
  end
  
  live_loop :sn3 do
    sync :bar
    sleep 6
    sleep rrand(0.99, 1.1)
    sample :perc_snap, amp: rrand(0.5, 1), rate: 1.2, pan: 0.2
  end
  
  live_loop :sn4 do
    sync :bar
    sleep 6
    sleep rrand(0.97, 1.2)
    sample :perc_snap2, amp: rrand(0.5, 1), rate: 0.8, pan: -0.9
  end
  
  live_loop :sn5 do
    sync :bar
    sleep 6
    sleep rrand(0.97, 1.2)
    sample :perc_snap2, amp: rrand(0.5, 1), rate: 1, pan: -0.5
  end
  live_loop :sn6 do
    sync :bar
    sleep 6
    sleep rrand(0.99, 1.1)
    sample :perc_snap2, amp: rrand(0.5, 1), rate: 1.2, pan: -0.2
  end
  live_loop :snare do
    sync :bar
    sleep 6
    sleep rrand(0.99, 1.1)
    sample :drum_snare_hard, amp: rrand(0.5, 1), rate: 1.2, pan: 0
  end
end

8.times do #bass intro
  giro = [:Bb1, :Bb1, :C2, :C2, :Db2, :Db2, :C2, :C2].ring
  use_synth :hoover
  play giro.tick+12, amp: 0.4
  sleep 1
end

live_loop :bass do
  24.times do
    giro = [:Bb1, :Bb1, :C2, :C2, :Db2, :Db2, :C2, :C2].ring
    use_synth :hoover
    play giro.tick+12, amp: 0.4
    play giro.look+24, amp: 0.3
    use_synth :fm
    play giro.look+31, amp: 0.05
    sleep 1
  end
  8.times do
    giro2 = [:Gb2, :Gb2, :F2, :F2, :Bb1, :Bb1, :Bb1, :Bb1].ring
    play giro2.tick, amp: 0.4
    sleep 1
  end
end

live_loop :melody do
  2.times do
    s = synth :dsaw, note: :A4, note_slide: 0.05, attack: 0.2, amp: 0.5, sustain: 8
    6.times do
      mel = [:Bb4, :Bb4, :Ab4, :F4, :Ab4, :Bb4].ring
      dur = [0.6, 2.4, 0.6, 0.4, 0.6, 3.4].ring
      rel = [0.5, 2.3, 0.5, 0.3, 0.5, 3.3].ring
      control s, note: mel.tick
      use_synth :blade
      play mel.look+12, attack: 0.1, release: rel.look, amp: 0.5
      play mel.look-24, attack: 0.05, release: rel.look, amp: 0.3
      sleep dur.look
    end
  end
  s1 = synth :dsaw, note: :A4, note_slide: 0.05, attack: 0.2, amp: 0.5, sustain: 16
  12.times do
    mel2 = [:Bb4, :Bb4, :Ab, :F4,
            :Ab4, :Bb4, :Bb3, :Db4,
            :E4, :Eb4, :Db4,
            :Bb3].ring
    dur2 = [0.6, 2.4, 0.6, 0.4,
            0.6, 2.4, 0.6, 0.4,
            0.6, 2.4, 1,
            4].ring
    rel2 = [0.5, 2.3, 0.5, 0.3,
            0.5, 2.3, 0.5, 0.3,
            0.6, 2.3, 1.0,
            3.0].ring
    control s1, note: mel2.tick
    use_synth :blade
    play mel2.look+12, attack: 0.2, release: rel2.look, amp: 0.5
    play mel2.look-24, attack: 0.2, release: rel2.look, amp: 0.3
    sleep dur2.look
  end
end

```
