Saturday, November 30, 2013

Arik Einstein

Anyone in Israel will know that the doyen of Israeli singers, Arik Einstein, died of an aortic aneurysm a few days ago at the age of 75. I'm not going to write an eulogy for him as many have already done so (and people are still laying wreaths at various places in Tel Aviv with which he had a connection) but rather write about what he meant to me.

Arik was at least a decade older than most of the Israeli musicians to which I listen: he was born in 1939 and served in the Nachal entertainment troupe from 1959. So when I first heard him in the autumn of 1973, he was already 34 years old. He made a series of classic records from about 1970 through 1975, had a few years off then made some more classic records. He was the first who wrote lyrics with every day words as opposed to singing poetry, thus making songs much more accessible to the general public.

Musically, his records occupied the same sonic space as the Beatles' "Rubber soul", although with a delay of several years, and most of his pre-1980 records maintained that simple acoustic guitar/electric guitar/piano/bass/drums sound. He very rarely sang with syncopation, which made his records to be not too engrossing. Thus in 1973, he already sounded anachronistic.

His second major talent was to hook up with a young and talented composer - Shalom Hanoch, Miki Gabrielov, Shem Tov Levi, Yoni Rechter and Yitzchak Klapter - making one or two records then moving on. These records naturally had differing styles and placed a seal of approval on the composer.

In the early 80s, he tried his hand with more upbeat material and larger groups (frequently featuring saxophone) which involved coarsening his fine voice. Whilst this was more interesting musically, it was less of a pleasure to listen to him.

I realise that all of the above is a bit muddled. I have a few records of his but never reckoned him as an artist to which I would like to listen. His mission - as far as I was concerned - was to influence and inspire other musicians. In that, he definitely succeeded.

Maybe his greatest strength was that from the 1980s onwards, he stayed at home and never performed in public again. He certainly was never part of the 'celebrity generation' and steered well away from them, maintaining his modesty until the end.

Friday, November 22, 2013

Nostalgia (song festival)

As I wrote the other day, I wrote a melody for the second set of lyrics that I received, but had difficulty in placing some of the lyrics on the melody. Presumably this is what happens when one writes lyrics without a tune to act as a reference: syllable counts don't matter, neither do metre nor emphasis. The name of the song (I assume) is 'Nostalgia', this being the five syllable word being sung at the end of every verse, hence the title of this blog.

I actually wrote to the author asking for some changes; I have yet to receive a reply and was getting worried - maybe she was hurt that I was asking for changes. Last night when I went to bed, I had some ideas both regarding the arrangement and how I could sing the problematic line. I woke up with the phrasing of that line on my lips and felt more confident regarding the recording.

As it happens, I met the lyricist this morning and asked her whether she had received an email from me. She said no, so I then asked whether xx@gmail was her address - yes, she said, but she only reads emails on Saturdays! Relieved, I asked her to ignore the email that I had sent her as I had cracked the problem.

This afternoon, I devoted more time to recording that tricky final verse. It took several takes before I got it exactly right; I also screwed up a few times regarding what might be called the 'engineering' part - deleting takes, correcting takes then losing them, etc. Finally I got the vocal file that I had been working towards, with all the phrasing and pitches that I had wanted. A quick mix with appropriate eq ... and the song is finished.

I read an article the other day which shows how to add a song to a Blogger page - the song itself is in my public Dropbox folder, but supposedly I can add a music player. I have added the necessary HTML code but at the moment I can't see whether it actually exists! What happens is the player appears for a few seconds but disappears before it can be activated; after reading the comments, I see that I have to create an ogg file instead of mp3 - I'll try that. [Edit: the player isn't visible when I'm creating the page, but it appears when the blog is read - and the player can be activated!]

[SO: 3048; 2, 11, 29]

Wednesday, November 20, 2013

Stack Overflow

I've been casually mentioning the Stack Overflow site on this blog for several years. As far as I can establish, my first mention here was on 25/10/09, but I asked my first question on 25/08/09.

As the site states, Stack Overflow is a question and answer site for professional and enthusiast programmers. It's built and run by you as part of the Stack Exchange network of Q&A sites. With your help, we're working together to build a library of detailed answers to every question about programming.

