linux

pysshbackup

I’ve always been very serious about data safety. I’ve lost data more than once, and so when I moved into the linux world I searched high and low for a backup system that would suit me. At the time, not many options existed, but one that stood out was the rsync + cp with hard links.
To sum up the idea, you make a copy of all the files on your hard drive to a backup system (another computer with a large attached hard drive), then when you want to update the backup, you copy the backup using hard links and then backup only the files that have changed since the previous backup (think snapshots). Let me explain hardlinks.
In linux there are symbolic links and hardlinks. Symbolic links are like most other OSes links… If you have a file and make a symbolic link, if you delete the link the file still exists, if you delete the original file, the link no longer works (its target is missing).
Hardlinks is a way for two (or more) files to ‘point’ to the same data. If I have a file and make a hard link, if I delete the link the file remains, if I delete the file the link still works… the actual file will exist as long as one hardlink points to it, when the last hardlink is removed, the space is regained and the data is released.
Using nothing more than a couple of command line utilities, one can have the most sophisticated incremental backups (like Apple’s time machine, just around for 15-20 years before time machine ever existed): rsync (makes copies of files that have changed), ssh (allows this to work over a network or the internet) and ‘cp -l’ (which makes hardlink copies of files).
I wanted a way to make this a little more automated, idiot proof if you wish, so I wrote a python program called pysshbackup. I’ve been using this program on my systems for some years and it works really well. It is command line only, it has a light menu system (similar to fdisk), and settings are stored in a xml file.
I recently uploaded the code to my github account in case anyone thinks this may be up their alley as well.
As always, because I am part of the open source software community who has given me all the tools I used to create the script, this is open source as well, GPL version2.
The program can be found here: https://github.com/eugenecormier/pysshbackup
I’m not sure if this is useful to anyone, but in the spirit of openness: have at it!
~Eugene

The original information I was using can be found here (last updated 2004!, still relevent): http://www.mikerubel.org/computers/rsync_snapshots/

guitar

Classical Guitar News

I’m quite busy practicing these days and I have a couple of exciting projects to share with you:

1. I’ve been working with our school’s composition/flute prof, Derek Charke, putting together a concert of Classical Guitar and Flute music. So far we’ve chosen to perform a set of pieces by Celso Machado, Histoire du Tango by Piazzolla, and I’m working on my continuo chops on Bach’s Flute Sonata (BWV 1034). Should be a really great concert! (I’m always amazed at the guitar writing of Piazzolla, for a non guitarist he sure knew how to toe the line of unplayable without going over!!)

2. I’m preparing two pieces of Shawn Bell, Currents I & II, for recording. I performed Currents II many years ago and loved the piece so it’s nice to revisit it with a bit more wisdom. It’s my first time working on Currents I and I have to say that this is another of Shawn’s gems! It shares similar rhytmic pulses and harmony with Currents II, but has a very different feel overall. You can now purchase Shawn’s pieces from D’Oz for the first time here:
http://www.productionsdoz.com/en/currents-i-ii

These are really great guitar works, and I’m so happy that Shawn has finally published them officially!
Eugene

music

My initiation to programming: Rudi

Exciting news: I’ve created a new program which randomly generates music theory/rudiments worksheets and corresponding answer keys. I’ve been working on this a few months and I’ve got most of the bugs worked out.
To use the program itself you need to download the source and you have to have Python3 and lilypond installed on linux.
The code can be found here:
https://github.com/eugenecormier/rudi

If you don’t want to do it the ‘hard’ way, a former guitar student of mine is creating a web interface, you just go to the website, click the options you want and poof! you get two pdfs to print off and use.
Justin’s website can be found here:
http://ec2-54-69-119-251.us-west-2.compute.amazonaws.com:8080/rudiweb/

Of course all the code is free to use, change… basically do whatever you want with… I wrote this to help my life out at university, now I give it away freely to whoever else wants it (my thanks to the open source community, Python, and of course Lilypond)

linux

Linux DVD conversion to h264 aac mp4

So I get a week off, and what really needs to be done?!? I’ve been noticing the deterioration of my massive, 200+, DVD collection which contains ALL my former concerts, ensembles, studio recitals, grad recitals etc…

This of course is very precious to me and maintaining my data/media is always a balance of: newest and greatest way, good compression, high quality audio and video, longevity, and last but not least convenience.

