Far too much technical stuff going on

OSC-this, Linux-that, Visualisers and Midi… Bah!

Nobody is posting… MUSIC. We need a flow of music/code in
the forums, to help new joiners to relax, play around with, and
get used to posting their code.

Too much dry, technical stuff and links to 30 page manuals
on MIDI, will just scare people away, making them feel it’s
all far too much to cope with…

So… here’s some stuff from the dumbest coder on the forums
to keep people going.

Eli…

Nice summery jazz-influenced stuff:

# Jazz Hands
# Eli...
# Oct 2019.

use_bpm 90

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

piano_tune = [ :d, :r, :r, :a,:g5, :r, :a, :r, :d, :r, :r, :b, :g5, :r, :b, :r]

live_loop :beat do
  sleep 4
end

live_loop :backbeat do
  sync  :beat
  sample :loop_breakbeat, beat_stretch: 4, amp: 0.5 if rand > 0.4
  sleep 0.1
end

live_loop :double_bass do
  with_fx :lpf, cutoff: 60 do
    use_synth :chipbass
    use_synth_defaults release: 0.3, amp: 0.5
    if rand < 0.75 then
      play_pattern_timed chord(:c1, :M7), 0.5
    else
      play_pattern_timed chord(:a1, :m7), 0.5
    end
    if rand < 0.75 then
      play_pattern_timed chord(:d1, :m7), 0.5
    end
    play_pattern_timed chord(:g1, :dom7), 0.5
  end
end

live_loop :hats do
  sample :drum_cymbal_closed, sustain: 0.125, amp: 0.3 if rand > 0.75
  sleep 0.5
  sample :drum_cymbal_closed, sustain: 0.125, amp: 0.2
  sleep 0.5
  tick
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
  with_fx :reverb, room: 0.75, damp: 0.25 do
    play clarinet_notes.tick
    play clarinet_notes.look
    play clarinet_notes.look
  end
  sleep clarinet_rhythm.look
end

live_loop :piano_step 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

live_loop :piano_tune do
  # piano_tune = [ :d, :r, :r, :a,:g5, :r, :a, :r, :d, :r, :r, :b, :g5, :r, :b, :r]
  with_fx(:reverb, room: 0.1, damp: 0.1) do |reverb1|
    use_synth_defaults release: [0.3,0.6].choose, amp: 0.6
    with_synth :piano do
      if rand() > 0.75
        use_transpose +12
        play_pattern_timed piano_tune, [0.25,0.5]
      else
        piano_tune=piano_tune.shuffle
        play_pattern_timed piano_tune, [0.5], amp: 0.5
      end
    end
  end
  sleep 4
end

Some spooky sounds to scare the kids with at your door on
Halloween…

use_real_time
use_sched_ahead_time 1
set_volume! 4
use_bpm 60

with_fx :hpf, cutoff: 60 do
  with_fx :reverb, room: 1, damp: 0.1 do
    with_fx :flanger, room: 1, damp: 0.1 do
      live_loop :ambience do
        use_sample_defaults pitch: [+24, +12].choose
        tick
        sample :drum_splash_soft, amp: 0.4, rate: [0.65, 1.25].choose, attack: 2, release: 2
        with_fx :reverb, room: 1, damp: 0.1 do
          sample [:elec_blup,:elec_blip2, :elec_blip].choose, rate: (knit -0.2, 2, -0.6, 2, 0.4, 4).look if bools(1, 0, 0, 1).look
        end
        if rand() > 0.55 then
          
          sample :ambi_drone, rate: (ring 0.1, 0.3, -0.25).look, amp: 0.25 if bools(1, 0, 1, 0).look
        end
        sleep [4,2].choose
      end
    end
  end
end

set_volume! 2

live_loop :flibble do
  #sample :ambi_choir, rate: 0.1, amp: 0.4
  sample :ambi_drone, rate: 0.19, amp: 0.4
  sample :ambi_haunted_hum, rate: 0.27, amp: 0.4
  #sample :bd_haus, rate: 0.01, amp: 0.5
  sleep 2
end

live_loop :bells do
  
  sample :ambi_dark_woosh, rate: -1, amp: 0.5
  sleep rand(6)
end

live_loop :whistles do
  
  sample :ambi_swoosh, rate: -1, amp: 0.5
  sleep rand(6)
end

live_loop :shriek do
  
  sample :ambi_glass_hum, rate: -1, amp: 0.5
  sleep rand(6)
end

live_loop :wobble do
  
  sample :ambi_glass_rub, rate: -0.5, amp: 0.5
  sleep rand(6)
end

live_loop :scream do
  use_synth :hollow
  play [80,55,90].choose, rate: [-1,1].choose, amp: 1
  sleep rand(6)
