Skip to content

Instantly share code, notes, and snippets.

@yradunchev
Last active March 28, 2020 06:42
Show Gist options
  • Select an option

  • Save yradunchev/c7a5c6b5b0e889deba65366756e547ea to your computer and use it in GitHub Desktop.

Select an option

Save yradunchev/c7a5c6b5b0e889deba65366756e547ea to your computer and use it in GitHub Desktop.
Arch DAW

Sudoers

pacman -S sudo

Use sed to uncomment the wheel group from sudoers, then hijack the EDITOR variable to copy the modified version back via visudo.

sed 's/# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/g' /etc/sudoers > /etc/sudoers.new
EDITOR="cp /etc/sudoers.new" visudo
rm /etc/sudoers.new

Create a non-root user

useradd -m -g users -G wheel,audio -s /bin/bash usernme
passwd username

At this point logoff and login as user

Install dev tools for AUR

sudo pacman -S --needed base-devel
sudo pacman -S wget cmake git

Install aurget

git clone https://aur.archlinux.org/aurget.git && cd aurget && makepkg -si

Install pro-audio & Reaper & sws

sudo pacman -S pro-audio jack2
aurget -S reaper-bin ffmpeg-libfdk_aac mencoder
git clone https://github.com/reaper-oss/sws.git
cd sws
git checkout next
git submodule update --init
cmake -B build -DCMAKE_BUILD_TYPE=Debug
cmake --build build
ln -s `pwd`\build\reaper_sws-x86_64.so ~/.config/REAPER/UserPlugins/

Install rt kernel (optional)

aurget -S linux-rt linux-rt-lts

WiFi roaming with netctl

sudo systemctl enable [email protected]

ThinkPad T450s

sudo echo "options snd_hda_intel index=1,0" >> /etc/modprobe.d/thinkpad-t450s.conf
sudo pacman -S xf86-input-synaptics

sudo cat << EOF > /etc/X11/xorg.conf.d/50-synaptic.conf
    Section "InputClass"
            Identifier "touchpad"
            Driver "synaptics"
            MatchIsTouchpad "on"
                # Enable clickpad/multitouch support
                Option "ClickPad" "true"
                # Middle-button emulation is not supported
                Option "EmulateMidButtonTime" "0"
                # Define right soft button at the bottom
                Option "SoftButtonAreas"  "50% 0 82% 0 0 0 0 0"
                # Enable Vertical Edge Scroll
                Option "VertEdgeScroll" "on"
                Option "HorizEdgeScroll" "on"
                Option "TapButton1" "1"
                Option "TapButton2" "3"
                Option "TapButton3" "2"
    EndSection
    EOF
# timestamp
output = system.exec_command("qdbus com.github.gkarsay.parlatype /com/github/gkarsay/parlatype com.github.gkarsay.parlatype.GetTimestamp")
keyboard.send_keys(output)
.asoundrc:
pcm.skypeout {
type file;
slave {
pcm "hw:0"
}
file "/home/user/skypeout";
format "raw";
}
restart skype, configure to use skypeout as audio out device.
sox -r 44100 -s -2 -t raw skypeout -t wav foo.wav
#!/bin/bash -
#===============================================================================
#
# FILE: pa2jack.sh
#
# USAGE: ./pa2jack.sh
#
# DESCRIPTION: Create Jack sink for applicaion audio output and move app
# audio from default sink to that new sink
#
# OPTIONS: ---
# REQUIREMENTS: ---
# BUGS: ---
# NOTES: ---
# AUTHOR: Yordan Radunchev (cc), [email protected]
# ORGANIZATION: ---
# CREATED: 2019-11-07 07:34
# REVISION: ---
#===============================================================================
set -o nounset # Treat unset variables as an error
echo -e '\n-------------------------------'
pacmd list-sink-inputs|grep -E '(index|application.name)'
echo '-------------------------------'
while read -rp "Choose recording index: " index
do
if [ "$index" = "exit" ]
then
exit 0
fi
curr_sink=$(pacmd list-sink-inputs|grep -EA 8 "index: $index\b"|grep sink|sed -E 's/.*sink:\s*([0-9]+)\s*.*/\1/')
if echo "$curr_sink"|grep -qE '^[0-9]+$'
then
break
fi
echo 'Invalid index, type exit to quit'
echo '-------------------------------'
pacmd list-sink-inputs|grep -E '(index|application.name)'
done
read -rp "Name the sink: " sinkname
read -rp "Channels: " channels
pactl load-module module-jack-sink sink_name="$sinkname" client_name="$sinkname" connect=yes channels="$channels"
pactl move-sink-input "$index" "$sinkname"
#Play/Pause
"qdbus com.github.gkarsay.parlatype /com/github/gkarsay/parlatype com.github.gkarsay.parlatype.PlayPause"
# m:0x0 + c:56
Control + space
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment