SonicPi Basics
- SonicPi is an open source synth music programm build on ruby.
- It was developed by Sam Aaron and can be downloaded here.
- livecoding in the browser: GIBBER.CC
Syntax
# print to console
puts "helloWorld!"
print "helloWorld!"
# global variables
$glbalVar = "hello"
# import another files
require "/home/dcts/myfile.rb"
Shortcuts
ALT-I # show/hide tutorial
ALT-P # show/hide preferences (options)
ALT-SHIFT-B # show/hide buttons
ALT-SHIFT-M # switch dark/bright mode
ALT-SHIFT-F # switch fullscreen on/off
ALT-minus # fontsize --
ALT-SHIFT-1 # fontsize ++
# for productive work
Alt-R # compile / run
Alt-S # stop all runs
ALT-SHIFT-FL # show/hide logs
CTRL-I # show helpfile for cursor location
Playing Sounds
There are three ways to produce sound in SonicPi:
play hz_to_midi 440
plays a sinewave with frequency 440 hzuse_synth :prophet
andplay 50
plays a note on a synthsample :mySample
plays a sample
Examples
# play 440 hz sinewave
play hz_to_midi 440
# choose synth
use_synth :prophet
play 50
# use sample
sample :loop_amen_full
Timing
play 50 # play sound
sleep 0.25 # sleep 0.25
play 60 # play sound
sleep 0.25 # sleep 0.25
Samples
# basic syntax
sample :sample_name, prop1: val1, prop2: val2
# porperties (value range)
amp: [0-inf]
pan: [-1 bis 1] # -1 left / 1 right
rate: [-1],[0-inf] # -1 reverse / 2 double-speed
List of all Samples
This documentation page is for fast browsing through all samples in SonicPi Version 3.1.0! All flac files have been converted to mp3 to make them easier playable through webbrowsers. Feel free to share this! Direct link to this page:
https://dcts.github.io/coding-notes/linked-mdbooks/sonicpi/book/all-samples.html
Categories
- Drums
- Electric sounds
- Guitar
- Misc
- Percussion
- Ambient
- Bass
- Bass Drums
- Snares
- Loops
- Tabla
- Glitchy Sounds
- Mehackit sounds
Drums
drum_heavy_kick
drum_tom_mid_soft
drum_tom_mid_hard
drum_tom_lo_soft
drum_tom_lo_hard
drum_tom_hi_soft
drum_tom_hi_hard
drum_splash_soft
drum_splash_hard
drum_snare_soft
drum_snare_hard
drum_cymbal_soft
drum_cymbal_hard
drum_cymbal_open
drum_cymbal_closed
drum_cymbal_pedal
drum_bass_soft
drum_bass_hard
drum_cowbell
drum_roll
Electric sounds
elec_triangle
elec_snare
elec_lo_snare
elec_hi_snare
elec_mid_snare
elec_cymbal
elec_soft_kick
elec_filt_snare
elec_fuzz_tom
elec_chime
elec_bong
elec_twang
elec_wood
elec_pop
elec_beep
elec_blip
elec_blip2
elec_ping
elec_bell
elec_flip
elec_tick
elec_hollow_kick
elec_twip
elec_plip
elec_blup
Guitar
guit_harmonics
guit_e_fifths
guit_e_slide
guit_em9
Misc
misc_burp
misc_crow
misc_cineboom
Percussion
perc_bell
perc_bell2
perc_snap
perc_snap2
perc_swash
perc_till
perc_door
perc_impact1
perc_impact2
perc_swoosh
Ambient
ambi_soft_buzz
ambi_swoosh
ambi_drone
ambi_glass_hum
ambi_glass_rub
ambi_haunted_hum
ambi_piano
ambi_lunar_land
ambi_dark_woosh
ambi_choir
ambi_sauna
Bass
bass_hit_c
bass_hard_c
bass_thick_c
bass_trance_c
bass_drop_c
bass_woodsy_c
bass_voxy_c
bass_voxy_hit_c
bass_dnb_f
Bass Drums
bd_pure
bd_808
bd_zum
bd_gas
bd_sone
bd_haus
bd_zome
bd_boom
bd_klub
bd_fat
bd_tek
bd_ada
bd_mehackit
Snares
sn_dub
sn_dolf
sn_zome
sn_generic
Loops
loop_industrial
loop_compus
loop_amen
loop_amen_full
loop_garzul
loop_mika
loop_breakbeat
loop_safari
loop_tabla
loop_3d_printer
loop_drone_g_97
loop_electric
loop_mehackit1
loop_mehackit2
loop_perc1
loop_perc2
loop_weirdo
Tabla
tabla_tas1
tabla_tas2
tabla_tas3
tabla_ke1
tabla_ke2
tabla_ke3
tabla_na
tabla_na_o
tabla_tun1
tabla_tun2
tabla_tun3
tabla_te1
tabla_te2
tabla_te_ne
tabla_te_m
tabla_ghe1
tabla_ghe2
tabla_ghe3
tabla_ghe4
tabla_ghe5
tabla_ghe6
tabla_ghe7
tabla_ghe8
tabla_dhec
tabla_na_s
tabla_re
Vinyl
vinyl_backspin
vinyl_rewind
vinyl_scratch
vinyl_hiss
Glitchy sounds
glitch_bass_g
glitch_perc1
glitch_perc2
glitch_perc3
glitch_perc4
glitch_perc5
glitch_robot1
glitch_robot2
Mehackit sounds
mehackit_phone1
mehackit_phone2
mehackit_phone3
mehackit_phone4
mehackit_robot1
mehackit_robot2
mehackit_robot3
mehackit_robot4
mehackit_robot5
mehackit_robot6
mehackit_robot7
TouchOSC Example
To control SonicPi with TouchOSC, you can run following testexample: