public void DrawNote(Graphics g, PlayingData pd, Note n, object color = null, int dx = 0, int dy = 0)
    {
        Color c;

        if (color == null)
        {
            switch (n.type)
            {//set color for default
            case NoteType.ShortNote:
                c = Color.White;
                break;

            case NoteType.SlideLongNote:
                c = Color.GreenYellow;
                break;

            default:
                c = Color.Red;
                break;
            }
        }
        else
        {
            c = (Color)color;
        }

        g.DrawRectangle(new Pen(c, 2), MusicMath.RectFromNote(n, pd, dx, dy));
    }
 public void DrawImaginaryNote(Graphics g, PlayingData pd, Note DraggingNote, Note SelectedNote, bool dragging, Point draggingDelta)
 {
     //draw dragging note
     ///todo: draggingnote delta beat
     if (dragging)
     {
         DrawNote(g, pd, DraggingNote, Color.Gray, draggingDelta.X, draggingDelta.Y);
     }
     //draw selected note
     if (SelectedNote != null)
     {
         g.DrawRectangle(new Pen(Color.Yellow, 1), MusicMath.RectFromNote(SelectedNote, pd));
     }
 }