Monday, June 29, 2015

Saving grid column widths

The OP returned from America a few days ago and on Friday we had our first meeting. After reviewing the various problems which had arisen during her absence, we turned to the few pieces of code which I had developed. The following request was then made: the ubiquitous dbGrid in the management program always shows each column being displayed with the appropriate width, although sometimes this width is wrong (especially when digits or English characters are displayed with Hebrew letters). The grid allows one to change a column's width, but these changes are not recorded. The OP wanted that once a column width is changed, it should always be displayed with that new width.

I have no experience of this so I had to research the subject. At first, it seemed very easy - simply write code which would store the column widths of a grid to the database when the form closes, then retrieve those widths when the form is opened. I considered the possibility of storing only data for columns whose width has changed, but found it very hard to determine when a change had been made. So I decided to store all the column widths of the grid.

But then I discovered that I was getting errors when I tried restoring those widths. Naturally I was working on the most complicated form in the entire program - but it's also the most heavily used. Data in the grid is often redisplayed by means of dynamic parametric queries and I had great difficulty in determining when to load the saved values. After knocking my head against the wall for at least an hour, I realised that instead of saving values from the grid, I should save (and load) values for the underlying dataset. Once I made this change, the task became much easier: before closing the dataset, I save the column widths, and after opening the dataset, I load the widths. The dataset has suitable events (BeforeClose and AfterPost), so the call to the library code need be written only once per dataset.

Naturally, the actual code to save the widths in the database is stored in a library procedure so every dataset can use it. The actual code to save widths is very simple; basically one iterates over the fields in the dataset and saves each width to the database.
with tsqlquery.create (nil) do begin sqlconnection:= dm.sqlConnection1; sql.add ('insert into usergridwidths (usergrid, colnum, colwidth) '); sql.Add ('values (:p1, :p2, :p3)'); params[0].asinteger:= gridnum; prepared:= true; for i:= 0 to cd.fields.count - 1 do begin params[1].asinteger:= i; params[2].asinteger:= cd.fields[i].displayWidth; execsql end; free end;
The loading code is very similar. 

I'm not sure that this is the best solution - the tdbgrid component has an event called 'OnColumnMoved'  which should provide a trigger for detecting a change in a column's width - but I couldn't get this to work. So the above solution should be taken with a grain of salt: it works, but I'm sure it's not optimal.

Sunday, June 28, 2015

Even more guitar

I started work on a new track the other night, fully intending to incorporate live guitar work. After preparing a track in Reason with holes left deliberately for the guitar, I started recording the parts. Again, there was an introduction, a link, another link and a coda. I also added a rhythm guitar part in the first two verses.

I worked a great deal on the sound of the guitar parts - the rhythm part had a noise gate, compressor, equaliser, flanger and a image width plugin applied to it. Still I wasn't very satisfied and in the end I decided to add the parts which I had played on the guitar to the original MIDI file, thus obviating the need for live guitar.

To my ears, the live guitar doesn't sit well with the sequenced material for two reasons. The primary reason is timing accuracy - when everything is exactly on the beat, then miniscule timing errors become very apparent. The less important reason is that I can hear extraneous noises coming from the strings after every note as my fingers lift off and move - a sign that my guitar technique is not as good as it should be. These 'clangs' were cut off by the noise gate and the compressor helped maintain a constant volume, but even so, the guitar simply sounds out of place.

I'm sure that if I recorded a track only with live guitars along with a sequenced drum part then the result would be better but at the moment that's not what I'm looking for. When I was rehearsing the song, I remembered one very good reason for not recording guitar: I'm not interested in simple strumming but rather in more complex arrangements. That said, I simulated the sound of an acoustic guitar playing a single strum on the second beat of every bar (at least, for the first two verses).

Someone approached me on the kibbutz the other week: he wants me to record him playing his songs. These are intended as demos, although it's not clear to me whether there will be any further development. Anyway, these will definitely be recorded with live guitars only along with vocals; at least I've had some practice in engineering for this. There's still a problem of latency with the program Audacity that I haven't managed to solve; this manifests itself by listening at the same time to both the prerecorded material and the live track which is being recorded. The way I 'solved' it - or rather avoided the issue - was by not listening to what I was playing. This is awkward with electric guitar (as its acoustic sound is not very large) but should be less of a problem with acoustic.

Saturday, June 27, 2015

Vinyl log 16 - 24 June

24June1977City BoyDinner at the Ritz

