Banging

hi again

i’m sure you’re all going to think i’m very silly, but this has really stumped me and searching forums and help files doesn’t help.

my question is actually in the FAQ:.
“How do you make a toggle IOBox switch values only when it is triggered by a bang IOBox?”

with the reply:
“There are no “bangs” in vvvv like in max or pd.” - basically.

This reply is no answer, though, since the question wasn’t “are there bangs in vvv like in max or pd.”

There must be a way to simulate the way max and pd uses bangs, but i can’t see how.

any help?

time to read the faq ourselves. i guess some of the basics are not explained very well anywhere here :)

so. first, as implied in the faq: vvvv always transmits values, no events.

next: the settings on the IOBox just change the behaviour which happens when you click on it with the mouse. it does not trigger any processing of the values in the IOBox.

you will need to know two nodes to do what you want:

the Toggle node will toggle its output as long the input stays 1. you can use that node to convert the output of an IOBox in bang mode to a toggle behaviour (which you can then display in an IOBox in whatever mode you like)

the Change node will output a 1 as long as the input is changing. so you can use that to convert the output of an IOBox in toggle mode to something you can use as bangs.

and somehow related: the TogEdge node is sometimes useful as it distinguishes between changes between a number 0.5 downwards.

thanks oschatz, but…

i’m aware of these nodes, but they’re not helping, since they both omit a when not omitting a 1.

what i’d like is to flick a switch without it flicking imediately back. for example:

one particular case is that i want to be able to turn something on and off using a number on a remote keypad during performance - rather than having to crouch down, find the toggle button and right click it.

i’ve set the lot up - keyboard, keymatch and all that but it only works if i hold down the key i’m pressing. you see?

i’m sure you’re all laughing at silly ol’ me :(

Tog edge followed by toggle will toggle a keypress or do you need it to be turn off when another key is pressed? In which case radio keymatch will do it

ok, i see; wrong question answered :)
radiokeymatch is especially made for your purpose.

flipflop, multiflipflop and automata do similiar things in a more general way…

perhaps i wasn’t clear there.

i want to make a switch change from one input to the other without changing back, at the press of a key.

the ‘tog edge’/‘change’ nodes detect the change and outputs a “1” for a single frame before outputing “0” again, doesn’t it? i need it to stay one until the next time I press the same key.

i’m in tears, here - is i so much to ask?!

every single person to finish a program in vvvv must have got round this somehow, surely!
help

hmm. but isnt this what the Toggle node is for?
did you try the TogEdge->Toggle combo?

i did, but there’s still a “0” coming out of keymatch when i don’t have my key presssed. therefore, toggle is off when i release the key.

i know i’m causing a kerfuffle.

at the risk of seeming forward, could someone please make a little patch for me?

so - when i press number 8 on the keypad a switch node switches from input 0 to input 1 and stays on input 1 after 8 is released. then when number 8 is pressed again the switch would flick back to input 0.

i’d love you forever. i have my first ever gig in another country in just over a week and i really need to finish my set.

x

you can find a small patch here
http://vvvv.org/tiki-download_file.php?fileId=706

hmm… i enclosed a keyboard->keymatch->togedge->toggle thingy below. no magic involved.
as i understand your problem, it does what you want ?! most probably just to late in the night…

toggle.v4p (4.8 kB)

thanks chaps

your patches didn’t work, but when i saw that you had exactly what i had being doing all along, i decided to re-install vvvv. 'tis fine now. :) the computer i’ve been working on is going nuts.

oschatz - you quoted me - nice touch ;)

thanks again, it was cheeky of me to ask you to make a patch just for me, but you’re nice lads.

biii