After transcribing the interview with Andi Otto using MHWaveEdit and Kate, I realised I needed to improve the tools I use for this a little bit, to make it easier to pause, playback, and jump back and forth. So I found another software for playing back the files: Parlatype that provides the necessary playback utilities. But then I needed a way to control the interface in a way that would disrupt the typing as little as possible. So I looked for a way to use a MIDI controller, the Akai LPD8, to send the key presses. With xdotool I was able to send the keypresses and I ended up hooking it up to
aseqdump with the script below, which I created with the help of this post. What happens in the script is:
- check which window is parlatype - the title gets the name of the soundfile, so that is passed as an argument to the script
- check which window is my instance of kate, opened in the session with the name
aseqdumpto print out the data from the LPD8
- Filter that data to take different actions on the different notes.
- In each case: switch focus to the parlatype window, send the keypress, switch focus back to kate (where I’m typing)
- The keys mapped are:
- jump back ten seconds
- pause/resume playback
- jump forward ten seconds
- copy the current timestamp to the clipboard
Placing the LPD8 now in front of my keyboard, I have a nice interface for transcribing!
#!/bin/bash echo $1 WID=`xdotool search --name $1 | head -1` WID2=`xdotool search --name mapping_book| head -1` echo $WID aseqdump -p "LPD8" | \ while IFS=" ," read src ev1 ev2 ch label1 data1 label2 data2 rest; do case "$ev1 $ev2 $data1" in "Note on 36" ) xdotool windowfocus $WID; xdotool key ctrl+Left ; xdotool windowfocus $WID2;; "Note on 37" ) xdotool windowfocus $WID; xdotool key ctrl+space ; xdotool windowfocus $WID2;; "Note on 38" ) xdotool windowfocus $WID; xdotool key ctrl+Right ; xdotool windowfocus $WID2;; "Note on 39" ) xdotool windowfocus $WID; xdotool key ctrl+c ; xdotool windowfocus $WID2;; esac done