• ### wanting to use a pitchbend to control array playback pitch?

hi, i had a really simple 16 array replay system that uses `[tabplay~]` to play the contents. i've mapped the pc keyboard to have zxcvbnmqwertyuio or so to trigger the 16 arrays.
but now i'm starting to think, having a pitchbend to warble around the playback would be pretty fun. i take it `[tabplay~]` is too limited for that, but what's the go-to for having pitchbend instead of single-shot with single-frequency playback?

• Posts 5 | Views 518
• You can use a signal going into `[rpole~ 1]` to increment the samples going into `[tabread4~]`, and change that signal's value to get different playback rates (1 is normal, 2 is an octave up, 0.5 for octave down)
Then all you have to do is translate from pitch bend values to playback rate

• +1 for rpole~.

Resetting the playback position using rpole~ isn't obvious, though: you need a single sample where the left inlet = new position, and right inlet = 0, then flip immediately back to left inlet = rate, right inlet = 1.

I had asked awhile back what is the best way to generate a single-sample (Dirac) impulse in response to a bang -- it seems that tabplay~ is the best way. tabplay~ goes to zero at the end of the array, so we have to generate "1, 0 0 0 0 0." The rpole~ right inlet needs "0, 1 1 1 1 1" so, 1 - pulse.

Then we need rate when this inverted pulse is 1, and the new position when it's 0: `(rate * invertedpulse) + (pos * (1 - invertedpulse))` but a bit of algebra changes 2 `*`-es and 1 `+` into 2 `+ or -`-es and 1 `*`:

``````(rate * invertedpulse) + (newpos * (1 - invertedpulse))
= rate * invertedpulse + newpos - (newpos * invertedpulse)
= (rate - newpos) * invertedpulse + newpos
``````

You would, of course, replace the snapshot~ with tabread4~.

23-0428-reset-rpole.pd

hjh

• @ddw_music what's wrong with `[clear(` and `[set(`?

• @seb-harmonik.ar said:

@ddw_music what's wrong with `[clear(` and `[set(`?

Probably nothing... I guess this reflects a hidden bias in my thinking. Where I'm coming from, unit generators take signal inputs; any control messages have to transmitted in terms of signals. So I'm pretty much always going to think of that first, and possibly / probably overlook control messages sent directly to UGens.

hjh

Posts 5 | Views 518
Internal error.

Oops! Looks like something went wrong!