This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Starting two sequencers at once Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Starting two sequencers at once" Watch "Starting two sequencers at once" New topic
Author

Starting two sequencers at once

Ravaa Bal
Ranch Hand

Joined: Apr 15, 2009
Posts: 31
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

Joined: Oct 13, 2005
Posts: 36482
    
  16
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

Joined: Apr 15, 2009
Posts: 31
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

Joined: Oct 13, 2005
Posts: 36482
    
  16
Don't know any more, I am afraid.
Prabz Bhatia
Greenhorn

Joined: Apr 14, 2009
Posts: 19
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

Joined: Apr 14, 2009
Posts: 19
Hope that helped you work it out... Did it?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Starting two sequencers at once
 
Similar Threads
MidiEvent Issues.
Multiple Sequencers In Applet
Simple interface & constructor question
I didn't think you could instantiate an Interface
My Midiplayer isn't looping