It's not a secret anymore!*
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
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:
 
jQuery in Action, 2nd edition
 
subject: Another HFJ BeatBox question - re: track.remove() method
 
Similar Threads
another head first beatbox question
Head First Java - BeatBox Code
Head Start java Beatbox serialization/deserializatoin
Swing Problem with Head First Java example
Swing Problem with Head First Java example