use of blue.blueLive.LiveObjectSet in project blue by kunstmusik.
the class LiveObjectSetListTableModel method pushDownSet.
public void pushDownSet(int index) {
LiveObjectSet set = liveObjectSetList.remove(index);
liveObjectSetList.add(index + 1, set);
fireTableDataChanged();
}
use of blue.blueLive.LiveObjectSet in project blue by kunstmusik.
the class BlueLiveTopComponent method buttonAddActionPerformed.
// GEN-LAST:event_buttonDownActionPerformed
private void buttonAddActionPerformed(java.awt.event.ActionEvent evt) {
// GEN-FIRST:event_buttonAddActionPerformed
if (data != null) {
LiveData liveData = data.getLiveData();
LiveObjectBins bins = liveData.getLiveObjectBins();
LiveObjectSetList sets = liveData.getLiveObjectSets();
LiveObjectSet set = bins.getEnabledLiveObjectSet();
if (set != null && set.size() > 0) {
setModel.addLiveObjectSet(set);
}
}
}
use of blue.blueLive.LiveObjectSet in project blue by kunstmusik.
the class BlueLiveTopComponent method triggerButtonActionPerformed.
// GEN-LAST:event_noteTemplateTextMousePressed
private void triggerButtonActionPerformed(java.awt.event.ActionEvent evt) {
if (data == null) {
return;
}
LiveObjectSet liveObjects = data.getLiveData().getLiveObjectBins().getEnabledLiveObjectSet();
if (liveObjects.size() > 0) {
System.out.println("LiveObjectsSize: " + liveObjects.size());
NoteList nl = new NoteList();
try {
for (LiveObject liveObj : liveObjects) {
SoundObject sObj = liveObj.getSoundObject();
if (sObj.getTimeBehavior() != SoundObject.TIME_BEHAVIOR_NOT_SUPPORTED) {
sObj.setTimeBehavior(SoundObject.TIME_BEHAVIOR_NONE);
}
nl.addAll(sObj.generateForCSD(compileData, 0.0f, -1.0f));
}
} catch (Exception e) {
Exceptions.printStackTrace(e);
}
int tempo = (Integer) tempoSpinner.getValue();
ScoreUtilities.scaleScore(nl, 60.0f / tempo);
String scoreText = nl.toString();
if (scoreText != null && scoreText.length() > 0) {
RealtimeRenderManager.getInstance().passToStdin(scoreText);
}
}
}
use of blue.blueLive.LiveObjectSet in project blue by kunstmusik.
the class LiveObjectSetListTableModel method pushUpSet.
public void pushUpSet(int index) {
LiveObjectSet set = liveObjectSetList.remove(index);
liveObjectSetList.add(index - 1, set);
fireTableDataChanged();
}
use of blue.blueLive.LiveObjectSet in project blue by kunstmusik.
the class BlueLiveBinding method triggerLiveData.
protected void triggerLiveData() {
LiveObjectSet liveObjects = data.getLiveObjectBins().getEnabledLiveObjectSet();
if (liveObjects.size() > 0) {
NoteList nl = new NoteList();
try {
for (LiveObject liveObj : liveObjects) {
SoundObject sObj = liveObj.getSoundObject();
if (sObj.getTimeBehavior() != SoundObject.TIME_BEHAVIOR_NOT_SUPPORTED) {
sObj.setTimeBehavior(SoundObject.TIME_BEHAVIOR_NONE);
}
nl.addAll(sObj.generateForCSD(compileData, 0.0f, -1.0f));
}
} catch (Exception e) {
Exceptions.printStackTrace(e);
}
ScoreUtilities.scaleScore(nl, 60.0f / data.getTempo());
String scoreText = nl.toString();
if (scoreText != null && scoreText.length() > 0) {
// FIXME - this is certainly not good code but functions for now...
BlueLiveToolBar.getInstance().sendEvents(scoreText);
}
}
}
Aggregations