No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


<title>Welcome to MMLL</title>

<p>MMLL is a Musical Machine Listening Library for javascript's Web Audio API. It provides a variety of higher level musical listening facilities for computer music, such as onset detection, (major-minor) chord detection, beat tracking and auditory modelling. All listening objects can run live, or could be called in a simulated block by block way offline, faster than realtime.</p>

<p>The library was developed by <a href="">Nick Collins</a> as part of the AHRC funded MIMIC project (Musically Intelligent Machines Interacting Creatively). MMLL is released under an MIT license, see the included COPYING.txt file.</p>

<p>The library can be used just for the machine listening objects, used within your own audio callback (e.g., as part of a ScriptProcessorNode), or via a quick set-up frontend that hides Web Audio API details and  has you write setup and audio callback functions analogous to Processing's setup and draw.</p>

<p>The latter method is the one explained here, but expert Web Audio API people should find it easy enough to just take the analyzers for their own work. Only including the precompiled MMLL.js file is needed to deploy the library, though from the home directory of the library you can compile it afresh via the shell script provided (it is just a concatenation of the js source files).</p>

<p>The typical expectation of a machine listening object is that we are working at 44.1KHz sampling rate and that a mono (single channel) input block of samples will be provided for analysis. The objects deal with accumulating samples ready for processing (often via an FFT) themselves and the user doesn't have to worry about that part. However, objects should cope at other standard sampling rates such as 48KHz, 88.2KHz and 96 KHz, even if performance is sub-optimal (for example, the onset detector was developed based on evaluation over a corpus of 44.1KHz samples, so works best at this home rate).</p>

<p>The <a href="Examples/minimalexample.html">minimal code example</a> is reproduced below and linked here too. Note how the machine listener object is prefixed with MMLL, and the SetUp function is passed the sampling rate, needed for initialising the listener. The CallBack is where the main action happens, as each new block of input samples is passed in. The input and output arguments hold MMLLInput and MMLLOutpu objects, which make the channels of input and output audio accessible, as well as a special input.monoinput which is a single channel ready for the listener. If a stereo sound file is loaded or two channel live input requested, the monoinput will be the average of the left and right channels. The output object assumes a stereo output for now, exposing the left and right channel data arrays.</p>

<p>var audioblocksize = 256; //lowest latency possible </p>

<p>var setup = function SetUp(sampleRate) { <br>
sensorydissonance = new MMLLSensoryDissonance(sampleRate); <br>
}; </p>

<p>var callback = function CallBack(input,output,n) { </p>

<p>var dissonance =; </p>

<p>console.log(dissonance); </p>

<p>for (i = 0; i < n; ++i) {<br>
    output.outputL[i] = input.inputL[i];<br>
    output.outputR[i] = input.inputR[i];<br>

<p>var gui = MMLLBasicGUISetup(callback,setup,audioblocksize,true,true);</p>

<p>The Examples folder provides a test example for each listener currently available in the library.</p>

<p>Happy MMLLing</p>