We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSound,  Music Libraries › Playing musical notes
Page Index Toggle Pages: 1
Playing musical notes (Read 546 times)
Playing musical notes
Nov 6th, 2008, 12:34am
 
I was wondering what is the easiest way to play a note such as an fsharp by pressing a keyboard button. I'm completely new to Processing, so any help would be appreciated.

thanks a bunch!
Re: Playing musical notes
Reply #1 - Nov 7th, 2008, 6:12pm
 
Brand new to Processing, but check out the SineWaveSignal example from the examples/libraries/minim (sound) menu.

Now just change the freq variable to something more desirable:

http://www.phy.mtu.edu/~suits/notefreqs.html

Combined that with keyPressed() and key variable and it shouldn't be that hard to conjure up.
Page Index Toggle Pages: 1