Saturday, December 19, 2009

second lesson - part 1

There are 5 variations to each of the full musical notes (C, D, E, F, G, A, B) based on a semi-tone seperation on the lower and higher ends. These are called Accidentals of a note. They are :
1) Double-flat (♭♭) 2) Flat (♭) 3) Natural (♮) 4) Sharp (♯) 5) Double Sharp (×)
♭♭is being used here for want of a symbol that looks can represent double-flat. Originally, it must look like the 2 flat symbols are stuck together instead of the gap. I must constantly be on the look out for a better utf8 symbol
When we refer to a note, say A, we generally mean A♮ - which is A-natural. With semitone separation between notes, there are 12 notes. C, C, D, D, E, F, F, G, G, A, A, B.
Logically, then, there will be multiple ways to refer to a note. So, C can be referred to as D♭♭ or B. So, for the first time after I started learning guitar, I heard the term B ... or even E, for that matter. Naturally, I got skeptical and curious and asked Deepak, what was this all about .. there is no such thing as B and so on. He said that is not true. Then I asked him, why accidentals, when we have clear cut representations for the 12 notes. Why even bother to represent them in multiple ways and create ambiguity ? As an answer he started me off on Circle of Fifths:

Circle of fifths:
The idea is to start of with a scale (major or minor) and write down the scale of the with the fifth note (from beginning or end of the scale) of current scale as the key. While doing this, we must make sure that all 7 notes C, D, E, F, G, A, B are mentioned with the appropriate accidentals. This is to avoid having to mention the accidentals of the same note again and again within a scale. For example, if we needed to mention A and A, we rather mention A and B.

Here goes the circle of fifths with C note as the first key. Both ascending (fifth from beginning of each scale) and descending (fifth from end of a scale).

Ascending Circle of Fifths:



CDEFGABC
GABCDEFG
DEFGABCD
ABCDEFGA
EFGABCDE
BCDEFGAB
FGABCDEF
CDEFGABC
GABCDEF×G
DEF×GABC×D
ABC×DEF×G× A
EF×G× ABC×D×E



Descending Circle of Fifths:



CDEFGABC
FGABCDEF
BCDEFGAB
EFGABCDE
ABCDEFGA
DEFGABCD
GABCDEFG
CDEFGABC
FGAB♭♭CDEF
B♭♭CDE♭♭FGAB♭♭
E♭♭FGA♭♭B♭♭CD E♭♭
A♭♭B♭♭C D♭♭ E♭♭FGA♭♭



When a major scale, such as a C major scale, is being worked upon, it is interesting to observe how the ionion mode of another scale would sound like, if the scale started off from the fifth note of the current scale. When writing these scales, to avoid ambiguity of having to use the same note in its natural and sharp format, the accidentals of a previous or a next note are used, so that all the notes have a representation within a given scale.

Labels: , ,

Monday, November 09, 2009

first lesson

Guitar lessons from an advanced teacher have started for me. I thought it'd be good to capture the input given in some form. What's better than a blog ? Until someone answers that question, I thought here's the place to capture it.

We discussed three important concepts that have wide use in western music (they go under different names in Indian classical music). They are Scale, Key and Mode.

Scale: Set of notes belonging to a Key.
Key: It's the pivot over which a scale or chord is built and defines the notes that'll belong to that scale/chord. Eg: E_M scale belongs to the key called E_M.
So, what are more commonly known as major or minor keys are defined by the modes of the key.
Mode: Mode is a get of intervlas that are to be followed when playing a set of notes belonging to a key/scale/chord. The commonly used modes are the following:
Representing the intervals of a Tone and Semitone by Whole(W) and HalfStep(H), we have:
1. Ionian: W - W - H - W - W - W - H
2. Dorian: W - H - W - W - W - H - W (right circular shift of above by one step)
3. Phrygian: H - W - W - W - H - W - W
4. Lydian: W - W - W - H - W - W - H
5. MixoLydian:W - W - H - W - W - H - W
6. Aeolian: W - H - W - W - H - W - W
7. Locrian: H - W - W - H - W - W - W

The practice exercise was to do the famous caterpiller exercise without taking the support of the thumb.

