This week's book giveaway is in the Agile forum.
We're giving away four copies of Head First Agile and have Andrew Stellman & Jennifer Greene on-line!
See this thread for details.
Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

MiniMusicPlayer3.java from Head First Java - Sounds like drums to me.  RSS feed

 
Ryan Blake
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This example program from Head First Java. It supposed to be a music video with synth sound and random rectangles. Instead, I have drum sounds with random rectangles. If I comment out the line The sound returns to synth but there aren't any rectangles. I know this is the ControllerEvent to signal the rectangles according to the book it does nothing but this. I wonder if maybe it is a drum sound? What is going on?

 
Knute Snortum
Sheriff
Posts: 4091
112
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I get piano sounds. I suspect that the program uses whatever sound you last used on your computer's synthesizer. I don't know enough about programming MIDI to be able to tell you how to change the sound. I'll try moving this thread to another forum.
 
Ryan Blake
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well I finally have some progress. I made one simple change from the book. I'm not 100% sure what it means. I changed the ControllerEvent line to to put the ControllerEvent on a different channel from the piano sound. I'm guessing because I can't have the ControllerEvent on the same channel as the note samples. I'm not sure why it works on other computers but not mine. It must be some environmental differences? I'm using a Debian Linux OS. Is there anyone using the same configuration who can explain why?
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!