viernes, 9 de noviembre de 2012

[OT] Music - Cracking multiple voices with mixed measures


Music and mathematics go hand in hand... and being an engineer just makes this relation clearer.

Having a strong background in mathematics makes some of the problems you find in music a little easier... like, wanna try me at intervals?

Then, I quit music (at least active playing to perform in public) some years ago but my brother is heavy on studying percussion at Maracaibo's Conservatory.

Yesterday he asked me to help him understand how to play a section of a two-voice piece for Marimba that had mixed measures.

In general, things like playing a binary measure along with a ternary measure (like eighths and eighths triplets) is not much of a problem.... but then you can get to face more complicated situations like the one he has facing. It was something like this:

Now, let me explain how you can mathematically (and reliably) go against this problem.

First, you have to study the voices separately and find the biggest measure that can break up all the notes of each voice and how many of each there are in the section you are trying to study.

For the upper voice, the biggest measure would be the half-note-in-a-tripplet and there are 3 of them in the section of our interest. That was easy.

For the lower voice, the biggest measure that can break up both eighths and quarters would be one eighth and there are 8 of them in the section of interest.

Continue doing this for as many voices as necessary but that's enough for our example.

Next step would be to find the Least Common Multiple of 3 and 8*. It's 24. This number will be the number of microbeats** you have to use at the same time for all voices involved in order to be able to fit all the notes in those two voices in one exact unequivocal fashion. Now you go back to study each voice separately based on the 24 microbeats for the whole section.

Upper voice has 3 half notes in a triplet so if you divide the 24 microbeats between the 3 notes this means each half-note will take up 8 microbeats so they will start on the 1st, 9th (1+8) and 17th (9+8) microbeats.

Lower voice length is made up of 8 eighths, remember? If the section we are studying will be measured with the same 24 microbeats, that means that each eighth in the lower voice will take up 3 microbeats (there are 8 eights in the section and so 24 / 8 = 3). Then that means that the first hit (remember it's a marimba) will be on the 1st microbeat, next on the 4th (1+3), quarter note starts on the 7th (4+3) microbeat and lasts for 6 microbeats, next eighths will start on the 13th (7+6) and 16th (13+3) microbeats and the final quarter note will start on the 19th (16+3) microbeat and will take up 6 microbeats which will complete the length we are studying.

So, having the upper voice written as an M and the lower voice as a B, the voices are played together like this:

  M               M               M
  B     B     B           B     B     B

I bolfaced the bar's quarter beats to make it clearer. That will do.

Another example, in the Biguine Caline from Klaynjans' Suite Antillaise for Guitar (a suite that I definitely love) you get to see something like this (voices separated for clarity):

So, we follow the same set of rules.

First voice, the biggest measure that can break it all up would the the eighth in a triplet and there are 6 of them in the section.

Second voice, the biggest measure that can break it all up would be the sixteenth and there are 8 of them in the section.

Now, the LCM for 6 and 8 would be 24 (again). So 24 microbeats it will be. Now, separate analysis again.

First voice has 6 notes the same length each in 24 microbeats. That's 4 microbeats for each one.

Second voice is 8 sixteenths in 24 microbeats, that means that it's 3 microbeats per each sixteenth and that means that the final resolution is like this:

  M       M       M       M       M       M
  B                 B     B           B

That will do.

Hope it was clear enough.

If you think you've got it, try to break this problem:

Solution should be like this:

35 microbeats:

  M                   M         M                             M
  B                                         B             B

And if you nailed that one, then add another voice like this:

If you can break that one (and I won't give any tips) then I don't think you will have problems cracking mixed measures ever again.

* as a matter of fact, you could use any other common multiple so you could just multiply them all but that will lead to higher numbers than necessary, like if you are working with 6 and 9 (too easy one example to try this method but the way to solve it still works this way) which will lead to 54 if you just multiply them but then 18 (their LCM) would have sufficed.

** microbeats will have a relation to a certain length for the section you are studying but that could be a little difficult to write on sheet paper (for example, here each microbeat will correspond to a tripleted sixteenth) so I'd recommend not to try to write it down in real music notation but keep it for your studying time.

domingo, 21 de octubre de 2012

Java GPS library release


It's been a while since I wrote my last post... not that I've had something great to talk about.

Among other things,  recently I laid my hands on a GPS USB dongle that I wanted to play around with for a project research.

It's either that my hand is large... or the dongle is small or a combination of both.

After getting output from it right after I plugged it in with putty/minicom/etc I started to look around for a java library that could take care of handling messaging. Not that I spent too much time looking around. I found this:

Unfortunately the last release is a little dated (like 10 years dated) and doesn't give me the kind of feedback I was expecting....

And so, what is a developer to do in these cases? That's right, sit down and code something of his/her own... and so I did.

I have just released version 0.02 of my brand new GPS library... it's still miles away from something really useful but I think the basics are pretty much laid down. Go grab it and, if you have corrections/recommendations, start sending patches. I'll be glad to merge them.

It's released under the terms of Affero GPLv3 and it's even got a couple of examples inside (I think that's a first-timer for me). Requirements: log4j.


martes, 7 de febrero de 2012

I need something close to debian with up-to-date KDE


I just read the news that Canonical will pull the plug (kind of) from Kubuntu. Kubuntu will go on as a community project and the only person who was getting paid to work on it will have to do other tasks. So.... I've been a very happy (ok, ok... mostly happy) kubuntu user for the last... what? 6 years? But why? Cause I like KDE and Kubuntu provides the latest version of the environment (with PPAs we're talking about almost inmediate availability of the last stable versions).

So I'd like to move into a real rolling release like debian testing but then the KDE version is a little behind, isn't it? Then what can I use instead?

Thanks for your feedback?

PS A little behind? Is that 4.6? Sigh. So.... I know some people will complain because I'm complaining instead of giving debian a hand with KDE to bring it up to date, right? So were can I give a little help for starters?

miércoles, 4 de enero de 2012

Dude, i'm not the usual PC technician!

So, you are in the middle of a crisis, you have tons of data stuck in a broken RAID5, shall I say it's critical data,  and you need it back.

So you look around the internet and find me, none other, with some articles published on the internet about some successful recoveries, a tool to do the recovery which, by the way, is completely Free (with capital F) to use.... and yet you want to ask for my help.

Well.... if you think this is the kind of job the PC-guy-you-call-when-your-home-PC-gets-busted-with-viruses can do and are willing to pay accordingly then don't bother to ask for my help. This is veeeery hackish stuff which takes some time to get done, a great deal of attention to details and yet another great deal of tricks and experience to solve so be ready to pay through your nose.

You still wanna call me? You have been warned.