public interface MasterListener extends BeatListener
MasterAdapter class (overriding only the methods of interest).
The listener object created from that class is then registered using
VirtualCdj.addMasterListener(MasterListener). Whenever a relevant change occurs, the appropriate method
in the listener object is invoked.
Note that in order for beats to be reported, the BeatFinder must be active as well.
| Modifier and Type | Method and Description |
|---|---|
void |
masterChanged(DeviceUpdate update)
Invoked when there is a change in which device is the current tempo master.
|
void |
tempoChanged(double tempo)
Invoked when the master tempo has changed.
|
newBeatvoid masterChanged(DeviceUpdate update)
To reduce latency, tempo master updates are delivered to listeners directly on the thread that is receiving them
from the network, so if you want to interact with user interface objects in this method, you need to use
javax.swing.SwingUtilities.invokeLater(Runnable)
to do so on the Event Dispatch Thread.
Even if you are not interacting with user interface objects, any code in this method
must finish quickly, or it will add latency for other listeners, and master updates will back up.
If you want to perform lengthy processing of any sort, do so on another thread.
update - the message identifying the new master, or null if there is now nonevoid tempoChanged(double tempo)
To reduce latency, tempo master updates are delivered to listeners directly on the thread that is receiving them
from the network, so if you want to interact with user interface objects in this method, you need to use
javax.swing.SwingUtilities.invokeLater(Runnable)
to do so on the Event Dispatch Thread.
Even if you are not interacting with user interface objects, any code in this method
must finish quickly, or it will add latency for other listeners, and master updates will back up.
If you want to perform lengthy processing of any sort, do so on another thread.
tempo - the new master tempoCopyright © 2016 Deep Symmetry, LLC. All rights reserved.