swamigui Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties | Signals |
#define SWAMIGUI_PIANO_DEFAULT_WIDTH #define SWAMIGUI_PIANO_DEFAULT_HEIGHT #define SWAMIGUI_PIANO_DEFAULT_LOWER_OCTAVE #define SWAMIGUI_PIANO_DEFAULT_UPPER_OCTAVE SwamiguiPiano; void swamigui_piano_note_on (SwamiguiPiano *piano
,int note
,int velocity
); void swamigui_piano_note_off (SwamiguiPiano *piano
,int note
,int velocity
); int swamigui_piano_pos_to_note (SwamiguiPiano *piano
,double x
,double y
,int *velocity
,gboolean *isblack
); double swamigui_piano_note_to_pos (SwamiguiPiano *piano
,int note
,int edge
,gboolean realnote
,gboolean *isblack
);
GObject +----GInitiallyUnowned +----GtkObject +----GnomeCanvasItem +----GnomeCanvasGroup +----SwamiguiPiano
"bg-color" guint : Read / Write "black-key-color" guint : Read / Write "black-key-play-color" guint : Read / Write "expression-control" SwamiControl* : Read "height-pixels" gint : Read / Write "key-count" gint : Read / Write / Construct Only "lower-octave" gint : Read / Write "lower-velocity" gint : Read / Write "midi-channel" gint : Read / Write "midi-control" SwamiControl* : Read "shadow-edge-color" guint : Read / Write "start-octave" gint : Read / Write "upper-octave" gint : Read / Write "upper-velocity" gint : Read / Write "white-key-color" guint : Read / Write "white-key-play-color" guint : Read / Write "width-pixels" gint : Read / Write
#define SWAMIGUI_PIANO_DEFAULT_HEIGHT 48 /* default hight in pixels */
#define SWAMIGUI_PIANO_DEFAULT_LOWER_OCTAVE 3 /* default lower keys octave */
#define SWAMIGUI_PIANO_DEFAULT_UPPER_OCTAVE 4 /* default upper keys octave */
void swamigui_piano_note_on (SwamiguiPiano *piano
,int note
,int velocity
);
Piano note on. Turns on note visually on piano as well as sends an event to SwamiControl objects connected to piano MIDI event control.
|
Piano object |
|
MIDI note number to turn on |
|
MIDI velocity number (-1 to use current keyboard velocity) |
void swamigui_piano_note_off (SwamiguiPiano *piano
,int note
,int velocity
);
Piano note off. Turns off note visually on piano as well as sends an event to it's connected MIDI driver (if any).
|
Piano object |
|
MIDI note number to turn off |
|
MIDI note off velocity |
int swamigui_piano_pos_to_note (SwamiguiPiano *piano
,double x
,double y
,int *velocity
,gboolean *isblack
);
Get the MIDI note corresponding to a point on the piano. The velocity relates to the vertical axis of the note. Positions towards the tip of the key generate higher velocities.
double swamigui_piano_note_to_pos (SwamiguiPiano *piano
,int note
,int edge
,gboolean realnote
,gboolean *isblack
);
"bg-color"
property"bg-color" guint : Read / Write
Color of border and between white keys.
Default value: 255
"black-key-color"
property"black-key-color" guint : Read / Write
Black key color.
Default value: 255
"black-key-play-color"
property"black-key-play-color" guint : Read / Write
Color of black key play highlight.
Default value: 2843738111
"expression-control"
property"expression-control" SwamiControl* : Read
Piano expression control (vertical mouse axis).
"height-pixels"
property"height-pixels" gint : Read / Write
Height in pixels.
Allowed values: >= 1
Default value: 48
"key-count"
property"key-count" gint : Read / Write / Construct Only
Size of piano in keys.
Allowed values: [1,128]
Default value: 128
"lower-octave"
property"lower-octave" gint : Read / Write
Lower keyboard start octave.
Allowed values: [0,10]
Default value: 3
"lower-velocity"
property"lower-velocity" gint : Read / Write
Lower keyboard velocity.
Allowed values: [0,127]
Default value: 127
"midi-channel"
property"midi-channel" gint : Read / Write
MIDI channel to send events on.
Allowed values: [0,15]
Default value: 0
"shadow-edge-color"
property"shadow-edge-color" guint : Read / Write
Bottom shadow edge color.
Default value: 2155905279
"start-octave"
property"start-octave" gint : Read / Write
Piano start octave (0 = MIDI note 0.
Allowed values: [0,10]
Default value: 0
"upper-octave"
property"upper-octave" gint : Read / Write
Upper keyboard start octave.
Allowed values: [0,10]
Default value: 4
"upper-velocity"
property"upper-velocity" gint : Read / Write
Upper keyboard velocity.
Allowed values: [0,127]
Default value: 127
"white-key-color"
property"white-key-color" guint : Read / Write
White key color.
Default value: 4294967295
"white-key-play-color"
property"white-key-play-color" guint : Read / Write
Color of white key play highlight.
Default value: 2843738111
"width-pixels"
property"width-pixels" gint : Read / Write
Width in pixels.
Allowed values: >= 1
Default value: 640
"note-off"
signalvoid user_function (SwamiguiPiano *swamiguipiano, guint arg1, gpointer user_data) : Run Last
"note-on"
signalvoid user_function (SwamiguiPiano *swamiguipiano, guint arg1, gpointer user_data) : Run Last