Home Manual Reference Source Test
public class | source

Step3Notes

Expression Extends:

class Step3Notes extends Solvable(Step)

Implements:

Step 3: per-voice pitch assignment. Builds a MiniZinc CSP over note variables note_s_t with domain {-2 (hold), -1 (rest), 0..127 (MIDI)}.

Test:

Method Summary

Public Methods
public

schema(): Object[]

public

async solve(parameters: Object, solver: function(model: string): Promise<Object|null>): Promise<Object>

Public Methods

public async solve(parameters: Object, solver: function(model: string): Promise<Object|null>): Promise<Object> source

Params:

NameTypeAttributeDescription
parameters Object

Form values plus chords and tempo; see Step3Notes#schema.

solver function(model: string): Promise<Object|null>

Pre-bound solver callback returning the MZN note-grid solution or null.

Return:

Promise<Object>

On success: {textOutput, solution, numSubBeats, subdivision, numerator, denominator, key, mode}. On UNSAT: {textOutput} only.

Test: