Forums > MaxMSP

one simple button input

March 4, 2006 | 7:16 pm

I am working on a patch that needs one simple button in the physical world to put a bang into max/msp. I can do this through the miditron, but there has to be a simpler way to just connect one button. I fear that this is so simple that it is either just "known" or has already been addressed in this forum (although i did search for it and did not find it, perhaps i an not using the right search criteria)

of course since i am asking such a simple question please understand that i have no experience with physical computing and need clear step by step instructions for those sorts of things.

thank you for your help


March 4, 2006 | 7:30 pm

On 4 Mar 2006, at 19:16, Chris Kaczmarek wrote:

> I am working on a patch that needs one simple button in the
> physical world to put a bang into max/msp.

USB game controller.

In pieces.

nick rothwell — composition, systems, performance — http://
http://www.cassiel.com


March 4, 2006 | 7:47 pm


March 4, 2006 | 10:08 pm

these are both good options,
I guess i need to clarify more, I am working on an art project and would love to get this http://www.happcontrols.com/pushbuttons/954002xxxxz.htm
to give the bang into max

since it is art how it looks is important to me

maybe able to wire a mouse or usb controller to this?

i don’t know these things


March 4, 2006 | 10:53 pm

If you only need 40 feet or so, just use a mouse with
USB extension cables, and mechanically activate the
mouse button.

And yes, this lovely industrial pushbutton can be
wired into a keyboard, mouse, or game controller. I
recommend using shielded 2-conductor cable. (In a
pinch, don’t be afraid to try cheap 100 foot length of
CAT-5 Ethernet network cable. Use one twisted pair
for signal, and connect the other 6 together to form a
"shield" wire.)

At the computer end, strip back a few inches of
insulation (being careful not to nick the shield
wires). Separate the signal wires from the shield,
and twist the shield strands together for neatness and
strength. Use the extra insulation to cover the
shield wire, so that a small amount of shield is
exposed.

Connect the shield to earth ground, such as the metal
chassis of the computer, or the ground lead of an AC
line cord, or just the front panel screw of an AC
outlet that the computer is plugged into(this reduces
spurious signals into the computer, and provides a low
impedance path to ground for any discharged static
electricity, protecting the computer).
Connect the 2 signal wires to your big switch
contacts. Connect the other end to the
keyboard/mouse/controller switch that you want to
bridge.
This might be easiest on a USB mouse, since they use
sturdy little through-hole-mounted switches, and are
cheapest to replace if destroyed. See
http://pctekonline.com and other sources of very cheap
mice.
Note that very long wire lengths (75 to 100 feet) may
produce spurious inputs due to their capacitance,
depending upon the internal circuit design of the
kb/mouse/contr.

Cheers,
lex


March 4, 2006 | 11:16 pm

thanks lex, it does not need to go any real distance so no real impeadance problems

i think that i will try your suggestion and attempt a wireing of my fancy industrial switch into a mouse!


March 5, 2006 | 2:39 am

Quote: nick rothwell / cassiel wrote on Sat, 04 March 2006 12:30
—————————————————-
>
> On 4 Mar 2006, at 19:16, Chris Kaczmarek wrote:
>
> > I am working on a patch that needs one simple button in the
> > physical world to put a bang into max/msp.
>
> USB game controller.

computer keybyoard. mouse button.


March 5, 2006 | 10:54 am

>> USB game controller.
>
>
> computer keybyoard. mouse button.

The only problem with keyboard and mouse is that they mean something
to the operating system, and so might affect the program’s operation
(like accidentally clicking a GUI object). A USB game controller is
ignored by everything except the [hi] object.

nick rothwell — composition, systems, performance — http://
http://www.cassiel.com


March 5, 2006 | 6:13 pm

Nick, you are right
I was thinking about that last night and have decided that your first suggestion:

usb game controler

in pieces

was the best one
thanks again

do you think the button i want to use is something i can easily hack into a game controller?
(no experience doing this)
as in I find a button on the game centroller and run wires from it to the button i like and it will work?
or is there some impeadance/voltage/whatnot problem that i might run into?


March 7, 2006 | 3:18 pm

just read you post,
how about a piezo transducer.
that’s what i use for simple trigger inputs.
audio fidelity is not really an issue, so on-board audio interfaces are fine.
just create a small patch that follows the envelope, then bangs over a threshhold (and possibly use ‘onebang’ to stop accidental repeated inputs).

Hmm, actually that all sounds alot more compli ated than a joystick button.

I have a patch with all this in if you want.


March 7, 2006 | 4:07 pm

The piezo sounds interesting,

I am not sure how it would work exactly
(my ignorance, not me telling you it wouldn’t work)

I would love to see the patch,

most of what I have been doing with max and jitter has been all done in the program or with only the jit.grab object to use video to interface with the "outside world"

I have not been able to find a way (in my limited experience)that i really liked, and that i could afford, that brings the outside world into max in an interactive way,

this is why I am now asking stupid questions about buttons, and why i would love to know of any cheap/reliable/elegant/simple ways that people have devloped for interaction
(keeping in mind that one man’s simple is often another man’s rocket science)

I have used piezo contact mikes in pure hardware audio installations before and they are a lot of fun.

I look foward to seeing how i might be able to intergrate them into max


March 8, 2006 | 12:17 am

I think the game controller is the right method.

But just to muddy the waters, I’ll mention that I’ve made switch inputs using these cheap USB sound thingies, like so:

http://cgi.ebay.com/USB-2-0-miniAudio-Adapter-perform-SOUND- CARD-functions_W0QQitemZ8773599498QQcategoryZ11682QQrdZ1QQcm dZViewItem

I send audio out, through the switch, and back to the input. And track the input using MaxMSP. There is DC blocking, so you’ve got to keep the signal moving.

mzed


March 8, 2006 | 4:14 am

thanks mzed,

those little USB things look cool, am i to understand that they basically consist of a miniplug in and a minplug out, or are they configurable as both in or both out or what? I couldn’t really figure it our from the ebay page, but they look like a nice simple cheap peice of kit that could have some real uses, (just what i like)

thanks too to lexein for the miniurl info that is a great idea.

P.S. I got a chepo USB controller ($10 at Target) and got it to talk to MAX with the HI object with no problem, now i just need to break it open and get my button wired into it, well actually i need to order and receive the button first.

I might just head down to radio shack to get a test button, i can’t wait!


March 8, 2006 | 9:51 pm


March 9, 2006 | 2:35 pm

If you just need a couple of buttons and have an extra input and
output channel on your audio interface, you can send a sine wave out
say dac~ 3 , wire the output to a stomp box, push button, toggle,
whatever. Then wire the other side back into whatever input you want
and do the amplitude tracking described below.

Works like a charm.

-Jesse Allison

~ http://www.electrotap.com ~


March 10, 2006 | 2:41 pm

the piezo solution looks great!

then i can even put them in a false floor (something i have done before, but just to get the sound of footsteps and process that wtih hardware) and track where the person is if I have four seprate inputs, and have responses to the viewer’s actual position.

Thanks!


Viewing 16 posts - 1 through 16 (of 16 total)