Little hack to make <input> can perform waves effect
1804
function (elements) {
      for (var a = 0; a < elements.length; a++) {
        var el = elements[a];

        if (el.tagName.toLowerCase() === 'input') {
          var parent = el.parentNode;

          // If input already have parent just pass through
          if (parent.tagName.toLowerCase() === 'i' && parent.className.indexOf('waves-effect') !== -1) {
            continue;
          }

          // Put element class and style to the specified parent
          var wrapper = document.createElement('i');
          wrapper.className = el.className + ' waves-input-wrapper';

          var elementStyle = el.getAttribute('style');

          if (!elementStyle) {
            elementStyle = '';
          }

          wrapper.setAttribute('style', elementStyle);

          el.className = 'waves-button-input';
          el.removeAttribute('style');

          // Put element as child
          parent.replaceChild(wrapper, el);
          wrapper.appendChild(el);
        }
      }
    }
265218
function(input) {
		var evt;

		if (typeof Event === 'function') {
			evt = new Event('input', {
				bubbles: true
			});
		} else {
			evt = dcmnt.createEvent('Event');
			evt.initEvent('input', true, false);
		}

		input.dispatchEvent(evt);
	}
1321487
function(input_32_bit_float_audio_obj, output_16_bit_audio_obj) {

    // MUST assure input float is BOUNDED between +1.0 to -1.0 ONLY

    // this is a lossless process - no information is thrown away

    // this logic MAINTAINS full information of input ... 32 bit float --> two 16 bit integers 
    // so NO loss of information - output buffer size is twice input buffer size
    // output 16 bit format can be later converted back into identical input 32 bit floats
    // DO NOT use this method to convert floats into 16 bit ints as preliminary step to save into WAV format
    // because that is a LOSSY process 

    var size_32_bit_float_buff = input_32_bit_float_audio_obj.buffer.length;

    // console.log("size 32 bit float ", size_32_bit_float_buff);

    var num_16_bit_chunks_per_32_bit_float = Float32Array.BYTES_PER_ELEMENT / 
                                    Uint16Array.BYTES_PER_ELEMENT;

    // console.log("num_16_bit_chunks_per_32_bit_float ", num_16_bit_chunks_per_32_bit_float);


    var size_16_bit_int_buff = size_32_bit_float_buff * num_16_bit_chunks_per_32_bit_float;

    // console.log("size 16 bit ints ", size_16_bit_int_buff); //  is OK

    output_16_bit_audio_obj.buffer = new Buffer(size_16_bit_int_buff);// input buffer is 32 bit we want 16 bit so half it

    // var one_float = new Float32Array(1);

    var one_float_in_2_16_bit_ints;
    // var curr_float;
    // var index_16_bit_ints = 0;

    var offset = 0;
    var same_value_in_16_bit_signed_int;
    // var local_divisor;

    // stens TODO - put below for loop into a try catch so when :

    /*

    14 ' aboutttttt to show raw float ' 1.2392250299453735
buffer.js:564
    throw new TypeError('value is out of bounds');
          ^
TypeError: value is out of bounds
    at checkInt (buffer.js:564:11)
    at Buffer.writeInt16LE (buffer.js:642:5)
    at convert_32_bit_floats_into_16_bit_ints (node-genome/src/node_utils.js:689:40)
    at Object.exports.write_buffer_to_file 

        when above happens - due to input raw float OUTSIDE boundary +1 <=> -1

    */

    for (var index_float = 0; index_float < size_32_bit_float_buff; index_float++) {

        // one_float[0] = input_32_bit_float_audio_obj.buffer[index_float];

        // if (index_float < 20) {

        //     console.log(index_float, " one_float ", one_float[0], 
        //                 " convert_32_bit_floats_into_16_bit_ints"); // is OK            
        // }

        // var same_value_in_16_bit_signed_int = ~~(one_float[0] * (32768 - 1));
        // https://stackoverflow.com/questions/11682804/confusion-in-16-bit-data-type-range

        /*
        if (one_float[0] < 0) {

        	same_value_in_16_bit_signed_int = ~~(one_float[0] * (0x8000)); // 32768

        } else {

        	same_value_in_16_bit_signed_int = ~~(one_float[0] * (0x7FFF)); // 32767
        }
        */

        // local_divisor = (one_float[0] < 0) ? 0x8000 : 0x7FFF; // 0x8000 = 32768 ... 0x7FFF = 32767

		// same_value_in_16_bit_signed_int = ~~(one_float[0] * (local_divisor));
		// same_value_in_16_bit_signed_int = ~~(one_float[0] * ((one_float[0] < 0) ? 0x8000 : 0x7FFF));// WORKS

        // console.log(index_float, " aboutttttt to show raw float ", input_32_bit_float_audio_obj.buffer[index_float]);

		same_value_in_16_bit_signed_int = ~~(input_32_bit_float_audio_obj.buffer[index_float] * 
                                            ((input_32_bit_float_audio_obj.buffer[index_float] < 0) ? 0x8000 : 0x7FFF));

        // if (index_float < 20) {

        //     console.log("same_value_in_16_bit_signed_int ", same_value_in_16_bit_signed_int);
        // }

        // output_16_bit_audio_obj.buffer[index_16_bit_ints++] = one_float_in_two_16_bit_ints[index_16_bit];

        output_16_bit_audio_obj.buffer.writeInt16LE(same_value_in_16_bit_signed_int, offset);
        offset += num_16_bit_chunks_per_32_bit_float;
    }

    // process.exit(3);

}
5423
function TouchMouseInput() {
  Input.apply(this, arguments);

  var handler = this.handler.bind(this);
  this.touch = new TouchInput(this.manager, handler);
  this.mouse = new MouseInput(this.manager, handler);
}
956498
function setupEqualizer() {

  var myp5 = new p5( function(sketch) {

    var x = 100; 
    var y = 100;

    sketch.setup = function() {

      var ac = sketch.getAudioContext();
  
      ac.suspend().then(function() {
  
        sketch.userStartAudio($('.btn-begin'), function() {
          mic = new p5.AudioIn();
          mic.start();
          fft = new p5.FFT();
          fft.setInput(mic);

          userInteracted = true;
        });
      });

      sketch.createCanvas(350, 100);
      sketch.noFill();
    };

    sketch.draw = function() {
      if (userInteracted) {
        var scale = 1;
        sketch.background(200);

        sketch.text(parseInt(sketch.map(sketch.mouseX, 0, sketch.width, 20, 15000 / scale)) + " Hz", sketch.mouseX - 10, sketch.mouseY - 20);
        var spectrum = fft.analyze();

        sketch.beginShape();
        sketch.vertex(0, sketch.height * 0.9);
        for (i = 0; i < spectrum.length / scale; i++) {
          sketch.vertex(i * scale, sketch.map(spectrum[i], 0, 255, sketch.height * 0.8, 0));
        }
        sketch.vertex(sketch.width, sketch.height * 0.9);
        sketch.endShape();

        var freq
        // draw labels
        for (i = 0; i < spectrum.length / scale; i += sketch.width / labelScale) {
          freq = parseInt(sketch.map(i, 0, 1024, 20, 15000));
          sketch.text(freq, sketch.map(i, 0, 1024 / scale, 0, sketch.width), sketch.height * 0.97);
          sketch.fill(0, 100);
        }
      }
    }
  }, $('.equalizer')[0]);
}
1153554
def connect_input(self, name, wire):
        """"""
        self._inputs[name] = wire
        wire.sinks.append(self)
