diff --git a/doc/classes/make.sh b/doc/classes/make.sh
deleted file mode 100644
index d875677c0..000000000
--- a/doc/classes/make.sh
+++ /dev/null
@@ -1 +0,0 @@
-dot -Tsvg midi.dot > midi.svg
diff --git a/doc/layering/build.sh b/doc/layering/build.sh
deleted file mode 100644
index ad8d95e7b..000000000
--- a/doc/layering/build.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-for f in basic-layering layering-order-1 layering-order-2; do
-    echo "$f"
-    inkscape -z --export-area-drawing -f $f.svg --export-pdf $f.pdf
-done
-
-pdflatex layering.tex
-pdflatex layering.tex
-
diff --git a/gtk2_ardour/midi_region_view.cc b/gtk2_ardour/midi_region_view.cc
index 481ac039b..b7a1bff3d 100644
--- a/gtk2_ardour/midi_region_view.cc
+++ b/gtk2_ardour/midi_region_view.cc
@@ -1764,7 +1764,7 @@ MidiRegionView::update_sustained (Note* ev, bool update_ghost_regions)
 
 	y1 = y0 + std::max(1., floor(note_height()) - 1);
 
-	ev->set (ArdourCanvas::Rect (x0, y0, x1, y1));
+	ev->set (ArdourCanvas::Rect (x0, y0, x1, y1), note->velocity());  //------------
 
 	if (!note->length()) {
 		if (_active_notes && note->note() < 128) {
@@ -1791,6 +1791,7 @@ MidiRegionView::update_sustained (Note* ev, bool update_ghost_regions)
 	const uint32_t base_col = ev->base_color();
 	ev->set_fill_color(base_col);
 	ev->set_outline_color(ev->calculate_outline(base_col, ev->selected()));
+	ev->set_velocity_line_color(UINT_INTERPOLATE(base_col, 0x000000ff, 0.5));
 
 }
 
diff --git a/gtk2_ardour/note.cc b/gtk2_ardour/note.cc
index 6e1878afc..7770a7793 100644
--- a/gtk2_ardour/note.cc
+++ b/gtk2_ardour/note.cc
@@ -32,21 +32,28 @@ using namespace ArdourCanvas;
 Note::Note (
 	MidiRegionView& region, Item* parent, const boost::shared_ptr<NoteType> note, bool with_events)
 	: NoteBase (region, with_events, note)
-	, _rectangle (new ArdourCanvas::Rectangle (parent))
+	, _rectangle (new ArdourCanvas::Rectangle (parent)), _velocity_line (new ArdourCanvas::Rectangle (parent))
 {
 	CANVAS_DEBUG_NAME (_rectangle, "note");
 	set_item (_rectangle);
+  //  set_item (_velocity_line);
+	_rectangle->set_outline_width(2);
+
 }
 
+
 Note::~Note ()
 {
 	delete _rectangle;
+	delete _velocity_line;
+
 }
 
 void
 Note::move_event (double dx, double dy)
 {
 	_rectangle->set (_rectangle->get().translate (Duple (dx, dy)));
+	_velocity_line->set (_velocity_line->get().translate (Duple (dx, dy)));
 }
 
 Coord
@@ -85,28 +92,39 @@ Note::set_fill_color (uint32_t color)
 	_rectangle->set_fill_color (color);
 }
 
+void
+Note::set_velocity_line_color (uint32_t color)
+{
+    _velocity_line->set_outline_color (color);
+    _velocity_line->set_fill_color (color);
+}
+
 void
 Note::show ()
 {
 	_rectangle->show ();
+	_velocity_line->show ();
 }
 
 void
 Note::hide ()
 {
 	_rectangle->hide ();
+	_velocity_line->hide ();
 }
 
 void
