Home

Awesome

sharp11-improv

Jazz improvisation engine for Sharp11. To see it in action, check out the Sharp11 web client.

API

var improv = require('sharp11-improv')

Contains an ImprovChart object, which can be created with improv.overChart()

<a name="module"></a> Exported Functions

<a name="module-over-chart"></a> overChart .overChart(chart, settings)

Improvises over a Chart object given an optional settings object and returns an ImprovChart object. The settings object can contain any of the following properties:

Note: Some settings can take a numerical range instead of a number. A numerical range is given as an array containing two values. When improvising, the improv engine starts with the value set to the first element of the array and adjusts it linearly throughout the improvisation, reaching the second value by the end of the improvisation.

<a name="module-isImprovChart"></a> isImprovChart .isImprovChart(object)

Returns true if a given object is an ImprovChart.

<a name="improv-chart-object"></a> ImprovChart Object

An ImprovChart represents an improvisation over a Chart.

<a name="improv-chart-chart"></a> chart .chart

The Chart object being improvised over.

<a name="improv-chart-settings"></a> settings .settings

An object containing all the settings used for this improvisation.

<a name="improv-chart-data"></a> data .data

An array of objects representing the notes that have been improvised for a given chord change. Each object contains the following properties:

<a name="improv-chart-notes-and-durations"></a> notesAndDurations .notesAndDurations()

Returns an array of objects representing the notes in the improvisation. Each object has a key note that corresponds to a Note object or null for a rest, and a key duration that corresponds to a Duration object.

<a name="improv-chart-chords-and-durations"></a> chordsAndDurations .chordsAndDurations()

Returns an array of objects representing the chords in the improvisation. Each object has a key chord that corresponds to a Chord object, and a key duration that corresponds to a Duration object.

<a name="improv-chart-midi"></a> midi .midi(settings)

Returns a Midi object for the improvisation with given settings.