Interactive Sound Installation using sensors
Hello everybody!
I' m working on an interactive sound installation using an 'Arduino Uno (Rev 3)' and a 'MPU-6050' sensor to collect and process data. The Arduino then sends the raw data from the sensor to the program 'Max/Msp.
The patch in 'Max/Msp' works according to the position of the mouse on the screen; moving the mouse, the music changes.
Now, since I would like to have a person instead of the mouse, I though that an accelerometer+gyro (MPU-6050 in my case), could help me to simulate the movement of the mouse if given to a person that would walk around the space where the installation takes place. The problem is that as I stop moving the a+g, the data value goes back to zero, basically coming back to the starting position.
Has anybody ever worked on such a project? Anybody that could hep with some nice suggestions?
Thank you for your time,
Marco
The main point in using mouse is that person that controls it
knows where it is, and can move it from - to desired position.
That sensor is not going to work as position detector.
But you could use some values of it to send
"mouse" to different directions while moving
and not for the absolute position.
Hey,
Thank you for your answer!
Now I' ll try to go a bit deeper in the patch I did and if you want you guide me a little bit.
So, first of all I'm reading the raw data in max with the 'serial' object ('serial c' in my case).
Then, after converting them with the 'itoa' object, which converts integers to UTF-8 (Unicode) characters.
Atthis point I'm able to read the data ina message box in an understandable way (Ex. " aX | 92 aY | -8 aZ | 15200 tmp |31.97 gX | -73 gY | -236 gZ | 50" , where A corresponds to the accelerometer's data and G to the gyro's).
The next step was to route the data to a 'fromsymbol' object and then to 'unpack' them (the unpack object didn' t do the job; therefore, I used 'zl nth + number' to separate them and route them to individual 'slide' object, since I notice the the numbers that I was getting from the sensors are too scattering and are jumping too much).
I still haven't realize how to use this data. The mouse positioning system works thanks to the 'mousestate' object. I would like to somehow trigger the mouse movement with the data that I got from the sensor.
I would love if you could guide me further.
Cheers,
Marco
I guess you read all possible arduino tutorials and forums
dealing with that sensor, so it should be clear that it can't really serve as
mouse replacement.
That would also mean that you should redesign whatever mouse was doing to control
your parameters.
And that is what is missing here - I have no idea what is being controled by mouse
and how.
You could also reduce data flow from arduino, if You don't need
all sensors.
Another question - as arduino should be moved arround,
what do you want to use for wireless connection ?
Maybe using a phone and some osc app would be a simpler
solution.
Or something totaly different, like light or IR sensor
in each corner, or motion sensor
Hey,
the 'mousestate' object outputs 4 values: the X and Y axes and then the Δ for the X and Y axes (I'm using X and Y values only). These parameters are scaled and mapped to the volume knobs of the panning system that I built thus, when moving the mouse the amplitude of the sounds is reduced or enhanced in different parts of the screen (so that basically not all the sounds play together but they merge and morph according to the position of the mouse on the screen).
Talking about the receiver, I thaught to embed the sensor and the arduino in an object that one can hold and carry around (to do so I will probably need a wireless arduino).
Hope that this clarifies a bit more what I'm trying to achieve.
Bests
I can't suggest much more than in previous post.
Either use sensor values to push "mouse"
pointer to 4 directions.
You can simulate that using pictslider object.
2 axis and speed would do.
When sensors are not moving - no change.
Other option would be to forget gyro & accel and use something else.
Yeah I just discovered the pctslider and I'm probably gonna build the system around that. Though, it doesn't seem to react to changing values; do you have any experience with that? I couldn' t find any infos in the Reference page. It seems like it needs to be banged somehow to constantly update it' s values but the metro doesn' t work with that. Do you have any clue?
I have to leave now, but tomorrow I'll post one example with
possible control using sensors.
Check the pict slider help file
I understood why it wasn' t moving, I made an error in the scaling.
Thank you very much, I wait for your examples then!
This is mouse delta to pictslider control:
If you scale x y from arduino to output similar values
than it should work.
Another option would be to use some gimick from z axis to
reset pictslider to middle position.
Or to change control, so that it does not stop at
min/max values, but to loop through modulo %.
here example with rollover
Thank you very much! Your patches were really helpful!