Faster(more frequently) = Louder . . . ?

Learn about building and using Max for Live devices.
Post Reply
Bigbee
Posts: 23
Joined: Fri Jul 04, 2008 3:59 am
Location: Washington, DC
Contact:

Faster(more frequently) = Louder . . . ?

Post by Bigbee » Mon Jul 08, 2013 3:56 am

I'm making an insect instrument. I want to replicate the process of an insect rubbing its legs together (or rubbing its head on its abdomen or rubbing one leg against another). Ideally, I'd like to use a slider or potentiometer to do this.

The instrument would behave like this: move the slider up and down slowly and a sound begins to resonate, move it faster and it resonates louder or the sound changes depending upon how fast the slider is moved up and down. Any ideas?

The wall I'm running into in my first attempts concerns the linear scaling of a slider/knob. Is there a way for a controller to tell Ableton: Faster (more frequently) = Louder? Perhaps there is a Max device that takes note of how often a value is reached?

Thanks!

Machinate
Posts: 11648
Joined: Thu Jun 24, 2004 2:15 pm
Location: Denmark

Re: Faster(more frequently) = Louder . . . ?

Post by Machinate » Mon Jul 08, 2013 9:18 am

Here's one working implementation, with some smoothing thrown in for good measure. It can be tweaked in a number of ways, depending on what you need. One thing that would be fun is to add an [accum] object to this, so that it can, well, accumulate even more.

<pre><code>
----------begin_max5_patcher----------
664.3ocyV10biBBEF9ZyuBFtN0QvD+XuZ2eG6zICpjT5XfL.lMc6z+6qfZ9z
zkZsN8lX.NBumGg2CuNyClINPUPvO.+F3485LOOaWlN7Za6A2RNjWRT1vfpR
VAUBm2LzNhjrkpoxUTNIqjZBIncLd0VFujpsuGpsSVgcVDYO+.ZA7TjhJ80g
1zk9kczF8AgfGOtr57mX7MqjzbcynXbnevb.JM17.Guv7XIxO.7n4cda1LyO
ycLK4z+TKwN8ooGrqBjjoftlcgcQtVv07ZJYG5WRFo7Cl2Lt9TpalME6u1wP
X+f6SDTxB+3k0HIzhjv.KXBFHQ1RUJxF5MHIvuWhf6gH3QiHCBGKCavQyNjk
VbfRF2MH0mEjh54F7SRtlsmBPcgTx3zbQEWeNc9uHKXzPVFguYPXCm5iqwFF
Y3UTpcqT3.oVYMR7KNS76IxiY0MC1m4Bxwieo8iG7c2QMG.WWJH520jAklXg
Ax5trn42XCLZeGEYOsXEQqkrrJM8z+TsToEKlLurhJV20cW+mm0kB9l6RmKh
T8jPpcKztbNnmwp3LsR+RqMdy31uvcOFmCIF+LGO.j7cwDMpwCE6u7S3gdGd
nAL.y05JweThfeOhL+SCljuPv7fqaSh91TqE8EhC6Uu.AfSUEtfKg8T+Xz3x
UdiCfLKsjIB26sPrSrsF4UWF0Nil9uDWJQkLuSasYJ3jMbAUoYbhlI3mGyhK
B5IVQAke9MVKXJSclhi1e27caTkS88g.noQNgtnmIiNQtnlvo6iUfC5IYxjS
pipYZ15j3fZhmL1D6fZhlL1DewJce0LD1z3HR1saOUpZmRqPpKU7rPZZFM21
jwaZZ8tgR5dVW71JBPhr1SVWaHWIa7+OjDAmYVm2l8O.GFsraC
-----------end_max5_patcher-----------
</code></pre>
mbp 2.66, osx 10.6.8, 8GB ram.

Bigbee
Posts: 23
Joined: Fri Jul 04, 2008 3:59 am
Location: Washington, DC
Contact:

Re: Faster(more frequently) = Louder . . . ?

Post by Bigbee » Tue Jul 09, 2013 9:02 pm

Hi Machinate. Thanks very much. I'm not sure how to use this code. I'm very new to Max. Is there a script editor that I can access? Really appreciate the help!

Machinate
Posts: 11648
Joined: Thu Jun 24, 2004 2:15 pm
Location: Denmark

Re: Faster(more frequently) = Louder . . . ?

Post by Machinate » Wed Jul 10, 2013 9:43 pm

just select it and paste it into Max
mbp 2.66, osx 10.6.8, 8GB ram.

Post Reply