Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Starting two sequencers at once

 
Ravaa Bal
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all, apologise for the multiple topics.

If I have a method as so:



And I have two Sequencers obtained in the same class as the above method:


How could I start both of these sequencers at once? I'm thinking along the lines of threads but I'm not sure how to do that with both sequencers and the method...is there a better way?

Thank you.
 
Campbell Ritchie
Sheriff
Pie
Posts: 49466
64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Will it work if you start both sequencers in the same method? Have you tried it? Do they interfere with each other?
 
Ravaa Bal
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Afraid so, as soon as the second sequencer is started after the first one is started the second sequencer 'takes over' the playback. Not quite sure what's going on as sequencers apparently should be able to play at the same time without threads.
 
Campbell Ritchie
Sheriff
Pie
Posts: 49466
64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't know any more, I am afraid.
 
Prabz Bhatia
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've had some experience in this field,
If I may ask, What exactly are you trying to accomplish by using 2 sequencers simultaneously?

I mean If you 're trying to produce 2 sounds at once, you could use 2 different channels on the same sequencer and start them together...
 
Prabz Bhatia
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hope that helped you work it out... Did it?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic