Skip to content

Latest commit

 

History

History
124 lines (102 loc) · 2.31 KB

cheatsheet.md

File metadata and controls

124 lines (102 loc) · 2.31 KB

Sonic Pi instructions cheat sheet

## ###
CDEFGAB
use_synth(SAW)  # instruments
sample(LOOP_AMEN_FULL)  # play an already made sample
play(64)    # plays E4 (Mi)
play(64.44)  # a note between 64 and 65
play(E4)    # plays E4
play(Db4)   # plays Re flat
play(D4)    # plays Re
play(Ds4)   # plays Re sharp
sleep(1)    # sleep for one beat

Play defaults

  • amp for amplification
  • pan for stereo left (-1) or right (1)
  • release is the time for the note to fade out
  • attack is the time for the note to fade in
  • sustain is the time for the note to maintain in full amplitude
play(C4, amp=1, pan=0, release=1, attack=0, sustain=0)

More play defaults

  • decay is the time to go from attack level to sustain level
  • attack_level default 1 (to implement)
  • decay_level default is sustain_level (to implement)
  • sustain_level is the level of the sustain

This is called the ADSR:

  1. attack - time from 0 amplitude to the attack_level,
  2. decay - time to move amplitude from attack_level to decay_level,
  3. sustain - time to move the amplitude from decay_level to sustain_level,
  4. release - time to move amplitude from sustain_level to 0
play(C4, decay=0, sustain_level=1)

Sample defaults

  • amp
  • pan
  • rate the more the fastest, minus for backwards
  • attack fade in at the beginning in seconds
  • release fade out in the end in seconds
  • sustain default is magically except explicitly asked in seconds
  • start in percentage
  • finish in percentage
sample(LOOP_AMEN_FULL, rate=1)
sample('/home/pere/my-sound.wav')  # wav, aiff or flac

Discovering new samples

  • ambi
  • bass
  • elec
  • perc
  • guit
  • drum
  • misc
  • bd

Discovering FX

  • band_eq
  • bitcrusher
  • bpf
  • compressor
  • distortion
  • echo
  • flanger
  • gverb
  • hpf
  • ixi_techno
  • krush
  • level
  • lpf
  • mono
  • nhpf
  • nlpf
  • normaliser
  • nrbpf
  • 0nrhpf
  • nrlpf
  • octaver
  • pan
  • panslicer
  • pitch_shift
  • rbpf
  • reverb
  • rhpf
  • ring_mod
  • rlpf
  • slicer
  • tanh
  • vowel
  • whammy
  • wobble

a simple approach to communicate with Sonic Pi

synthServer.run('play 60')
synthServer.run("with_fx :echo do\nplay 64\nend")