Search in sources :

Example 1 with LiveObjectSet

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();
}
Also used : LiveObjectSet(blue.blueLive.LiveObjectSet)

Example 2 with LiveObjectSet

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);
        }
    }
}
Also used : LiveObjectSetList(blue.blueLive.LiveObjectSetList) LiveObjectBins(blue.blueLive.LiveObjectBins) LiveObjectSet(blue.blueLive.LiveObjectSet)

Example 3 with LiveObjectSet

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);
        }
    }
}
Also used : NoteList(blue.soundObject.NoteList) SoundObject(blue.soundObject.SoundObject) LiveObjectSet(blue.blueLive.LiveObjectSet) BadLocationException(javax.swing.text.BadLocationException) LiveObject(blue.blueLive.LiveObject)

Example 4 with LiveObjectSet

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();
}
Also used : LiveObjectSet(blue.blueLive.LiveObjectSet)

Example 5 with LiveObjectSet

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);
        }
    }
}
Also used : NoteList(blue.soundObject.NoteList) SoundObject(blue.soundObject.SoundObject) LiveObjectSet(blue.blueLive.LiveObjectSet) LiveObject(blue.blueLive.LiveObject)

Aggregations

LiveObjectSet (blue.blueLive.LiveObjectSet)5 LiveObject (blue.blueLive.LiveObject)2 NoteList (blue.soundObject.NoteList)2 SoundObject (blue.soundObject.SoundObject)2 LiveObjectBins (blue.blueLive.LiveObjectBins)1 LiveObjectSetList (blue.blueLive.LiveObjectSetList)1 BadLocationException (javax.swing.text.BadLocationException)1