Chapter 5. Making music: An on-screen piano

topics:

sound

concepts:

abstraction, loops, arrays, OO structure

In this chapter we shall start on a new scenario: a piano that we can play with our computer keyboard. Figure 5.1 shows what it could look like once we’re finished.

The goal for this chapter: an on-screen piano

Figure 5.1. The goal for this chapter: an on-screen piano

We start again with opening a scenario from the book scenarios: piano-1. This is a version of our scenario that has the resources in it that we will need (the images and the sound files), but not much else. We shall use this as the base scenario to start writing the code to build the piano.???

Example . 

Exercise 5.1Open the ...

Get Introduction to Programming with Greenfoot: Object–Oriented Programming in Java™ with Games and Simulations, First Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.