-Note::set (ArdourCanvas::Rect rect)
+Note::set (ArdourCanvas::Rect rect, uint8_t velocity)
 {
 	_rectangle->set (rect);
+	_velocity_line->set (ArdourCanvas::Rect(rect.x0, rect.y0-((rect.y0-rect.y1)*.33), rect.x0 + ((rect.x1 - rect.x0) * ((float)velocity/(float)127)), ((rect.y0-rect.y1)*.33)+rect.y1));    //(rect.x0, (rect.y1-rect.y0)*.33, (rect.y1-rect.y0)*.66, rect.y1*(velocity/127)));
 }
 
 void
 Note::set_x0 (Coord x0)
 {
 	_rectangle->set_x0 (x0);
+
 }
 
 void
@@ -131,16 +149,19 @@ void
 Note::set_outline_what (ArdourCanvas::Rectangle::What what)
 {
 	_rectangle->set_outline_what (what);
+	_velocity_line->set_outline_what (what);
 }
 
 void
 Note::set_outline_all ()
 {
 	_rectangle->set_outline_all ();
+	_velocity_line->set_outline_all ();
 }
 
 void
 Note::set_ignore_events (bool ignore)
 {
 	_rectangle->set_ignore_events (ignore);
+	_velocity_line->set_ignore_events (ignore);
 }
diff --git a/gtk2_ardour/note.h b/gtk2_ardour/note.h
index c002f9d3c..0cb3ff243 100644
--- a/gtk2_ardour/note.h
+++ b/gtk2_ardour/note.h
@@ -46,7 +46,7 @@ public:
 	ArdourCanvas::Coord x1 () const;
 	ArdourCanvas::Coord y1 () const;
 
-	void set (ArdourCanvas::Rect);
+	void set (ArdourCanvas::Rect, uint8_t);
 	void set_x0 (ArdourCanvas::Coord);
 	void set_y0 (ArdourCanvas::Coord);
 	void set_x1 (ArdourCanvas::Coord);
@@ -57,6 +57,7 @@ public:
 
 	void set_outline_color (uint32_t);
 	void set_fill_color (uint32_t);
+  void set_velocity_line_color (uint32_t);
 
 	void show ();
 	void hide ();
@@ -67,6 +68,7 @@ public:
 
 private:
 	ArdourCanvas::Rectangle* _rectangle;
+  ArdourCanvas::Rectangle* _velocity_line;
 };
 
 #endif /* __gtk_ardour_note_h__ */
diff --git a/gtk2_ardour/note_base.h b/gtk2_ardour/note_base.h
index ebc00cbfa..d1e82327e 100644
--- a/gtk2_ardour/note_base.h
+++ b/gtk2_ardour/note_base.h
@@ -104,9 +104,10 @@ public:
 	static void set_colors ();
 
 	inline static uint32_t meter_style_fill_color(uint8_t vel, bool selected) {
-		if (selected) {
-			return _selected_mod_col;
-		} else if (vel < 64) {
+		//if (selected) {
+		//	return _selected_mod_col;
+		//} else
+    if (vel < 64) {
 			return UINT_INTERPOLATE(_min_col, _mid_col, (vel / (double)63.0));
 		} else {
 			return UINT_INTERPOLATE(_mid_col, _max_col, ((vel - 64) / (double)63.0));
diff --git a/libs/canvas/rectangle.cc b/libs/canvas/rectangle.cc
index 488d5bf1f..ad97950d4 100644
--- a/libs/canvas/rectangle.cc
+++ b/libs/canvas/rectangle.cc
@@ -106,7 +106,7 @@ Rectangle::render_self (Rect const & area, Cairo::RefPtr<Cairo::Context> context
 		 * detail.
 		 */
 
-		if (fmod (_outline_width, 2.0)  != 0.0) {
+		if (fmod (_outline_width, 2.0)  != 0.0) { //changed 2 -> 4
 			const double shift = _outline_width * 0.5;
 			self = self.translate (Duple (shift, shift));
 		}
@@ -180,7 +180,7 @@ Rectangle::compute_bounding_box () const
 		   than the rectangle itself.
 		*/
 
-		_bounding_box = r.expand (1.0 + _outline_width * 0.5);
+		_bounding_box = r.expand (2.0 + _outline_width * 0.5);
 	}
 
 	_bounding_box_dirty = false;