For a long time now, the best option for me has been a transfer to the DVD format, and I have well over 200+ DVD vids of our concerts. I’ve been watching video codecs with hope, and finally with h264 and aac I have to say it really is incredible quality at a highly compressed bitrate.

So with the h264 (x264 in linux) codec (the video/size ratio is very good) and my dying DVDs, I decided to get this done, and I’ve learnt a few key commands that I’d like to share with whoever will listen. I’ll break it into steps:

1) Getting the info off the disc
Since these are all personal discs, a conversation about libdvdcss as it’s not needed. There are two good ways of doing this (the former is quicker, while the latter is far better at regaining lost data

ddrescue works really well if there are no/few problems with the disc (free from scratches):
dd_rescue -n -b 2048 /dev/cdrom dvd.iso

dd can be brutally slow, but gets everything:
dd if=/dev/cdrom of=dvd.iso conv=noerror,sync

2) joining VOBs
There are two ways to do this too. I’ll give the most logical and easiest first although I notice no difference at all between the two.

use cat:
cat VTS_01_1.VOB VTS_01_2.VOB VTS_01_3.VOB > combined.vob

use ffmpeg (you need 1.1 or newer for concat):
ffmpeg -i concat:VTS_01_1.VOB\|VTS_01_2.VOB\|VTS_01_3.VOB -c copy combined.vob

One neat thing about the ffmpeg command is you can include everything else and come up with a finished product like:
ffmpeg -i concat:VTS_01_1.VOB\|VTS_01_2.VOB\|VTS_01_3.VOB -c:v libx264 -crf 23 -c:a libfaac -ac 2 -ab 192k finished-video.mp4

3) Encoding video
I use ffmpeg for this:
ffmpeg -i combined.vob -c:v libx264 -crf 23 -c:a libfaac -ac 2 -ab 192k test.mp4

to break this last example down:
-i combined.vob -> is the concatted vob file
-c:v libx264 -> this is the codec (x264)
-crf 23 -> this is how you set the constant quality, a lower number means higher quality, bigger file
-c:a libfaac -> audio codec (faac)
-ac 2 -> stereo sound (channels = 2)
-ab 192k -> the audio bitrate, higher is better/bigger

and that’s pretty much it. For a 1 hour concert at 720p I’m getting about a 500-600mb file which is really good, and I’m using all open source software. I’m plowing through these videos, getting them backed up and safe. As soon as I complete this, the next stage is to run out to pick up a new 2TB HD, copy the files to that and move them offsite (just in case the house burns down…. you can NEVER be too safe with your data!

I like the quote:

“There are two types of people in this world, those who have lost data, and those who are going to lose data”

stsbanner

Shattering the Silence – in one week!!!

Shattering the Silence, Acadia’s New Music Festival starts next week and the guitar department will be well represented. The Acadia guitar quartet is going to play Philip Glass’ 3rd String Quartet (Mishima), Leo Brouwer’s Cuban Landscape With Rain & a brand new piece from Martin Campbell (Acadia composition student) called ‘Perspectives’.

It should be a great series. See the following link for more information:
ShatteringTheSilence.ca

tomregan2014

Tom Regan Memorial Concert tonight!

There’s going to be lots of classical guitar offerings at the TR concert tonight including:

  • The Acadia Guitar Quartet (Me, Alec Leard, Matthew Martin & Jeff Torbert) will play the entire 3rd String Quartet by Philip Glass
  • The Cormier/Martin Guitar Duo will play Jongo by Paulo Bellinati
  • And Alec Leard, winner of this year’s Tom Regan auditions will be performing Tango en Skai by Roland Dyens
  • Should be a great night, everything gets started at 7:30.

    oro_band_photo

    ORO! Orkestra – Turko-Balkan Dance Musik

    I just wanted to let everyone know that I’ve been invited to join ORO!, a Turkish/Balkan Dance band. We’ve had a few rehearsals and it’s very fun music to play. We also have a number of performances coming up starting with this coming weekend and the Deep Roots Music Festival. Keep an eye on upcoming performances below, and be sure to check out ORO’s website and some of their videos.

    http://oro-orkestra.com/

    steve-reich-2

    Reich…

    So I’ve just gotten home from a few weeks on the road. Edmonton and Montreal were great. I got to hear many good players while I was out, but I’m very happy to be home again. The next thing that I’m getting ready for is another concert playing the great Steve Reich piece 2×5….time to dust off the strat again :)