I'm pausing the programming after about five solid days working on it, with moderate (but not good enough) results. Instead I decided to finish this simple painting; "An Experience that isn't Shared is the Same as No Experience", oil on MDF, 420x318mm.
Sunday, November 17, 2013
Wednesday, November 13, 2013
Soundy Stuff
I'm supposed to be recording music this week but I've got caught up with enthusiasm for sound programming, as my new music will be vocal and I'd like some vocal processing options. I write my music on my own software, which is brilliant because it's cheap AND it gives you the freedom and power to add new bits as needed. Today I wrote a vocoder, which turned out to be quite simple; it's a bank of band-pass filters that filter the voice at different frequencies, then boost a sound wave (music) in those frequencies by an amount proportional to the volume of each filter.
It has sixteen filters. I wondered what would happen if I changed the destination frequencies but kept the source ones the same. I got some interesting results when boosting the mid range but didn't experiment further. I must try more of that one day...
My next task though is to pitch correct a vocal sample. Playing a sample at any pitch is easy so the hard part is determining the root frequency of the voice. I started by pondering (and head scratching) at Discrete Fourier Transforms for a couple of days. This bamboozling maths made sense; from what I understand it's basically that there are two ways to represent a complex waveform; as amplitude and time, and as a sum of sine and cosine waves of different frequencies. Both represent the same wave, just in two forms, the time and frequency way ("domain" mwahahahaha). This made me wonder if the universe behaves like this, as it sparked off a connection with waves and particles; odd how waves are seen as timeless and infinite but particles are discrete and finite, yet they are the same thing seen in different ways. It made me think that the Fourier transform has an important role in physics, and that any equation for the universe must be two equations, both different that say the same thing in two ways. After all, everything is one wave, the whole universe is a complex wave.
I'll leave that prediction to history and get back to my speech test. So, I need to work out the frequency of a bit of singing. I've split the sound into lots of sections. After lots of reading it seems there are several ways to identify pitch. The frequency way had appeal because I'd not done it before; that basically divides the sample into root frequencies, so a pure note would be a clear spike. The thing is the voice isn't a pure note anyway, so it's not necessarily easier than looking at the normal time-based sample.
So I think I'll start with normal sample data. Speech/singing isn't always pitched anyway, lots of hissy sounds like "sh" "tch" "sss" are white noise really and could be ignored. I'll need some A.I. to guess a good pitch, or even think that it isn't a pitch, and discard it.
Some principles mused...
A singing voice might be off but it's not going to be very off so it's more likely to be close to the desired pitch, or it's more likely to be at the previously sung pitch (rarely will a song jump up two octaves). You could go further and guess that a pitch will be musically pleasant, guessing that a tune is probably in the right key. This is the start of artificial intelligence routines...
So, I've got a few starting strategies. At best I want to determine the difference between ideals; a sine wave and white noise, and if it's a sine wave then determine the frequency. What options are there to detect either?
A sine wave flows smoothly, white noise jerks about. I thought of a fish flowing along the wave, heading up or down for the next hillock or trough. The fish can't turn as rapidly as the sound wave. If the fish stays close to the target path then it's a smooth wave, if it's always turning or miles away then it's more likely to be random noise. Perhaps the fish could be rewarded when it's close to the wave with accumulated points, but those fall away if the fish becomes sad at unable to track the wave (or rapidly turns; the pain of the anxious fish means white noise psychosis). So, a volume tracker of some sort is one strategy.
Another is to pick random points every so often... if that fish headed for waypoints every so many samples, then on a sine wave the results would still be easy going; a quantized sine wave would still appear smooth, a noisy one still random. Does that help?
And frequency. I thought I could track zero crossings, the times that the wave jumps above and below zero, then track similarity. This would be a great indicator on perfect source data; on an ideal sine wave the periods would be identical; and totally random on white noise. So a reward number for regularity would be good, together with a proposed period.
(EDIT: What if a sound wave had a good repeating pattern rather than simple repeats? I expect a few natural sounds might do that, or do they?)
Looking at different windows of samples might be a problem too, chances are there will be a few periods of pitch on there. An ideal size to analyse must be sought; one short enough to find only one sound/syllable, but long enough to give a good indicator of periodicity for low notes. Perhaps window periods that match the tempo of the song would be an idea. An idea that a musician and never a mathematician would even pick, as powers of two are best, and they're not at 120 B.P.M. (I wonder why 44,100hz was chosen as CD frequency and not 65,536hz for example? Maybe it's something to do with the laser of a compact disc, or a transistor or something.)
Well, I'll give it a go tomorrow. Please excuse my meandering thoughts but I wanted to type them out and I thought that this might be useful to other signal processing people in future. There's no conclusion to this blog post ... well, not tonight :) Happy dreams of sound fish to you!
Friday, November 01, 2013
A Big Post about Music Production and The Invisible Man
Well, my Iris is still not finished, despite days of work. Each step seems to just lead to another, but the end is in sight. I'm reminded that Fabergé didn't make his eggs, he might have designed them, and quality checked them, but he had a vast team of experts to actually do the craft work. That unskilled Carl Fabergé.
Now, speaking of Kraftwerk I'm in music mode. Yesterday I saw a call for the National Songwriting Competition and decided on the spur of the moment to enter. I'm not very keen on this contest as I suspect that it's there to leech money from the vast numbers of people eager for music success (I base this judgement on A: the fact that they've spammed every email address I have with calls for entries, and charge a lot for them, and B: I thought their critique of my last entry One Day was poor, it seemed they'd not even heard the song never mind analysed it). That aside, a deadline is fun and inspiring, and I want to write and record a new album this month, so I thought I'd record a new song in the four days until closing date. I re-wrote (the music to) a 2009 song a few days ago so I chose that.
The song is a plodding ballad that grows in power. In my head the backing was a piano, and I began with "Imagine" style chords (two then one then two etc.) this was a bit monotonous (sorry, John) so on the piano played something grand like Tchaikovsky's 1st piano concerto, but made the low notes single notes, then realised that it was similar to the Bohemian Rhapsody intro. I stuck with it, then added alternating flutes. In my head the song had the power of Calypso 3 by Jarre, a climb of mountains up and down in vast sways, and I toyed with booming slow percussion and considered a vocoded part like a titanium sound cannon at the start of each pattern.
The song is in three bits, but one interesting feature is that the chorus really should be quiet because it's about invisibility, being unnoticed. A vast chorus wouldn't fit the meaning yet songs demand a chorus that's more special than the verses. The chords in this one are pleasant, so I wanted something gentle that enhances them, like Karl Jenkins Palladio, or Vivaldi, and a harpsichord was ideal, stabbed in regular beats. It has a gentle feel (the modern ability to make it quiet is really a godsend for this wonderful instrument) and also a high narrow register that means it goes really well in songs without interfering with other instruments.
The last part was integrating the piano and harpsichord. At one point I toyed with having either, not both, but I found that the depth and richness of the piano really improved the verses, the song sounding icy spidery without it. In the chorus, alongside the harpsichord, I added high tremulating strings, ghostly. The lead in (the "I drift" lines...) was powerful, initially a large piano stab (Tchaikovsky/Grieg! again) then more subtle. I added some warm brass there, echoes of Comfortably Numb, which is a song with similar mood and themes (I experimented with an electric guitar solo in the middle too, which I might add later, but I didn't have the time and there was no real need for one; would it add to a sense of invisibility? That most famous and wonderful solo in the Pink Floyd song, does it really convey numbness? Not really, you could say that it's a wailing at the forces of malevolent emptiness, a banshee at the oppressive doctor, but it was more a showy rock part I think, an aesthetic element, than anything on an intellectual or emotional connected with the song).
I added and removed lots. At one point a large echoing stab took place on each chord change of the chorus, but it made it too dramatic when the chords alone convey enough. I played with the Strawberry Fields style flutes (more inspired by Beethoven's 6th and my Infinite Forest music, which is full of sighing alternations) but left them in because it added something to the song generally, I hummed them when I took them out so they must be worth keeping. The intro is short but was extended a bit, and some casual ambient speech added there. A wailing ambulance (a Vangellisism from Blade Runner) was toyed with but unused. The tempo changes were the last thing, a gentle slow into the chorus, so important. The deadness of tempo and volume expressiveness is the curse of modern pop. Then finally a booming piano end (ala I Don't Like Mondays).
Overall though, the whole song is all of those influences and none. If anything, the tune and mood is more like Nobody Home than Comfortably Numb on that Pink Floyd album, but with a soupcon of a power ballad by an 80's Heart, the verse with a relaxed feeling like Love Letters Straight From Your Heart...
To hear the final tune, you'll have to wait until I learn to sing it (I must learn fast!) and make at least a crude video for YouTube (though this song would benefit from some special effects - yes?)
Here, in the mean time, are the words to The Invisible Man...
No parts.
No broken clockwork heart.
No bits of hair to depart.
That's me.
That gap inside the crowd.
A snowflake inside a cloud.
I drift inside a fog all day.
I close my eyes to find out that the world won't go away.
There's no-one to believe me.
There's nothing left to leave.
My body is clear as air.
There's no eye that can see me.
I blinked and I was gone.
I woke up to find myself
invisible.
Too bad.
My happy life went sad.
I've turned from obscure to mad.
I call,
but make no sound at all.
The mirror just shows the wall.
Is this what it feels like to die?
Appealing to a frozen sun inside a silent sky.
no-one to believe me.
There's nothing left to leave.
My body is clear as air.
There's no eye that can see me.
I blinked and I was gone.
I woke up to find myself
invisible.
Monday, September 02, 2013
Iris Slots
The doors are now stuck on my Eden iris. The hard part was lining them up so that the exact curve on the front edge of one door matched the curve on the rear of the next one. The way I did that was to lay the outer doors out on top of the inner doors, carefully moving and shifting each bit, bit by bit, weighing down the correct ones to stop them moving. Here's two outer doors in place, showing the inner doors.
It took half a day of placing, shifting, staring, thinking, before I thought I'd done enough. It wasn't perfect, two doors were up to 2mm out, but I decided not to muse forever like Leonardo would have. That was probably as good as it would get so I lifted one door at a time, marked the area to be glued in pencil with a paper template, sanded a little to create tooth then carefully applied aliphatic resin glue to each surface, brushed it even then weighed it down as it stuck. After an hour or so I moved onto the next door. At the end of the day all seven were stuck. Here it is at that stage...
Then I opened the doors, and after a tense moment or two where one door had glued to its neighbour, they slid open...
Now each has to be opened by hand so there is a crucial job left, well, two and one is critical in that it needs to be millimetre perfect. Each door will have a metal pin coming from the top which must be in exactly the right place. It has to be pretty vertical but if it's not perfectly vertical it'll still work, but they must be on the same radius. To open the iris those pins move outwards in unison, that's basically all they need to do. The pins fit in a special slotted ring (the bezel) such that rotating it makes the pins move outwards. It's important that the pins are in the right place or they won't fit the bezel.
Here's the prototype:
I deliberately made it badly so that I knew the tolerances. Basically they were worst at this bit. The prototype struggled with opening and the result wasn't that pretty. The wobble, the difference between the size of the pins and the width of the slots needed to be minimal. If it's too large it will not only hang loose and look ugly, it will also distort the shape of the doors as they open and instead of nice seven-fold symmetry, it will sort of sag.
So those slots need to be just a tiny bit bigger than the pins. Here are the slots on the full size version...
I drew them with a beam compass and cut them with a jigsaw, with a plan to sand them to size. The problem is that sanding inside a long thin curvy slot like that is a nightmare. My first thought was to use a spindle with sandpaper on, but it would have to be on a pedestal so that the slots remain vertical (a Dremel tool would be a no-no). The spikey giant bezel made doing anything on the pedestal drill awkward and dangerous, and I had to make the sanding spindle thing because they don't make them that thin. It barely worked, and naturally produced a lumpy result, sanding a long thing slot with a tiny cylinder...
Ideally I'd have a gently curving sander, perhaps a belt that bent at the perfect angle (well I say ideally, ideally I'd use a computer controlled machine to cut the thing in the first place, but I'll ignore that option for now, but keep it in mind, just in case). Anyway I thought that the jigsaw worked quite well... so what if I attached a sander to the jigsaw... so my plan is to take a metal plate and bend it to the correct curve...
Then glue sandpaper to it, then glue it to a jigsaw blade to make an electric sander that works at just the right curve and at a right angle to the surface. I'd have to make a second concave blade for the inner curve.
When that's done I can check the measurements with a paper template, then check the position of the pins on the doors. Once they're in there's no going back, no adjusting the doors, no shifting and sanding. Any gaps will remain gaps. Putting the pins in will be a make or break moment...
If in doubt though I'll stick the pins based on the correct measure. It's easier to make a new bezel than make everything else again. I hope to have all of the engineering bits done within two weeks, then the painting can begin, and the decoration.
Thursday, August 29, 2013
Pivots
One of the difficult tasks on my Eden iris today, fixing the pivots. These 20mm diameter tubes need to be exactly in the middle and exactly vertical, so how to do it?
At first I thought I'd drill an 18mm hole then sand around the rim, gently expanding the hole until I got a perfect tight fit. I used a blade drill, here:
I quickly discovered that these wobble and shake the wood horribly. The nice bore type thing (I think it's called a Forstner bit) was much better but I didn't have an 18mm one. Anyway, I realised that I could stop much of the vibration by drilling a big pilot hole first with the biggest drill I could find, that cleared away most of the actual solid wood, making it less effort for the blade to cut a hole.
So, I had an 18mm hole that wasn't quite in the centre (never would be it's impossible to get these things perfect). I took a cylindrical file/rasp and started to finish off the edge. After about 10 mins of mashing the chewy M.D.F. I realised that this was going to take a long time AND probably not work, the wood texture was not ideal for rasping in this way. The end result would almost certainly not be clean or vertical.
I decided a sanding drum would be better, but I didn't have one that was tall enough, so I made one from metal tubes, glueing some sanding drum bits to it...
It was good enough to work, it still rather mashed the edge a bit but was relatively clean. When I'd cleaned out the hole to make it 20mm I found that it was a worse fit than drilling a 20mm hole from the outset!
So there seemed to be no perfect way. I decided to drill a 20mm hole directly instead. There was a gap and wobble, but thought that I could glue the pivot with epoxy resin (or clay) and set it perfectly that way. But how to make sure it was vertical and central?
For centralness (is that a word) I drew rings around the 20mm guide (22mm) and used that as a guide where to place the tube. For verticality I screwed a metal collar to the pipe...
It's deep enough so that the edge of that should be at a right angle to the pipe, so I then fixed that into the hole, clamping the collar to the wood...
And there we are, one pipe that's about as vertical and central as I could get, I think. Time is short so rather than consider infinite possibilities of getting it perfect I went for the best I could think of at the time. Now I'll glue the other six. It will probably take me all day just to attach these seven tubes!
Sunday, August 25, 2013
Somewhere Out There
Not a productive day, one of slow steady toil. These past few weeks have been notable for lonely periods, which are good for creativity. The time for more painting is to come. Tonight, a poem came to me.
Somewhere Out There
Somewhere out there is a world, to touch.
Close and ubiquitous.
Humming with people,
emotions, an engine of activity and love.
Somewhere there is a place,
of warmth and comfort.
A web of answers, thoughts,
and liquid perceptions.
Silent peace.
The tears of sleep.
There is something more than surfaces,
and objects,
and temperatures,
and rigid data.
More than words.
More than mere words.
I know it is there,
near,
somewhere.
Sunday, August 18, 2013
The Great Being
I'm back to reading philosophy and the discussions about consciousness being an "emergent" property, something that naturally lies above the hum-drum of cellular interactions, like a face inherently "emerges" from patterns of paint in a portrait, inspired me to wonder about the implications.
As a human being we think of ourselves as one being. What is oneness? A feeling of control and influence and feedback. Oneness is communication, and self-awareness. We know what constitutes us by our influence and feedback, control and sense, of our bodies. Our clothes become us when we wear them, without even thinking about it. Our hair doesn't have any feeling to it, not much, but it's still us, if less us than something we can totally feel and control.
Of course, we are not one life-form but a collection of cells and bacteria, each a life-form in itself performing a task and co-operating with its neighbours with differing degrees of dependence and independence. Do you think that our cells are aware of us? That any individual cell knows that it forms one big being with an independent self-awareness?
We don't command our cells directly, for the notion of us itself, a control centre, is illusory, a factor that emerges from the interactions of the cells. Like a living city, cells are partly independent, and partly responsive to their neighbours, the rules, chemicals and signals from those "higher up" in the control chain. Our bodies function like a country, a world in itself with the commanding brain cells as government, capable of some wilful doctrine or law, but largely independent of the lives of the populace. The cells of our bodies live perfectly well when we are unconscious, after all. But we can't do as much when unconscious. Together we are stronger, just as one cell alone can't achieve most of what one human can. No cell will ever play the piano, never mind compose a Bach fugue, but a collection of them can and did!
Our society functions in a similar way too. We interact and socialise depending on rules and needs, interactions. Together we achieve more than we could alone. Nobody invented the electronic computer, or put a man into space; those things were collective efforts. Many activities of society are now essentially collective, with no one person capable of doing them. This applies even to vital public services. The individual has grown less and less important as civilisation has advanced.
We respond to rules as complex as those that our cells respond to. We purge the world of vermin in the same way that cells attack bacteria. Societies go to war when threatened, like an attacked body battles an infection. Our memory is made up from the collective memories of our brain cells, but so to does society form and store memories in libraries and archives, memories greater than any one person can have. Could it be that we form a new being, one collective consciousness with a united independent thought, as detached from us as one cell is from our minds? This poses a question; what is the difference between our waking conscious selves and when we are asleep and unconscious?
On a cellular level there is probably no difference. When awake we can move about though, talk, and interact, and do things... that's the key difference between being conscious and unconscious! How can a society, a country, a planet, express that it is self-aware? And to whom? Without an entity for our society to interact with then perhaps it can't be called conscious. Perhaps we seek life on other planets because the great being that is all life on Earth feels alone.
Thursday, August 15, 2013
Mash
Tick tick. SO many things in progress at the moment. My main art task is the construction of the Eden cabinet, a new art project that has already pushed the boundaries of doing something intensive and expensive that 99.99% of other artists wouldn't bother with!
However last night I went to the première of a short promotional video that I wrote the music for, so here it is. It's for a charity ball in Nantwich in November, so if you know anyone in the vicinity who'd like to come then please let them know and/or spread the video. I hope you enjoy it.