373483
function MouseInput() {
    this.evEl = MOUSE_ELEMENT_EVENTS;
    this.evWin = MOUSE_WINDOW_EVENTS;

    this.pressed = false; // mousedown state

    Input.apply(this, arguments);
}
934689
function (event) {
                this._setRadioValue();
                this._focus();
                if (event.target.tagName.toLowerCase() != "input") {
                    event.preventDefault(false);
                }
            }
337526
function effects() {
		extend(window, {
			requestAnimationFrame: (function() {
				var func =
					window.requestAnimationFrame ||
					window.webkitRequestAnimationFrame ||
					window.mozRequestAnimationFrame ||
					window.oRequestAnimationFrame ||
					window.msRequestAnimationFrame ||
					(function() {
						var lastTime = 0;
						return function(callback, element) {
							var currTime = new Date().getTime();
							var timeToCall = Math.max(0, 16 - (currTime - lastTime));
							var id = window.setTimeout(function() {
									callback(currTime + timeToCall);
								},
								timeToCall);
							lastTime = currTime + timeToCall;
							return id;
						};
					}());
				return func;
			})(),
			cancelAnimationFrame: (function() {
				return (
					window.cancelAnimationFrame ||
					window.webkitCancelAnimationFrame ||
					window.mozCancelAnimationFrame ||
					window.oCancelAnimationFrame ||
					window.msCancelAnimationFrame ||
					clearTimeout
				);
			}()),
			/*
			 * TODO: Internalize into gui.Tick
			 * TODO: Move to MessageChannel!!!
			 */
			setImmediate: (function() {
				var list = [],
					handle = 1;
				var name = "spiritual:emulated:setimmediate";
				window.addEventListener("message", function(e) {
					if (e.data === name && list.length) {
						list.shift().apply(window);
						e.stopPropagation();
					}
				}, false);
				return function emulated(func) {
					list.push(func);
					window.postMessage(name, "*");
					return handle++;
				};
			})()
		});
	}