Like all the Stack Exchange sites, there are two systems of ranking: one is reputation (Your reputation score goes up when others vote up your questions, answers and edits. As you earn reputation, you'll unlock new privileges like the ability to vote, comment, and even edit other people's posts) and the other is badges (Badges are special achievements you earn for participating on the site. They come in three levels: bronze, silver, and gold).

Sometimes the badges seem puerile (there's a badge awarded for filling in one's biography or logging in every day for a month), but some are more serious and of course, the gold badges are difficult to achieve.

Most of the time, I manage to ignore my reputation and number of badges, but over the past week checking my reputation had become almost obsessive. The reason is that a reputation of over 3,000 enables one to vote to close questions which aren't good (or vote to reopen), and I was so very close to achieving that 3,000 reputation.

Unfortunately, SO doesn't easily allow one to see how the reputation changes over time (that's not strictly true, but it'll do for now). I've been thinking about including my reputation and badges here for some time - not in order to brag, but rather to see where I was standing at a given date. The key is very simple: first the reputation, followed by the number of gold, silver and bronze badges.

At the moment my reputation is 3,013 but having just given a good answer to a question, it may soon increase. Sometimes it happens that people upvote an answer which was given months or even years ago, so there is not necessarily a connection between answering new questions and increases in reputation.

[SO: 3013, 2, 11, 29]

More song festival

I wrote a tune for the second set of lyrics that I received and probably will record a demo this evening.

I find it very interesting to note that when I looked at the first line, I automatically knew that this was going to be a slow, sad song in a minor key (A minor, as it happens!) with a 6/8 time signature. There are lots of songs like this, although I have been racking my brains to try and think of an example which I can quote! The song which does come to mind is 'Because' by the Beatles, but this isn't really an example as the arpeggio has eight notes (the time signature is 4/4); if one thinks of it as 6 + 2, then it's easier to understand how this might be considered an example.

This song was a bit harder to compose than the other song; the melody - bar that first line - was difficult to hear. After finishing the song, I realised that four bars were actually pinched from a song which I wrote 40 years ago (but recently rerecorded); although no one else would know, I would know. I have to admit that the melody was somewhat weak there, so yesterday an alternative chord sequence for those bars appeared. I worked them into the song then found that I needed to change the melody - for the better, I think.

Despite that, I've had so much trouble with a line in the final verse that I decided to return the lyrics to their author, asking for a revision to that line.

The festival organiser thought that my first song was wonderful. I think that she's exaggerating somewhat, but I have to admit that the melody was in my head all day long yesterday.

[SO: 3003, 2, 11, 29]

Tuesday, November 19, 2013

What's in a name?

Yesterday, the Israeli National Statistics Unit (I'm sure they have a more official name) published data regarding the names given to newly born children in the year 2012. Most of the attention was given to the names given to girls - 850 were called 'Adele', probably in homage to the British singer.*

In the boys department, the most popular name in 2012 was No'am! When I chose my name, some 36 years ago, it was a rare thus meaningful name. Now it's become common. Maybe I should change my name again. One of the children living next door is also called No'am; sometimes I hear a voice calling the name and I answer, not realising that the child is being called and not me.

I note - with a certain elitist disdain - that the name has been spelt in the more 'common' form, where the letter vav carries the 'o' sound - נועם. I spell my name with the archaic "holam haser" vowel, נעם. Such is the phonetic character of modern Hebrew; this is akin to the British spelling 'night' as opposed to the American 'nite', or 'through' versus 'thru'.

Incidentally, the most popular girls name in 2012 was No'a (which literally means movement, as opposed to No'am, delightful). Interesting that the most popular names sound almost the same. I note too that No'a is spelt with a vav as opposed to with holam haser, נועה as opposed to נעה.

* 10 years later, my daughter tells me that the many religious women named Adele are in fact named after the wife of a famous Rabbi.

Sunday, November 17, 2013

TV series update

