summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-03-21 15:07:37 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-03-21 15:07:37 +0000
commit7874dd2b07ec38a400479e39a65e4d4c75b32394 (patch)
tree991e29069069854d34eab50af692ef3088c8ba55 /gtk2_ardour
parent3a1349bf60e1c4f42081c97ab6573eb79134fff7 (diff)
two small fixes from melvin ray herr for the step editor
git-svn-id: svn://localhost/ardour2/branches/3.0@9171 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/gtk_pianokeyboard.c19
-rw-r--r--gtk2_ardour/step_entry.cc4
2 files changed, 15 insertions, 8 deletions
diff --git a/gtk2_ardour/gtk_pianokeyboard.c b/gtk2_ardour/gtk_pianokeyboard.c
index f9ab9068e4..361e6685e9 100644
--- a/gtk2_ardour/gtk_pianokeyboard.c
+++ b/gtk2_ardour/gtk_pianokeyboard.c
@@ -102,17 +102,21 @@ draw_note(PianoKeyboard *pk, cairo_t* cr, int note)
int h = pk->notes[note].h;
if (pk->notes[note].pressed || pk->notes[note].sustained) {
- is_white = !is_white;
+ if (is_white) {
+ cairo_set_source_rgb (cr, 0.60f, 0.60f, 0.60f);
+ } else {
+ cairo_set_source_rgb (cr, 0.50f, 0.50f, 0.50f);
+ }
+ } else {
+ if (is_white) {
+ cairo_set_source_rgb (cr, 1.0f, 1.0f, 1.0f);
+ } else {
+ cairo_set_source_rgb (cr, 0.0f, 0.0f, 0.0f);
+ }
}
cairo_set_line_width (cr, 1.0);
- if (is_white) {
- cairo_set_source_rgb (cr, 1.0f, 1.0f, 1.0f);
- } else {
- cairo_set_source_rgb (cr, 0.0f, 0.0f, 0.0f);
- }
-
cairo_rectangle (cr, x, 0, w, h);
cairo_fill (cr);
@@ -744,4 +748,3 @@ piano_keyboard_set_keyboard_layout(PianoKeyboard *pk, const char *layout)
return FALSE;
}
-
diff --git a/gtk2_ardour/step_entry.cc b/gtk2_ardour/step_entry.cc
index af439ea26f..0ac281b877 100644
--- a/gtk2_ardour/step_entry.cc
+++ b/gtk2_ardour/step_entry.cc
@@ -790,6 +790,10 @@ StepEntry::insert_grid_rest ()
void
StepEntry::insert_note (uint8_t note)
{
+ if (note > 127) {
+ return;
+ }
+
se->step_add_note (note_channel(), note, note_velocity(), note_length());
}
void