0 - 1 - 0 with one bang or integer change

tedor's icon

Dear Max user,

I am wondering which is the fasters way of getting a change from 0 to 1 then back to 0 in a number box?

0 - 1 - 0
A numberbox change should open a gate whenever the number changes.
Instead of the toggle I would like to have something which changes from 0 to 1 and back to 0 with one bang.

Is there a nice object somewhere?
Help appreciated!

all the best,
Krisztian

LoneMonad aka don malone's icon

! use [trigger] on the output of the gate to close the gate before passing the data

Emmanuel Jourdan's icon

Have a look to the match object.

ej

On 3 nov. 08, at 14:42, tedor wrote:

>
> Dear Max user,
>
> I am wondering which is the fasters way of getting a change from 0
> to 1 then back to 0 in a number box?
>
> 0 - 1 - 0
> A numberbox change should open a gate whenever the number changes.
> Instead of the toggle I would like to have something which changes
> from 0 to 1 and back to 0 with one bang.
>
> Is there a nice object somewhere?
> Help appreciated!
>
> all the best,
> Krisztian

pdelges's icon

On 3 nov. 08, at 14:42, tedor wrote:
>
> I am wondering which is the fasters way of getting a change from 0
> to 1 then back to 0 in a number box?

[t 0 1 0] ?

> 0 - 1 - 0
> A numberbox change should open a gate whenever the number changes.

But what is supposed to close the gate? If you want to have data going
thru it, [t 0 1 0] may be too fast... You may close when dsomething
gos thru the gate (using something like [t l 0] with 0 connected to
the gate control inlet).

_____________________________
Patrick Delges

Centre de Recherches et de Formation Musicales de Wallonie asbl
http://www.crfmw.be/max

LoneMonad aka don malone's icon

if it is the changing number you want to pass
all you need is [change]

Max Patch
Copy patch and select New From Clipboard in Max.

otherwise
this try this

tedor's icon

Thank you for your help, I am sorted now.
Best
K

Iñaki Ramírez's icon

Hello there,

I am having the same issue as Tedor had. I am a new max user and I want to convert a bang signal into an integer box that goes from 0-1-0 again. As these questions where posted in 2008 the answers in the replies don't make any sense for me and are not working in my patch. Does anybody can help me with this?

thanks,

Iñaki.

schlam's icon

Hello, the 2008's answers should work.
Maybe can you post your patch..

Iñaki Ramírez's icon

to arduino serial.amxd
amxd 23.36 KB

I added a comment to where I want my bang to be converted to a number box that goes 0-1-0. Again I'm quite new to the program so I'm pretty much doing very simple things.

riccardo dapelo's icon

Max Patch
Copy patch and select New From Clipboard in Max.

try this to see if it's what you mean

Iñaki Ramírez's icon


Thats exactly what I was searching for. Thanks you so much, I appreciate it!

Source Audio's icon

you can do it simpler

it timed output is needed , there are several options

Pedro Santos's icon

Two more methods.

Max Patch
Copy patch and select New From Clipboard in Max.

Jean-Francois Charles's icon

If you're new to Max, you will also need to learn the [trigger] object:

Max Patch
Copy patch and select New From Clipboard in Max.