I checked the upcoming programmes on satellite channel BBC Entertainment a few days ago and was pleased to note that the channel is commencing showing several series from their first episodes. This makes it ideal to follow (and possibly record) the series.

  • Absolutely fabulous - I loved this series in the 1990s and even bought the first two series on video (which of course I haven't seen in years). It was interesting to watch this again with a more critical eye: Edina is totally over the top and Patsy has tremendous hate for Saffron, but for me, the funniest character was actually Bubble, who got some lovely lines. For example, they were talking about a fashion show starring the model Yasmin Le Bon; her husband Simon Le Bon (lead singer of Duran Duran) called to say that his wife couldn't come, so Bubble says "How progressive of him to take his wife's surname". I am going to record all the episodes of this classic series.
  • The office - I saw a few episodes of this many years ago and really hated the character of David Brent. I thought that I would try again, now being a graduate of Organisational Behaviour. My opinion hasn't changed. The only character with whom I felt any form of identification was the lady who came from head office to inform Brent that his was one of two branches which might be closed. Interesting to note that Martin Freeman (The Hobbit, Sherlock, etc) was one of the characters. I won't be continuing with this!
  • Hebburn - This is a fairly new programme (from 2012) which I watched with no preconceptions. The series seems to be about a family which lives in the town of Hebburn near Newcastle; the son of the family brings home a girl who initially he presents as his latest girlfriend - although actually they are already married. The only interesting characters are the above girl (presented as Jewish and studying for a doctorate in psychology) and the family mother. Here I will reveal my class bias and state that I found most of the characters 'exceedingly common'. I look (or at least, think that I look) quite like the father of the family, although I hope that I don't share his health problems: he has a heart attack at some time during the series. Whilst I imagine that I'll continue watching this series, I doubt very much that I'll keep it for posterity.
  • DCI Banks - I wrote about this several years ago, giving it a scathing review. I think that I had downloaded the 'Aftermath' film from the Internet as opposed to watching it being televised. I presume that BBC Entertainment are going to show as many episodes as they can, which means that my previous judgement may be tempered by episodes which take less liberties with the source material. Of course I'm going to record this.
I've also been watching a few other series which I haven't mentioned here. The primary series is from Australia, entitled 'Rake'; this is about a barrister, but as opposed to other series which I have seen about barristers, this is more about his out-of-court life as opposed to his legal career. I find this series very entertaining, although sometimes it's hard to figure out what they're talking about (strong Australian accents). It's a comedy in the same way that Gavin and Stacey is a comedy, and 'Absolutely Fabulous', 'The office' and 'Hebburn' aren't: it doesn't have funny one liners, but rather situations which tend to be strange, the humour arising from the situations themselves. To my regret, I didn't record this: I would like to see the first episodes again.

The other series which I have been watching half heartedly is 'The good wife'. In my opinion, American TV rarely produces anything which I can watch, the exception being 'The West Wing', of course. Unfortunately, I only hooked up with this from the fifth series, so I don't know any of the back story. It's certainly classy but not totally immersing. At the moment, I've been watching it in lieu of anything better to watch.

I suppose that the main criterion is how I would feel if I missed an episode of one of the above programmes. I would be distraught if I missed an episode of DCI Banks, disappointed if I missed AbFab or Rake, and not bothered about the others. Fortunately, the satellite tv provider generally shows each programme two or three times during the week, so there really should be no reason not to see each programme if I am so inclined.

I don't recall whether I have previously written about regret over not recording programmes. I have dealt with this in the past by recording everything (or nearly everything). Obviously I am not consistent. Somehow I doubt that I am going to feel any regret about not transferring 'The Office' or 'Hebburn' to dvd; I have most of this week to make up my mind as BBC Entertainment will show each programme a few more times this week.

Saturday, November 16, 2013

Song festival

My kibbutz will be celebrating its 65th birthday in December. There's quite a heavy programme planned for the first week, but I shall be elsewhere as my two doctoral exams will be held at the end of that first week. 

At the end of the month will be held a song festival; a month or so ago, a call was put out for people to write songs around the theme of the 65th birthday. It was stated that those who only wrote lyrics would have tunes provided for them. I volunteered my services to write tunes.

Yesterday, one of the festival organisers called me and asked whether I was still prepared to write music. I noted that I had the exams at the beginning of the month, but that I would find the time for the music. We agreed that working on songs makes a good distraction from preparing for doctoral exams.

After we spoke, the hint of a tune came to mind. I mentally filed it away for further use, as there was no guarantee that the tune would be at all suitable (in terms of metre) for the lyrics that I would be sent. As it happens, the first set of lyrics which I saw fit almost exactly onto the tune (a nice piece of serendipity), so I was easily able to extend my snippet into something more substantial. I noted that there were some lines which were problematic in that they had too many syllables, but I managed to get around this.

The chord sequence for the verse is a combination of something standard aligned with my harmonic sense: in the key of E minor, there are two repeats of Em | Bm | C | G | Am | B | C | D | followed by two bars of E minor, which link the verse to the chorus. The instrumentation is basically syncopated Rhodes, bass and drums.

The chorus, though, was something else again. At first, I couldn't see much of a rhythm in the words, but after playing with it for a while, I began to see opportunities. The tune which I created for the opening of the chorus used virtually the same chord sequence as the verse, which was a mild annoyance to me, so the next part veered from the standard into more familiar territory for me. Two repeats of Em | Bm | C | G, followed by Am - so far, standard. But the A minor is followed by G minor: Am | Gm | F | Gm | Am | Bb | Am | Bb. At this point, I was worried that I had dug myself into a hole from which I would not extract myself, so I put in a four bar instrumental which brings us back home - C | D | Em | Em. The end part of the chorus serves as the introduction, and there the E minor chords are major.

Whilst I was working out the tune and the chords, I also developed the arrangement. Actually, there isn't much development, as this song is being written for a song festival: the most important part is the words, followed by the tune, followed by the chords and ended by the arrangement. So I settled on a fairly simple arrangement with only small amounts of instrumental fairy dust.

Feeling that the chorus wasn't packing much power - to be honest, the line structure didn't help here - I decided to cut the second chorus short and then repeat it from the beginning, this time in a different key. The first attempt as this was ok, but after thinking about it, I decided to make the cut earlier, then transpose to F#m.

I'll record vocals this afternoon and then we'll see what happens to this song. The fascinating point about this process is that I received the lyrics at about 1:30pm and had a finished song (without vocals) at around 6pm. I would have completed the song that evening had it not been a Friday night, when my daughter comes for a cooked (and formal) meal. 

Do I wish I could normally work this fast? It certainly makes life much easier having a completed set of lyrics. Normally I would work and work on the arrangement, thinning it out at the beginning and adding instrumental dexterity later on, but as I wrote at the beginning, this time the music is not the focal point.

I have also been sent the lyrics to another song. At first glance, these are going to require a completely different approach, but I won't start with them until I finish this first song.

We last had a song competition about fifteen years ago: I took one of my songs and had the lyrics translated into Hebrew. My wife and I sang the song with live backing, and I thought that we did very well. In fact, everyone who had heard the song during rehearsal was impressed. But as the kibbutz as a whole voted on the songs, extraneous factors came into play, and I don't think that the voting reflected the musical quality. We came third, but this left a sour taste in my mouth.

Tuesday, November 12, 2013

Minimalistic arrangements

As I have probably mentioned at some time in the past, every evening I take a 'power walk' of two kilometers. As this walk is simply ten times around what might be termed a car park, one might consider it to be boring. Indeed, my dog has long learnt that when I'm walking laps, she can sit down and wait for me to finish.

When I walk, I think about programming problems, although lately I've been going over the methods for solving the statistics questions in the doctoral exams. I also listen to music: in fact, this is a chance to listen to clearly recorded/played back material without any distraction. Last night, most of my laps coincided with the Swell Season's "Strict Joy", which took me back four years to the evenings when I would listen to the disc whilst traveling to lectures on organisational behaviour.

About a week ago, my laps coincided with the Blue Nile's "Hats" disc. Every time that I hear these songs, I think that I should be able to create something which sounds similar - but then I remember that my songs tend to have more complex chord sequences, meaning that it would be difficult to imagine the necessary minimalistic arrangements.

This time around, however, I was reminded of a song which I wrote 40 years ago, which has a very simple verse: a two bar phrase (E and F#) which repeats four times. I dug the song up and started arranging it. As usual, getting started took a while, but after a few evenings' cogitation, I had a basic arrangement with picked acoustic guitar and bass. After playing with this for several hours (and in the course of doing so, I added a new chord sequence for the middle eight), I ended up with a complete arrangement. 

I listened to this for a few days but felt unhappy as it wasn't the minimalistic arrangement which I had in mind. The second verse, especially, gave completely the wrong feeling. On a whim, I took out all the instruments except for the bass, a chordal pad and a monotonous drum beat: this was much closer to what I was looking for! I had to change the bass line in a few places, but otherwise no changes were required. I decided to leave in a few instrumental lines, without which the song would have sounded incomplete (these were links between verses and a short solo).

After completing the arrangement, I looked at the words. As these were written 40 years ago, when I wasn't as experienced at songwriting as I am now, I could see that they were clearly the result of a small amount of inspiration and a larger amount of filler. Some of the lines didn't make too much sense and the language was simple. Yesterday, I rewrote the words, keeping the original idea and maybe 40% of the original lyric; I enriched the language and generally improved the lyrics. It helps to look at all the lyrics at one go: one can see where an idea was set up in the opening verse and either repeated verbatim or even negated in the final verse. I was able to change the words around, making a better flow.

I'll probably record the vocal over the weekend; I want to keep this as simple as possible with as few affects as possible. It probably will not even be double tracked. 

The end result may not be The Blue Nile, but it's certainly different from my usual output.

Friday, November 08, 2013

Sorting in Excel via Delphi automation

I was asked to prepare a table for the OP's flagship database, which shows for each question how many people have answered 'yes' and how many 'no'. Getting the data itself was fairly easy but displaying it was something else again.

Basically, I had an array with 480 rows and seven columns, where I had to sort the array by the fourth column; the spreadsheet has a header row. I thought that it would be easy to output the data to Excel then let Excel do the sorting. As it turns out,  I have never had cause to sort in Excel via automation before now, so first I recorded an Excel macro which would sort. This is the result
    
Range("A1:G481").Sort Key1:= Range("D2"), Order1:= xlAscending, Header:= _
  xlGuess, OrderCustom:= 1, MatchCase:= True, Orientation:= xlTopToBottom, _
  DataOption1:= xlSortNormal
While Excel might be able to understand that, it wasn't at all clear how I was going to translate that into a form that Delphi could understand. So I started googling, finding several solutions, none of which worked. Eventually I found the solution which I am documenting here.
 
const
 xlAscending = 1;
 xlNo = 0;
 xlTopToBottom = 1;
 xlSyllabary = 1;

 sheet.Range['A1', 'G481'].Sort (sheet.Range['D2'], xlAscending,
                                 EmptyParam, EmptyParam,  // key2
                                 EmptyParam, EmptyParam,  // key3
                                 xlAscending, xlNo, EmptyParam, True,
                                 xlTopToBottom, xlSyllabary);

Let me explain the 'G481' term: there are seven columns, and Excel labels them alphabetically. So 'A1' refers to the cell at the intersection of the first column and the first row, its neighbour is 'B1', etc. So 'G1' refers to the cell at the intersection of the seventh column and the first row. As there are 480 rows in the array along with a header row, the final cell is G481.

The first parameter to the 'sort' procedure is the column by which the spreadsheet will be sorted; the second parameter presumably states that the sort will be in ascending order. In this case there is no second nor third key, but if there were, they would be the third and fifth parameters. The eighth parameter (xlNo) would appear to relate to the existence of the header. Don't ask me about the rest (what does syllabary mean? Now I know).

Unfortunately, for the time being,  I am going to have to relate to this code as a magical spell as I don't really understand what each parameter does. All I know is that it does what is required.

Note to myself: following is the definition of the 'sort' procedure from MSDN:
 
Object Sort(
 Object Key1,
 XlSortOrder Order1,
 Object Key2,
 Object Type,
 XlSortOrder Order2,
 Object Key3,
 XlSortOrder Order3,
 XlYesNoGuess Header,
 Object OrderCustom,
 Object MatchCase,
 XlSortOrientation Orientation,
 XlSortMethod SortMethod,
 XlSortDataOption DataOption1,
 XlSortDataOption DataOption2,
 XlSortDataOption DataOption3
)