use of de.mossgrabers.framework.daw.resource.ChannelType in project DrivenByMoss by git-moss.
the class OSCWriter method flushTrack.
private void flushTrack(final String trackAddress, final ITrack track, final boolean dump) {
this.sendOSC(trackAddress + "exists", track.doesExist(), dump);
final ChannelType type = track.getType();
this.sendOSC(trackAddress + "type", type == null ? null : type.name().toLowerCase(), dump);
this.sendOSC(trackAddress + "activated", track.isActivated(), dump);
this.sendOSC(trackAddress + "selected", track.isSelected(), dump);
this.sendOSC(trackAddress + "isGroup", track.isGroup(), dump);
this.sendOSC(trackAddress + "name", track.getName(), dump);
this.sendOSC(trackAddress + "volumeStr", track.getVolumeStr(), dump);
this.sendOSC(trackAddress + "volume", track.getVolume(), dump);
this.sendOSC(trackAddress + "panStr", track.getPanStr(), dump);
this.sendOSC(trackAddress + "pan", track.getPan(), dump);
this.sendOSC(trackAddress + "mute", track.isMute(), dump);
this.sendOSC(trackAddress + "solo", track.isSolo(), dump);
this.sendOSC(trackAddress + "recarm", track.isRecArm(), dump);
this.sendOSC(trackAddress + "monitor", track.isMonitor(), dump);
this.sendOSC(trackAddress + "autoMonitor", track.isAutoMonitor(), dump);
this.sendOSC(trackAddress + "canHoldNotes", track.canHoldNotes(), dump);
this.sendOSC(trackAddress + "canHoldAudioData", track.canHoldAudioData(), dump);
this.sendOSC(trackAddress + "position", track.getPosition(), dump);
for (int i = 0; i < track.getNumSends(); i++) this.flushParameterData(trackAddress + "send/" + (i + 1) + "/", track.getSend(i), dump);
for (int i = 0; i < track.getNumSlots(); i++) {
final ISlot slot = track.getSlot(i);
final String clipAddress = trackAddress + "clip/" + (i + 1) + "/";
this.sendOSC(clipAddress + "name", slot.getName(), dump);
this.sendOSC(clipAddress + "isSelected", slot.isSelected(), dump);
this.sendOSC(clipAddress + "hasContent", slot.hasContent(), dump);
this.sendOSC(clipAddress + "isPlaying", slot.isPlaying(), dump);
this.sendOSC(clipAddress + "isRecording", slot.isRecording(), dump);
this.sendOSC(clipAddress + "isPlayingQueued", slot.isPlayingQueued(), dump);
this.sendOSC(clipAddress + "isRecordingQueued", slot.isRecordingQueued(), dump);
this.sendOSC(clipAddress + "isStopQueued", slot.isStopQueued(), dump);
final double[] color = slot.getColor();
this.sendOSCColor(clipAddress + "color", color[0], color[1], color[2], dump);
}
final double[] color = track.getColor();
this.sendOSCColor(trackAddress + "color", color[0], color[1], color[2], dump);
final String crossfadeMode = track.getCrossfadeMode();
this.sendOSC(trackAddress + "crossfadeMode/A", "A".equals(crossfadeMode), dump);
this.sendOSC(trackAddress + "crossfadeMode/B", "B".equals(crossfadeMode), dump);
this.sendOSC(trackAddress + "crossfadeMode/AB", "AB".equals(crossfadeMode), dump);
this.sendOSC(trackAddress + "vu", this.configuration.isEnableVUMeters() ? track.getVu() : 0, dump);
}
use of de.mossgrabers.framework.daw.resource.ChannelType in project DrivenByMoss by git-moss.
the class AddTrackMode method onFirstRow.
/**
* {@inheritDoc}
*/
@Override
public void onFirstRow(final int index, final ButtonEvent event) {
if (event != ButtonEvent.UP)
return;
final PushConfiguration conf = this.surface.getConfiguration();
final List<IDeviceMetadata> devices = new ArrayList<>();
final ChannelType channelType;
String channelName = null;
if (index < 4) {
channelType = ChannelType.AUDIO;
if (index > 0) {
final Optional<IDeviceMetadata> audioFavorite = conf.getAudioFavorite(index - 1);
if (audioFavorite.isPresent()) {
final IDeviceMetadata deviceMetadata = audioFavorite.get();
devices.add(deviceMetadata);
channelName = deviceMetadata.name();
}
}
} else {
channelType = ChannelType.EFFECT;
if (index > 4) {
final Optional<IDeviceMetadata> effectFavorite = conf.getEffectFavorite(index - 5);
if (effectFavorite.isPresent()) {
final IDeviceMetadata deviceMetadata = effectFavorite.get();
devices.add(deviceMetadata);
channelName = deviceMetadata.name();
}
}
}
this.model.getTrackBank().addChannel(channelType, channelName, devices);
this.surface.getModeManager().restore();
}
Aggregations