Labels: , ,

Thursday, July 09, 2009

finally ...

Typing out 164.99.khrrmm.khrrmm for server ip and realizing that it is no more valid ..
Getting up at 10:30 am from the seat for a quick chat with team in a coffee break and realizing no one would come ..
Repeating the above step once again at 4:00 pm ..
Having to use the heavy RDP sessions only to 'interactive session' to a computer :-( ...
Seriously going to a cmd prompt and typing vi ..
Looking at code that starts with
'import System.WebSSO.Properties.Thingummy.WhatzitCalled.YouKnowWhat ...'
as opposed to a friendly
#include
Slowly knowing that around 50 % of work time need to be spent in editing automation jobs :-(
Miserably failing at configuring pidgin to work with Office communicator plugin ...
Getting angry on why I need to have a *in***s only box to connect to office ...
Trying to say "Ab kahaa hein aap ?" to a cab wallah on phone as opposed to a cute - "ellidira neevu ? ..... aaha .. avuda .. allinda swalpa mundey banni .."
Not finding time for guitar and listening to my favourite songs on iPod, imagining myself playing them ..
Carrying lunch box from home, as the food at office is freaking costly ...
Realizing that the floor I'm sitting in (5th) has about as much strength as my previous company ..
Getting surprised when a guy from Utah, USA picks up my helpdesk call at 4 in the afternoon ..
Understanding that Visual_freaking_Studio takes about gazillion minutes to install ..
Not knowing the phone numbers of my own team mates even after about 2 months of joining .. They do not know mine too ...
Figuring out why first line managers are called leads here and still trying to understand why I'm in first role of test after 4 years experience as Dev.
Absorbing the fact that medical checkup post employment can be so weird that the lab guy asks for a sample of stools after asking me to come empty stomach ..

hmm ... transition transition transition ... life changes.

Labels: , ,

Wednesday, September 17, 2008

cheer up bro

Going back home from office with the realization there's no one at home is becoming increasingly tough for me. I wonder how I managed it for the past one and a half month. And I don't even want to think about the fact that I have 4 more months (minimum ... that is ...) to spend this way.

In India, it's a norm that the pregnant wife will spend her last 3,4 months of pregnancy and the first 3,4 months of motherhood at her parent's place. And it's a widely agreed school of thought, that the husband's feelings during that period must be like .... wow .... !! yuuuhuuuu .... !!! But, no ... not me. I got too habituated to the comfort of having some one to speak to (back home) to bear with the thought of having to spend about 12 hours all by myself everyday.

Here are some interesting techniques and skills I have painstakingly developed over months after marriage:
1) I can code for fixing an intricately involved bug even as I listen to home news bulletin from my wife.
2) I can actually repeat the news bulletin - word to word - in case my wife tends to think I'm not paying attention. (Later I also remember giving her a choice of listening to a short summary - 2 marks or a detailed discourse - 10 Marks)
(Actually I'm mid-way - developing a technique where I can repeat what she said - word-word in the reverse order, not that it interests her .... just very amusing ..)
3) With a single look (I needn't even have to hold them), I can differentiate between capsicum and a badly grown brinjal.
4) I can prepare these items (ordered in ascending order of expertise) - coffee, horlicks, maggie noodles.
5) I can carry about 7 kg of grocery on each of my hands and walk slowly (to match my wife's pace) with an unfading smile on my face in a heavily crowded market area. (Normal people will have to do specialized yoga to achieve this feat.)
6) It's only after marriage that I couped up enough courage to watch a full telugu movie. (A piece of cake for my wife :( )

Don't want to boast about it in the list of points above, but I'd want to mention here - in passing - that at one instance, I bravely argued with an auto-guy for a rupee (only once though).

And it all seems such a waste, that I have no one to whom I can show-off these skills.

But, just as things were turning worse from bad, a ray of hope entered my life this evening, in the form of a dog. Okay, don't get confused. I can explain.

