public class guidopianorollbase
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
kALine |
static int |
kASharpLine |
static int |
kAutoLines |
static int |
kBLine |
static int |
kCLine
line pitch
|
static int |
kCSharpLine |
static int |
kDLine |
static int |
kDSharpLine |
static int |
kELine |
static int |
kFLine |
static int |
kFSharpLine |
static int |
kGLine |
static int |
kGSharpLine |
static int |
kNoLine |
static int |
kSimplePianoRoll
Piano roll type
|
static int |
kTrajectoryPianoRoll |
Constructor and Description |
---|
guidopianorollbase()
Create an empty piano roll
|
guidopianorollbase(long arHandler)
Create a piano roll and add a arHandler.
|
Modifier and Type | Method and Description |
---|---|
void |
AR2PianoRoll(int type)
Create a piano roll from the Abstract representation.
|
int |
DestroyPianoRoll()
Destroy a piano roll created with AR2PianoRoll or Midi2PianoRoll
|
int |
EnableAutoVoicesColoration(boolean enabled)
Enables or not the automatic voices coloration (not enabled by default)
(not for a midi rendering).
|
int |
EnableKeyboard(boolean enabled)
Enables keyboard or not (not enabled by default)
|
int |
EnableMeasureBars(boolean enabled)
Enables or not measure bars (false by default)
|
float |
GetKeyboardWidth(int height)
Gets the piano roll keyboard width
|
int |
GetMap(int width,
int height,
guidoscoremap scoremap)
Gets the piano roll map
|
protected static void |
Init()
Internal jni initialization method.
|
void |
Midi2PianoRoll(int type,
java.lang.String midiFileName)
Create a piano roll from a midi file.
|
void |
setARHandler(long arRef)
Set a new ArHandler.
|
int |
SetHtmlColorToVoice(int voiceNum,
long color)
Sets a html color to a voice (first voice is number 1) (black by default)
|
int |
SetLimits(limitparams limitParams)
Sets limits to a piano roll (start/end date, lower/higher pitch)
|
int |
SetPitchLinesDisplayMode(int mode)
Sets the pitch lines display mode (automatic by default).
|
int |
SetRGBColorToVoice(int voiceNum,
int r,
int g,
int b,
int a)
Sets a RGB color to a voice (first voice is number 1) (black by default)
|
public static final int kCLine
public static final int kCSharpLine
public static final int kDLine
public static final int kDSharpLine
public static final int kELine
public static final int kFLine
public static final int kFSharpLine
public static final int kGLine
public static final int kGSharpLine
public static final int kALine
public static final int kASharpLine
public static final int kBLine
public static final int kAutoLines
public static final int kNoLine
public static final int kSimplePianoRoll
public static final int kTrajectoryPianoRoll
public guidopianorollbase()
public guidopianorollbase(long arHandler)
arHandler
- a Guido AR identifierpublic void setARHandler(long arRef)
arRef
- a reference to a Guido AR representationpublic final void AR2PianoRoll(int type)
type
- the type of piano roll (kSimplePianoRoll or
kTrajectoryPianoRoll)public final void Midi2PianoRoll(int type, java.lang.String midiFileName)
type
- the type of piano roll (kSimplePianoRoll or
kTrajectoryPianoRoll)midiFileName
- the midi filepublic final int DestroyPianoRoll()
public final int SetLimits(limitparams limitParams)
limitParams
- an object contaning the limits.public final int EnableKeyboard(boolean enabled)
enabled
- a boolean corresponding to the keyboard draw statepublic final float GetKeyboardWidth(int height)
height
- the height of the canvas (-1 to set the default height : 512)public final int EnableAutoVoicesColoration(boolean enabled)
enabled
- a boolean corresponding to the color statepublic final int SetRGBColorToVoice(int voiceNum, int r, int g, int b, int a)
voiceNum
- the voice number (first voice is number 1)r
- the red param of RGB colorg
- the green param of RGB colorb
- the blue param of RGB colora
- the alpha param of RGB colorpublic final int SetHtmlColorToVoice(int voiceNum, long color)
voiceNum
- the voice number (first voice is number 1)color
- an html colorpublic final int EnableMeasureBars(boolean enabled)
enabled
- a boolean corresponding to the measure bars draw statepublic final int SetPitchLinesDisplayMode(int mode)
mode
- an int corresponding to the pitch lines display modepublic final int GetMap(int width, int height, guidoscoremap scoremap)
width
- the width of the piano roll (-1 to set the default width : 1024)height
- the height of the canvas (-1 to set the default height : 512)scoremap
- on output, contains the pianoroll map.protected static void Init()