Drawing a line that responds to sound
I’m trying to make a patch that will draw a continuous line as a response
to sound input from a microphone. I.e. if there is no sound the line will just move forward at a constant level, if there is sound at a high pitch the line will rise at an appropriate angle, if there is a low pitch the line will go down…any pointers would be greatly appreciated :)
Here’s one way to do it:
----------begin_max5_patcher---------- 900.3oc6XssiaBCD84juBKdlF4qfou0uipUUDvIq6Blnfi1ap8auiMPBIKgM IJa5VolGvlAFOmyYFeg75zIAyqdRUGf9J56nISdc5jIdSNCSZueRPY5SYEo0 9WKHqprTYrAgMOypdx5sW+n1lcOJMOCUYBQolbTs1rDUWUpPqbOChSqSEZiJ qZiw6Is0nYSo1Tnr9vPZMtJEbDFlerVkYafISRmgCQjjDeCg3ZX7YXzcsNoy 8HpZ9O+BiEra3q1X6Febq0EUFas9EkOltwcmYSZo2bv2VqSKBbO3WSm5tDdc jJ68JToxttBDLzB85Z6UQen3XmhPkXWShbT4g7WTdluwZqLAmK8hDMLpgk3t qCQOpbX50M7MlrOuR0L1AySMKCP2cAjwVsbYg5RIClbBjI5LIi1U+bIbwndD B3aJaapUo3AII88IIk6ZDxQIIebRdjBxikHup0qGQVpyRKTPJDQvXDdF.q3Y CJQQirlF2m5YLQyZZIipQ3qiFcs0mEEU.fN2o.cTG64rXzo.j3gYN8LYNfzT Xw1aZYxFypzrGPKPKtPEhJYtlH1nJj3JqPMctMRj+TB+9rkGZjWQD9MDDIyD iHOGYpC+RVdATmBcsse6GhZodANT0kJKjDeCWzccHYIY7hl2P+Z8RCvkvs8t nsYJ2TX00E5b05t3mAGaTCWThlHgmIjbFgGB8jzXtf35AVXwLfa8XyfxRMbu 84BUexTuiI3QTuHurwZ15pUDSn8B3Vnx6fJmkPIQN.FANfktd3XrPJ2Gp8WJ mMtxuMHrtfPSvvf6UABINR35ECxAMZ+f.zDDDPu6bzQCXmocuwa2OHr+dBaC sb6HrKAvAZk35Ibngren25IsySBWfS75AEChD00iIhjQri3YbmmxXW926oOq G1azFzynNOiYte9b.SPS7kPwRIkI12yUpzGxpJpVuMMlHAPFNXOuieVK0Okx 51MaaJqaNu40uplK9eUceOgcAxSso8SW+yUo6GE+Gldv+VfuJyYe+x+5pMqy 5xAceKFZGXxU0VsI0pgu.b2K4pb58R2qyyUl90zk57UUvG1zBhiLY7jwD+Dv zA.+CGSQmBl32TLQDm.lbGN+VhI3nbHx6goaa8Txo.I7MGR3OWP5fBkiTgea wzAg6SwpS7SYVm6DjmClXbYyWBjzbP.xrXwatkE4+KVYwhYc2cvlAS+0z+PL gqPe -----------end_max5_patcher-----------
You need to adjust it, though, to suit the range of incoming pitches, and also sensitivity issues etc etc (so, perhaps only count a pitch if it is above a certain dynamic etc).
NOTE: You need the [pitch~] external, which you can download here: http://web.media.mit.edu/~tristan/maxmsp.html . These might also be useful, if you haven’t got them already: http://crca.ucsd.edu/~tapel/software.html (probably [fiddle~] in your case)
the pitch~ external isn’t working…I’m getting this error message:
this application failed to start because fftw3.ll was not found. re-installing the application may fix this problem.
…also, how do i open the patcher that you’ve uploaded? I’m sorry, I’m new at this.
To install the [pitch~] external, copy it to Applications -> Max5 -> Cycling74 -> max-externals (or create a folder).
To open the patcher I posted, copy the code and paste it into a new MaxMSP window.
Did you take a look at the [fiddle~] helpfile? It is a bit complicated, [pitch~] is based on [fiddle~] and is basically a more digestible version of it, focusing on pitches (but not as versatile).