This evening, as I had a few things to purchase from Nilgiris, I had been there and was coming back with a fairly big carry-bag in my hand. Here I was walking, and at about 25 meters from me, due north east, I happened to glimpse at a dog on the other side of the road. Even though some people will be skeptical on this, I happened to easily observe that the dog's eyes were on my bag. I wanted to avoid a scene. So I started walking faster and realized that the dog was doing same on the other side. The road was fairly well occupied with zooming vehicles, so everything is fine for the present. My razor sharp brain could immediately come up with 2 plans, as they show in the movies - plan A and plan B. At this point, the road became silent because of a signal further down, and as anticipated, the dog crossed the road to my side at about 43 kmph. I don't understand dogs, especially this one. I guess it thought that I was a pie-faced nincompoop or something. It was about to know that it misjudged me. We were separated by about 15 meters and it starting walkin towards me, it's eyes hawk-like on the bag. Distance between us slowly started reducing. (slowly - owing to the facts that i) I wasn't too keen to get near the dog and ii) the dog was stalking it's prey.). We are about 7 meters apart, when I stopped on my tracks. The dog stopped as well. I had plan A on the cards. So, I lifted my bag up over my shoulders. Our eyes briefly met. I mustered up as much malice into my eyes as possible. But the dog looked away indifferently, back at the carry-bag. I delivered plan B. I took out the umbrella that I had hidden in the carry-bag and walked towards it (the dog, I mean) in quick steps with it (the umbrella) uplifted in a threatening manner. I think it understood the general message I wanted to convey - about how superior I was. It immediately backed out and ran away to it's evening chores (which I'm sure involves - conversing with it's friends about the incident, picking at humbler targets etc).

I came back home thinking that life isn't that bad after all.

Sunday, August 03, 2008

Number of company mergers - explanation rather than proof

One of the famous problems in combinatorics that interests a comp.sci. enthusiast - is the Catalan's problem - that talks about finding the number of binary bracketings of n elements. For example, if we consider three elements 1, 2 and 3. We have :

((1 2)3)
(1(2 3))

as the binary brackets, in that order of 1,2 and 3. If we consider 4 elements, say, 1, 2, 3 and 4. The number of binary brackets in that order is 5 - and they are:

(((1 2) 3)4)
((1 (2 3))4)
((1 2)(3 4))
(1((2 3) 4))
(1(2 (3 4)))

Imagine 1,2,3 and 4 to be 4 elements held in the computer memory. In the above example, we have fixed order of retrieval of the elements, i.e 1,2,3 and 4.

Catalan has proved that this number is given by the formula:
C(n-1) = 1/n * (2n-2 C n-1) , where (n C k) is n choose k - or the kth binomial co-efficient.

It is easy to see that, this number also exactly gives the number of un-ordered full-binary trees of n-leaves (or n-1 internal nodes).

o 0 0 0 0 0 0
/ \ / \ / \ / \ / \ / \ / \
0 3 1 0 0 4 0 4 0 0 1 0 1 0
/ \ / \ / \ / \ / \ / \ / \ / \
1 2 2 3 0 3 1 0 1 2 3 4 0 4 2 0
/ \ / \ / \ / \
1 2 2 3 2 3 3 4

Leaving this at that, let's look at a related interesting problem of counting various possible ways to merge N companies. This is related to the above problem because, in essence we are counting binary bracketings of companies. But here, the differnce is that, order matters. Since there are N companies - the merger process can be viewed as a full binary tree with N leaves. The number of such un-ordered trees is given by the formula mentioned above.

The points that effect the count are
1) The permutations of this set of companies and
2) Whether the A merging with B - must be treated same as B merging with A (commutativity). To view it differently, if A is a merger of K companies, and B is a merger of m companies, should we take into consideration the chronology of the events, because of which A->B is different from B->A.

Taking point 1, we have N! permutations of N companies.
Now consider point 2. Because of the properties of full binary tree, there are N-1 internal nodes with a tree with N leaves. Commutativity can be simply viewed as a mirror rotation of the tree (subtree) at an internal node. For example.

O O
/ \ == Mirror Rotation on O == / \
A B B A

Since there are 2 degrees of freedom the number of such combinations possible for N-1 internal nodes is 2^(N-1) . This is easily seen if you view the two possible postions at an internal node as 0 and 1, and then count the number of N-1 length binary strings.

