/// <summary>
        /// ビブラートのRateまたはDepthカーブを指定したサイズで描画します
        /// </summary>
        /// <param name="list">描画するカーブ</param>
        /// <param name="start_value"></param>
        /// <param name="drawer"></param>
        /// <param name="width"></param>
        /// <param name="height"></param>
        private void drawVibratoCurve(VibratoBPList list, int start_value, LineGraphDrawer drawer, int width, int height)
        {
            int size = 0;

            if (list != null)
            {
                size = list.getCount();
            }
            drawer.clear();
            drawer.setBaseLineY(height);
            int iy0 = height - (int)(start_value / 127.0 * height);

            drawer.append(0, iy0);
            int lasty = iy0;

            for (int i = 0; i < size; i++)
            {
                VibratoBPPair p  = list.getElement(i);
                int           ix = (int)(p.X * width);
                int           iy = height - (int)(p.Y / 127.0 * height);
                drawer.append(ix, iy);
                lasty = iy;
            }
            drawer.append(width + drawer.getDotSize() * 2, lasty);
            drawer.flush();
        }
        private XmlElement createVibratoCurveNode(int start_value, VibratoBPList curve)
        {
            var result = doc_.CreateElement("seqAttr");
            Func <VibratoBPPair, XmlElement> CreateElem = (pair) => {
                var elem = doc_.CreateElement("elem");
                int x    = (int)(pair.X * 65536);
                elem.AppendChild(createNode("posNrm", x));
                elem.AppendChild(createNode("elv", pair.Y));
                return(elem);
            };

            result.AppendChild(CreateElem(new VibratoBPPair(0.0f, start_value)));
            int count = curve.getCount();

            for (int i = 0; i < count; ++i)
            {
                var pair = curve.getElement(i);
                var elem = CreateElem(curve.getElement(i));
                result.AppendChild(elem);
            }
            return(result);
        }