use of blue.BlueData in project blue by kunstmusik.
the class ScoreSection method main.
public static void main(String[] args) {
File test = new File("/work/blue/trappedInConvert/01-Trapped.csd");
try {
BufferedReader in = new BufferedReader(new FileReader(test));
String line = "";
StringBuilder buffer = new StringBuilder();
while ((line = in.readLine()) != null) {
buffer.append(line).append("\n");
}
String CSD = buffer.toString();
BlueData data = CSDUtility.convertCSDtoBlue(CSD, CSDUtility.IMPORT_SINGLE_SOUNDOBJECT);
System.out.println(data.saveAsXML());
} catch (Exception e) {
e.printStackTrace();
System.exit(1);
}
}
use of blue.BlueData in project blue by kunstmusik.
the class ScoreSection method convertOrcScoToBlue.
public static BlueData convertOrcScoToBlue(File orcFile, File scoFile, int importMode) {
BlueData data = null;
try {
String orc = TextUtilities.getTextFromFile(orcFile);
String sco = TextUtilities.getTextFromFile(scoFile);
data = new BlueData();
parseCsOrc(data, orc);
parseCsScore(data, sco, importMode);
} catch (Exception e) {
e.printStackTrace();
}
return data;
}
use of blue.BlueData in project blue by kunstmusik.
the class ScoreSection method convertCSDtoBlue.
public static BlueData convertCSDtoBlue(File csdFile, int importMode) {
BlueData data = null;
try {
String CSD = TextUtilities.getTextFromFile(csdFile);
data = convertCSDtoBlue(CSD, importMode);
} catch (Exception e) {
e.printStackTrace();
}
return data;
}
use of blue.BlueData in project blue by kunstmusik.
the class AddToSoundObjectLibraryAction method actionPerformed.
@Override
public void actionPerformed(ActionEvent e) {
SoundObject sObj = (SoundObject) soundObjects.iterator().next().deepCopy();
if (sObj instanceof Instance) {
return;
}
BlueData data = BlueProjectManager.getInstance().getCurrentBlueData();
Instance i = new Instance(sObj);
i.setStartTime(sObj.getStartTime());
i.setSubjectiveDuration(sObj.getSubjectiveDuration());
data.getSoundObjectLibrary().addSoundObject(sObj);
SoundLayer layer = (SoundLayer) scorePath.getGlobalLayerForY(p.y);
layer.remove(soundObjects.iterator().next());
layer.add(i);
// BlueUndoManager.setUndoManager("score");
// BlueUndoManager.addEdit(new ReplaceScoreObjectEdit(
// sCanvas.getPolyObject(), oldSoundObject,
// newSoundObject, index));
}
use of blue.BlueData in project blue by kunstmusik.
the class ScratchPadTopComponent method reinitialize.
private void reinitialize() {
BlueProject project = BlueProjectManager.getInstance().getCurrentProject();
if (project != null) {
BlueData currentData = project.getData();
setScratchPadData(currentData.getScratchPadData());
} else {
setScratchPadData(null);
}
}
Aggregations