number box to trigger i to number box…. help? strange problem to be solved?

Dec 5, 2010 at 10:58pm

number box to trigger i to number box…. help? strange problem to be solved?

Hi Guys,

i have a very strange problem i was wondering if someone could solve it?

i am sending 4 numbers through a number box to (trigger i)object, this is then going into another number box that will trigger gates 1,2,3 or 4.

The problem is that when i send all of my numbers into the first number box – only the number 2 reads in the second.

If i send them in one at a time they all read in the second float box?

How do i fix this problem? – is it something to do with the trigger object?

#53748
Dec 5, 2010 at 11:17pm

– Pasted Max Patch, click to expand. –
#193297
Dec 6, 2010 at 1:00am

What are you trying to achieve with this patch? The way it is set up now any number you send to the first number box will be sent to the second number box four times in a row which looks fairly pointless with the set up you have. Just connect a [print] object to the second number box to see what data is actually passing through.

#193298
Dec 6, 2010 at 12:39pm

if you want to control each gate separately, this way it is not happening. if you can explain what you want to achieve, it would be easier to help!

Nickolas

#193299
Dec 6, 2010 at 9:23pm

Hi Guys,

Thanks so much for having a look. As a further explination:

Basicly the numbers are being sent from the buttons on a wii controler. I wish the numbers 1-4 to control switching between gates 1-4. i.e when number 1 is pushed the gate one remains, when 2 is pushed it switches to gate 2 remaining open, etc.

The problem is that the controler sends out two bangs when a button is pushed.
What i have put here is what i thought might be away around having the two bangs?

PLEASE help me! its for my uni project! – hope i have explained enough! let me know if more explination is needed!

Thank you
x

#193300
Dec 6, 2010 at 9:34pm

two bangs? or a 1 then a 0 which you are converting to bangs?

you can try [onebang] to restrict bangs. but you need to differentiate between the numbers coming in. if it’s 1 2 3 4 then you can send these directly to your [gate 4].

#193301
Dec 6, 2010 at 9:57pm

Yes each button has an if statement to give it numbers 1-4.
i did the [trigger i] to get rid of the zero and let the number remain.

i dont think i need a bang?

i just want the numbers 1-4 to go trigger the gates 1-4.

- how do i fix this? – it seams such a simple idea?

Thanks
x

#193302
Dec 6, 2010 at 10:31pm

If you send the data from the buttons you want to use to the receives in this patch it should open the gates as you want.

– Pasted Max Patch, click to expand. –
#193303
Dec 6, 2010 at 10:34pm

I don’t have a wii controller but have used others, and the way they usually work is to give you a button id and then button state. so you would get a list of say “4 1″ when you press button 4 down and then “4 0″ when you release that button. now if that is the case with the wii, it’s easy as pi ;)

[route 1 2 3 4] (where 1 2 3 4 are the button ids), then connect to your gates and you are golden since the ids will be stripped and only the On/Off messages will go through…

EDIT: well, seems I should have looked at your patch better. I didn’t see the [gate 4]. sorry

#193304
Dec 7, 2010 at 12:47am

I am still unsure how to get the sole numbers 1-4 without interferance of 0′s from letting go of the button.???

#193305
Dec 7, 2010 at 1:49am

I’m fairly sure the buttons send out 0 when released and some other value (depending on the button) when pressed so using [> 0] [sel 1] will trigger a bang when a certain button is pressed providing you have the buttons routed seperately (the help patch with aka.wiiremote shows you how this can be achieved). You can then use a [trigger] for each button individually set to whichever gate outlet you want it to open.

#193306
Dec 7, 2010 at 12:34pm

Thanks luke, i see what you mean. That does work for selecting the gates.

But if i want to alternate between gates how do i turn the other three gates off when one is being used? – i need this because im going to be controling filters inside the gate with the wii controler?

#193307

You must be logged in to reply to this topic.