Can't get my local samples to load

Hi, just started fiddling with Sonic Pi, it’s really fun and straightforward to use as a live looper or a sequencer.

I made a little song to check out the capabilities and I wanted to add a voice, so I recorded a small track. But the sample won’t load.

Here are the specifics:

  • The test sample is a 10s FLAC around 450 ko.
  • It plays in VLC / other players without trouble.
  • File.exists? returns true in the script
  • I don’t have a “sample skipped” error
  • I call it throught sample "/file/path"
  • The sample_info is blank #<SampleBuffer @id=9, @num_chans=0, @num_frames=0, @sample_rate=0.0, @duration=NaN>
  • I use sample_free_all at the beginning of the script so I don’t get caching errors

Still nothing though… Am I missing something obvious?

I use Sonic Pi 4.5.0, the Flathub flatpak version, on a Fedora Workstation 38

Fingers crossed it’s just a silly mistake :crossed_fingers:

It could be the format, try converting it to .wav

1 Like

Ok, that was the issue! I was surprised because the inboard help documentation stated that FLAC were allowed. If this isn’t a bug, the doc should be fixed.

Thanks a lot :blush:

Hiya, FLAC is definitely supported in the official releases for Windows and macOS.

However, the Flathub release was not created by us and support for different audio formats will be entirely dependent on how the internal libraries are built (libsnd in particular).

Glad you found a solution though! Happy coding!

Sam

1 Like