Posts

Showing posts from August, 2011

How to slow down a guitar solo with free software on Ubuntu Linux

Image
In my spare time, I like to play guitar. I also enjoy learning guitar solos the "hard way" - by working out the notes, slurs, slides, bends, taps, mutes and harmonics by ear. However, some solos -- no matter how many times you listen to them -- are just too fast to "reverse engineer" as your brain just isn't able to distinguish between individual notes. If you simply slow down the solo, you'll be able to hear the individual notes, but you'll be changing the pitch of the notes such that a C 4 or " middle C " might sound like a B 4 . That's not much help as the music will sound different. What we need is a way to slow down the notes, but retain their original pitch. Since I run Ubuntu Linux , I have access to a true "Embarrassment of Riches" when it comes to free and high quality music software. This post outlines some of the methods I've found to slow down guitar solos using different tools. So, if you're wanting t...

Diff two files ignoring certain fields (like timestamps)

This is a useful trick to avoid creating lots of intermediate temporary files when you're trying to compare two files that are almost the same, but which have some fields which are guaranteed to be different. Classic examples of this are two log files that have almost the same data in them, but where every line in these files is prefixed by a pesky timestamp which is different between the two files. bash process substitution (using named pipes) to the rescue! Let's assume we have two files " file1.log " and " file2.log " and the first six space-separated fields comprise a timestamp. To ignore those fields and just diff the log file contents we can do this: $ diff <(cut -d" " -f7- /tmp/file1.log) <(cut -d" " -f7- /tmp/file2.log) But why limit yourself to a textual diff. Go graphical if you prefer: $ meld <(cut -d" " -f7- /tmp/file1.log) <(cut -d" " -f7- /tmp/file2.log) This technique can be employed ...

how to use bash lists to time a group of commands

How do you run multiple commands in bash and calculate the total time taken to run all the commands? Use a list by surrounding the commands with curly braces: time { sleep 2; uptime; true && date; } The tricky bit is remembering to add that last semi-colon - without it, the command will fail to be parsed by bash. Also, the spaces either side of the curly braces are mandatory.

Starting terminals in tmux in particular directories

I've found a way to tweak my ~/.tmux.conf to create a terminals in particular directories: # start a window in $HOME/foo and call it "bar" set-option default-path "$HOME/foo" neww -n bar # another terminal in a different directory set-option default-path "/var/cache/weird" neww -n weird # revert to default for any further windows set-option default-path "$HOME"

quick terminal reset

Amazing how many people don't know this skool technique to reset a corrupted terminal: ^jstty sane^j Note - you don't press return/enter at all and those are CONTROL+j combos at either end.