Skip to content

Instantly share code, notes, and snippets.

View TomScotch's full-sized avatar

Thomas TomScotch

  • Germany Düsseldorf NRW
View GitHub Profile
@TomScotch
TomScotch / split-spleeter-join.sh
Created December 15, 2019 02:56
use spleeter to extract music , this script chops down your file before extraction and joins the wav files
f=$(ls -r $1/*/drums.wav) ; shntool join $f ; mv joined.wav $1/drums.wav
f=$(ls -r $1/*/vocals.wav) ; shntool join $f ; mv joined.wav $1/vocals.wav
f=$(ls -r $1/*/bass.wav) ; shntool join $f ; mv joined.wav $1/bass.wav
f=$(ls -r $1/*/other.wav) ; shntool join $f ; mv joined.wav $1/other.wav
for x in $( ls -1 $1/*.mp3 ) ; do spleeter separate -i $x -o $1 -p spleeter:4stems ; done
mkdir $2 ; ffmpeg -i $1 -f segment -segment_time 60 -c copy $2/%03d.mp3
@TomScotch
TomScotch / pulseaudio-compressor
Created September 3, 2017 21:45
audio compressor
sudo aptitude install rlwrap swh-plugins ;
rlwrap pacmd ;
load-module module-ladspa-sink sink_name=ladspa_out plugin=mbeq_1197 label=mbeq control=11.621622,10,4.594594,2.702703,0,0,-1.621622,-0.270270,-5.405406,-3.513514,-8.648648,-5.675676,-4.054054,1.351351,9.189189 ;
load-module module-ladspa-sink sink_name=sc4m plugin=sc4m_1916 label=sc4m control=1,1.5,401,-30,20,5,12 ;
set-default-sink sc4m ;
@TomScotch
TomScotch / lotto.cpp
Last active March 16, 2017 01:55
g++ lotto.cpp -o lotto && chmod +x lotto && ./lotto
#include <iostream> // input output c standard
#include <string> // leichterer umgang mit namen als strings
#include <cstdlib> // enthaelt random
using namespace std; // leichter als immer std:: zu schreiben
int pot = 100;
int max_user = 100 ; // maximum user anzahl
int max_tip = 45 ; // maximale tip groesse
int anzahl ; // einzugebende anzahl der user
@TomScotch
TomScotch / ffrec_x11.sh
Created October 6, 2016 21:53
record x11 with ffmpeg
ffmpeg -video_size 1024x768 -framerate 25 -f x11grab -i :0.0+100,200 output.mp4
@TomScotch
TomScotch / ffrec.sh
Created October 6, 2016 21:51
record framebuffer with ffmpeg
ffmpeg -f fbdev -i /dev/fb0 -r 24 -c:v libx264 -b:v 500k output.avi
@TomScotch
TomScotch / git_create_repo.sh
Created September 26, 2016 23:25
create repo and push local
curl -u 'tomscotch' https://api.github.com/user/repos -d '{"name":"projectname",$ARGV[1]:"atomatically generated"}'
git remote add origin tomscotch@github.com:tomscotch/$ARGV[1].git
git push origin master