• martinIrl

    Hi,

    I hope I'm putting this question into the right section.

    I'm attempting to compare a number over time. (The number is coming from a rotary encoder on an Arduino, which is being sent to pd through oscP5 Processing library.)

    Basically, I want to use the rotary encoder to control the speed of an audio track. However, the rotary encoder sends values between 0-15.
    I want to check the speed of the rotary encoder by seeing how much the numbers change in any direction.

    So my thinking is that if I take the number of the rotary encoder (say its 4) and store it, and then a second later check the current number of the encoder it (say its moved to 8) I will then know that its turning at a rate of 4. I can then get the track to play at a rate of 1 (normal speed). If its only turning at a rate of 2, I can play the track at 0.5.

    I've attached a patch where I'm trying to compare a number over time, but I don't know if it will be any use.

    http://www.pdpatchrepo.info/hurleur/timerNumberTesting.pd

    posted in technical issues read more
  • martinIrl

    Ah ok, how electrickery's patch make a bit more sense. I'll look into it some more.

    Your explanation of the aliasing problem was also enlightening.

    Your latest version is great, much appreciated.

    What I'm thinking of doing from here is to have a load of [sel] objects that then set the speed for the audio track. Its a bit messy looking, but it did the trick on the last patch you sent on to me.

    I'm not sure if its kosher to link to external sites here, but this is a video has some footage that shows how I'm using the [sel] objects http://museumexp.wordpress.com/2014/01/12/rotary-encoder-controlling-audio-speed-in-pd/
    If you dont like external linking, let me know and I'll take it out!

    posted in technical issues read more
  • martinIrl

    Hi All,

    sebfumaster, your patch is excellent, just what the doctor ordered. Unfortunately the numbers go backwards (ie decrease) as well so it only works if the rotary encoder is going clockwise, but I can try and figure something on Arduino, unless you have a better idea?

    electrickery, I've tried making sense of your patch but can't seem to.
    You're right to say that the rate of change is all that matters, but I don't see this effecting the bangs per second?

    posted in technical issues read more

Internal error.

Oops! Looks like something went wrong!