Saturday, March 20, 2021

New song, E Dorian? B minor?


Over the past few months, I've been listening to the YouTube channel of 'David Bennett Piano' that explains points in music theory in an amusing and interesting way. True, I haven't learnt very much that I didn't know previously, but David plays through the examples and also points out how changing the examples makes them lose their special touch. An example, to which I was listening the other day, is 'Songs that use the Dorian mode'.

Quick explanation of the Dorian mode: if one plays all the white keys beginning on C, one plays the notes C-D-E-F-G-A-B-C: the C major scale, otherwise known as the Ionian mode. If one plays the same notes but beginning on D, the notes are D-E-F-G-A-B-C-D: still the same notes, but the intervals are different. The C major scale has a major third (C-E, four semitones) whereas the scale beginning on D has a minor third (D-F, three semitones). But this is not the D minor scale: in D minor, the subdominant chord (formed from the fourth note in the scale, the sixth and the eighth) is G minor (G-Bb-D). This scale has a subdominant chord G major (G-B-D); this 'sharpened sixth' causes the scale built on the white notes starting on D to be called the Dorian mode.

David plays tunes in the Dorian mode and points out that the typical chord change in Dorian is i-IV, for example Dm to G. Of course, the Dorian mode doesn't have to start on D; it can start on any note, but what is important is the intervals between the notes. If one starts on E, then the notes are E-F#-G-A-B-C# (sharpened sixth)-D-E, etc.

