Compare commits
No commits in common. "8981111193d868d9363921e1a8bc9452e9b4823a" and "89f8a74f347daa26f97c45a5204a317e390de8a4" have entirely different histories.
8981111193
...
89f8a74f34
6 changed files with 36 additions and 48 deletions
|
@ -1,8 +1,8 @@
|
||||||
1. Execute the `prepare-image.sh [image]` script as `root` where `[image]` is the url to raspiOS.
|
1. Execute the `prepare-image.sh [image]` script as `root` where `[image]` is the url to raspiOS.
|
||||||
|
|
||||||
2. Flash the `vcpi.img` to SD card. You can use Rpi Imager to set additional settings like wifi.
|
2. Flash the `vcpi.img.xz` with for example Balena Etcher to a SD Card
|
||||||
|
|
||||||
3. Boot Rpi on DHCP enabled network. The boot script should run `setup.sh` on first boot and reboot the system when its done.
|
3. Boot Rpi on DHCP enabled network. The boot script should run `setup.sh` on first boot.
|
||||||
|
|
||||||
4. Login using user: `pi` pass: `vcpi`
|
4. Login using user: `pi` pass: `vcpi`
|
||||||
|
|
||||||
|
|
|
@ -1,28 +0,0 @@
|
||||||
#N canvas 619 34 526 667 12;
|
|
||||||
#X obj 113 129 osc~ 440;
|
|
||||||
#X obj 113 188 dac~;
|
|
||||||
#X obj 113 158 *~ 0.05;
|
|
||||||
#X text 152 13 MAKING A SINE WAVE;
|
|
||||||
#X text 42 226 Audio computation can be turned on and off by sending messages to the global "pd" object as follows:, f 56;
|
|
||||||
#X msg 108 277 \; pd dsp 1;
|
|
||||||
#X msg 212 277 \; pd dsp 0;
|
|
||||||
#X text 123 314 ON;
|
|
||||||
#X text 232 314 OFF;
|
|
||||||
#X text 39 353 You should see the Pd window change to reflect whether audio is on or off. You can also turn audio on and off using the "audio" menu \, but the buttons are provided as a shortcut.;
|
|
||||||
#X text 40 405 When DSP is on \, you should hear a tone whose pitch is A 440 and whose amplitude is 0.05. If instead you are greeted with silence \, you might want to read the HTML documentation on setting up audio.;
|
|
||||||
#X text 40 471 In general when you start a work session with Pd \, you will want to choose "test audio and MIDI" from the help window \, which opens a more comprehensive test patch than this one., f 60;
|
|
||||||
#X text 246 44 Audio computation in Pd is done using "tilde objects" such as the three below. They use continuous audio streams to intercommunicate \, as well as communicating with other ("control") Pd objects using messages.;
|
|
||||||
#X text 296 285 <= click these;
|
|
||||||
#X text 155 188 <=== send to the audio output device;
|
|
||||||
#X text 183 157 <= reduce amplitude to 0.05;
|
|
||||||
#X text 183 128 <= 440 Hz. sine wave at full blast;
|
|
||||||
#X obj 309 545 ../5.reference/set-dsp-tgl;
|
|
||||||
#X text 310 524 DSP on/off;
|
|
||||||
#X msg 309 582 \; pd dsp \$1;
|
|
||||||
#X text 291 635 updated for Pd version 0.54;
|
|
||||||
#X text 345 549 <-- open abstraction;
|
|
||||||
#X text 24 541 These examples also use a helper abstraction from the documentation help files of Pd. Check it to the right and see how the toggle shows the DSP state., f 35;
|
|
||||||
#X obj 42 45 abl_link~;
|
|
||||||
#X connect 0 0 2 0;
|
|
||||||
#X connect 2 0 1 0;
|
|
||||||
#X connect 17 0 19 0;
|
|
20
patch/init.rb
Normal file
20
patch/init.rb
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
# Coded by Sam Aaron
|
||||||
|
|
||||||
|
load_samples(sample_names :ambi)
|
||||||
|
sleep 2
|
||||||
|
|
||||||
|
with_fx :reverb, mix: 0.8 do
|
||||||
|
live_loop :foo do
|
||||||
|
# try changing the sp_ vars..
|
||||||
|
sp_name = choose sample_names :ambi
|
||||||
|
# sp_name = choose sample_names :drum
|
||||||
|
sp_time = [1, 2].choose
|
||||||
|
#sp_time = 0.5
|
||||||
|
sp_rate = 1
|
||||||
|
#sp_rate = 4
|
||||||
|
|
||||||
|
s = sample sp_name, cutoff: rrand(70, 130), rate: sp_rate * choose([0.5, 1]), pan: rrand(-1, 1), pan_slide: sp_time
|
||||||
|
control s, pan: rrand(-1, 1)
|
||||||
|
sleep sp_time
|
||||||
|
end
|
||||||
|
end
|
|
@ -46,7 +46,7 @@ ln -v -s /lib/systemd/system/payload.service /tmp/rpi-img/etc/systemd/system/gra
|
||||||
|
|
||||||
#provision project files
|
#provision project files
|
||||||
cp -v ./src/setup.sh /tmp/rpi-img/root/setup.sh
|
cp -v ./src/setup.sh /tmp/rpi-img/root/setup.sh
|
||||||
cp -v ./patch/init.pd /tmp/rpi-img/root/init.pd
|
cp -v ./patch/init.rb /tmp/rpi-img/root/init.rb
|
||||||
|
|
||||||
echo "] press enter to write the image"
|
echo "] press enter to write the image"
|
||||||
read
|
read
|
||||||
|
|
|
@ -6,8 +6,8 @@ Environment=DISPLAY=:0
|
||||||
Environment=XAUTHORITY=/home/pi/.Xauthority
|
Environment=XAUTHORITY=/home/pi/.Xauthority
|
||||||
User=pi
|
User=pi
|
||||||
Group=pi
|
Group=pi
|
||||||
ExecStartPre=/bin/sleep 30
|
ExecStartPre=/bin/sleep 60
|
||||||
ExecStart/usr/bin/plugdata /home/pi/init.pd
|
ExecStart=/opt/sonic-pi/bin/sonic-pi
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=10s
|
RestartSec=10s
|
||||||
KillMode=process
|
KillMode=process
|
||||||
|
|
26
src/setup.sh
26
src/setup.sh
|
@ -1,18 +1,16 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# set opensuse raspbian repo for plugdata
|
|
||||||
echo 'deb http://download.opensuse.org/repositories/home:/plugdata/Raspbian_12/ /' | tee /etc/apt/sources.list.d/home:plugdata.list
|
|
||||||
curl -fsSL https://download.opensuse.org/repositories/home:plugdata/Raspbian_12/Release.key | gpg --dearmor | tee /etc/apt/trusted.gpg.d/home_plugdata.gpg > /dev/null
|
|
||||||
|
|
||||||
# upgrade system
|
# upgrade system
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get upgrade -y
|
apt-get upgrade -y --autoremove
|
||||||
|
|
||||||
# setup apps
|
# setup apps
|
||||||
apt-get install htop wget curl -y
|
apt-get install htop wget -y
|
||||||
|
|
||||||
# setup plugdata
|
# setup sonic-pi
|
||||||
apt-get install plugdata
|
wget https://sonic-pi.net/files/releases/v4.6.0/sonic-pi_4.6.0_1_bookworm.arm64.deb
|
||||||
|
dpkg -i sonic-pi_4.6.0_1_bookworm.arm64.deb
|
||||||
|
apt-get --fix-broken install -y
|
||||||
|
|
||||||
# setup udev
|
# setup udev
|
||||||
echo "SUBSYSTEM==\"usb\", ENV{DEVTYPE}==\"usb_device\", MODE=\"0666\"" > /etc/udev/rules.d/50-udev-default.rules
|
echo "SUBSYSTEM==\"usb\", ENV{DEVTYPE}==\"usb_device\", MODE=\"0666\"" > /etc/udev/rules.d/50-udev-default.rules
|
||||||
|
@ -23,16 +21,14 @@ ufw allow ssh
|
||||||
ufw enable
|
ufw enable
|
||||||
|
|
||||||
# deploy patch
|
# deploy patch
|
||||||
mkdir -vp /home/pi/
|
mkdir -vp /home/pi/.sonic-pi/config/
|
||||||
mv -v /root/init.pd /home/pi/init.pd
|
mv -v /root/init.rb /home/pi/.sonic-pi/config/init.rb
|
||||||
chown pi:pi /home/pi/init.pd
|
chown -R pi:pi /home/pi/.sonic-pi
|
||||||
|
chown -R pi:pi /home/pi/.sonic-pi/config
|
||||||
|
|
||||||
# cleanup
|
# cleanup
|
||||||
mv /root/setup.sh /root/setup.sh.done
|
mv /root/setup.sh /root/setup.sh.done
|
||||||
chmod -x /root/setup.sh.done
|
chmod -x /root/setup.sh.done
|
||||||
|
|
||||||
echo "done :)"
|
echo "done :)"
|
||||||
|
|
||||||
# reboot and exit
|
|
||||||
reboot
|
|
||||||
exit 0
|
exit 0
|
Loading…
Add table
Reference in a new issue