public class MixerStatus extends DeviceUpdate
| Modifier and Type | Field and Description |
|---|---|
static int |
STATUS_FLAGS
The byte within the 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.
|
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 |
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 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 double getEffectiveTempo()
DeviceUpdategetEffectiveTempo in class DeviceUpdatepublic String toString()
toString in class DeviceUpdateCopyright © 2016–2018 Deep Symmetry, LLC. All rights reserved.