On 19/6/77, Jeremy and I went to a concert at the Roundhouse; as I wrote three years ago ... in June 1977 I saw Caravan play, supported by an otherwise unknown group called City Boy. Actually, I had heard the name before: in 1975, I started reviewing lps for my university's newspaper and in the course of my duties received records and information packs about upcoming acts, including the above mentioned City Boy. Their information sheet must not have been too attractive as I elected not to ask for their record.

These days, the only thing that I recall about their act was that the stage was dressed like a sitting room for their encore, with the two singers sitting in armchairs at the front of the stage. The song which they played was the title song of their second album. I was sufficiently impressed to buy the album a few days after the concert - surely this is the whole point of playing as a supporting act. I was amused to note that additional vocals and saxophone were supplied on that track were Peter Hammill and David Jackson (of VdGG, as if anyone needs reminding). As far as I could figure out, they recorded the album at Rockfield Studios in Monmouth at the same time as VdGG were recording "Still Life".

The music was heavier - containing more loud electric guitars - than I prefer, but the songs and especially the lyrics displayed a large amount of wit which caught my fancy. I decided to add CB to the list of acts whose records I would buy; I bought this one at least a year after it was released but would buy the next one on the day of its release.

Monday, June 22, 2015

Vinyl log 15 - 22 June

22June1972variousMorris On

Judging by the date, this was another purchase from Virgin Records in Bristol. At the time of its purchase, I was in a strong 'folkie' phase: I had recently attended the Lacock Festival (read an earlier blog about it here) and at some time in the near future, I was to buy a concertina. I have just spent some time googling that festival and was unable to find much information, apart from the fact that the festival moved to Chippenham and recently celebrated its 40th anniversary.

The link between Lacock and 'Morris On' is this: one of the many workshops at the festival was a rudimentary introduction to Morris dancing. As someone who felt competent in Israeli folk dancing, it was only natural to try out the Morris. I recall Morris being much easier, being composed of only a few steps. Most of the tunes passed me by, but I recall one tune was called 'Princess Royal'. This is one of the tunes played on 'Morris On'.

At the time, I think that the record was a slight disappointment as I expected more of Richard Thompson. He shone only on "Cuckoo's nest" (a song which I think I sang once or twice in folk clubs), but in retrospect, his job was to accompany the songs and not take the limelight. Now I wonder what Dave Mattacks thought of the project: did he have some genuine interest or was he dragged along as the regular folk rock drummer?

The record's cover was probably the best thing about the project.

Tuesday, June 16, 2015

More guitar

"Everything is written in sand", sang Robin Frederick; normally I wouldn't agree, but following my adventures of recording electric guitar, I have to admit that there is some truth in her statement.

After having listened more than a few times to the song which I recorded both with Reason and with live guitar, I made two major decisions: the synthesized arpeggio in the first two verses does more harm than good and so can go, and the guitar solo needs to be redone. It occurred to me that this was my chance to incorporate some reverse guitar: as the solo is over four bars of A minor, this shouldn't be too hard.

I was surprised at how hard it actually was. I had already decided on an ascending scale, and as the meter is 5/4, it means three beats on the A, two on the B, three on the C, two on the D, three on the E, two on the G and a whole bar on A. But recording this backwards requires a few changes: I had to play a descending scale, so that when reversed, the scale would be ascending. 

More problematic was the timing: out of habit, I played three beats on the top A before playing two on the G.  When reversed, this didn't sound correct: the solo started with a bar of low A, when it should be three beats of A. In the end, I chopped 1.6 seconds off the front of the sound file and got everything aligned correctly. Whilst maybe the end is slightly premature, the total effect is good. I should add that the sound editor easily allows one to reverse a recording.

