Button with Minim/Processing to play sound - arduino

I have been trying to play a sound on my laptop by pressing a homemade button on my Arduino.
Now I found this example code to play a file with Minim.
I want to know where I can trigger the button in the code, to play the sound.
Can somebody help me?

Try By looking here Arduino and Processing
This page explains communication examples and how to communicate between arduino and processing
And then you just need to call "player.play();"(from the example you need to remove it)
once the user presses the button

Related

Is there a way to pause the Media Object when a Suggestion Chip has been clicked - while the Media Object is playing?

I have an audio clip that pays when a specific intent has been triggered. A set of suggestion chips are displayed along with it. Now when I test it out in the simulator or my phone the MediaObject works fine but if I continue to the next intent using a suggestion chip the MediaObject doesn't pause automatically. Which in-turn overlaps with the next intents SSML.
I'm unable to get a sample code or any reference on how to pause MediaObject audio.
I've tried adding a blank audio clip in an SSML before the next intent starts, so to auto cancel the MediaObject, which failed.
I expect that when the user clicks on a Suggestion Chip while a MediaObject is playing - the Audio clip must pause automatically. And it should not overlap with the next intents SSML.
We were able to reproduce the issue and have filed an internal bug.
There isn't an API to pause the music.

How to add close and minimize button to processing program

I made a program with processing and arduino to control RGB led using processing
then I made application .exe from my processing code
the problem is the application work without close and minimize button .
how can i add it for my application ?
be sure that you Uncheck the Presentation Mode
You need to make sure the "Presentation Mode" checkbox is unchecked:
If this is checked, your sketch is displayed in full screen. If it's unchecked, your sketch is displayed in a window.

making one button send multiple commands

I'm making a robot using an arduino motherboard and an Ethernet shield. The Ethernet shield is setup so that if I type http://www.robotip.com/?1 it gives power to pin 1, if I type http://www.robotip.com/?2 it gives power to pin 2. So I have a button and rather then a normal button clicking it sends 1 command I would like to be able to hold the button and have it send ?1 every second that the button is held. What can i use to achieve this? I know this is a very confusing question lol thanks a lot.
If you're making a "control interface" with a webpage,
you should use javascript (Jquery is a nice javascript library)
Using get function you can send the commands asynchronous so it won't refresh the page every time you want to send some data to the robot.
And it also have a mousedown method, that is just what you want, it will do something while the mouse button is .. pressed.
Then you can put your timed requests inside the mousedown method.

How do you register an event listener to the appear/disappear events of the virtual keyboard on Blackberry Playbook using Flex?

Not why no one has been complaining about this but I'm have a lot of problems with the Blackberry Playbook Virtual Keyboard on the Simulator.
I have an richedit component in the middle of the screen and as soon as the virtual keyboard appears to enter text, it completely hides the text input. I'd like to move the text input up when the keyboard appears/disappears. Is there any way to do this? I don't want to muck around with the focus_in and focus_out events on the richedit. I've tried, and it's not very reliable.
Thank you in advance!
We expect the next release of the SDK (long overdue at this point but, I think, imminent) to provide much more complete support for the virtual keyboard. Until that occurs, I think it's a waste of time to attempt to do anything special with it.
I also think there's a chance it will automagically move your whole stage up when it would cover up a text input, so maybe you won't have to do anything about it anyway.
Edit: Actually I published code in January describing an undocumented way to support this, using some rudimentary PPS support. It also shows how you can programmatically control the keyboard opening and closing. I don't recommend it yet for real code...

GWT designing a Button

I would like to do some notification stuff for my website.
I am done with the backend coding but i would like to display properly in the VIEW.
So exactly what i need to do is when ever there is a message i would like my button to change its color.I mean i want to do something which indicates that there is a message waiting for the user.
So basically i need to make my button blinking or change color so that it indicates the user that he has some message waiting for him
So can you please suggest me any button which can have an image as a display and a corresponding css file which i need to use which can blink when ever there is a message.
Both PushButton and ToggleButton allow setting an image as the face of the button. However, you should be able to make a normal Button "blink" just by using CSS and a Timer. Use addStyleName() and removeStyleName() in combination with the Timer - on new message, add your "blink" style (it's up to you to come up with it ;)), add a Timer and in its run() method removeStyleName() the "blink" style.
PS: See this blog post, to see how the Google team created the cross-browser, customizable buttons in GMail - but that's an overkill in this situation, IMHO ;)

Resources