AudioVideo - mwicat/personal GitHub Wiki

Record loopback

pavucontrol
audacity
  1. click "record" button

Jack network

  • master: open -a JackPilot
  • slave: jackd -R -d netone
  • master: jack_netsource -H SLAVEIP -n LATENCY_PERIODS

Pitch up and down sample

sox file.wav file_pitch_up_500.wav speed 500c
sox file.wav file_pitch_down_500.wav speed -500c

Reaper batch convert

https://github.com/ReaTeam/Doc/blob/master/REAPER%20command%20line%20parameters.md

convert.txt:

input.wav   output.wav
<CONFIG
  FXCHAIN "fazortan.RfxChain"
>
/Applications/REAPER64.app/Contents/MacOS/REAPER -batchconvert convert.txt

Convert wav to mono mp2 64kbit/s

ffmpeg -i winyl.wav -c:a mp2 -b:a 64k -ac 1 output.wav

Show video info

ffmpeg -i video.mp4

List codecs and formats

ffmpeg -codecs
ffmpeg -formats

Transcode files

ls * | parallel ffmpeg -i {} wav/{.}.wav

ls * | parallel ffmpeg -i {} -b:a 256k mp3/{.}.mp3

Truncate

start at 00:00:30 and get 10 seconds

ffmpeg -i input.wmv -c copy -ss 00:30:00 -t 00:00:10  output.wmv

Normalize audio

audacity

  • Open Audacity
  • File > Edit Chains
  • Add "Normalize"
  • Insert "Normalization"
  • Add "Export" step (otherwise file will not be saved)
  • Ok
  • File > Normalize > Apply to Files

strip silence

sox inputfile.mp3 outputfile.mp3 silence 1 0.1 1%

This example roughly translates to: trim silence (anything less than 1% volume) until we encounter sound lasting more than 0.1 seconds in duration. The output of this command produces the following:

normalize

brew install normalize
normalize --peak *.wav

sox

brew install sox --with-flac --with-lame --with-libao --with-libsndfile --with-libvorbis
sox --norm=-0.1 in.mp3 out.mp3
for f in *.mp3; do sox --norm=-0.1 "$f" "${f%%.mp3}-norm.mp3"; done
for f in *-norm.mp3; do mv "$f" "${f%%-norm.mp3}.mp3"; done
for f in *.wav; do sox --norm=-0.1 "$f" "${f%%.wav}-norm.wav"; done
for f in *-norm.wav; do mv "$f" "${f%%-norm.wav}.wav"; done

mp3

sudo apt-get install ffmpeg python-pip
pip install ffmpeg-normalize
ffmpeg-normalize file.mp3

Split cue/flac

brew install cuetools flac ffmpeg shntool

sudo apt-get install cuetools shntool

shnsplit -t %n-%t -o flac -f file.cue file.flac

osx: https://sourceforge.net/projects/xld/files/latest/download?source=typ_redirect

Show audio info

soxi yourfile.wav

mac

afinfo *

Guess file format

http://www.headbands.com/gspot/v26x/GSpot270a.zip

Convert flstudio ogg-wav to ogg

def conv(fn): d = open(fn, 'rb').read(); open(fn.replace('wav', 'ogg'), 'wb').write(d[d.find('OggS'):])

Disable pulseaudio

Edit /etc/pulse/client.conf:

autospawn = no

pkill pulseaudio

Alsa recording

alsamixer <F4>
Capture <SPC>

Sox mp3 conversion

sudo apt-get install libsox-fmt-mp3

Loopback

modprobe snd-aloop

Logic IR

/Library/Audio/Impulse Responses/Apple
⚠️ **GitHub.com Fallback** ⚠️