• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
richard rehl
Ranch Hand
Posts: 36
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic