parent
9d9aa20665
commit
caa0e279b7
23 changed files with 244 additions and 77 deletions
@ -1,2 +0,0 @@ |
|||||||
For the moment we can use those two scritps in order to record while writing or just view and listen to the recorded files.. |
|
||||||
A more integrated solution would be better, but I haven't got much time now. |
|
||||||
@ -1,20 +0,0 @@ |
|||||||
#!/bin/bash |
|
||||||
|
|
||||||
record_audio() |
|
||||||
{ |
|
||||||
directory="$HOME/Musica/recordings/" |
|
||||||
|
|
||||||
if ! [ -d "$directory" ]; |
|
||||||
then |
|
||||||
mkdir "$directory" |
|
||||||
fi |
|
||||||
|
|
||||||
xournalpp-ts -f $directory $1 |
|
||||||
} |
|
||||||
|
|
||||||
main() |
|
||||||
{ |
|
||||||
record_audio $1 |
|
||||||
} |
|
||||||
|
|
||||||
main "$@" |
|
||||||
@ -1,44 +0,0 @@ |
|||||||
#!/bin/bash |
|
||||||
|
|
||||||
#!/bin/bash |
|
||||||
# Author: Serg Kolo |
|
||||||
# Date: Dec 1, 2016 |
|
||||||
# Purpose: simple script for recording audio with arecord |
|
||||||
# Written for: https://askubuntu.com/q/855893/295286 |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
record_audio() |
|
||||||
{ |
|
||||||
# Set up some variables to control arecord here |
|
||||||
# Please remember to quote the variables |
|
||||||
# and pay attention to slashes in file paths |
|
||||||
|
|
||||||
filetype="wav" |
|
||||||
filename="record_$(date +%H_%M_%m_%d_%Y)" |
|
||||||
directory="$HOME/Musica/recordings/" |
|
||||||
|
|
||||||
if ! [ -d "$directory" ]; |
|
||||||
then |
|
||||||
mkdir "$directory" |
|
||||||
fi |
|
||||||
|
|
||||||
# This part will initiate recording of timestamped |
|
||||||
# please see arecord's man page for other options |
|
||||||
notify-send "Recording started" |
|
||||||
exec arecord -f cd -d 3600 -t wav |lame --preset 56 -mm - "$directory""$filename".mp3 & |
|
||||||
xournalpp-ts -a $filename.mp3 -f $directory $1 |
|
||||||
pkill -f "arecord" && notify-send "Recording stopped" |
|
||||||
} |
|
||||||
|
|
||||||
main() |
|
||||||
{ |
|
||||||
# if pgrep -f "arecord" ; |
|
||||||
# then |
|
||||||
# pkill -f "arecord" && notify-send "Recording stopped" |
|
||||||
# else |
|
||||||
record_audio $1 |
|
||||||
# fi |
|
||||||
} |
|
||||||
|
|
||||||
main "$@" |
|
||||||
@ -0,0 +1,23 @@ |
|||||||
|
#!/bin/bash |
||||||
|
|
||||||
|
filetype="wav" |
||||||
|
#filename="record_$(date +%H_%M_%m_%d_%Y)" |
||||||
|
directory="$HOME/Musica/recordings/" |
||||||
|
|
||||||
|
if ! [ -d "$directory" ]; |
||||||
|
then |
||||||
|
mkdir "$directory" |
||||||
|
fi |
||||||
|
|
||||||
|
if [[ $1 == "start" ]] && [[ $# -eq 2 ]] |
||||||
|
then |
||||||
|
filename=$2 |
||||||
|
notify-send "Recording started" |
||||||
|
amixer sset 'Capture' 35% |
||||||
|
exec arecord -f cd -d 3600 -t wav |lame --preset 56 -mm - "$directory""$filename" & |
||||||
|
elif [[ $1 == "stop" ]] |
||||||
|
then |
||||||
|
pkill -f "arecord" && notify-send "Recording stopped" |
||||||
|
fi |
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,3 @@ |
|||||||
|
#!/bin/bash |
||||||
|
|
||||||
|
xournalpp -f /home/morro/Musica/recordings/ |
||||||
|
After Width: | Height: | Size: 8.8 KiB |
|
After Width: | Height: | Size: 320 B |
|
After Width: | Height: | Size: 347 B |
Loading…
Reference in new issue