public class MixerStatus extends DeviceUpdate
| Modifier and Type | Field and Description |
|---|---|
static int |
MASTER_HAND_OFF
The byte within a status packet which indicates that the device is in the process of handing off the tempo
master role to anther device, labeled Mh in Figure 11 of the
Packet Analysis document.
|
static int |
MINIMUM_PACKET_SIZE
The smallest packet size from which we can be constructed.
|
static int |
STATUS_FLAGS
The byte within the status packet which contains useful status information, labeled F in Figure 10 of the
Packet Analysis document.
|
| Constructor and Description |
|---|
MixerStatus(DatagramPacket packet)
Constructor sets all the immutable interpreted fields based on the packet content.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getBeatWithinBar()
Get the position within a measure of music at which the most recent beat occurred (a value from 1 to 4, where 1
represents the down beat).
|
int |
getBpm()
Get the BPM at the time of the update.
|
Integer |
getDeviceMasterIsBeingYieldedTo()
If this packet indicates the device in the process of yielding the tempo master role to another player,
this will hold the device number of that player, otherwise it will be
null. |
double |
getEffectiveTempo()
Get the effective tempo reflected by this update, which reflects both its track BPM and pitch as needed.
|
int |
getPitch()
Get the device pitch at the time of the update.
|
boolean |
isBeatWithinBarMeaningful()
Returns
true if this beat is coming from a device where getBeatWithinBar() can reasonably
be expected to have musical significance, because it respects the way a track was configured within rekordbox. |
boolean |
isSynced()
Was the mixer in Sync mode when this update was sent? Unless someone has been sending sync control packets
using a package like Beat Link, this will generally return
true. |
boolean |
isTempoMaster()
Is this mixer reporting itself to be the current tempo master?
|
String |
toString() |
getAddress, getDeviceName, getDeviceNumber, getPacketBytes, getTimestamppublic static final int STATUS_FLAGS
public static final int MASTER_HAND_OFF
public static final int MINIMUM_PACKET_SIZE
public MixerStatus(DatagramPacket packet)
packet - the beat announcement packet that was receivedpublic int getBpm()
getBpm in class DeviceUpdatepublic int getBeatWithinBar()
getBeatWithinBar in class DeviceUpdatepublic boolean isBeatWithinBarMeaningful()
true if this beat is coming from a device where getBeatWithinBar() can reasonably
be expected to have musical significance, because it respects the way a track was configured within rekordbox.isBeatWithinBarMeaningful in class DeviceUpdatepublic int getPitch()
DeviceUpdateUtil.pitchToPercentage(long), and the corresponding
fractional scaling value by passing it to Util.pitchToMultiplier(long). Mixers always report a pitch
of +0%, so tempo changes are purely reflected in the BPM value.getPitch in class DeviceUpdatepublic boolean isTempoMaster()
isTempoMaster in class DeviceUpdatetrue if the mixer that sent this update is the masterpublic boolean isSynced()
true.isSynced in class DeviceUpdatepublic Integer getDeviceMasterIsBeingYieldedTo()
DeviceUpdatenull.getDeviceMasterIsBeingYieldedTo in class DeviceUpdatepublic double getEffectiveTempo()
DeviceUpdategetEffectiveTempo in class DeviceUpdatepublic String toString()
toString in class DeviceUpdateCopyright © 2016–2019 Deep Symmetry, LLC. All rights reserved.