This exercise only increases my appreciation of guitarists who have recorded long backwards parts. The pioneer was probably George Harrison on "I'm only sleeping" (Revolver); several years later, Stephen Stills played backwards almost all the way through "Pre-road downs" (Crosby, Stills and Nash) and Robert Fripp also plays mainly backwards through "Book of Saturdays" (Lark's tongue in aspic).

Maybe my next step is recording the Ovation guitar to provide the chordal background for a song, instead of the more usual pad.

Monday, June 15, 2015

Ashley Hutchings, MBE

This morning's mail brought the following announcement:

English traditional music is celebrated in the Queen's Birthday Honours as musician, songwriter and bandleader Ashley Hutchings is made an MBE for his services to folk music.

Born in London but now living in Derbyshire, 70-year-old Hutchings was the driving force behind several famous bands including Fairport Convention, Steeleye Span and the Albion Band. These groups enlivened the folk scene by introducing rock instruments thereby opening up traditional music to a new and younger audience. Hutchings said: "I'm obviously very proud of this honour but it's England's musical tradition that's being recognised as much as me."

In a career spanning nearly 50 years Hutchings has worked with a host of folk and folk-rock luminaries including Richard Thompson OBE, Martin Carthy MBE, Maddy Prior MBE, Shirley Collins MBE, John Tams and the late Sandy Denny (who described him as 'one of my biggest heroes, a great man').

During the 1970s, Hutchings worked with National Theatre director Bill Bryden composing the music to 'The Mysteries', 'Lark Rise to Candleford' and 'The World Turned Upside Down'. Education has also been an important element in Hutchings’ career. EMI commissioned him to put together an LP of traditional dance tunes specifically aimed at school children and he has conducted numerous workshops to introduce young people to England's folk song and dance.

Hutchings has won numerous awards including the English Folk Dance and Song Society's Gold Badge Award, the Good Tradition Award at the BBC Radio 2 Folk Awards, and a Lifetime Achievement Award at Italy's Premio Ciampi. Hutchings was also the driving force behind Fairport Convention’s seminal album 'Liege & Lief' which was voted 'The Most Influential Folk Album of All Time' by BBC Radio 2 Listeners.

The picture at the top was taken at the 1997 Cropredy Festival, at a time when we both had hair. I wonder why I am wearing a 'Liverpool' baseball cap.

Sunday, June 14, 2015

Vinyl log 14 - 14 June

14June1975Fairport ConventionRising for the moon
14June1975Van der Graaf GeneratorThe aerosol grey machine
14June1986Sandy DennyWho knows where the time goes
14June1986The BandNorthern lights - Southern cross

In 1975, 'The aerosol grey machine', which could be viewed as VdGG's debut album (although it was actually a Peter Hammill solo album) was a mythical beast. We knew it existed because two tracks from it had been released on the compilation "68-71", and Jeremy's brother Paul had a tape of another track ("Octopus") from this album. I think that we also knew that it had been released in America only, so no one in Britain had a copy.

I noticed one day in the Melody Maker that a record importer was selling copies of this album. So immediately I ordered one and sent a cheque in the mail. I remember that 14 June was a nice sunny Saturday, so Jeremy (whose birthday it was) and I decided to pay a personal visit to the shop selling the record, which was in a remote (to us) district of London called Blackheath. Once in the shop, I said that I had ordered a copy of the record; the sales assistant went into the store room then returned with the packaged record. No identification required.

The album has a  rather strange history; it included two tracks which were recorded at the beginning of 1968 ("Afterwards" and "Necromancer", both of which were on "68-71"), whereas the rest of the songs were recorded at the end of July 1969. The sleeve notes reference a song which is not on the record, and if I remember correctly, there were also some pressings of the record without "Necromancer". The vinyl version did not include the song "Ferret and Featherbird", which was included on the cd version released by Mr Hammill. There is also an alternative sleeve which I saw at some point in the early 70s, although I don't remember where.

I don't remember now whether I had also ordered the new Fairport album or whether I picked it up when I was in the shop. This line up - half Fairport and half Fotheringay - had great potential, but something went wrong during the recording process. I saw the band play at the Royal Albert Hall close to the release of this album, along with G, the above mentioned Paul and his then girlfriend. It was the only time I went to the RAH; we had seats somewhere in the sky and I made a terrible recording of it, to which I have never listened.

This record was the debut of drummer Bruce Rowland with Fairport, who was to occupy the drum seat for several years. An email posted a few days ago by Swarb said that Rowland had cancer and is living in a hospice.

Fast forward eleven years: my wife and I were in New York City for a short family visit. We were staying at the Wellington Hotel, which was a few blocks south of Central Park. One day I walked up past Columbus Circle to the Lincoln Center, where there was a good record shop. I bought The Band's "Northern lights - Southern cross" along with the four record Sandy Denny box set. I don't recall listening to The Band's record that much, although it contains two excellent songs ("It makes no difference" and "Acadian driftwood").

The Sandy Denny box set was wonderful. Whilst I already owned the majority of tracks, it also contained live material and demoes with which I wasn't familiar. The set came with a beautifully produced booklet with full personnel listings along with pictures. Obtaining this box set was probably the highlight of the visit.

Saturday, June 13, 2015

Incorporating guitar into recordings

Several months ago, I thought that it would be a good idea if I could incorporate some guitar playing into my recordings. All I would need for this would be some way of interfacing the guitar to the computer - and there is a simple solution. The device pictured on the left costs about $10 and is easily obtainable. Unfortunately, I couldn't get it to work with my main computer, which is  a throwback to previous days, still running XP (I don't want to start updating software which might not have suitable versions for Windows 8).

