Adding own samples: Difference between revisions
From wikiluntti
(Created page with "Sonic Pi can sample any <code>.wav</code> files. <syntaxhighlight> live_loop :kick do sleep 1 sample "/Users/sonicPi/Documents/clap.wav" end </syntaxhighlight>") |
No edit summary |
||
Line 2: | Line 2: | ||
<syntaxhighlight> | <syntaxhighlight> | ||
live_loop : | live_loop :clap do | ||
sleep 1 | sleep 1 | ||
sample "/Users/sonicPi/Documents/clap.wav" | sample "/Users/sonicPi/Documents/clap.wav" | ||
end | |||
</syntaxhighlight> | |||
This is rather difficult, but we can rename it: | |||
<syntaxhighlight> | |||
path = "/Users/sonicPi/Documents/" | |||
live_loop :clap do | |||
sleep 1 | |||
sample path, "clap.wav" | |||
end | end | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 17:59, 12 October 2020
Sonic Pi can sample any .wav
files.
live_loop :clap do
sleep 1
sample "/Users/sonicPi/Documents/clap.wav"
end
This is rather difficult, but we can rename it:
path = "/Users/sonicPi/Documents/"
live_loop :clap do
sleep 1
sample path, "clap.wav"
end