use of blue.soundObject.NoteParseException in project blue by kunstmusik.
the class TuningProcessor method main.
public static void main(String[] args) {
NoteList n = new NoteList();
for (int i = 0; i < 30; i++) {
try {
n.add(Note.createNote("i1 " + i + " " + i + " 6." + i + " 4"));
} catch (NoteParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
System.out.println("before: \n\n" + n + "\n\n");
TuningProcessor tp = new TuningProcessor();
tp.setPfield("4");
try {
tp.processNotes(n);
} catch (NoteProcessorException ex) {
System.out.println("Exception: " + ex.getMessage());
}
System.out.println("after: \n\n" + n + "\n\n");
}
use of blue.soundObject.NoteParseException in project blue by kunstmusik.
the class CSDRender method handleParametersForBlueLive.
private void handleParametersForBlueLive(ArrayList parameters, ArrayList<StringChannel> stringChannels, GlobalOrcSco globalOrcSco, NoteList notes, Arrangement arrangement, boolean useAPI) {
Object[] varNum = new Object[1];
StrBuilder initStatements = new StrBuilder();
StrBuilder paramScore = new StrBuilder();
for (StringChannel strChannel : stringChannels) {
String varName = strChannel.getChannelName();
initStatements.append(varName);
initStatements.append(" = ");
initStatements.append("\"").append(strChannel.getValue()).append("\"\n");
if (useAPI) {
initStatements.append(varName).append(" chnexport \"");
initStatements.append(varName).append("\", 3\n");
}
}
for (int i = 0; i < parameters.size(); i++) {
Parameter param = (Parameter) parameters.get(i);
varNum[0] = new Integer(i);
String varName = param.getCompilationVarName();
// param.setCompilationVarName(varName);
double initialVal = param.getFixedValue();
// init statements
initStatements.append(varName);
initStatements.append(" init ");
initStatements.append(NumberUtilities.formatDouble(initialVal));
initStatements.append("\n");
if (useAPI) {
initStatements.append(varName).append(" chnexport \"");
initStatements.append(varName).append("\", 3\n");
}
}
globalOrcSco.appendGlobalOrc(initStatements.toString());
try {
notes.addAll(ScoreUtilities.getNotes(paramScore.toString()));
} catch (NoteParseException ex) {
ex.printStackTrace();
}
// globalOrcSco.appendGlobalSco(paramScore.toString());
}
use of blue.soundObject.NoteParseException in project blue by kunstmusik.
the class CommandlineRunner method passToStdin.
@Override
public void passToStdin(String text) {
NoteList nl = null;
try {
nl = ScoreUtilities.getNotes(text);
} catch (NoteParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
nl = null;
}
if (nl == null) {
return;
}
for (Iterator iter = nl.iterator(); iter.hasNext(); ) {
Note note = (Note) iter.next();
console.passToStdin(note.toString());
}
}
Aggregations