Trying to use a Button with Ableton Live but getting strange behavior.

I’m very new to Arduino and i’m trying to build a MIDI controller using a Mega, the Ableton Live connection kit and some arcade buttons and getting some odd behavior that I don’t know how to fix. When the button isn’t pressed down, I’m going a constant flicking on and off from the digital output, no constant stream of on or off. But when the button is pressed down, the flicking stops. How can I set this up so I just send a impulse when the button is pressed down. Your help is greatly appreciated.

I’ve attached a picture of how I set arcade button up.

you need to use a pull up or pull down resistor otherwise when the button is not pressed you can get noise which gives faulty digitial readings, see