Forums > MaxMSP

Maybe this is a silly question, but…

June 4, 2010 | 9:09 am

I am am lost finishing my project for university. I am reading sensors values with arduino and arduino to max and putting those values on makenote. the problem is that these values flicker a lot, therefore I dont have a real constant sound. Is there a way to reduce this flickering? On a worst case scenario I would play only with a tone, where I change pitch and volume, but I didnt foound a way to manipulate volume on cycle~ . Can anyone help me?

Regards,
Oscar


June 4, 2010 | 9:19 am

1. What type(s) of sensor are you using?
2. What is the interaction modality? Touch, presence, breath, light, magnetic field…?
3. You haven’t posted your patch to let forum members see if the problem lies there.
4. Is the data also erratic in your Arduino sketch?

Posting a forum request that creates more questions is not a good idea; try to give us as much help as possible please.
Brendan


June 4, 2010 | 9:40 am

I am using 2 distance sensors, from sharp. The sensor uses an IR led and a receiver – and calculates the distance between objects with that.
The interaction, therefore, is waving my hand over the sensor.
I cant show the patcher because of rules from university. Wish I could do that. The problem is not with my sensors – it also happens with potentiometers.


June 4, 2010 | 9:59 am

Have a look at this patch for methods on smoothing jittery data streams. Which University bans you from sharing your own work in order to benefit from our advice?

lh


June 4, 2010 | 11:05 am

Luke,
this seems to help me a lot! thank you!


June 4, 2010 | 11:51 pm

helped a bit… one of the methods worked a bit, but it adds some delay. and the data is still flickering a lot, as you can see on the print screen. I saw that there is a average~ object, but I don't know how to connect it just for data. any help?

[attachment=134076,638]

Attachments:
  1. flickering.JPG

June 5, 2010 | 2:07 am

You are basically filtering the data, like a low-pass in the audio domain which is bound to add some sort of delay. Have a look at [lybl] from CNMAT which is a look-before-you-leap object to ignore jumps if they’re steeper than you desire. I can only suggest experimenting with the methods provided and trying to find one that fits as best you can, there is no perfect solution as sensor data is inherently jumpy.

lh


June 5, 2010 | 3:23 am

It looks like you have quite a lot of jitter on that signal. Have you measured it? Have you tried adjusting the parameters that are available with the different filtering methods in that example patch?


June 5, 2010 | 5:25 am

Just curious if your circuit is well insulated. If you’re using a solderless breadboard, it could be introducing a fair amount of noise on its own. Have you successfully used this circuit elsewhere? Can you move it to another board? add some small caps to filter out any voltage irregularities?

As Chris mentioned, there’s a lot of noise there, and it’s probably easier to approach it from the source, not in the interpretation.


June 5, 2010 | 5:31 am

It’s also worth noting that unused analog inputs on the Arduino should be grounded.


June 5, 2010 | 4:20 pm

I think it could be a problem with my hardware. I am not using a breadboard any more. I will try to ground the unused inputs, that might help. Thanks for the advice!


Viewing 11 posts - 1 through 11 (of 11 total)