Help...Thread death? (SOLVED - incorrect audio file encoding)

If you restart Sonic Pi does that fix it?

hey! nah it didnt

also the 808s still aren’t working @Nechoj

What do you get if you type the following into a terminal window:

file /Users/samhumphreys/Desktop/bouncedLoops/SonicPiBass.wav

I’ve since moved the SonicPiBass file to another location, so ill try

file [my_new_location]

instead

and… that’s weird

samhumphreys@MacBook-Pro-2 ~ % file /Users/samhumphreys/Library/Mobile Documents/com~apple~CloudDocs/2020/2021/Te Kura/Music/Sonic Pi/bouncedLoops/SonicPiBass.wav
/Users/samhumphreys/Library/Mobile:         cannot open `/Users/samhumphreys/Library/Mobile' (No such file or directory)
Documents/com~apple~CloudDocs/2020/2021/Te: cannot open `Documents/com~apple~CloudDocs/2020/2021/Te' (No such file or directory)
Kura/Music/Sonic:                           cannot open `Kura/Music/Sonic' (No such file or directory)
Pi/bouncedLoops/SonicPiBass.wav:            cannot open `Pi/bouncedLoops/SonicPiBass.wav' (No such file or directory)

Put your path inside “…” quotes

1 Like

it looks like the spaces are affecting it somehow so I removed them

/Users/samhumphreys/Library/Mobile:                                                        cannot open `/Users/samhumphreys/Library/Mobile' (No such file or directory)
Documents/com~apple~CloudDocs/2020/2021/TeKura/Music/SonicPi/bouncedLoops/SonicPiBass.wav: cannot open `Documents/com~apple~CloudDocs/2020/2021/TeKura/Music/SonicPi/bouncedLoops/SonicPiBass.wav' (No such file or directory)
samhumphreys@MacBook-Pro-2 ~ % 

still didn’t work

what about drag and drop into sonic pi your aif file ?
it should write the good path right ?

that did something!

samhumphreys@MacBook-Pro-2 ~ % file "/Users/samhumphreys/Library/Mobile Documents/com~apple~CloudDocs/2020/2021/TeKura/Music/SonicPi/bouncedLoops/SonicPiBass.wav"
/Users/samhumphreys/Library/Mobile Documents/com~apple~CloudDocs/2020/2021/TeKura/Music/SonicPi/bouncedLoops/SonicPiBass.wav: Audio file with ID3 version 2.2.0, contains:MPEG ADTS, layer III, v1, 160 kbps, 44.1 kHz, JntStereo
samhumphreys@MacBook-Pro-2 ~ %

I tried that already, that didn’t work.

File and path look ok to me.
And still, this one does not work inside Sonic Pi?

no, it doesn’t…

again try to put your sample into a folder without space as Sam said

file /Users/samhumphreys/Desktop/bouncedLoops/SonicPiBass.wav


because you gave us the result for another file

This didn’t work…

To summarize: can you give us the output of a

file <path>

with a sample that works and a second one with the file that does not work?

1 Like

this one works:

samhumphreys@MacBook-Pro-2 ~ % file "/Users/samhumphreys/Library/Mobile Documents/com~apple~CloudDocs/2020/2021/TeKura/Music/SonicPi/bouncedLoops/Hi-hat-loop-for-Sonic-Pi.aif"

/Users/samhumphreys/Library/Mobile Documents/com~apple~CloudDocs/2020/2021/TeKura/Music/SonicPi/bouncedLoops/Hi-hat-loop-for-Sonic-Pi.aif: IFF data, AIFF audio

this one doesn’t work

samhumphreys@MacBook-Pro-2 ~ % file "/Users/samhumphreys/Library/Mobile Documents/com~apple~CloudDocs/2020/2021/TeKura/Music/SonicPi/bouncedLoops/SonicPiBass.wav"
/Users/samhumphreys/Library/Mobile Documents/com~apple~CloudDocs/2020/2021/TeKura/Music/SonicPi/bouncedLoops/SonicPiBass.wav: Audio file with ID3 version 2.2.0, contains:MPEG ADTS, layer III, v1, 160 kbps, 44.1 kHz, JntStereo

The only difference I can see is the codec. If you convert the hi hat to wav, does it still work?

yes it does still work

So we have identical path and identical codec, one works, one doesn’t. And both can be played with another program such as Logic Pro, they both seem to be ok. :cold_face:
@samaaron : Maybe the not working file should run through Sonic Pi’s debugger? Or, any other idea?

1 Like

Sorry, I just flicked through the history and couldn’t quickly see the specific codec that does and doesn’t work. All I could see that there was an issue with a MP3 file which happened to have a .wav extension which I wouldn’t expect to work.

Sonic Pi does not support all sound formats - only free ones. MP3s are not supported. This is a restriction in the sound library libsndfile (mega-nerd.com)