end
7 Likes

hi @Eli

i agree :slight_smile:

There are forum categories to sort the posts into the right section : the Creation and ideas category is there for.
If we want to help new users we have to comment our code and why not adding link to listen to the result of it.

But this forum is the only place to ask questions and find solutions together.
Maybe a “for kids” or “Newsbies” category should be set.

cool the jazz stuff !

1 Like

Take your point Eli. In fact the recent technical posts are posted in the help and support sections.
I am about to post 6 Bach preludes and some music my Dad composed in the 1940s!! To balance my output.

1 Like

Hey @Eli , these spooky sounds are really great!|

These are really awesome! Thank you for sharing. I do like the idea of sharing more music people have created. I am a high school teacher and I love Sonic Pi and wish to use it more in my classroom, but I am very much a novice at actually making music myself. Having access to code like this is great to share with my students to give them ideas and show them what is possible with Sonic Pi. Thanks again!

2 Likes

I’m a Middle School music teacher and having been using Sonic PI in class for 3 years now. Happy to answer questions or share resources if you’d like.

3 Likes

Hi @mrbombmusic,

I would love to hear about how you use Sonic Pi in your class. Any tips/resources you’d like to share would be great!

1 Like

Hi Eli,

some pretty nice examples you created there, especially the spooky ones :slight_smile:

Cu.

Hi @sraser88

The first year I taught Sonic Pi, I documented my experience on a weekly basis through posts on this forum: https://in-thread.sonic-pi.net/c/educators
Anything with the title: My year teaching Sonic PI: week ___ is one of mine. They include details on what happened in class and links to any resources I made for the kids.

I made some changes the following year which I have documented but in just a very short list. I’d be happy to share that if you like, but it may not make sense if read out of context from the original lessons.

I am teaching it again this year and continue to make changes which I hope to document in some form as well. In fact, after I finish this post, I’m off to grade the first projects my students complete this year!

Feel free to ask me any questions or share what your doing if you’d like any feedback.

1 Like

I am not a teacher… consider me a 60+ I.T. Techie (its easier that way).

To the point: Mr Bombs posts about his weekly ‘adventures’ with teaching,
and his thoughts and insights were eye opening to me. as a non-teaching
person.

I have no professional criteria to help me recommend you to him… all
I can point to is his consistent weekly posts, and his obvious care about
his students.

Regards,

Eli…

1 Like

Hi @Eli,

I don’t think there is too much technical stuff going on here. It is just what people are interested in. Furthermore, as someone mentioned, we have different categories for everything to fit in.

Nevertheless here is some more music. Finally took some time to begin to dive into control. As I suspected the options are possibly endless (especially if you use in_thread to create separate time tracks within a live loop). Here is an experiment and maybe a base for a track:

# Experiments with control

use_bpm 120

live_loop :metro do
  sleep 4
end


live_loop :bd, sync: :metro do
  #stop
  at (ring 0, 1, 2, 3) do
    sample :bd_fat, amp: 4
  end
  sleep 4
end

live_loop :percussion, sync: :metro do
  with_fx :rhpf, cutoff: 95, res: 0.95 do
    sample :loop_tabla, beat_stretch: 16, amp: 3
  end
  at (ring 0, 4, 8) do
    sample :loop_amen, beat_stretch: 4, amp: 1
  end
  at (12) do
    8.times do
      sample :loop_amen, beat_stretch: 4, amp: 1, num_slices: 8, slice: pick
      sleep 0.5
    end
  end
  sleep 16
end


live_loop :modulate, sync: :metro do
  use_synth :dsaw
  use_synth_defaults attack: 0.01, attack_level: 10, sustain: 2, release: 2
  
  with_fx :reverb, room: 0.75, mix: 0 do | rev |
    
    with_fx :lpf, cutoff: 30, amp: 1 do | lpf |
      with_fx :slicer, phase: 0.25, wave: 0, mix: 0 do | slc |
        s = synth :dsaw, note: :c2, amp: 1
        
        if one_in 3
          in_thread do
            sleep (ring 1, 2).choose
            control s, note: (ring :eb2, :g2).choose, note_slide: 2
            sleep 2
            control s, note: :c2, note_slide: 0.25
          end
        end
        
        in_thread do
          control slc, mix: 1, mix_slide: 0.25
          sleep 1.5
          control slc, mix: 0, mix_slide: 0.5
          sleep 2
        end
        
        in_thread do
          control lpf, cutoff: 90, cutoff_slide: 2
          sleep 2
          control lpf, cutoff: 30, cutoff_slide: 2
          sleep 1
        end
      end
      
    end
    control rev, mix: 1, mix_slide: 2.5
  end #/reverb
  sleep 4
end
5 Likes

Thank you for the kind words @Eli