#!/bin/sh # a1-music - generate music and send it to the speaker # Copyright (C) 2009 Joost van Baal # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # NEWS # friday 2009-07-31: development started # 2010-02-05: development stopped (?) # TODO # reimplement in c++ as lv2core-application. lv2 is the ladspa reimplementation. # TODO: get apt-get source alsa-utils , fork speaker-test # SEE ALSO # dj@bruhat:~% mpc clear # dj@bruhat:~% mpc add 'Trentemøller/The_Last_Resort_(2006)/2. Vamp.ogg' # dj@bruhat:~% repeat 20; do mpc stop; mpc play; sleep 2; done # # Very_Best / Hugh 20 eerste paar seconden # Very_Best / 19 (eventueel) # # van 5:35/7:03 tot 5:54/7:03 van # joostvb@hille:~% while sleep 22; do mpc seek 5:32; done # at 5:32: guitar + one two three four # # dj@bruhat:~% mpc clear # dj@bruhat:~% mpc add 'James_Brown/Funky_President_(The_Very_Best_Of_Vol_2)/14-Funky_Drummer.ogg' # while true; do mpc seek 5:34; sleep 19; done # 20.25 na 5:34 beginnen instrumenten # met "one two tree four" # while true; do mpc seek 5:34; sleep 20; done # # # geen beat; wel synths # joostvb@hille:~% mpc clear # joostvb@hille:~% mpc add 'Deadmau5_and_Kaskade/I_Remember_(2008)/02 - Instrumental.flac' # joostvb@hille:~% mpc play # joostvb@hille:~% while true; do mpc seek 4:00; sleep 120; done # # fq=40 tst=sine prd=2 st() { f=${1:-$fq} t=${2:-$tst} p=${3:-$prd} # max 4 extra args a="$4 $5 $6 $7" speaker-test --frequency $f --test $t --nloops 1 --period $p $a >/dev/null } echo --------- func ----- st 20 & st 40 echo --------- 30 80 ----- st 30 & st 80 echo ----- 100 90 ---- st 100 & st 90 echo --------- 200 and 190 ----- st 200 & st 190 echo ---- going down ----- for i in $(seq 200 -10 150) do # speaker-test --frequency $i --test sine --nloops 1 --nperiods 2 --period 1 st $i sine 1 --nperiods 2 done echo --- pink noise --- speaker-test --test pink --nloops 1 >/dev/null & speaker-test --rate 10 --test pink --nloops 1 >/dev/null speaker-test --frequency 50 --test wav --nloops 1 >/dev/null