I don’t understand what you mean by ‘space’?
move and rename your sample test.aif
for the path and the name file don’t include space (my english is not perfect i’m french)
by the way aiff with 2 f or 1f ?
just try this code into another buffer
hi_hats = "/Users/samhumphreys/test.aif"
sample hi_hats
edit : in the doc, there is no space in the path to the file
https://sonic-pi.net/tutorial.html#section-3-6
I still don’t understand what you mean.
it is aif with one f
you see your path, the path is the way for your computer to reach your sample ok ?
no space in the path here
hi_hats = "/Users/samhumphreys/test.aif"
spaces in this path
hi_hats = "/Users/samhumphreys/Library/Mobile Documents/com~apple~CloudDocs/2020/2021/Te Kura/Music/Sonic Pi/Hi hat loop for Sonic Pi.aif"
in the name folder and in the filename.
is it more clear ?
like this?
/Users/samhumphreys/Desktop/bouncedLoops/808-loop-for-Sonic-Pi.aif
yep that’s it
so does it work ?
no, it doesn’t work.
Runtime Error: [workspace_zero] - Exception
Thread death!
File '/Users/samhumphreys/Desktop/bouncedLoops/808-loop-for-Sonic-Pi.aif' could not be opened: System error : Operation not permitted.
/Applications/Sonic Pi.app/Contents/Resources/app/server/ruby/lib/sonicpi/lazybuffer.rb:67:in `block in wait_for_prom'
/Applications/Sonic Pi.app/Contents/Resources/app/server/ruby/lib/sonicpi/lazybuffer.rb:63:in `synchronize'
/Applications/Sonic Pi.app/Contents/Resources/app/server/ruby/lib/sonicpi/lazybuffer.rb:63:in `wait_for_prom'
/Applications/Sonic Pi.app/Contents/Resources/app/server/ruby/lib/sonicpi/lazybuffer.rb:31:in `num_chans'
/Applications/Sonic Pi.app/Contents/Resources/app/server/ruby/lib/sonicpi/samplebuffer.rb:39:in `num_chans'
/Applications/Sonic Pi.app/Contents/Resources/app/server/ruby/lib/sonicpi/lang/sound.rb:3413:in `trigger_sampler'
/Applications/Sonic Pi.app/Contents/Resources/app/server/ruby/lib/sonicpi/lang/sound.rb:2490:in `block in sample'
/Applications/Sonic Pi.app/Contents/Resources/app/server/ruby/lib/sonicpi/runtime.rb:1093:in `block (2 levels) in __in_thread'
just try simple
s = " /Users/samhumphreys/Desktop/bouncedLoops/808-loop-for-Sonic-Pi.aif"
sample s
‘space’ refers to a blank/empty character inside a string. String with spaces:
"This is a string with a lot of spaces"
String without spaces:
"Thisisastringwithaallspacesremoved"
s = "/Users/samhumphreys/Desktop/bouncedLoops/808-loop-for-Sonic-Pi.aif"
sample s
didn’t work
you put only these two lines into another empty buffer ?
If yes maybe use \ instead /, you are on mac ?
yes, I put it in an empty buffer.
I am on Mac, ill try do \ instead of /
returned this:
{run: 5, time: 0.0}
└─ sample ["Users amhumphreysDesktop\bouncedLoops808-loop-for-Sonic-Pi.aif"]
- no match found, skipping.
There are leading spaces in this string:
" /Users/samhumphreys/Desktop/bouncedLoops/808-loop-for-Sonic-Pi.aif"
Remove the leading spaces.
Can you access the file with another program using this path?
still returned this
Runtime Error: [workspace_zero] - Exception
Thread death!
File '/Users/samhumphreys/Desktop/bouncedLoops/808-loop-for-Sonic-Pi.aif' could not be opened: System error : Operation not permitted.
/Applications/Sonic Pi.app/Contents/Resources/app/server/ruby/lib/sonicpi/lazybuffer.rb:67:in `block in wait_for_prom'
/Applications/Sonic Pi.app/Contents/Resources/app/server/ruby/lib/sonicpi/lazybuffer.rb:63:in `synchronize'
/Applications/Sonic Pi.app/Contents/Resources/app/server/ruby/lib/sonicpi/lazybuffer.rb:63:in `wait_for_prom'
/Applications/Sonic Pi.app/Contents/Resources/app/server/ruby/lib/sonicpi/lazybuffer.rb:31:in `num_chans'
/Applications/Sonic Pi.app/Contents/Resources/app/server/ruby/lib/sonicpi/samplebuffer.rb:39:in `num_chans'
/Applications/Sonic Pi.app/Contents/Resources/app/server/ruby/lib/sonicpi/lang/sound.rb:3413:in `trigger_sampler'
/Applications/Sonic Pi.app/Contents/Resources/app/server/ruby/lib/sonicpi/lang/sound.rb:2490:in `block in sample'
/Applications/Sonic Pi.app/Contents/Resources/app/server/ruby/lib/sonicpi/runtime.rb:1093:in `block (2 levels) in __in_thread'
what other program can I use?
a music player program?
I try with Logic Pro