Waveform = function(container, buffer){

		/**
		 *  the waveform container
		 */
		this.element = document.createElement("DIV");
		this.element.id = "WaveformContainer";
		container.appendChild(this.element);

		/**
		 *  the waveform canvas
		 */
		this.canvas = document.createElement("canvas");
		this.element.appendChild(this.canvas);

		/**
		 *  the playhead
		 */
		this.playhead = document.createElement("div");
		this.playhead.id = "Playhead";
		this.element.appendChild(this.playhead);

		/**
		 *  the drawing context
		 */
		this.context = this.canvas.getContext("2d");

		this.width = window.innerWidth * 2;
		this.height = waveformHeight * 2;

		//size it
		this.context.canvas.width = this.width;
		this.context.canvas.height = this.height;

		/**
		 *  the last drawn position
		 */
		this.lastPosition = 0;

		/**
		 *  the amplitudes
		 */
		this.amplitudes = [];
	}
draws a waveform
 and let's you select the start position