• Post Reply Bookmark Topic Watch Topic
  • New Topic

Basic sequence  RSS feed

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


The sequencer only plays note 63; ; ; ; ; ;, why?
 
Sheriff
Posts: 4756
133
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's hard to know what's going on without the full code.  And when you post code, please UseCodeTags (that's a link).  I added them to your post above.

Is this from Head First Java?  Be sure to quote your sources.
 
Rancher
Posts: 2862
32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does the MidiEvent constructor copy the contents of a or does it just copy the reference.
It is likely the call to setMessage will change a's contents to the current contents of i, losing the last contents.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!