• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 30. SOUND APPLICATIONS > CREATING A PLAYER PIANO

CREATING A PLAYER PIANO

Another possibility for a piano program is to have it play all by itself. You can provide it with a series of notes and durations, and feed them to the key behaviors at the proper time.

The first step is to come up with a simple notation scheme. Specifying the notes by their member names is a good start, but you also need to specify their duration. A good idea might be to measure this in one-tenths of a second, or six ticks.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint