com.softsynth.jmsl.score.transforms
Class HoldTransform
java.lang.Object
com.softsynth.jmsl.score.NotePropertiesTransform
com.softsynth.jmsl.score.transforms.HoldTransform
public class HoldTransform
- extends NotePropertiesTransform
Change hold (sustain time) of selected notes based on a ratio to its
duration. Brings up dialog for user input.
- Author:
- Nick Didkovsky, copyright 2000 Nick Didkovsky, all rights reserved
Field Summary |
static java.lang.String |
copyright
|
Constructor Summary |
HoldTransform()
Constructor gives unique name, this.name = "Transpose: " + interval; |
HoldTransform(java.awt.Frame f)
|
Method Summary |
void |
operate(Score score,
SelectionBuffer selectionBuffer)
public void operate(Score score, SelectionBuffer selectionBuffer) {
HoldDialog vd = new HoldDialog(this, parent, ratio);
(new HoldDialog(this, parent, ratio)).setVisible(true);
if (!proceed) {
// System.out.println("Bailing");
} else {
for (Enumeration e = selectionBuffer.elements(); e.hasMoreElements();) {
Note note = (Note) e.nextElement();
if (!note.isRest()) {
double duration = note.getDurationData();
double hold = ratio * duration;
note.setHoldData(hold);
}
}
}
score.setDirty(true);
} |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
copyright
public static final java.lang.String copyright
- See Also:
- Constant Field Values
HoldTransform
public HoldTransform()
- Constructor gives unique name, this.name = "Transpose: " + interval;
HoldTransform
public HoldTransform(java.awt.Frame f)
operate
public void operate(Score score,
SelectionBuffer selectionBuffer)
public void operate(Score score, SelectionBuffer selectionBuffer) {
HoldDialog vd = new HoldDialog(this, parent, ratio);
(new HoldDialog(this, parent, ratio)).setVisible(true);
if (!proceed) {
// System.out.println("Bailing");
} else {
for (Enumeration e = selectionBuffer.elements(); e.hasMoreElements();) {
Note note = (Note) e.nextElement();
if (!note.isRest()) {
double duration = note.getDurationData();
double hold = ratio * duration;
note.setHoldData(hold);
}
}
}
score.setDirty(true);
}
- Specified by:
operate
in class NotePropertiesTransform