public class Scale
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
GAMME_STATE_COMPLETED
scale state "completed"
|
static java.lang.String |
GAMME_STATE_INPROGRESS
scale state "In Progress"
|
Constructor and Description |
---|
Scale(java.lang.String name,
double width,
double intertrackdistance,
double trackwidth,
double firsttrackaxisdistance,
int tracknumber,
AbstractTrackDef[] tracksdefinition,
PipeStopGroupList registersets,
double speed,
ConstraintList constraintlist,
java.lang.String infos,
java.lang.String state,
java.lang.String contact,
VirtualBookRendering rendering,
boolean preferredViewedInverted,
boolean bookMovingRightToLeft,
java.util.Map<java.lang.String,java.lang.String> properties)
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
int |
findNoteDefTrack(int midinote)
look for a track associated to a midi note
|
int |
findNoteDefTrack(int midinote,
java.lang.String registersetname)
get the first track associated with a mininote, for a register
|
int[] |
findNoteDefTrack(java.lang.String registersetname)
find all tracks associated to a specific registerset name
|
int |
findPercussionDef(int percussion)
get the track index for a given percussion
|
PercussionDef[] |
findUniquePercussionDefs()
Get all the percussion defs, this function remove the PercussionDef
duplicated
|
java.util.Map<java.lang.String,java.lang.String> |
getAllProperties()
get All the properties
|
ConstraintList |
getConstraints()
Get a constraint list copy
|
java.lang.String |
getContact()
get the scale contact
|
double |
getFirstTrackAxis()
get the first track axis distance from the reference
|
static Scale |
getGammeMidiInstance()
utility function that create from scratch a dummy scale of the midi
definition
|
java.lang.String |
getInformations()
get the informations
|
double |
getIntertrackHeight()
get the distance between each track (in mm)
|
java.lang.String |
getName()
get the scale name
|
PipeStopGroupList |
getPipeStopGroupList()
get a registerset liste copy
|
PipeStopGroupList |
getPipeStopGroupListRef() |
java.lang.String |
getProperty(java.lang.String key)
get the free property associated to this scale
|
VirtualBookRendering |
getRendering()
get the rendering associated to this scale
|
double |
getSpeed()
get the speed of the organ
|
java.lang.String |
getState()
get the scale state
|
int |
getTrackNb()
get track number
|
AbstractTrackDef[] |
getTracksDefinition()
get the definition of the tracks
|
double |
getTrackWidth()
get width of a track (in mm)
|
double |
getWidth()
get the width of the scale (the virtual book)
|
boolean |
isBookMovingRightToLeft()
get the book orientation
|
boolean |
isPreferredViewedInversed()
Get a flag indicating that the user prefer view the scale inverted
|
long |
mmToTime(double mm)
mm to Time
|
void |
setBookMovingRightToLeft(boolean bookMovingRightToLeft)
define the orientation of the book
|
double |
timeToMM(long time)
time to mm
|
java.lang.String |
toString() |
public static final java.lang.String GAMME_STATE_INPROGRESS
public static final java.lang.String GAMME_STATE_COMPLETED
public Scale(java.lang.String name, double width, double intertrackdistance, double trackwidth, double firsttrackaxisdistance, int tracknumber, AbstractTrackDef[] tracksdefinition, PipeStopGroupList registersets, double speed, ConstraintList constraintlist, java.lang.String infos, java.lang.String state, java.lang.String contact, VirtualBookRendering rendering, boolean preferredViewedInverted, boolean bookMovingRightToLeft, java.util.Map<java.lang.String,java.lang.String> properties) throws ScaleException
name
- name of the scalewidth
- the widthintertrackdistance
- intertrack distance in mmtrackwidth
- with of a track in mmfirsttrackaxisdistance
- first track axis distance in mmtracknumber
- track numbertracksdefinition
- tracks definitionregistersets
- registerset definitionsspeed
- speedconstraintlist
- constraint listinfos
- scale information (free text)state
- status of this scalecontact
- contact for the scalerendering
- display rendererpreferredViewedInverted
- is the reference on topbookMovingRightToLeft
- the book is moving on the instrumentproperties
- additional propertiesScaleException
public double getIntertrackHeight()
public double getTrackWidth()
public int getTrackNb()
public AbstractTrackDef[] getTracksDefinition()
public double getFirstTrackAxis()
public double getWidth()
public java.lang.String getName()
public double getSpeed()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public static Scale getGammeMidiInstance()
public java.lang.String toString()
toString
in class java.lang.Object
public int findNoteDefTrack(int midinote)
midinote
- the midi notepublic PercussionDef[] findUniquePercussionDefs()
public int findNoteDefTrack(int midinote, java.lang.String registersetname)
midinote
- registersetname
- public int[] findNoteDefTrack(java.lang.String registersetname)
registersetname
- name of the registersetpublic int findPercussionDef(int percussion)
percussion
- midi codepublic long mmToTime(double mm)
mm
- the distancepublic double timeToMM(long time)
time
- the time in microsecondspublic PipeStopGroupList getPipeStopGroupList()
public PipeStopGroupList getPipeStopGroupListRef()
public ConstraintList getConstraints()
public java.lang.String getInformations()
public java.lang.String getState()
public java.lang.String getContact()
public VirtualBookRendering getRendering()
public boolean isPreferredViewedInversed()
public boolean isBookMovingRightToLeft()
public void setBookMovingRightToLeft(boolean bookMovingRightToLeft)
bookMovingRightToLeft
- public java.lang.String getProperty(java.lang.String key)
key
- public java.util.Map<java.lang.String,java.lang.String> getAllProperties()