Site Map - skip to main content

Hacker Public Radio

Your ideas, projects, opinions - podcasted.

New episodes every weekday Monday through Friday.
This page was generated by The HPR Robot at


hpr1775 :: Sonic Pi

A short review of sonic PI and programming the HPR theme

<< First, < Previous, , Latest >>

Hosted by Steve Bickle on Friday, 2015-05-22 is flagged as Clean and is released under a CC-BY-SA license.
Raspberry PI, music, programming, review. 1.
The show is available on the Internet Archive at: https://archive.org/details/hpr1775

Listen in ogg, spx, or mp3 format. Play now:

Duration: 00:11:17

general.

In this review of the Sonic Pi software I have mentioned a couple of programs that I wrote the listings are here:

============================
The Hippopotamus Song
============================
use_bpm 180
# use_transpose -12
use_synth :fm
2.times do
play_pattern_timed [:D3,:G3,:G3,:G3], [1,1,1,1]      # 1 extra note from bar an bar 2
play_pattern_timed [:G3,:D3,:B2,:G2], [0.5,0.5,1,1]  # 3
play_pattern_timed [:a2,:b2,:c3], [1,1,1]            # 4
play_pattern_timed [:b2,:b2,:a2], [2,0.5,0.5]        # 5
play_pattern_timed [:g2,:g3,:g3], [1,1,1]            # 6
play_pattern_timed [:fs3,:g3,:e3], [1,1,1]           # 7
play_pattern_timed [:d3,:d3], [4,1]                  # 8 9
play_pattern_timed [:g3,:g3,:g3], [1,1,1]            # 10
play_pattern_timed [:g3,:d3,:b2,:g2], [0.5,0.5,1,1]  # 11
play_pattern_timed [:a2,:b2,:c3], [1,1,1]            # 12
play_pattern_timed [:b2,:b3,:a3], [2,0.5,0.5]        # 13
play_pattern_timed [:g3,:fs3,:e3], [1,1,1]           # 14
play_pattern_timed [:a3,:fs3,:e3], [1,1,1]           # 15
play_pattern_timed [:d3,:d3], [4,1]                  # 16 17
play_pattern_timed [:a3,:a3,:a3], [1,1,1]            # 18
play_pattern_timed [:e3,:e3,:e3], [1,1,1]            # 19
play_pattern_timed [:a3,:a3,:a3], [1,1,1]            # 20
play_pattern_timed [:e3,:a3], [2,1]                  # 21
play_pattern_timed [:c4,:b3,:a3], [1,1,1]            # 22
play_pattern_timed [:a3,:b3,:gs3], [1,1,1]           # 23
play_pattern_timed [:a3,:d3], [4,1]                  # 24 25
play_pattern_timed [:e3,:fs3,:g3], [1,1,1]           # 26
play_pattern_timed [:fs3,:d3,:d3], [1,1,1]           # 27
play_pattern_timed [:e3,:fs3,:g3], [1,1,1]           # 28
play_pattern_timed [:fs3,:d3,:d3], [1,1,1]           # 29
play_pattern_timed [:c4,:b3,:a3], [1,1,1]            # 30
play_pattern_timed [:g3,:fs3,:e3], [1,1,1]           # 31
play_pattern_timed [:fs3],[1], sustain_level: 0.6, sustain: 1, decay: 3   # 32 sustain note into next bar
play_pattern_timed [:g3,:fs3], [1,1]                 # 32
play_pattern_timed [:e3,:d3,:fs3], [1,1,1]           # 33
play_pattern_timed [:g3,:d3],[3,3]                   # 34 35
play_pattern_timed [:c3,:b2,:a2], [1,1,1]            # 36
play_pattern_timed [:d3],[3]                         # 37
play_pattern_timed [:g3,:fs3,:g3], [1,1,1]           # 38
play_pattern_timed [:e3,:a3,:g3], [1,1,1]            # 39
play_pattern_timed [:fs3,:e3,:fs3], [1,1,1]          # 40
play_pattern_timed [:d3,:d3],[2,1]                   # 41
play_pattern_timed [:b3,:b3,:a3], [0.5,1.5,1]        # 42
play_pattern_timed [:g3,:d3,:d3], [0.5,1.5,1]        # 43
play_pattern_timed [:c4,:c4,:b3], [1,1,1]            # 44
play_pattern_timed [:a3,:e3,:d3], [0.5,1.5,1]        # 45
play_pattern_timed [:e3,:fs3,:g3], [1,1,1]           # 46
play_pattern_timed [:d3,:b2,:g2], [1,1,1]            # 47
play_pattern_timed [:a2],[3], decay: 3               # 48
play_pattern_timed [:a2,:b2,:a2], [1,1,1]            # 49
play_pattern_timed [:g2],[3], decay: 3               # 50
play_pattern_timed [:g2],[1]                         # 51
sleep 2
end

