Home Manual Reference Source Test
public class | source

Step2Chords

Expression Extends:

class Step2Chords extends Solvable(Step)

Implements:

Step 2: chord-progression solving as shortest path of fixed length over the weighted chord graph G = (V, E, w); emits Roman-numeral progression + SVG.

Test:

Method Summary

Public Methods
public

async schema(): Promise<Object[]>

public

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

Public Methods

public async schema(): Promise<Object[]> source

Return:

Promise<Object[]>

SCHEMA with the part.style preset options patched in.

Test:

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

Params:

NameTypeAttributeDescription
parameters Object

Per-part form values; see Step2Chords#schema.

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

Pre-bound solver callback returning the MZN solution {path: number[], total_cost: number} or null.

Return:

Promise<Object>

Resolves to {textOutput, chordGraph: {graph, path, key, mode}, chords, concreteProgression}; path is {nodes: string[], edges: Set<string>} on success, null otherwise.

Test: