sync 2026-09-23: refresh README, add new scripts
This commit is contained in:
@@ -1,12 +1,23 @@
|
||||
#!/bin/bash
|
||||
NAME=$1
|
||||
if [ $# -eq 0 ]
|
||||
then
|
||||
NAME=recording
|
||||
fi
|
||||
|
||||
(sleep 1; jack_connect SuperCollider:out_1 rec:input_1)&
|
||||
(sleep 1; jack_connect SuperCollider:out_2 rec:input_2)&
|
||||
ffmpeg -f jack -i rec -af "afade=t=in:ss=0:d=5" -strict -1 -y ~/recordings/`date +%s`_$NAME.flac
|
||||
#echo "\\n"
|
||||
#(sleep 0.1; kill -s SIGSTOP `pidof ffmpeg`; read -rsn1 -p "Press any key to start recording"; kill -s SIGCONT `pidof ffmpeg` ; read -rsn1 -p "Any key to stop it"; kill -SIGINT `pidof ffmpeg`)
|
||||
NAME="${1:-recording}"
|
||||
OUT_DIR="$HOME/recordings"
|
||||
|
||||
# Ensure the recordings directory exists
|
||||
mkdir -p "$OUT_DIR"
|
||||
|
||||
# Background routine to poll ports and link them natively via PipeWire
|
||||
(
|
||||
for i in {1..20}; do
|
||||
if pw-link -i | grep -q "rec:input_1" && pw-link -i | grep -q "rec:input_2"; then
|
||||
pw-link SuperCollider:out_1 rec:input_1
|
||||
pw-link SuperCollider:out_2 rec:input_2
|
||||
exit 0
|
||||
fi
|
||||
sleep 0.1
|
||||
done
|
||||
echo "Warning: Timed out waiting for JACK ports." >&2
|
||||
)&
|
||||
|
||||
pw-jack ffmpeg -f jack -i rec -c:a libopus -b:a 256k -af "afade=t=in:ss=0:d=5" -y "$OUT_DIR/$(date +%s)_${NAME}.opus"
|
||||
#FLAC pw-jack ffmpeg -f jack -i rec -af "afade=t=in:ss=0:d=5" -y "$OUT_DIR/$(date +%s)_${NAME}.flac"
|
||||
|
||||
Reference in New Issue
Block a user