Articles 3D Audio Custom Controls General RB Graphics Hacks Mac OS X Menus Novelty Printing REALbasic 2005 REALbasic 2006 Registration Resources Reviews Serial Speech Sockets XML Video Resource Links News Current News February 2006 January 2006 December 2005 November 2005 October 2005 September 2005 August 2005 July 2005 June 2005 May 2005 April 2005 March 2005 ![]() REALbasic for Dummies by Erick Tejkowski ![]() Learning REALbasic through Applications REALbasic for Macintosh REALbasic Cross-Platform Application Development
Older files are in Stuffit 5 or greater format. Newer files are ".Zip". Download StuffIt Expander |
|
Metronomes With that in mind, we're going to create a very small application to create a metronome on your computer. For years I heard nothing but "go buy a metronome!" but I never did. I wrote one in REALbasic instead. Design
The Few Lines to Make It The time keeping aspect of the program is a simple do-loop which contains an if-statement that constantly checks to see if the right amount of time has passed since the last beat. If enough time has passed then we use the NotePlayer to play a sound and record the current time. To stop the metronome the do-loop will exit if the user presses Command-Period or the Escape key.
The instrument 128 is a gunshot sound. When played and silenced immediately after, the resulting sound is sort of a cross between a snare drum and a bouncing ball. If you don't silence the gunshot immediately after playing it then it has a pretty interesting effect! Put the BPM value up at 400 and you have yourself a machine gun! The Finished Product
|
||||
|
||||||||||||||||||||||||||||||||
Maintained by the Staff of ResExcellence. This entire site ©1997-2006 ResExcellence
Privacy Statement? Sure we gotta Privacy Statement.
[an error occurred while processing this directive]