126171
function(element, audio) {
      audio['swfReady'] = false;
      audio['load'] = function(mp3) {
        // If the swf isn't ready yet then just set `audio.mp3`. `init()` will load it in once the swf is ready.
        audio.mp3 = mp3;
        if (audio.swfReady) audio.element.load(mp3);
      }
      audio['loadProgress'] = function(percent, duration) {
        audio.loadedPercent = percent;
        audio.duration = duration;
        audio.settings.loadStarted.apply(audio);
        audio.settings.loadProgress.apply(audio, [percent]);
      }
      audio['skipTo'] = function(percent) {
        if (percent > audio.loadedPercent) return;
        audio.updatePlayhead.call(audio, [percent])
        audio.element.skipTo(percent);
      }
      audio['updatePlayhead'] = function(percent) {
        audio.settings.updatePlayhead.apply(audio, [percent]);
      }
      audio['play'] = function() {
        // If the audio hasn't started preloading, then start it now.  
        // Then set `preload` to `true`, so that any tracks loaded in subsequently are loaded straight away.
        if (!audio.settings.preload) {
          audio.settings.preload = true;
          audio.element.init(audio.mp3);
        }
        audio.playing = true;
        // IE doesn't allow a method named `play()` to be exposed through `ExternalInterface`, so lets go with `pplay()`.  
        // <http://dev.nuclearrooster.com/2008/07/27/externalinterfaceaddcallback-can-cause-ie-js-errors-with-certain-keyworkds/>
        audio.element.pplay();
        audio.settings.play.apply(audio);
      }
      audio['pause'] = function() {
        audio.playing = false;
        // Use `ppause()` for consistency with `pplay()`, even though it isn't really required.
        audio.element.ppause();
        audio.settings.pause.apply(audio);
      }
      audio['setVolume'] = function(v) {
        audio.element.setVolume(v);
      }
      audio['loadStarted'] = function() {
        // Load the mp3 specified by the audio element into the swf.
        audio.swfReady = true;
        if (audio.settings.preload) audio.element.init(audio.mp3);
        if (audio.settings.autoplay) audio.play.apply(audio);
      }
    }
1025366
function() {
  var height = window.innerHeight * 0.3;
  var width = window.innerWidth;
  wave.height = height;
  wave.height_2 = height / 2;
  wave.MAX = wave.height_2 - 4;
  wave.width = width;
  wave.width_2 = width / 2;
  wave.width_4 = width / 4;
  wave.canvas.height = height;
  wave.canvas.width = width;
  wave.container.style.margin = -(height / 2) + 'px auto';

  // Update the position of the slider.
  var sound = player.playlist[player.index].howl;
  if (sound) {
    var vol = sound.volume();
    var barWidth = (vol * 0.9);
    sliderBtn.style.left = (window.innerWidth * barWidth + window.innerWidth * 0.05 - 25) + 'px';
  }
}
915354
def noise(params, amplitude=1, offset=0):
    '''
    
    '''
    amplitude = create_buffer(params, amplitude)
    offset = create_buffer(params, offset)
    output = offset + amplitude * (np.random.random(params.length)*2 - 1)
    return output
810093
function() {
    var self = this;

    // Get the Howl we want to manipulate.
    var sound = self.playlist[self.index].howl;

    // Determine our current seek position.
    var seek = sound.seek() || 0;
    timer.innerHTML = self.formatTime(Math.round(seek));
    progress.style.width = (((seek / sound.duration()) * 100) || 0) + '%';

    // If the sound is still playing, continue stepping.
    if (sound.playing()) {
      requestAnimationFrame(self.step.bind(self));
    }
  }
647553
public void setInput( I input ) {
		derivX.reshape(input.width,input.height);
		derivY.reshape(input.width,input.height);

		// pixel gradient
		gradient.process(input,derivX,derivY);
	}
649366
function init(input) {

            // Gradients
            if (input && input.stops) {
                stops = map(input.stops, function (stop) {
                    return Color(stop[1]);
                });

                // Solid colors
            } else {
                // rgba
                result = rgbaRegEx.exec(input);
                if (result) {
                    rgba = [pInt(result[1]), pInt(result[2]), pInt(result[3]), parseFloat(result[4], 10)];
                } else {
                    // hex
                    result = hexRegEx.exec(input);
                    if (result) {
                        rgba = [pInt(result[1], 16), pInt(result[2], 16), pInt(result[3], 16), 1];
                    } else {
                        // rgb
                        result = rgbRegEx.exec(input);
                        if (result) {
                            rgba = [pInt(result[1]), pInt(result[2]), pInt(result[3]), 1];
                        }
                    }
                }
            }

        }
241420
function(input) {
        if (input.length !== 0) {
            // with an empty Uint8Array, Opera fails with a "Offset larger than array size"
            input = utils.transformTo("uint8array", input);
            this.data.set(input, this.index);
            this.index += input.length;
        }
    }
863666
def flanger(self, delay=0, depth=2, regen=0, width=71, speed=0.5, shape='sine', phase=25, interp='linear'):
        """"""
        raise NotImplementedError()