Thursday, 13 May 2010

The end is nigh...

Hi,
And that's Hi very possibly for the last time for this project, as the project is pretty much complete.

So, from where we left off last time then..

I had made a breakthrough in getting one LDR triggering MIDI within Max/MSP.
So I had a wonder over to the Max/MSP forum (http://cycling74.com/forums/) and asked for help with my single remaining problem (unless you count building the piece as a problem, but I didn't). I needed Max/MSP code to read the value from an LDR and use it to trigger a sample - much more than just the MIDI piano sound I already had. This required actual knowledge of Max!
So a member of the Max/MSP online community called Brendan stepped in and gave me a patch that did exactly what I wanted. The user gives a value (or two values that it will react between, but in my case I gave it a single value to work with) and this creates a 'bang' which, with help from Robert Taylor I had playing samples that I created - simple sine waves using Logic.

Now that the patch was there I needed to build the beast, and I have done just that.
I only had to purchase two extra LDRs (which use a slightly lower range of Ohm-age as Maplins ran out of stock of the most ideal LDR), as well as three variable resistors - one for each LDR. The first had managed to set itself on fire during some testing before. Using tape to attatch the LDRs to various things I attatched two new LDRs, one to a cardboard box and the other to the top of a pringles tube. It's nice to give it a 'bodged' home-made feel. The other advantage was saving money on purchasing breadboards when I had already bought enough breadboard real estate to fit the resistors on.

So stick a fork in me, I believe I'm pretty much done.

Here is a very brief video of the piece:
video

I'll do another using different samples and more accurate readings in Max very soon.


The issues that still remain are:
A) The sensitivity of each LDR could definitely improve, only time spent tweaking it will cure this problem.. which brings me to my next issue..
B) If this piece is presented at the Confetti showcase, the values given from the LDRs will differ throughout the day if presented in a room with a window, as the amount of light that leaks in will change - this means the values that the samples must be triggered at must be changed slightly throughout the day to accommodate for this.
C) This final issue is minor. To put it simply, the sine waves are quite boring and ugly sounding, especially when repeated so often. I may create a drop-down list in Max/MSP so that different samples can be loaded at the users discretion.

Monday, 10 May 2010

Welcome to the working piece...

Hi Again,
Since I last updated, lots has happened. Last Friday (only four days ago) I was keen to get this project underway. I went to Maplins with the list I had acquired from Charlotte and purchased the following:
1 x breadboard
3 x Light Dependant Resistors (of different values - low, middle, and high so the best could be found)
1 x 100KOhm Variable Resistor
1 x Bag of single stranded wire
1 x Cheap torch

With this I built the circuit using the previously mentioned blog.

After building this I used the Arduino2Max software - I opened the Arduino sketch in the Arduino sketch, and the Arduino2Max Maxpatch in Max/MSP.
Nothing happened.
Even when trying different LDRs nothing happened.
So I was disheartened, and then came the news of my mumps! That's right, I was horribly ill.
Today however, although I still resemble quagmire from Family Guy, I had a brainwave. The arduino software doesn't simply 'run' when opened. It is supposed to be uploaded to the arduino board itself so that it is programmed to do what I wish it to do.

So this instantly gave results! I had values coming from the board when the light changed around the LDR!
I spent a while testing each LDR and seeing which was the most ideal to use - it became apparent that the highest value LDR (120KOhms - 210KOhms) worked best due to it being the least sensitive, thus the range of values it gave were more controllable with the variable resistor.

Great, so all that was left was to jump into max and actually build something myself (the patch I was working with up until now to show the values coming from the Arduino are taken from the Arduino2Max software).
With knowledge gained from youtube videos and my friend Robert Taylor, I used the internal MIDI to not trigger a sample but to allow the values received from the LDR to control what note on the pianoroll was played in Max/MSP. This means as light passes by the pitch increases, and when it passes it decreases again.
I have recorded a short clip of this showing the status of the piece thus far.
Please enjoy:



video


My plan now is to figure out if (and if so, how) I can set up more LDRs to the breadboard and then I will most likely set samples for each LDR rather than having the MIDI pianoroll being controlled.
The voltage that is controlled to give the resistance and thus the values is the 5v from the Arduino board itself, my fear is that this cannot be split to multiple LDRs, meaning either I may not be able to do the piece with multiple samples OR it means that seperate power will be needed.. maybe in the form of 5v batteries? and if so, how?
I will be looking into this if need be.
For now, thank you for reading!
With luck I will be in good health in the next day or two as I feel better today, meaning I will be able to go out in public and sort things.
Alan Joesbury

Thursday, 6 May 2010

Leaps and bounds

So it took me longer than expected to get in touch with Charlotte from the Radford maplins store, but I did just have a conversation with her and I am set to begin my project properly.

What I haven't mentioned, but what is important is that I now have an Arduino board!
I ordered it a few days ago and it came today. But anyway, here's what I've learnt from talking to Charlotte and explaining to her info on this blog that I found on connecting LDRs to an Arduino:
http://little-scale.blogspot.com/2007/11/connecting-ldr-to-arduino.html

