mood sensing project
May 4, 2008 at 3:02pm
mood sensing project
My project consists of a pulse sensor that reads into the sound card of a computer via the microphone input, my plan is then to take the pulse rate in bpm and compare it to a list of songs to select a piece of music with a tempo equal or close to the pulse rate.
I have a program that will take the tempo of a list of songs imported into it and export the names of the songs and they’re relative tempos (in bpm) in a standard .txt file.
basically, what I need is to write a program that will read this imput from my microphone based pulse sensor, I imagine some noise gateing will take place and setting this pulse as a form of click track, then the program will have to read the txt file to find the best suited song. I would like ideally for the program to play the track and then, once it is played, select the next song based on the current heart rate, but for the moment I will settle for it actually just suggesting the best suited song from the list.
I have been told that Max/MSP can help me do this but I really have no idea of how to go about it. Any help, methods or suggestions would be truely well appreciated,
May 4, 2008 at 3:58pm
Then when I got stuck, I either referred to the manual or did more tutorials… I think it was a very quick way to get started…
Also what helped was in the Max and MSP reference manuals there is a “thesaurus” at the end where you can look up keywords and there will be a short list of objects, and that helped me a lot as well.
But for a more direct answer to your question… you’ll need to look into the adc~ object to get sound into Max, then some sort of trigger to convert that audio into a “bang” message, I’ve used the “change” object with some success, but I found it wasn’t always accurate. If you look in the help files, in the bottom right corner there is always a list of related objects, so sometimes you can find an object better suited to your needs, or something that will help later.
Also max measures in milliseconds between each pulse, not in BPM, so you’ll either have to do some math, or if you search on http://www.maxobjects.com and there is at least one external object that I know of that you can download that will convert ms to BPM for you ( I think it’s actually called “mstoBPM”).
May 4, 2008 at 7:46pm
Quote: email@example.com wrote on Sun, 04 May 2008 08:58
The new “translate” object can do this and more conversions.
I don’t know if it will help, but the new timing system with transport might be a way to get the pulse triggers (literally pulse triggers in this case) to “tap” out a BPM in transport? But that might open a whole new bag of worms in timing problems.
May 4, 2008 at 10:06pm
jimigringo, the following does not answer your initial question but might be interesting for you:
Some years ago I experimented with heart beat to control the tempo of live playing musicians. The whole thing happened in a labor situation and I played myself and was not directly involved in the technical stuff. But we found out that the heartbeat is not enough to influence the “mood” of the music. At least it had no positive influence but qualifiying the result might not be part of your work. However, we experienced that musicians seem to adopt their heart beat (yes, they do) and their playing in a way that was counterproductive for the experiment. Sometimes we became unnecessarily fast and/or ended up with less groove than with independent playing.
This may depend on the musicians because everybody has his own way to establish a relationship between heart beat, musical tempo and interpretation. We added the measuring of skin resistance, finally what we used was basically a lie detector that controlled tempo, filters and dynamics.
I am also rather new to Max but I can assure you that the program can handle everything you need for your project, once you managed to get the signal into the computer. And it is definitely a perfect tool to experiment with the weight of different influences and their impact on music.
May 4, 2008 at 11:11pm
It would be really cool if you could get use of an EEG machine to measure brainwaves (which would show more brain/emotion activity beyond heartrate) to use the performer’s brainwaves as LFOs for all kinds of parameter control. Human oscillators/noise generators? Maybe that would be a good indication of emotional states? It would be interesting to use a sleeping person’s dream state too. haha.
You could measure posture with even a Wii control. :)
If you are planning on taking things that far, I would look at some controllers too. Arduino, Makingthings, and Cycling has some in their store too.
How much time do you have before presentation?
May 5, 2008 at 2:17am
yes, it is quite easy to create your own galvanic skin response sensor
Don K wrote:
You must be logged in to reply to this topic.