ford posted Sep 28 '19, 06:37:
Hello,
I am setting up my SamplerBox, and I have really appreciated all of the helpful information on this forum. I manually installed the SamplerBox software on a RBP2 running the latest version of Debian (with desktop). The SB software works great so far, but like forum members Ayskura, Simon, and aamm did in an earlier post (post 314) I wanted to have samplerbox.py run automatically after booting up the RBP to a full OS. The rc.local method did not work for me, so I setup a systemd service which works fine but with one problem: on boot, the systemd service launches samplerbox.py and the audio works but there is no text output to the console that is normally there when launching samplerbox.py ("Opened audio device #0, Opened MIDI, preset loaded", etc.) I would like this output to still display visually in the console on boot, in the case that I am running SB headless and need to troubleshoot by hooking up to a display.
1) Is there a better way to have the SamplerBox scripts autorun at startup while still running a full OS?
2) Is there a way to successfully print the output of samplerbox.py to the console at startup?
The systemd unit file for the startup service contains the following:
[Unit]
Description=Starts SamplerBox
After=multi-user.target
[Service]
ExecStart=/home/pi/SamplerBox/SBstarter1.sh #bash file that runs setup.py build_ext --inplace
ExecStartPost=/home/pi/SamplerBox/samplerbox.py #runs samplerbox.py after setup.py runs
Working Directory =/home/pi/SamplerBox
StandardOutput=journal+console
[Install]
WantedBy=multi-user.target
The "SBstarter1.sh" bash file above contains the following:
#!/bin/bash
cd /home/pi/SamplerBox ; python /home/pi/SamplerBox/setup.py build_ext --inplace
Thanks!
HansEhv posted Sep 29 '19, 03:09:
No clue what you want to achieve.
If you run samplerbox as a script, you need a powerfull computer. If you run it on a raspberry, you need to get rid of the overhead of the full OS, in order to avoid latency and other timing/syncing issues.
But it's DIY, make what you want..
Ford posted Sep 29 '19, 18:37:
Hi Hans,
Thanks for your reply. I was trying to achieve the same thing as Ayskura, Simon, and aamm did in an earlier post (post 314). They used rc.local to auto start samplerbox.py on boot, but that did not work for me so I was trying to use a systemd service file instead. Did I read that post wrong? Was Ayskura not booting a full OS with samplerbox? I'm new to RBP, linux, and SamplerBox so sorry for any confusion. I was trying to boot SamplerBox this way (with a full OS and GUI) until I have an LCD display hooked up to my RBP in order to troubleshoot any problems with setting up my whole SamplerBox build.
Thanks,
Ford posted Sep 29 '19, 19:35:
Hi Hans,
Thanks for your reply. I was trying to achieve the same thing as Ayskura, Simon, and aamm did in an earlier post (post 314). They used rc.local to auto start samplerbox.py on boot, but that did not work for me so I was trying to use a systemd service file instead. Did I read that post wrong? Was Ayskura not booting a full OS with samplerbox? I'm new to RBP, linux, and SamplerBox so sorry for any confusion. I was trying to boot SamplerBox this way (with a full OS and GUI) until I have an LCD display hooked up to my RBP in order to troubleshoot any problems with setting up my whole SamplerBox build.
Thanks,
Ford posted Sep 29 '19, 20:00:
Hi there,
Sorry again for double posting by accident. I'm going to mount the recommended SB image directly to the SD card, and try a sample partition according to the instructions on Hans' site. Consider this issue resolved. Thanks!
HansEhv posted Sep 29 '19, 22:00:
Hi Ford,
I read that post the same way, I assume they run on full OS.
This doesn't contradict. I've read a lot of posts in this forum regarding latency I cannot reproduce / explain, unless these observations are from running scripts on machines running other demanding tasks. For what this conclusion is worth....there is so much I can't explain :-)
What I can say: I run it on full OS too when developing and there I encounter latency and other timing/syncing issues that disappear when code is ported to the dedicated box.