With this prologue, lets look at the two problems of company mergers:
1) Where the timing does matter: In this case only the first point (about permutations) need to be considered and so - the answer turns out to be :
T(N) = C(N-1) = N!/N * (2N-2 C N-1) , where (n C k) is n choose k - or the kth binomial co-efficient.

2) Where timing doesn't matter -- i.e. A->B is considered same as B->A, we need to nullify the effect of the mirror trees, because of which a division by 2^(N-1) is required. SO the formula turns out to be:
T(N) = C(N-1) = 1/2^(N-1) * N!/N * (2N-2 C N-1) , where (n C k) is n choose k - or the kth binomial co-efficient.
OR

T(N) = C(N-1) = (N-1)!/2^(N-1) * (2N-2 C N-1) , where (n C k) is n choose k - or the kth binomial co-efficient.

There is a simple proof that the number is second formula is nothing but (2N-3) !! (double factorial).

Labels: , ,

Friday, August 24, 2007

classical guitar

This is the first time I have seen classical guitar in its full glory. Apart from the fact that it has nylon strings and that the fret board is much wider (good luck ! fingers !!) I had no clue, that it can be played so beautifully. One of my music enthusiast friends pointed me to this video and I have lost my mind over it. You can see it here.


This song called "Bohemian Raphsody" is from a 70's band called Queens.

Sunday, August 19, 2007

come back

It was this afternoon, a bright sunday Bangalore afternoon, while I was chewing on some old novel, ... no wait .. take back that line .... it wasn't supposed to start like that. Just to erase any false impressions, I don't generally chew on old novels in the afternoons, you know, like sitting in the porch or balcony, sipping coffee etc. No, that'll be a completely wrong picture of me. It was just that I was totally bored from gawking at my lappy, trying to figure out a bug in my project, which is a darn wrong thing to do on a Sunday, btw. But, what can i say ? All the 4 movie channels, two music channels, two science channels and two cartoon channels, were airing nothing of the stay-glued-to-the-chair types. And that bug I was talking about, has been infesting my grey cells for sometime now.

Anyways, where was I ? yeah ... as I was pouring over one of my fav. literary marvels, I realised with a brief start that it's been exactly four months since I wrote anything here. And I judged it's only fair to give the future historians some clue regarding this gap and save them from some agonizing nights. To relate it in the style of Chris Gardner (Will Smith) from the movie "Pursuit of HappYness" - this part of my life, right here ? is called - "getting married". Yup. That's right. Everyone does it. I did it. You may look askance and enquire if I had no other good reason than that. But please, I got fed up of explaining myself to people, arguing with them and all that. I'm over that now. Not that life's been unpleasant or negative in anyway after I got married, no, I don't mean that at all. But I have relatively radical views on marriage. Yes, both of us and our families are happy. Ask the CIA or anyone.

Here's a link to a video generated by one of my close friends, capturing some glimpses of the historical event. So many of my college buddies are getting married in the recent past and going to tie the knots in recent future, it's like participating in a grand gala marriage fest. For me, out of marriage, I got a lot of things. For starters, I got a lovely wife. Okay that's kinda given. I also got to meet my brother, my sis-in-law and my nephew after 3 years (bro works in US). Got to meet lot of relatives, whose names I'd forget if I didn't meet them for a year or so more. Got an excellent electric guitar from my friends (watch that you tube clip). Definitely not the least, got my parents to stay with me here at Bangalore. What more can an orthodox-family-born-music-junkie-Bangalore-lover ask for ?

This guitar, it is just amaaaaayyzzzzing. I'm impressed by the kinda faith my friends are showing in me by gifting me an original Yamaha electric guitar (speaker being part of the package). All this considering I'm an amateur strum guitarist who plays the chords from "Hotel California" for the 20th time and looks around like he's composed the song himself. Just so my parents and my neighbours don't get hard of hearing, I got a universal-jack-to-speaker-jack converter plug and now, only I get to listen to all the cacophony that I generate. I was trying some relatively easy carnatic pieces on it and really got excited by the quality of sound. Expect me to post my musical experiments here. And so, beware. ;-)