Last weekend, it occurred to me that maybe the device would work with my new laptop computer: I plugged my guitar into the device and plugged the device's USB connector into the computer. I began running Audacity, the freeware music editor, and hey presto! The guitar was being recorded into a sound file. I then began developing ideas for incorporating some guitar work into a recording.

At the same time, I was developing an arrangement for an old song of mine, converting the original 4/4 rhythm into 5/4. Once I had the backbone of the arrangement ready, I started adding more instrumental parts, but this time taking care to leave room for where the guitar was going to play an introduction, a solo and a coda.

Yesterday, I sat down with the computer, guitar and interface device in order to record the guitar parts. Audacity allows one to record multiple tracks which can either be mixed down to one or to be exported as individual files; I preferred the latter option. The introduction took a few takes to get right, then I recorded a simple rhythm guitar part for most of the song. A few more solo parts were required, which again were recorded several times each until I was satisfied.

After transferring the files from the laptop to my main computer, I was able to plug them into the song. There is a small problem with latency: the parts as recorded lag slightly behind the main music track, but this was easy to fix. Having multiple guitar tracks was a good idea as I was able to apply different processing to each track: the opening was overdriven, the rhythm part was recorded in stereo and had flanging applied to one side, the middle had multiple echo and the coda had a different type of flanging. Once I was satisfied with the effects and the timing, I mixed the guitar parts down to one track.

This morning I recorded vocals: in places this was hard as the words don't fit the new rhythm too well. One punch in was required for the first verse and the entire final verse was rerecorded. Again, once everything was satisfactory, I mixed the vocal tracks to one track then ran the file through pitch correcting software.

Finally I mixed the music track from Reason, the guitar track and the vocals together. The result is quite good - although whether it justifies the effort is debatable.

[SO: 3927; 3,16,37]

Tuesday, June 09, 2015

Vinyl log 13 - 9 June

09June1977Randy Newman12 songs

I have absolutely no recollection of buying this album, although I think that I can reconstruct the reasons for its purchase. A very influential book on me at the time was Greil Marcus' "Mystery train"; I bought the book for its chapter on Randy Newman and came away convinced that I had to listen to The Band.

At the time, the earliest record of Randy Newman that I owned was "Live"; Marcus referred many times to songs which were on his first two albums, songs with which I was not familiar. In order to fill the gaps, I bought this record. I don't think that I ever owned Randy's debut record on vinyl although of course I have it on cd.

I don't like this record very much. It was very much a reaction to the debut album, which was orchestration run wild; this one has very simple arrangements. The songs are - for Newman - very simple. There have been several occasions when I have given this record another listen but I have yet to improve my opinion of it. 

"Sail away", the next RN album, was a huge improvement, in every possible way.


Like many others, I too am a member of LinkedIn (the soi disant "world's largest professional network") although until now, this has been more of a game for me and not something serious. The other night it occurred to me that I could use LinkedIn to help with my doctoral research. I searched for people whose profile includes the words "ERP" and "Priority", then sent invitations to those that I found.

When the people answered my invitation (and I think that everyone has), I sent them a message back thanking them, then describing my research. From the eight or so names that I found, I have been in contact with two. I could take things to 'the next stage' but until this morning I haven't been feeling well enough to do anything about this.

This morning, I went to the doctor, who after listening to my symptoms and prodding my stomach, prescribed for me a drug which is a cocktail of paracetamol, codeine, papaverine (an opium extract which relaxes smooth muscles) and atropine. I took my first pill at around 9:15; at first it didn't seem to do anything, but two hours later, I was feeling much better. My stomach barely hurts, but more importantly my mood has greatly improved.

Thus I was primed for the next move in the 'pilot game'. Every day I check the incoming orders to see whether there is one from a company which uses Priority. Today I found such an order; it turns out that the company is situated about 200 metres from me. So despite the heat, I went straight to the company to speak with the appropriate person.

This company employs someone in roughly the same position as I; when I explained the research, he said (as does everyone) that it is very interesting. To cut a long story short, he has provisionally agreed to take part in the pilot research, for which I am extremely thankful. As I am physically near, it will be much easier to keep in touch than with someone who is in the far north of Israel (one of the LinkedIn connections).

Saturday, June 06, 2015

Vinyl log 12 - 30 May

30May197510ccThe original soundtrack

