No Log indication of init.rb running... should there be?

I’ve put a patch into my init.rb file which responds to inputs on a Pi 4’s GPIO and loops associated samples from a directory on the Pi’s desktop. The messages are coming up as cues, so OSC communication is all fine, but there’s no indication in the Log that samples are being loaded, and the scope shows a frozen waveform, so it doesn’t look like anything is playing.

When I hit stop, and then run again (the code in the buffer is the same as what’s in the init.rb), messages appear in the Log specifying which sample has been loaded and so on, and I also get a moving waveform in scope. Is this normal/expected behaviour, due to the Log being cleared when I click stop? I am having issues with a HifiBerry Amp2 not playing any sound, so this is just the first stage of debugging for me, unfortunately.

I’m running SP 3.2.2 and the whole thing has worked in the past, for some reason when I handed it over to the client it just gave up.

Interesting. I can confirm that this also happens on v3.3.1, as seen on my macbook.
(I placed the following in my init file):

sleep 20
sample :loop_amen_full

I can hear the sample play as Sonic Pi starts up, but as you say, there are no corresponding log messages, and the scope is inactive during this time.

This feels like it is a bug to me (or at the very least, a missing feature). @samaaron - thoughts?

Interesting. I don’t think I’ve ever considered playing sounds from the init.rb file. The intention for that was purely to allow people to put some default functions in there to be able to use from their scripts.

I’m pretty sure I also silenced the log output so that it didn’t pollute the log files every time you booted. Would likely be something we could change with a preference somewhere if someone was interested in looking into this.

Hi @samaaron, I was just going by the tips I found in this thread, as it’s a standalone installation which I just want to run every time the Pi is switched on.