     ctx.strokeStyle = color or (if is_root then 'red' else 'black')
     ctx.lineWidth = 1
     ctx.beginPath()
-    ctx.arc h_gutter + (6 - string) * string_spacing, y, note_radius, 0, 2 * Math.PI, false
+    ctx.arc h_gutter + string * string_spacing, y, note_radius, 0, 2 * Math.PI, false
     ctx.fill() if fret or is_root
     ctx.stroke()
     ctx.strokeStyle = 'black'
+
+find_barres = (positions) ->
+  fret_rows = for fn in FretNumbers
+    (for sn in StringNumbers
+      if _.find(positions, (pos)-> pos.string == sn and pos.fret > fn)
+        '.'
+      else if _.find(positions, (pos)-> pos.string == sn and pos.fret < fn)
+        '-'
+      else if _.find(positions, (pos) -> pos.string == sn and pos.fret == fn)
+        'x'
+      else
+        ' ').join('')
+  barres = []
+  for fp, fn in fret_rows
+    continue if fn == 0
+    m = fp.match(/^[^x]*(x[\.x]+x\.+?)$/)
+    barres.push fret: fn, string: m[0].length - m[1].length, string_count: m[1].length if m
+  barres
 
 draw_fingerboard = (positions, options={}) ->
   {barres} = options
   draw_strings()
   draw_frets()
   if barres and (pos for pos in positions when pos.fret > 0).length > 4
-    fret_rows = for fn in FretNumbers
-      (for sn in StringNumbers
-        if _.find(positions, (pos)-> pos.string == sn and pos.fret > fn)
-          '.'
-        else if _.find(positions, (pos)-> pos.string == sn and pos.fret < fn)
-          '-'
-        else if _.find(positions, (pos) -> pos.string == sn and pos.fret == fn)
-          'x'
-        else
-          ' ').reverse().join('')
-    barres = []
-    for fp, fn in fret_rows
-      continue if fn == 0
-      m = fp.match(/^[^x]*(x[\.x]+x)$/)
-      barres.push fret: fn, string: m[0].length - m[1].length, string_count: m[1].length if m
-    for {fret, string, fret, string_count} in barres
+    for {fret, string, fret, string_count} in find_barres(positions)
       y = v_gutter + above_fretboard + (fret - 1) * fret_height + fret_height / 2
       ctx.beginPath()
       ctx.arc h_gutter + string * string_spacing, y, string_spacing / 2, Math.PI/2, Math.PI*3/2, false

  x = h_gutter + (fret - 1) * fret_width + fret_width / 2
  x = h_gutter if fret == 0
  ctx.beginPath()
  ctx.arc x, v_gutter + (string - 1) * string_spacing, 7, 0, 2 * Math.PI, false
  ctx.fillStyle = 'red'
  ctx.fillStyle = color or 'white' unless is_root
  ctx.lineWidth = 2 unless is_root

  high_note_count = (fs) -> -fs.length

  is_first_position = (fs) ->
    _(fs).sortBy((f) -> f.string)[0].degree_index == 0

  cmp = (fn) -> (x...) -> !fn(x...)