I need to purchase a bag of single core wire, a breadboard, and a few LDRs that deal with different ranges of resistance as well as a variable resistor.
So using the blog and the knowledge gained from Charlotte, I know how to connect the bits together and simply need to test different LDRs in the circuit. This is because although I can fine tune the resistance with the variable resistor, I need to choose an LDR that already has a suitable resistance as it could be too resistance or not resistant enough when the light passes over it.

So my project is in motion now, and with luck I could have it working by this weekend! All thanks to Charlotte from Maplins and her extensive knowledge of electronics.

I'll buy the bits tomorrow, and update you then. For now I am installing Arduino software.
Yippee.
Alan Joesbury

Saturday, 1 May 2010

Possibly a pretty pointless post

Hello again,

After my previous post explaining that I needed to return to Maplins on Friday to speak to this 'Matt' fellow (if this is his real name) it became apparent that 'Matt' is no more - for at least a week whilst he is on holiday. So I was told to pay them another visit today (Saturday) to speak to another guy who may well know about electronics.

I put on my finest shoes and strolled on down merely an hour ago, only to find that this new fellow (Simon maybe?) has a very limited knowledge of electronics and circuitry (apparently he learnt nothing from a six week course).

Anyway. Long story short, the research goes on and I can contact a lady called Charlotte tomorrow in the Radford Maplins store who studies electronics at University.
Score!
But will she simply fob me off like the others?

I will update the blog tomorrow with news from Charlotte - another person from the ever growing Maplin's team of 'experts'.
Good day,
Alan Joesbury

Thursday, 29 April 2010

Research - an update on events

Hello Blog lovers.
Today I spent some time with tutor Dan Livesey. We spoke about various ways to go about this project, and Dan graced me with his limited (but very useful) knowledge of electronics.

My original plan (and what I am still aiming to do) will mean using a light dependant resistor (or LDR) connected to an Arduino board that will detect changes in voltage when the torch swings over the LDR. The arduino board converts this change in voltage to information that can then be received by Max/MSP via USB.

Dan educated me on other methods that would achieve the same results.
One way of working, he said, would be to simply do the original 'Pendulum Music' piece using microphones and speakers and have the signal from the microphones trigger Max/MSP. This would mean the 'woop' feedback AND a sample could be triggered.
Interesting, however after discussion about my original way of working it seemed that I prefer the use of an arduino board and the concept of swinging torches excites me way too much.

If this is too much to read, check this video out and have a kit-kat:
http://www.youtube.com/watch?v=oGQa1_pBQzE

Skip to about six and a half minutes to hear how the feedbacks all interact when the piece is coming to a close.


Anyway..
With this talk with Dan and newly found knowledge of what I need to do I headed to every IT technician's favourite shop...

I visited Maplins and asked a friendly worker called Matt to advise me on what I needed to purchase to make the project work. After some talk of Ohms and a measurement of light I've never heard before called 'Lux', Matt told me to bring in a print off specification sheet for the arduino board I am thinking of purchasing. He can then advise me on the appropriate resistors etc to buy.
I shall be making that little venture tomorrow, so await more updates.


Oh. and I found software that lets Arduinos talk to Max/MSP (It's called Arduino2Max):
http://www.arduino.cc/playground/Interfacing/MaxMSP

Alan Joesbury



Edit: Just thought I should say - the information I believe Matt needs is the input voltage for the model of Arduino board I wish to use. Which is as follows:
Arduino Duemilanove
Input Voltage (recommended) 7-12V
Input Voltage (limits) 6-20V

I believe the point is to buy a specific LDR for the recommended voltage, but we'll see.

Tuesday, 27 April 2010

'Pendulum Music' - An Explanation

Hi,
I'm Alan Joesbury.
I'll be keeping this blog up to date with information on my project as and when it happens - the research, the building, and the testing of my work.

First to explain the idea behind my escapade.
I plan to create a performance piece based on Steve Reich's 'Pendulum Music'.
Which is based on the concept of swinging three or more microphones above a speaker (each Mic has one speaker to itself). The gain for these microphones is set so that when it passes above it's own speaker a small 'woop' of feedback leaps out when the mic is directly above the speaker.
It is a piece based on the idea of phase and time change between each woop.
Here is an interesting link to an interview with Reich about the piece:
http://www.furious.com/perfect/ohm/reich.html

And a video to show a performance of the piece:
http://www.youtube.com/watch?v=Z6r3HDn6wFU

This is not the piece I hope to produce however - although it is an option.

I hope to replace the microphones with torches/lights, and the speakers with light sensors. Setting these up using something such as an Arduino board (hardware that converts different signals like light, motion, or sound into other signals) means that I should be able to convert these light signals into MIDI for example, which can then trigger samples using a software such as Max/MSP.

This is a tall order, and I hope to be successful in doing this, however if the challenge becomes too much I plan to use the original 'Pendulum Music' piece using three or more microphones and speakers.

Await more updates - they will come.
Cheers,
Alan Joesbury