Package com.softsynth.jmsl.score
Class NotePropertiesTransform
java.lang.Object
com.softsynth.jmsl.score.NotePropertiesTransform
- Direct Known Subclasses:
AccidentalPreferenceTransform
,AccidentalVisibilityPolicyTransform
,AltEnharmonicSpellingToggleTransform
,AmplitudeTransform
,AutoBeamTransform
,BeamGroupTransform
,BeamTransform
,CrescTransform
,DetachGraceNoteTransform
,DotTransform
,DoubleTransform
,DurationTransform
,DynamicTransform
,GlissTransform
,HalveTransform
,HoldTransform
,LyricLevelTransform
,MakeGraceNotesTransform
,MarkTransform
,NoteHeadTransform
,NoteheadVisibleToggleTransform
,NoteheadVisibleTransform
,NoteOrnamentTransform
,NoteVisibleToggleTransform
,NoteVisibleTransform
,OctavaTransform
,PasteAsGraceNotesTransform
,PitchToTextTransform
,RestToggleTransform
,SlurTransform
,SpellingTransformLineOfFifthsRule
,StemInfoOverrideTransform
,StemVisibilityTransform
,StemVisibleToggleTransform
,TiedInToRestTransform
,TieTransform
,TrackSwitchTransform
,TransposeGraceNotesTransform
,TranspositionTransform
,TupletTransform
public abstract class NotePropertiesTransform
extends java.lang.Object
Abstract superclass for Transforms that apply to the properties of Notes in
Selection Buffer. Examples include transposition and beaming. Notes are left
in place in their tracks after their properties are altered. You should
provide a constructor that set this.name="something unique" so that this can
be put into a ScoreFrame Menu and show up with a meaningful name.
- Author:
- Nick Didkovsky , copyright 2000 Nick Didkovsky , all rights reserved
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
copyright
-
Constructor Summary
Constructors Constructor Description NotePropertiesTransform()
-
Method Summary
Modifier and Type Method Description java.lang.String
getName()
abstract void
operate(Score score, SelectionBuffer selectionBuffer)
Implement this method to do something to the Notes in the SelectionBuffer.void
setName(java.lang.String s)
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
copyright
public static final java.lang.String copyright- See Also:
- Constant Field Values
-
-
Constructor Details
-
NotePropertiesTransform
public NotePropertiesTransform()
-
-
Method Details
-
getName
public java.lang.String getName() -
setName
public void setName(java.lang.String s) -
operate
Implement this method to do something to the Notes in the SelectionBuffer. Operations are upon the Notes themselves, not a clone of the Notes. Be careful!Example: // transpose pitch up an octave public void operate(SelectionBuffer selectionBuffer) { for (Enumeration e=selectionBuffer.elements(); e.hasMoreElements(); ) { Note note = (Note)e.nextElement(); if (!note.isRest()) { // get pitch data, transpose it, and set it again note.setPitchData(note.getPitchData()+12); // Use NoteFactory to recalculate staff level, accidental, and stem direction NoteFactory.setLevelPitch(note, note.getPitchData()); } } }
-