wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Another HFJ BeatBox question - re: track.remove() method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Another HFJ BeatBox question - re: track.remove() method" Watch "Another HFJ BeatBox question - re: track.remove() method" New topic
Author

Another HFJ BeatBox question - re: track.remove() method

richard rehl
Ranch Hand

Joined: May 21, 2007
Posts: 36
Hi, yet another ? regarding HFJ, the BeatBox example. I'm modifying it because I hated the way you had to stop and restart the sequence to hear whatever changes you made to the pattern. My problem is that the track.remove(MidiEvent) method doesn't seem to be working. I'm able to add events to the track correctly: (jc is the JCheckBox that's sent an ActionEvent to its ActionListener, and makeEvent() returns a MidiEvent with NoteOn/NoteOff, channel, note, velocity, and tick)

and I can see that unselecting the JCheckBox causes the correct code block to run:

yet the MidiEvents don't seem to actually get removed from the track and keep playing. Any thoughts? Here's the complete code:
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Another HFJ BeatBox question - re: track.remove() method
 
Similar Threads
Head Start java Beatbox serialization/deserializatoin
Swing Problem with Head First Java example
Swing Problem with Head First Java example
Head First Java - BeatBox Code
another head first beatbox question