I had probably read about the impending release of this record in the music papers; after the success of 10cc's previous release, "Sheet music", I would have been impatient to hear their latest recordings. I had also read about how a record company had bought their contract for 1 million GBP, which at the time seemed like a huge amount of money.

The first time that I heard anything from this album was when I was riding on a bus and I heard a young girl singing what turned out to be the chorus from "Life is a minestrone". The fact that I was on a bus was unusual enough; I think that I was returning from a stay at my parents.

Anyway: the album. A fantastic one-two punch of an opening, with "Une nuit a Paris" and "I'm not in love". Unfortunately, the rest of the album wasn't so good; the above mentioned "Life is a minestrone" is remnant lyrically of their previous "The Wall Street Shuffle", and is still good for a laugh. "Second sitting at the last supper" is a piece of furious rock; intriguingly all four members have a writing credit. This has always struck me as a strange theme for 10cc as 7.5cc are Jewish.

Personal recollections: my girlfriend, G, could not get enough of "I'm not in love"; we used to listen to this on repeat all the time. I used to entertain thoughts of returning from the university to find her in my room, playing this song (like all fantasies, it never came true).

Forty years on, I find the opening "Paris" track to be incredibly strong, which shows how advanced it must have been then. But there is too much filler, and I wonder whether Phonogram, the record company, recouped their advance.

[SO: 3919; 3,16,37]

Friday, June 05, 2015

User conference

Since having returned from Italy, I have been working very hard at the day job; the days have been exceedingly long and full of pressure. I also worked most of the last weekend, both Friday and Saturday. Thankfully, it seems that almost all of the tasks have been completed, although as Donald Rumsfeld famously said, "there are things that we don't know that we don't know". 

Accompanying me for the past eight or nine days are stomach aches which range from the mildly annoying to the extremely painful. It's not clear how much these are organic and how much they are psychological - probably 50:50. Things seem to have died down now, although there is still a lingering ache.

The only extra-curricular activity which I had time for was a conference of Priority users, which was held on Monday. This meant that I had to take time out of my extremely pressured work schedule. The conference was on a much larger scale than I expected: apparently slightly more than a thousand people attended. Whilst the location seemed suitable when only a few people were there, it later became extremely crowded. I saw someone that I know, but before I could react, that person disappeared and I never saw her again, despite wandering around for about 15 minutes, specifically looking for her.

The evening before the conference, I prepared a hand out about my research: an explanatory note from me, a letter from the university, the consent form and my SEMS paper. I printed 100 copies of this five page document and stapled them together. I purposely arrived at the conference venue early so that I could distribute the papers. Although I expected a few booths, I hadn't expected the scale of what awaited me. I saw that there was an area with small tables set up so that people could sit down, eat, drink and talk, so after considering my options, I decided to place a few copies of the hand out on each table.

I managed to distribute most of the hand outs this way, then had a cup of tea myself. My stomach was performing acrobatics so I decided not to partake any of the culinary delights being offered. A woman appeared at my table and collected the few hand outs which were on the table, adding them to those which she had already collected. I asked her what she was doing and she said that it was forbidden to distribute those papers. I said that they were mine and that at least she should return them to me. Eventually all the hand outs were returned. A more senior figure kept on saying that it was forbidden; I tried to explain, the more senior woman said that she would try and find out whether I would be allowed to distribute the hand outs, but of course she did not return.

I realised that no one could stop me handing out the papers to people as they went past. This was difficult at first as no one was coming my way and anyway I'm too diffident for this. Eventually I got better at this and managed to distribute personally about 80 copies. I saw that most of the people actually read the hand out and seemed intrigued by it, although later on I saw a few discarded copies. One person actually said to me later on that the research seemed very interesting. Naturally I included two email addresses and my mobile phone number.

Four days later, I am still waiting for the first response.

The conference itself was very disappointing: it was very strategic and modern, whereas I am a tactical and traditional person. In other words, there was very little said which was of direct interest to me; the conference could have been about any ERP program. After a break, I consulted my phone (which had been turned off; it seemed that I was the only person not consulting his phone all the time), I saw several messages from my manager, asking where I was and imploring me to return. As I wasn't feeling well and wasn't enjoying the conference, I decided to leave.

This was a very disappointing day: I didn't make a single contact. I am very depressed regarding the future of my studies as without companies willing to participate, I have no research and without research, I have no doctorate. It may be that the pressure of the past fortnight is influencing this depression, but at the moment I can't see any alternative to cold calling companies, and that hasn't been successful so far. Even the person that I met the day before going to Florence has yet to answer the emails that I have sent him.