This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

edparrish
edparrish presents ...

2011/3/5

Piano Visualizer

This scenario is an extension of the one from the book:

"Introduction to Programming with Greenfoot"
by Michael Kolling
ISBN: 0-13-603753-4

The book example shows a piano on screen that players can play with their
keyboard. It uses pre-made sound files for every piano key.

This extension is a music visualizer that creates imagery based on music played
on the piano keys. The Visualizer class controls the imagery displayed. The
Oval class is a shape class that gets displayed to create the imagery.

You can easily extend this project and here are some suggestions:

1. Change the background color of the Visualizer screen.
2. Add more and different shape classes.
3. Move the shapes by adding code to the act() method.
4. Arrange shapes in different patterns like lines, circles, flowers, etc.
5. Fade or intensify colors by adjusting transparency.
6. Have shapes disappear after some time or when moving off the screen.

Note that some drawing can be done directly on the Visualizer screen though
this usually makes animation more difficult.

9796 views / 28 in the last 7 days

Tags: mouse simulation with-source cabrillo

open in greenfoot
Your browser does not support the canvas tag.
A new version of this scenario was uploaded on Sat Mar 05 05:07:13 UTC 2011 Changed the screenshot.
A new version of this scenario was uploaded on Mon Jul 25 20:29:54 UTC 2011
A new version of this scenario was uploaded on Mon Jul 25 20:35:15 UTC 2011
A new version of this scenario was uploaded on Mon Jul 25 20:37:05 UTC 2011
A new version of this scenario was uploaded on Wed Aug 10 00:49:26 UTC 2011 Reduced the visualizer screen size so the project shows more easily on the screen.
A new version of this scenario was uploaded on 2017-08-17 04:52:28 UTC Update for Greenfoot 3.1
A new version of this scenario was uploaded on 2017-08-17 05:30:55 UTC
A new version of this scenario was uploaded on 2017-08-17 05:48:52 UTC Added mouse press to play.
PianoBeginnerPianoBeginner

2019/3/18

Cool tool you made here. I have done a similar one, checkout www.piano-visualizer.com

Want to leave a comment? You must first log in.

Who likes this?

No votes yet.