I just started pd and I have a simple question.
Can anyone teach me how to make a pendulum like sequence, for example(1,2,3,4,5,4,3,2,1,2,3,4,5,4,3,2,1,2,3...and so on)?
I'm actually trying to build a pendulum style note sequencer.
So if I decide maximum step as 7, it will be like 1,2,3,4,5,6,7,6,5,4,3,2,1,2,3...and repeat forever.
So I would be glad to know if anyone can teach me how to do it.
-
Newbie Question
-
I'm fairly new to pd and have tried several different ways to do what you are asking. I just came up with this - it's using the swap object. If you take the sequence 1, 2, 3, 4, 5, 6, 7 and starting from 4 subtract each number from 8 you will get the sequence 1, 2, 3, 4, 3, 2,
This is set up as an abstraction so put it into your path and type [pendulum] in an object box.Simon
-
@Simon2 said:
I'm fairly new to pd and have tried several different ways to do what you are asking. I just came up with this - it's using the swap object. If you take the sequence 1, 2, 3, 4, 5, 6, 7 and starting from 4 subtract each number from 8 you will get the sequence 1, 2, 3, 4, 3, 2,
This is set up as an abstraction so put it into your path and type [pendulum] in an object box.Simon
thank you so much!!!
you are my hero!! -
Hello!
i found a much simpler solution to a pendulum sequence you where looking for using
the [counter] object and a modulo object.the [counter] object counts up all the time and the modulo object [%] sets the limit for the sequence.
the good thing about the [counter] object is that its second inlet (from left to right) when you send a bang it starts counting down.
i used [sel] object for when the counter reaches 7, it sends a bang to the second inlet of counter to start counting down, and another [sel] object for when the counter reaches 0 it sends a bang again to the second inlet of the [counter] object so it starts counting upwards again, and so on, and so on...
no math requiredhope it helps
keep up the good work. -
Why not using [counter 2 1 8] ?
It will counts up&down. -
HA! im a newbie too...
didnt know counter could do that -
I didn't know that either
that's amazingly simple!
Thanks!!