programming

Recently I found it necessary to join two git repos together while still maintaining history & future ability to split or rejoin them. Enter the ‘git subtree‘ command.

Because this command is now merged into git-core since 1.7.11, we will need to install the latest git from a PPA. Note that as of ‘now‘, the latest available package from the PPA we will use is 1.8.0, and it currently installs the subtree script to /usr/share/doc/git/contrib/subtree. However, since the Makefile there expects asciidoc.conf to be in ../../Documentation/asciidoc.conf, we must checkout the source package & make from there.

I am using Ubuntu 12.04.1 LTS here.

Installing latest git-core + git-subtree

First add the PPA, update & upgrade. Then install git packages that are held back by apt. Also install asciidoc (optional if you want the manpage).

This may not work for you if you’re not using Ubuntu (your prefix or libexec dir may be different). If in doubt, get git-core from upstream and build it from there, or install the script to $(git --exec-path)/git-subtree and chmod 755 it (see Makefile & INSTALL doc in contrib/subtree).

Now you should be able to use the ‘git subtree‘ command. For help, run ‘git help subtree‘ or ‘man git-subtree‘.

Update 2012-10-22: Currently the package for git 1.8.0 from the PPA does not include the git-prompt.sh script. If you are using the __git_ps1 function in your bash prompt, you’ll need to get the source package and find that file in /home/jcuzella/src/git-core/git-1.8.0/contrib/completion/git-prompt.sh. Install that file somewhere under your home directory and then add a line to your .bashrc file to source it. You’ll know if you need it because you’ll probably see this message after installing latest git:

You may ask: why create yet another script for this? Well, I found a couple issues with the other implementations that bugged me.

After snapping, windows lost their original dimensions :-/

The left & right states failed to unset the horizontal maximized window property

Inputting the scripts directly into CCSM, or separate scripts was a bit messy

So, I created a single script that fixes these issues, and also adds another feature: Set a window’s size back to a default state. Currently, this default is set using a bash variable, because I usually like to keep my terminals and nautilus windows one manageable size. I also mainly find myself only using this snap feature on nautilus and terminal windows as well, so it works for me. Perhaps in the future there may be some need to keep track of each window’s individual default size… but that’s too complicated for now.

How to use:

Use -l for left, -r for right, -m for maximized, and -d for a “default” sized window. The default window geometry is configurable as a variable called $WIN_DEFAULTGEOM. If the variable is set at runtime, it will override the hardcoded value in the script. You can use this to create however many default window sizes you need if you set them in multiple commands in compiz. See the manpage for wmctrl for the format to specify window geometry arguments. (This is called <MVARG> in the manpage). If you’re wondering why I chose such a weird default value… it cooresponds to an 80×26 line terminal window on my resolution.

So I finally got my KRK Rockit 8′s back from getting their tweeters replaced! I’m extremely happy about having a good reference system to work with now. It was quite hard to go back to standard consumer speakers after getting so used to the quality of the Rockits for so long.

Podcast:

Anyway, expect a remixed re-release of LyraPhase 004 – PsycheDatum soon! Because I’m not planning on releasing many Psytrance mixes, I wanted to redo this one with a new track selection. I may be releasing the original alongside it just because it contains a couple tracks I decided to scratch out from the setlist, yet I really did like quite a bit. The main reasons for the re-release of this one is that I was unhappy with the flow, and the fact that I seemingly couldn’t stop myself from putting multiple tracks from the same artists on it. I definitely blame this on the disorganized and frantic setlist planning done back when I had to make & practice a new set each week and still get myself through those last college courses in the fall.

I’m quite self critical sometimes, and really was expecting better although I was very rushed at the time. Plus, I also have had a chance to give quite a large number of new tracks a listen in the past couple months, and just had to add a couple of them to the set.

Either way, if Psytrance isn’t your bag, then you probably won’t care either way. In that case, look forward to LyraPhase 005, in which I made an adventurous attempt to mix Electro, House, Progressive, and even a bit of Trance-ish stuff. It was a bit experimental, that’s for sure. Still I’m really looking forward to doing some completely new sets, especially with all the excellent Minimal and Tech House I’ve been listening to lately.

On to other news:

Job Offer:

I’ve finally got a job offer! Really looking forward to interviewing for a hardware (EE) related job this time. I really have been needing some good electronics experience to put on my resume. Definitely feeling like I need to brush up on my skills though. Wish me luck!

Sound Production:

In the meantime, I’m checking out some sound engineering and production stuff while I still have the time to do so. So far I’ve started reading “Computer Sound Design Synthesis Techniques and Programming” by Eduardo Reck Miranda. I had no idea where to start, and this book seems like it’s a good point. The first chapter goes over some basics of sound synthesis, and some real basic stuff about audio sampling, file formats, and ultra basic programming concepts. It’s definitely written for someone who doesn’t know much about programming and how computers work, but skipping over those parts just makes me feel more productive anyway . The way in which it describes sound generation using oscillators and function generators is also very intuitive from an Electrical Engineering standpoint. I hope to learn a lot quickly from this book, and move on to other sources more directly applicable to Ableton and VST synths.

Any suggestions for reading material on electronic music production would be greatly appreciated!