StringConverter:
Filter:
GamelanPatterns/Classes (extension) | Extensions > Virtual Gamelan

StringConverter
ExtensionExtension

Converts strings to sc-events (typically into arrays of events)

Description

Superclass to convert gamelan-notation strings into events. BalunganReader is the subclass that is used as default currently. KendhanganReader is used for kendhangan (drumming) notation. BasicScoreReader implements a simpler conversion (not needed in VG).

Class Methods

.current

Returns:

Returns the current score reader

.convert

Convert the string into an array of events. If addScore is true (default), add the score to the proto event (under the key \score) when using the converter to create an attribute for a rule, addScore should be set to false.

Arguments:

str
addScore

Returns:

(describe returnvalue here)

.makeCurrent

(describe method here)

Returns:

(describe returnvalue here)

.use

Use a score reader without changing the global current reader

Arguments:

function

(describe argument here)

Returns:

(describe returnvalue here)

.unconvert

(describe method here)

Arguments:

list

(describe argument here)

Returns:

(describe returnvalue here)

.error

(describe method here)

Arguments:

string

(describe argument here)

index

(describe argument here)

Returns:

(describe returnvalue here)

Examples