Friday, 10 January 2014

Sensitivity

The problem I have found initially with the sensors, is that they tend to pick up the slightest vibration and therefore often trigger unwanted notes. For this to be a useful tool, the sensitivity of the sensors is going to need to be decreased so that its clear when the user wants a note to be triggered. There is probably a better way to do this than the way I have done, however for the time being I have used an 'if' function to create a threshold.

I've noticed that a gentle knock by accident will cause less than 100 units. Therefore I've used the if function:

"  if $i1 > 100 then $i1==1 else $i1==0  "

This basically creates an 'on or off' switch for the signal, similar to the use of a digital pin. However the advantage of using the analog pins is that I am able to easily create this threshold, and change it. Ideally however I would like the threshold to be an integer box so I could change it easily and on the fly if necessary. However to achieve this I may need to rethink the structure of my initial patch. For now functionality is the priority rather than efficiency.


EDIT:

Actually, the I thought this made a difference but the second time I loaded the patch it didnt seem to do anything. having said that, I know now that I definitely need to find a way to control the sensitivity of the inputs. The more immediate problem however is making all the inputs work, as the standard Arduino2Max template only allows for 6 analog inputs, when I need 10. Therefore I will need to edit the Arduino code in order to read the extra inputs.

No comments:

Post a Comment