=======================================
The HPR Outro theme - hack on this improve it and make a show
=======================================
in_thread do
  use_bpm 180
  use_transpose 24
  use_synth :beep
  19.times do
    play_pattern_timed [:a,:as,:a,:a], [0.5],release: 0.02, amp: 0.3 #
    play_pattern_timed [:as,:f,:as,:a], [0.5],release: 0.02, amp: 0.3  #
  end
end
use_bpm 180
sample :elec_hi_snare
sleep 0.5
sample :elec_hi_snare
sleep 0.5
sample :drum_bass_hard
sleep 0.5

use_transpose -0
use_synth :saw
2.times do
  play_pattern_timed [:a,:a,:a,:a], [0.5,1,0.5,1] # 3
  play_pattern_timed [:a,:as,:a], [1,1,1]
  play_pattern_timed [:c5], [3], decay: 2   # 6
  play_pattern_timed [:a,:a,:a,:a], [0.5,1,0.5,1] # 3
  play_pattern_timed [:a,:as,:a], [1,1,1]    # 6
  play_pattern_timed [:f], [3], decay: 2   # 6
end
use_synth :dsaw
play_pattern_timed [:f],[1]
play_pattern_timed [:c5],[2], decay: 1.5
play_pattern_timed [:as,:a,:as],[1,1,1]
play_pattern_timed [:a],[1]
play_pattern_timed [:c5],[2], decay: 1.5
play_pattern_timed [:f],[1]
play_pattern_timed [:c5],[2], decay: 1.5
play_pattern_timed [:as,:a,:as,],[1,1,1]
play_pattern_timed [:a],[1]
play_pattern_timed [:f],[2], decay: 1.5
play_pattern_timed [:f],[1]
play_pattern_timed [:c5],[2], decay: 1.5
play_pattern_timed [:as,:a,:as],[1,1,1]
play_pattern_timed [:a],[1]
play_pattern_timed [:c5],[2], decay: 1.5
play_pattern_timed [:f],[1]
play_pattern_timed [:c5],[2], decay: 1.5
play_pattern_timed [:as,:a,:as,:a],[1,1,1,1]
play_chord [:c4,:f], decay: 4
===========================
------------------------------------------------------------

Comments

Subscribe to the comments RSS feed.

Comment #1 posted on 2015-05-25 07:08:15 by kdmurray

SonicPi Releases

Great show. I'd never heard of SonicPi before and have been messing around with it since I heard the episode.

It also looks like a Windows MSI version has become available since the episode was recorded.

Looking forward to hearing more music from the HPR community!

Leave Comment

Note to Verbose Commenters
If you can't fit everything you want to say in the comment below then you really should record a response show instead.

Note to Spammers
All comments are moderated. All links are checked by humans. We strip out all html. Feel free to record a show about yourself, or your industry, or any other topic we may find interesting. We also check shows for spam :).

Provide feedback
Your Name/Handle:
Title:
Comment:
Anti Spam Question: What does the letter P in HPR stand for?
Are you a spammer?
Who is the host of this show?
What does HPR mean to you?