David asked for songs that use the Dorian mode, and I pointed out that 'The Banks of the Nile' by Fotheringay is in E Dorian (whenever a C is sung, it is C#). I was thinking about this the other day when walking the dog and thought that maybe I can break my temporary drought by using the chords of 'Banks' in order to write a new song, using primarily the chords Em, D, A and Bm. I sat at the piano and quickly came a tune based on these chords. The actual sequence is Em-D-A-Bm (twice) A-Bm-Em-D A-Bm-Em-G-F#-Bm: the notes of all these chords are contained within the E Dorian scale (except for the A# in the F# chord; Dorian would have an A chord instead) and so this song - unusually for me - is perfectly scalar, albeit in a mode.

The instrumental/bridge part in the middle is of a different species, what could be called a cycle of fourths: Bb-F-C-G, repeated several times. The move from Bm to Bb might look odd on paper but it sounds correct (I actually heard it in my head before I started playing it). I thought that going back to E Dorian from G would be easy, but because I extended the instrumental with several bars of Bb, I had to transition back via C.

After I finished sequencing (including playing a brief solo on my new mini-keyboard) and having the traditional post-prandial snooze, I took the dog for a walk. Naturally my thoughts turned to this new song (no lyrics yet and I have no idea what they will be about when they get written); it suddenly occurred to be that it might be more accurate to say that this song is written in plain B minor. The notes are exactly the same but start at a different place: B-C#-D-E-F#-G-A-B. So is the song in E Dorian or B minor?

The answer to this (somewhat pointless) question depends on which note sounds like the base note (or tonic, to use the musical name). Is it E or B? Whilst the song might start on an E minor chord, it ends on B minor, and in fact the only place where a perfect cadence (a dominant chord followed by its tonic) appears is at the end: F# > Bm. So however much I might have though that this song is in E Dorian, I have to conclude that it's in B minor. Does this make any difference? Not really.

[Edit from a month later] In order to confuse things even more, I decided to replace the F# chord towards the end of the verse with an A, definitely making the song Dorian. This required a slight change in the tune that actually made it easier to sing. Just to be contrary, I didn't replace the perfect cadence in the final verse.

Wednesday, March 17, 2021

DSupt Banks: Not dark yet

The usual time for a new Peter Robinson/DCI Banks book to be published is in the summer, but the summer of 2020 went by with no new book - not really surprising, considering the year 2020. But wait! A new book did appear yesterday, creeping onto the stage with little publicity - "Not dark yet", the 27th installment of the series.

The book is named after a Bob Dylan song, to which DS Banks listens at one stage, thus maintaining the tradition of naming books after songs, no matter how tenuous the connection.

The book became available yesterday in its Kindle edition: I had ordered it perhaps a week in advance and was mildly excited when I downloaded it.

At first, I was underwhelmed by the story; it begins with three different strands: recently added character Zelda revisits her childhood, Alan Banks sees his daughter get married, and Annie Cabbott continues investigating the background behind a murder executed (sorry for the pun!) in the previous book. None of these threads are particularly interesting, and in fact, the marriage thread runs dry immediately. It gets replaced with another short thread about Banks' son and his musical group's farewell tour.

But then an event that crops up in Annie's investigation starts to become interesting and the Zelda thread hots up ... and suddenly the book becomes much more interesting and engrossing, so much so that I continued reading all the way until the end, which is surprising, to say the least. I have often written that the pacing in these books is such that the beginning is slow and the ending fast, but this time the beginning was very slow and the ending very fast.

No glaring mistakes appeared in my first pass through the book, although there was one little thing that nagged me. Annie is looking for someone (a girl) but can only find very few traces. She manages to find the manager of a pizza restaurant where the girl had worked; not much information comes out of this interview, but the manager did say that the girl's salary was paid to her bank account. This is never referred to again, but surely Annie should have asked about this account then follow it up with the appropriate branch who could have told her that the balance was transferred to ....

Monday, March 15, 2021

A year of Covid-19

Today marks the unofficial anniversary of Covid-19 in Israel. What has changed since then? So much and so little. Israel is now returning to normal after some vast percentage of the population has been vaccinated against Covid-19. I've been working at home for nearly three months but soon I imagine that I will have to return soon to the factory (Covid-19 was a good excuse). We have elections again in another week. We might even be able to celebrate the Passover as a kibbutz again, although that seems unlikely; certainly Independence Day.

I wrote a year ago: On Monday I participated in a video conference: we now have software which enables peer to peer conferencing, as opposed to the 'client server' software which we had been using with special projectors. As a result, six or seven people connected up: most of the time there were only four active windows with two being hidden, although I think that everyone was visible at first. Another surreal event in increasingly surreal times. We were discussing (as we do every week) changes which are to be made to the factory in Karmiel; the biggest change is the installation of two huge 'nesting' machines which perform a variety of tasks connected with wood. These machines are being supplied by a company in Italy ... with whom all contact has been lost. It is clear that there will be a three month moratorium on these machines, if not longer.

Today we had another video conference: the novelty has long worn off and this is how I keep in touch with people. The 'nesting' machine arrived about a month ago and the technicians are due to arrive tomorrow for their long awaited visit. 

I am vaguely thinking about writing a song about the last year. I am fairly ashamed/embarrassed as my year has been good, whereas many, many people have lost their jobs, not to mention the 6,000 Israelis who have died of Covid. Of course, hundreds of thousands of people have died over the world. So far I've only got one couplet, something like "I've been practising/social distancing/all my life", but that's as far as it goes. I haven't suffered and sometimes that makes me feel guilty. I have increased my monthly donations to charity three-fold, partially assuaging my conscience, but that's the closest I have come. 

Friday, March 12, 2021

The continuing saga of saving unicode text - this time in the 'manager' program

Due to Covid-19, for the past year almost all of the customers/examinees for the Occupational Psychologist have been completing their exams via the Internet; someone developed a method using Google Forms (or docs, I'm not sure) to display one or two exams and to receive the output. These output files are very simple text files, normally in the form of an INI file, and there has been no difficulty in reading these files.

There is one form - not an exam - that is causing problems now: the personal details of  the examinees. I've received two files in which all the data has been written in Russian, and of course all our tools refuse to read this (or rather, replace each Russian character with a question mark). My previous forays into unicode (for example, this blog) had a program reading data into a database consisting of one or two tables, and so it was very easy (once I understood what to do!) to create a new database for these data. But we want to read the examinees' personal data into the 'manager' program (which is conceptually an ERP system) that has, at present, 101 tables in its database and around 260 different forms. There is no easy way of converting this system!

On the basis of the above-mentioned blog, I created a new test database consisting one table. There are two very important definitions: the database itself has a default charset UTF-8, and most of the fields within the single table have the UNICODE_FSS charset. I was able to input manually the Russian data into this table, save it and then display it (albeit in the database manager - I haven't got as far as trying this out in Delphi yet). 

This is as far as I have got so far, and I wanted to document all this before I go any further.

A solution that I am considering is to maintain this UTF-8 database along with the regular database. The 'people' table will contain an id field - not an autoincrement, but the same number as in the regular database - along with the fields that need to be in unicode. Fortunately, these fields do not appear in any reports so they can be maintained separately. The form that displays the data will have to get half of its fields from the regular database and the other half from the UTF-8 database; I think that this is feasible. 

I will create a stand-alone form that will display this double data so that I can solve all (?) the problems in a simple test harness before I try to integrate this form into the rest of the ERP program. 

Tuesday, March 09, 2021

Sometimes it takes a long time for the light to go on in my head

A shade over ten years ago, I reported that I had bought an Alesis Q49 usb/midi keyboard controller. I had fully intended to use this keyboard when sequencing songs, but it was too large for my computer desk and it joined its comrades in the music room shortly after its purchase. As far as I can recall, I used it precisely once.

Over the years, I've gotten used to 'writing the dots' as if I were a composer from the pre-computer age. This is painstaking work but more importantly, it forces me to imagine in my mind, then sing, parts so that I can write them down. I'm not very good at transcribing rhythms, so frequently I will simply plonk down the notes as crotchets, then play around with the note lengths until what I have written matches what I have imagined.


Sometimes it takes a long time for the light to go on in my head: this time, it wasn't until someone asked on the Musical Practice & Performance Stack Exchange site a question about small midi controllers. It wasn't a very good question, but it moved me sufficiently to search for such a controller on eBay. I quickly found this and ordered it without much delay. I ordered it on the evening of 23 February and was given a delivery date of after March 15; it arrived yesterday, a week earlier.

The unit itself is fairly small which is good, as far as I'm concerned. The action is somewhat 'chunky' which is not so good but not that important. Surprisingly, the keyboard is 'weighted' or 'velocity sensitive', meaning that the harder one presses, the louder the note played. I'm not sure that this is an advantage and the chunky action makes me doubt this more. Apart from the octave buttons (on the left), I couldn't get much joy out of the rotary control and other control buttons. The documentation is minimal; one is supposed to download a program from the manufacturer's site and indeed I did so, but I couldn't get much out of this either.

Reason recognises the keyboard without problem and I was able to play along with songs in this program. My regular MIDI sequencer was more problematic: whilst the notes that I played were recorded, I could barely hear them. The rotary control appears to change the instrument patch but I couldn't find a way to increase the volume produced. So it seems - on the basis of maybe fifteen minutes exploration - that I can use the keyboard with the sequencer when I am laying down chord sequences, but if I want to play anything expressively, I will have to do it in Reason. Fortunately this program has the ability to save anything recorded in it as a MIDI file, so I can still play to my heart's content and then edit whatever needs editing. I have never got to grips with editing within Reason: better the tools one knows.

All I need now is a song; I've actually been very productive in this respect, writing and recording five songs since the beginning of December. One - silly - song was written in about fifteen minutes, sequenced in a few sessions and vocals recorded within a week. So now I'm waiting for new ideas.