diff --git a/dist/app.min.js b/dist/app.min.js
index be9f738fe..50835cc97 100644
--- a/dist/app.min.js
+++ b/dist/app.min.js
@@ -3353,7 +3353,7 @@ NetsBloxMorph.prototype.showUpdateNotification=function(){this.simpleNotificatio
NetsBloxMorph.prototype.linkAccount=function(){(new DialogBoxMorph(null,async a=>{try{await this.cloud.linkAccount(a.username.toLowerCase(),a.password,"Snap!"),this.showMessage(localize("Linked account!"),2)}catch(b){this.showMessage(localize("Unable to link account:")+" "+b.message,2)}})).withKey("cloudlogin").promptCredentials("Sign in with Snap!","login",null,null,null,null,"stay signed in on this computer\nuntil logging out",this.world(),this.cloudIcon(),this.cloudMsg)};
NetsBloxMorph.prototype.unlinkAccount=async function(a){const {username:b}=a;if(await this.confirm(localize("Are you sure you would like to unlink ")+b+"?",localize("Unlink Account?")))try{await this.cloud.unlinkAccount(a),this.showMessage(localize("Unlinked ")+b,2)}catch(c){this.showMessage(localize("Unable to unlink account: ")+c.responseText,2)}};
function loadWasmModule(a,b){console.log(`loading wasm module: ${a}`);const c=document.createElement("script");c.type="module";c.innerHTML=[`import init, {${b.join(",")}} from '/src/wasm/${a}/${a}.js';`,"await init();",`window.${a} = {};`,...b.map(d=>`window.${a}.${d} = ${d};`)].join("\n");document.body.appendChild(c)}window.addEventListener("DOMContentLoaded",()=>{loadWasmModule("amm_sdk_netsblox_wasm",["translate_musicxml","translate_midi"])});NetsBloxSerializer.prototype=new SnapSerializer;
-NetsBloxSerializer.prototype.constructor=NetsBloxSerializer;NetsBloxSerializer.uber=SnapSerializer.prototype;SnapSerializer.prototype.isSavingHistory=!0;NetsBloxSerializer.prototype.appName="NetsBlox";NetsBloxSerializer.prototype.version="2.4.18";NetsBloxSerializer.prototype.app=NetsBloxSerializer.prototype.appName+" "+NetsBloxSerializer.prototype.version+", http://netsblox.org";function NetsBloxSerializer(){this.init()}
+NetsBloxSerializer.prototype.constructor=NetsBloxSerializer;NetsBloxSerializer.uber=SnapSerializer.prototype;SnapSerializer.prototype.isSavingHistory=!0;NetsBloxSerializer.prototype.appName="NetsBlox";NetsBloxSerializer.prototype.version="2.4.19";NetsBloxSerializer.prototype.app=NetsBloxSerializer.prototype.appName+" "+NetsBloxSerializer.prototype.version+", http://netsblox.org";function NetsBloxSerializer(){this.init()}
NetsBloxSerializer.prototype.loadMessageType=function(a,b){var c=b.childNamed("name").contents;b=b.childNamed("fields").children.map(function(d){return d.contents});a.addMessageType({name:c,fields:b})};NetsBloxSerializer.prototype.loadCustomBlock=function(a,b){"services"===a.attributes.category&&(a.attributes.category="network");return NetsBloxSerializer.uber.loadCustomBlock.call(this,a,b)};
SnapSerializer.prototype.getInitialStageSpriteIds=function(a){a=a.childNamed("stage").attributes.collabId;var b=a.split("_").slice(0,2).join("_");return[a,b]};MessageFrame.prototype.toXML=function(a){var b=this;return this.names().map(function(c){return b.getMsgType(c)}).map(function(c){return a.format("%",a.store(c))}).join("")};
MessageType.prototype.toXML=function(a){var b=this.fields.map(function(c){return a.format("%",a.escape(c))}).join("");return a.format("%%",a.escape(this.name),b)};HintInputSlotMorph.prototype.toXML=function(a){return this.empty?a.format("$",""):InputSlotMorph.prototype.toXML.call(this,a)};SnapActions.addActions("addMessageType","deleteMessageType");ActionManager.URL="ws://"+SERVER_ADDRESS+"/collaboration";
diff --git a/index.dot b/index.dot
index 1a72ba447..94861df05 100644
--- a/index.dot
+++ b/index.dot
@@ -80,7 +80,7 @@
{{ } else { }}
-
+
{{ } }}
diff --git a/src/store-ext.js b/src/store-ext.js
index 01fe07872..e854cab24 100644
--- a/src/store-ext.js
+++ b/src/store-ext.js
@@ -8,7 +8,7 @@ NetsBloxSerializer.uber = SnapSerializer.prototype;
SnapSerializer.prototype.isSavingHistory = true;
NetsBloxSerializer.prototype.appName = 'NetsBlox';
-NetsBloxSerializer.prototype.version = '2.4.18';
+NetsBloxSerializer.prototype.version = '2.4.19';
NetsBloxSerializer.prototype.app = NetsBloxSerializer.prototype.appName + ' ' +
NetsBloxSerializer.prototype.version + ', http://netsblox.org';
diff --git a/src/wasm/amm_sdk_netsblox_wasm/amm_sdk_netsblox_wasm.d.ts b/src/wasm/amm_sdk_netsblox_wasm/amm_sdk_netsblox_wasm.d.ts
index 140f63bbb..ac026c450 100644
--- a/src/wasm/amm_sdk_netsblox_wasm/amm_sdk_netsblox_wasm.d.ts
+++ b/src/wasm/amm_sdk_netsblox_wasm/amm_sdk_netsblox_wasm.d.ts
@@ -18,20 +18,66 @@ export enum Accidental {
DoubleSharp = 4,
DoubleFlat = 5,
}
+/**
+ * Represents the symbol used to designate a clef.
+ *
+ * Note that the same symbol can be used for different clef types.
+ */
export enum ClefSymbol {
+ /**
+ * ![G Clef](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/g-clef.png)
+ */
GClef = 0,
+ /**
+ * ![C Clef](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/c-clef.png)
+ */
CClef = 1,
+ /**
+ * ![F Clef](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/f-clef.png)
+ */
FClef = 2,
}
+/**
+ * Designates the meaning of a clef.
+ *
+ * A clef is used to determine the pitches for the notes on a staff.
+ */
export enum ClefType {
+ /**
+ * Designates that pitch G4 is located on the second line from the bottom of the staff.
+ */
Treble = 0,
+ /**
+ * Designates that pitch F3 is located on the second line from the top of the staff.
+ */
Bass = 1,
+ /**
+ * Designates that pitch G4 is located on the bottom line of the staff.
+ */
FrenchViolin = 2,
+ /**
+ * Designates that pitch F3 is located on the top line of the staff.
+ */
Subbass = 3,
+ /**
+ * Designates that pitch C4 is located on the second line from the top of the staff.
+ */
Tenor = 4,
+ /**
+ * Designates that pitch C4 is located on the middle line of the staff.
+ */
Alto = 5,
+ /**
+ * Designates that pitch C4 is located on the bottom line of the staff.
+ */
Soprano = 6,
+ /**
+ * Designates that pitch C4 is located on the second line from the bottom of the staff.
+ */
MezzoSoprano = 7,
+ /**
+ * Designates that pitch C4 is located on the top line of the staff.
+ */
Baritone = 8,
}
export enum DurationType {
@@ -51,28 +97,101 @@ export enum DurationType {
OneThousandTwentyFourth = 13,
TwoThousandFortyEighth = 14,
}
+/**
+ * Represents the relative interval between notes in musical scale.
+ */
export enum KeyMode {
+ /**
+ * Represents the following note intervals in semitones,
+ * starting from the root note of the corresponding key:
+ *
+ * `[2, 2, 1, 2, 2, 2, 1]`
+ */
Major = 0,
+ /**
+ * Represents the following note intervals in semitones,
+ * starting from the root note of the corresponding key:
+ *
+ * `[2, 1, 2, 2, 2, 1, 2]`
+ */
Minor = 1,
}
+/**
+ * Represents the key signature of a musical piece, not taking
+ * into account its mode (i.e., major or minor).
+ */
export enum KeySignature {
+ /**
+ * ![Key of A](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/key-a.png)
+ */
A = 0,
+ /**
+ * ![Key of A#](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/key-a-sharp.png)
+ */
ASharp = 1,
+ /**
+ * ![Key of A♭](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/key-a-flat.png)
+ */
AFlat = 2,
+ /**
+ * ![Key of B](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/key-b.png)
+ */
B = 3,
+ /**
+ * ![Key of B♭](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/key-b-flat.png)
+ */
BFlat = 4,
+ /**
+ * ![Key of C](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/key-c.png)
+ */
C = 5,
+ /**
+ * ![Key of C#](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/key-c-sharp.png)
+ */
CSharp = 6,
+ /**
+ * ![Key of C♭](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/key-c-flat.png)
+ */
CFlat = 7,
+ /**
+ * ![Key of D](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/key-d.png)
+ */
D = 8,
+ /**
+ * ![Key of D#](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/key-d-sharp.png)
+ */
DSharp = 9,
+ /**
+ * ![Key of D♭](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/key-d-flat.png)
+ */
DFlat = 10,
+ /**
+ * ![Key of E](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/key-e.png)
+ */
E = 11,
+ /**
+ * ![Key of E♭](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/key-e-flat.png)
+ */
EFlat = 12,
+ /**
+ * ![Key of F](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/key-f.png)
+ */
F = 13,
+ /**
+ * ![Key of F#](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/key-f-sharp.png)
+ */
FSharp = 14,
+ /**
+ * ![Key of G](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/key-g.png)
+ */
G = 15,
+ /**
+ * ![Key of G#](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/key-g-sharp.png)
+ */
GSharp = 16,
+ /**
+ * ![Key of G♭](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/key-g-flat.png)
+ */
GFlat = 17,
}
export enum PitchName {
@@ -85,44 +204,146 @@ export enum PitchName {
F = 6,
G = 7,
}
+/**
+ * Represents a text-based tempo marking in music notation.
+ */
export enum TempoMarking {
+ /**
+ * Very, very slowly.
+ */
Larghissimo = 0,
+ /**
+ * Very slowly.
+ */
Grave = 1,
+ /**
+ * Broadly.
+ */
Largo = 2,
+ /**
+ * Slowly.
+ */
Lento = 3,
+ /**
+ * Rather broadly.
+ */
Larghetto = 4,
+ /**
+ * Slowly and stately.
+ */
Adagio = 5,
+ /**
+ * More slowly than andante.
+ */
Adagietto = 6,
+ /**
+ * At a walking pace.
+ */
Andante = 7,
+ /**
+ * At a brisk walking pace.
+ */
Andantino = 8,
+ /**
+ * Moderately, in the manner of a march.
+ */
MarciaModerato = 9,
+ /**
+ * Between andante and moderato.
+ */
AndanteModerato = 10,
+ /**
+ * Moderately.
+ */
Moderato = 11,
+ /**
+ * Moderately quickly.
+ */
Allegretto = 12,
+ /**
+ * Brightly and moderately quickly.
+ */
AllegroModerato = 13,
+ /**
+ * Quickly and brightly.
+ */
Allegro = 14,
+ /**
+ * Lively and fast.
+ */
Vivace = 15,
+ /**
+ * Very fast and lively.
+ */
Vivacissimo = 16,
+ /**
+ * Very fast.
+ */
Allegrissimo = 17,
+ /**
+ * Very lively and fast.
+ */
AllegroVivace = 18,
+ /**
+ * Very, very fast.
+ */
Presto = 19,
+ /**
+ * Extremely fast.
+ */
Prestissimo = 20,
}
+/**
+ * Represents a type of time signature marking, whether explicit or implicit.
+ */
export enum TimeSignatureType {
+ /**
+ * ![Common Time](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/common-time.png)
+ *
+ * Represents an explicit time signature of 4/4.
+ */
CommonTime = 0,
+ /**
+ * ![Cut Time](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/cut-time.png)
+ *
+ * Represents an explicit time signature of 2/2.
+ */
CutTime = 1,
+ /**
+ * ![Explicit Time](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/explicit-time.png)
+ *
+ * Represents the number of beats in each measure and the
+ * note value which represents a beat.
+ */
Explicit = 2,
+ /**
+ * Represents an explicit lack of time signature,
+ * also called "senza misura".
+ */
None = 3,
}
+/**
+ * Represents a clef which is used to determine the pitches for the notes on a staff.
+ */
export class Clef {
free(): void;
/**
+ * Creates a new clef with the given type and optional symbol.
+ *
+ * If the `symbol` parameter is `None`, the most common symbol for the
+ * given `clef_type` will be used instead.
* @param {ClefType} clef_type
* @param {ClefSymbol | undefined} [symbol]
* @returns {Clef}
*/
static new(clef_type: ClefType, symbol?: ClefSymbol): Clef;
+/**
+ * The meaning of the clef.
+ */
clef_type: ClefType;
+/**
+ * The symbol used to designate the clef.
+ */
symbol: ClefSymbol;
}
export class Duration {
@@ -162,35 +383,82 @@ export class Duration {
dots: number;
value: DurationType;
}
+/**
+ * Represents the key of a musical piece, including both its
+ * mode (i.e., major or minor) and its signature.
+ */
export class Key {
free(): void;
/**
+ * Creates a new key with the given signature and mode.
* @param {KeySignature} signature
* @param {KeyMode} mode
* @returns {Key}
*/
static new(signature: KeySignature, mode: KeyMode): Key;
/**
+ * Creates a new key from the given circle of fifths value and
+ * optional mode.
+ *
+ * The circle of fifths represents the number of flats or sharps in
+ * a traditional key signature. Negative numbers are used for flats
+ * and positive numbers for sharps. For example, a key with two flats
+ * would be represented by a `fifths` value of `-2`.
+ *
+ * If the `mode` parameter is `None`, the key will default
+ * to [`KeyMode::Major`].
* @param {number} fifths
* @param {KeyMode | undefined} [mode]
* @returns {Key}
*/
static from_fifths(fifths: number, mode?: KeyMode): Key;
/**
+ * Returns the circle of fifths value for the key.
+ *
+ * The circle of fifths represents the number of flats or sharps in
+ * a traditional key signature. Negative numbers are used for flats
+ * and positive numbers for sharps. For example, a key with two flats
+ * would be represented by a `fifths` value of `-2`.
* @returns {number}
*/
fifths(): number;
/**
+ * Returns a new key with the same tonic as the current key,
+ * but with the opposite mode (i.e., the parallel key of C-Major
+ * would be C-Minor and vice versa).
* @returns {Key}
*/
to_parallel(): Key;
/**
+ * Returns a new key with the same accidentals as the current key,
+ * but with the opposite mode (i.e., the relative key of C-Major
+ * would be A-Minor and vice versa).
* @returns {Key}
*/
to_relative(): Key;
+ /**
+ * Converts the current key into its parallel key.
+ *
+ * A parallel key is a key with the same tonic as the current key,
+ * but with the opposite mode (i.e., the parallel key of C-Major
+ * would be C-Minor and vice versa).
+ */
make_parallel(): void;
+ /**
+ * Converts the current key into its relative key.
+ *
+ * A relative key is a key with the same accidentals as the current
+ * key, but with the opposite mode (i.e., the relative key of C-Major
+ * would be A-Minor and vice versa).
+ */
make_relative(): void;
+/**
+ * The mode of the key (i.e., major or minor).
+ */
mode: KeyMode;
+/**
+ * The signature of the key (i.e., A, A♭, B, etc).
+ */
signature: KeySignature;
}
export class Pitch {
@@ -212,57 +480,103 @@ export class Pitch {
name: PitchName;
octave: number;
}
+/**
+ * Represents an explicit tempo marking in music notation.
+ */
export class Tempo {
free(): void;
/**
+ * Creates a new tempo with the given base note and beats per minute.
* @param {Duration} base_note
* @param {number} beats_per_minute
* @returns {Tempo}
*/
static new(base_note: Duration, beats_per_minute: number): Tempo;
+/**
+ * The base note which represents a "beat" in the tempo.
+ */
base_note: Duration;
+/**
+ * The number of beats per minute.
+ */
beats_per_minute: number;
}
+/**
+ * Represents a text-based tempo suggestion in music notation.
+ */
export class TempoSuggestion {
free(): void;
/**
+ * Creates a new tempo suggestion with the given marking.
* @param {TempoMarking} marking
* @returns {TempoSuggestion}
*/
static new(marking: TempoMarking): TempoSuggestion;
/**
+ * Returns a description of the tempo suggestion.
* @returns {string}
*/
description(): string;
/**
+ * Returns the minimum beats per minute for the tempo suggestion.
* @returns {number}
*/
bpm_min(): number;
/**
+ * Returns the maximum beats per minute for the tempo suggestion.
* @returns {number}
*/
bpm_max(): number;
/**
+ * Returns the average beats per minute for the tempo suggestion.
* @returns {number}
*/
value(): number;
marking: TempoMarking;
}
+/**
+ * Represents a time signature in music notation.
+ *
+ * Some `signature` types are implicit (e.g., `CommonTime` = `4/4`,
+ * `CutTime` = `2/2`), while others require an explicit `numerator` and `denominator`.
+ */
export class TimeSignature {
free(): void;
/**
+ * Creates a new time signature with the given *implicit* type.
+ *
+ * **Note:** This method should only be used for implicit time
+ * signatures like [`TimeSignatureType::CommonTime`] and
+ * [`TimeSignatureType::CutTime`]. If you need to create an explicit
+ * time signature, use [`TimeSignature::new_explicit`] instead.
* @param {TimeSignatureType} signature
* @returns {TimeSignature}
*/
static new(signature: TimeSignatureType): TimeSignature;
/**
+ * Creates a new time signature with the given *explicit* type.
+ *
+ * The `numerator` indicates the number of beats in each measure,
+ * and the `denominator` designates the note value which represents
+ * a beat in the measure (e.g., `4` = quarter note, `8` = eighth note,
+ * etc.).
* @param {number} numerator
* @param {number} denominator
* @returns {TimeSignature}
*/
static new_explicit(numerator: number, denominator: number): TimeSignature;
+/**
+ * The note value which represents a beat in the measure (e.g.,
+ * `4` = quarter note, `8` = eighth note, etc.).
+ */
denominator: number;
+/**
+ * The number of beats in each measure.
+ */
numerator: number;
+/**
+ * The type of time signature marking, whether explicit or implicit.
+ */
signature: TimeSignatureType;
}
@@ -272,12 +586,25 @@ export interface InitOutput {
readonly memory: WebAssembly.Memory;
readonly translate_musicxml: (a: number, b: number) => Array;
readonly translate_midi: (a: number, b: number) => Array;
+ readonly __wbg_tempo_free: (a: number, b: number) => void;
+ readonly __wbg_get_tempo_base_note: (a: number) => number;
+ readonly __wbg_set_tempo_base_note: (a: number, b: number) => void;
+ readonly __wbg_get_tempo_beats_per_minute: (a: number) => number;
+ readonly __wbg_set_tempo_beats_per_minute: (a: number, b: number) => void;
+ readonly tempo_new: (a: number, b: number) => number;
readonly __wbg_clef_free: (a: number, b: number) => void;
readonly __wbg_get_clef_symbol: (a: number) => number;
readonly __wbg_set_clef_symbol: (a: number, b: number) => void;
readonly __wbg_get_clef_clef_type: (a: number) => number;
readonly __wbg_set_clef_clef_type: (a: number, b: number) => void;
readonly clef_new: (a: number, b: number) => number;
+ readonly __wbg_timesignature_free: (a: number, b: number) => void;
+ readonly __wbg_get_timesignature_signature: (a: number) => number;
+ readonly __wbg_set_timesignature_signature: (a: number, b: number) => void;
+ readonly __wbg_get_timesignature_denominator: (a: number) => number;
+ readonly __wbg_set_timesignature_denominator: (a: number, b: number) => void;
+ readonly timesignature_new: (a: number) => number;
+ readonly timesignature_new_explicit: (a: number, b: number) => number;
readonly __wbg_pitch_free: (a: number, b: number) => void;
readonly __wbg_get_pitch_name: (a: number) => number;
readonly __wbg_set_pitch_name: (a: number, b: number) => void;
@@ -286,6 +613,20 @@ export interface InitOutput {
readonly pitch_new: (a: number, b: number) => number;
readonly pitch_new_rest: () => number;
readonly pitch_is_rest: (a: number) => number;
+ readonly __wbg_set_timesignature_numerator: (a: number, b: number) => void;
+ readonly __wbg_get_timesignature_numerator: (a: number) => number;
+ readonly __wbg_key_free: (a: number, b: number) => void;
+ readonly __wbg_get_key_mode: (a: number) => number;
+ readonly __wbg_set_key_mode: (a: number, b: number) => void;
+ readonly __wbg_get_key_signature: (a: number) => number;
+ readonly __wbg_set_key_signature: (a: number, b: number) => void;
+ readonly key_new: (a: number, b: number) => number;
+ readonly key_from_fifths: (a: number, b: number) => number;
+ readonly key_fifths: (a: number) => number;
+ readonly key_to_parallel: (a: number) => number;
+ readonly key_to_relative: (a: number) => number;
+ readonly key_make_parallel: (a: number) => void;
+ readonly key_make_relative: (a: number) => void;
readonly __wbg_temposuggestion_free: (a: number, b: number) => void;
readonly __wbg_get_temposuggestion_marking: (a: number) => number;
readonly __wbg_set_temposuggestion_marking: (a: number, b: number) => void;
@@ -305,33 +646,6 @@ export interface InitOutput {
readonly duration_value: (a: number) => number;
readonly duration_beats: (a: number, b: number) => number;
readonly duration_split: (a: number, b: number) => number;
- readonly __wbg_key_free: (a: number, b: number) => void;
- readonly __wbg_get_key_mode: (a: number) => number;
- readonly __wbg_set_key_mode: (a: number, b: number) => void;
- readonly __wbg_get_key_signature: (a: number) => number;
- readonly __wbg_set_key_signature: (a: number, b: number) => void;
- readonly key_new: (a: number, b: number) => number;
- readonly key_from_fifths: (a: number, b: number) => number;
- readonly key_fifths: (a: number) => number;
- readonly key_to_parallel: (a: number) => number;
- readonly key_to_relative: (a: number) => number;
- readonly key_make_parallel: (a: number) => void;
- readonly key_make_relative: (a: number) => void;
- readonly __wbg_timesignature_free: (a: number, b: number) => void;
- readonly __wbg_get_timesignature_signature: (a: number) => number;
- readonly __wbg_set_timesignature_signature: (a: number, b: number) => void;
- readonly __wbg_get_timesignature_numerator: (a: number) => number;
- readonly __wbg_set_timesignature_numerator: (a: number, b: number) => void;
- readonly __wbg_get_timesignature_denominator: (a: number) => number;
- readonly __wbg_set_timesignature_denominator: (a: number, b: number) => void;
- readonly timesignature_new: (a: number) => number;
- readonly timesignature_new_explicit: (a: number, b: number) => number;
- readonly __wbg_tempo_free: (a: number, b: number) => void;
- readonly __wbg_get_tempo_base_note: (a: number) => number;
- readonly __wbg_set_tempo_base_note: (a: number, b: number) => void;
- readonly __wbg_get_tempo_beats_per_minute: (a: number) => number;
- readonly __wbg_set_tempo_beats_per_minute: (a: number, b: number) => void;
- readonly tempo_new: (a: number, b: number) => number;
readonly __wbindgen_export_0: WebAssembly.Table;
readonly __wbindgen_malloc: (a: number, b: number) => number;
readonly __externref_table_dealloc: (a: number) => void;
diff --git a/src/wasm/amm_sdk_netsblox_wasm/amm_sdk_netsblox_wasm.js b/src/wasm/amm_sdk_netsblox_wasm/amm_sdk_netsblox_wasm.js
index 9cdcaac20..b73a8684d 100644
--- a/src/wasm/amm_sdk_netsblox_wasm/amm_sdk_netsblox_wasm.js
+++ b/src/wasm/amm_sdk_netsblox_wasm/amm_sdk_netsblox_wasm.js
@@ -145,10 +145,6 @@ function getDataViewMemory0() {
return cachedDataViewMemory0;
}
-function isLikeNone(x) {
- return x === undefined || x === null;
-}
-
function _assertClass(instance, klass) {
if (!(instance instanceof klass)) {
throw new Error(`expected instance of ${klass.name}`);
@@ -156,28 +152,293 @@ function _assertClass(instance, klass) {
return instance.ptr;
}
-export const Accidental = Object.freeze({ None:0,"0":"None",Natural:1,"1":"Natural",Sharp:2,"2":"Sharp",Flat:3,"3":"Flat",DoubleSharp:4,"4":"DoubleSharp",DoubleFlat:5,"5":"DoubleFlat", });
-
-export const ClefSymbol = Object.freeze({ GClef:0,"0":"GClef",CClef:1,"1":"CClef",FClef:2,"2":"FClef", });
+function isLikeNone(x) {
+ return x === undefined || x === null;
+}
-export const ClefType = Object.freeze({ Treble:0,"0":"Treble",Bass:1,"1":"Bass",FrenchViolin:2,"2":"FrenchViolin",Subbass:3,"3":"Subbass",Tenor:4,"4":"Tenor",Alto:5,"5":"Alto",Soprano:6,"6":"Soprano",MezzoSoprano:7,"7":"MezzoSoprano",Baritone:8,"8":"Baritone", });
+export const Accidental = Object.freeze({ None:0,"0":"None",Natural:1,"1":"Natural",Sharp:2,"2":"Sharp",Flat:3,"3":"Flat",DoubleSharp:4,"4":"DoubleSharp",DoubleFlat:5,"5":"DoubleFlat", });
+/**
+ * Represents the symbol used to designate a clef.
+ *
+ * Note that the same symbol can be used for different clef types.
+ */
+export const ClefSymbol = Object.freeze({
+/**
+ * ![G Clef](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/g-clef.png)
+ */
+GClef:0,"0":"GClef",
+/**
+ * ![C Clef](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/c-clef.png)
+ */
+CClef:1,"1":"CClef",
+/**
+ * ![F Clef](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/f-clef.png)
+ */
+FClef:2,"2":"FClef", });
+/**
+ * Designates the meaning of a clef.
+ *
+ * A clef is used to determine the pitches for the notes on a staff.
+ */
+export const ClefType = Object.freeze({
+/**
+ * Designates that pitch G4 is located on the second line from the bottom of the staff.
+ */
+Treble:0,"0":"Treble",
+/**
+ * Designates that pitch F3 is located on the second line from the top of the staff.
+ */
+Bass:1,"1":"Bass",
+/**
+ * Designates that pitch G4 is located on the bottom line of the staff.
+ */
+FrenchViolin:2,"2":"FrenchViolin",
+/**
+ * Designates that pitch F3 is located on the top line of the staff.
+ */
+Subbass:3,"3":"Subbass",
+/**
+ * Designates that pitch C4 is located on the second line from the top of the staff.
+ */
+Tenor:4,"4":"Tenor",
+/**
+ * Designates that pitch C4 is located on the middle line of the staff.
+ */
+Alto:5,"5":"Alto",
+/**
+ * Designates that pitch C4 is located on the bottom line of the staff.
+ */
+Soprano:6,"6":"Soprano",
+/**
+ * Designates that pitch C4 is located on the second line from the bottom of the staff.
+ */
+MezzoSoprano:7,"7":"MezzoSoprano",
+/**
+ * Designates that pitch C4 is located on the top line of the staff.
+ */
+Baritone:8,"8":"Baritone", });
export const DurationType = Object.freeze({ Maxima:0,"0":"Maxima",Long:1,"1":"Long",Breve:2,"2":"Breve",Whole:3,"3":"Whole",Half:4,"4":"Half",Quarter:5,"5":"Quarter",Eighth:6,"6":"Eighth",Sixteenth:7,"7":"Sixteenth",ThirtySecond:8,"8":"ThirtySecond",SixtyFourth:9,"9":"SixtyFourth",OneHundredTwentyEighth:10,"10":"OneHundredTwentyEighth",TwoHundredFiftySixth:11,"11":"TwoHundredFiftySixth",FiveHundredTwelfth:12,"12":"FiveHundredTwelfth",OneThousandTwentyFourth:13,"13":"OneThousandTwentyFourth",TwoThousandFortyEighth:14,"14":"TwoThousandFortyEighth", });
-
-export const KeyMode = Object.freeze({ Major:0,"0":"Major",Minor:1,"1":"Minor", });
-
-export const KeySignature = Object.freeze({ A:0,"0":"A",ASharp:1,"1":"ASharp",AFlat:2,"2":"AFlat",B:3,"3":"B",BFlat:4,"4":"BFlat",C:5,"5":"C",CSharp:6,"6":"CSharp",CFlat:7,"7":"CFlat",D:8,"8":"D",DSharp:9,"9":"DSharp",DFlat:10,"10":"DFlat",E:11,"11":"E",EFlat:12,"12":"EFlat",F:13,"13":"F",FSharp:14,"14":"FSharp",G:15,"15":"G",GSharp:16,"16":"GSharp",GFlat:17,"17":"GFlat", });
+/**
+ * Represents the relative interval between notes in musical scale.
+ */
+export const KeyMode = Object.freeze({
+/**
+ * Represents the following note intervals in semitones,
+ * starting from the root note of the corresponding key:
+ *
+ * `[2, 2, 1, 2, 2, 2, 1]`
+ */
+Major:0,"0":"Major",
+/**
+ * Represents the following note intervals in semitones,
+ * starting from the root note of the corresponding key:
+ *
+ * `[2, 1, 2, 2, 2, 1, 2]`
+ */
+Minor:1,"1":"Minor", });
+/**
+ * Represents the key signature of a musical piece, not taking
+ * into account its mode (i.e., major or minor).
+ */
+export const KeySignature = Object.freeze({
+/**
+ * ![Key of A](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/key-a.png)
+ */
+A:0,"0":"A",
+/**
+ * ![Key of A#](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/key-a-sharp.png)
+ */
+ASharp:1,"1":"ASharp",
+/**
+ * ![Key of A♭](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/key-a-flat.png)
+ */
+AFlat:2,"2":"AFlat",
+/**
+ * ![Key of B](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/key-b.png)
+ */
+B:3,"3":"B",
+/**
+ * ![Key of B♭](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/key-b-flat.png)
+ */
+BFlat:4,"4":"BFlat",
+/**
+ * ![Key of C](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/key-c.png)
+ */
+C:5,"5":"C",
+/**
+ * ![Key of C#](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/key-c-sharp.png)
+ */
+CSharp:6,"6":"CSharp",
+/**
+ * ![Key of C♭](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/key-c-flat.png)
+ */
+CFlat:7,"7":"CFlat",
+/**
+ * ![Key of D](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/key-d.png)
+ */
+D:8,"8":"D",
+/**
+ * ![Key of D#](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/key-d-sharp.png)
+ */
+DSharp:9,"9":"DSharp",
+/**
+ * ![Key of D♭](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/key-d-flat.png)
+ */
+DFlat:10,"10":"DFlat",
+/**
+ * ![Key of E](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/key-e.png)
+ */
+E:11,"11":"E",
+/**
+ * ![Key of E♭](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/key-e-flat.png)
+ */
+EFlat:12,"12":"EFlat",
+/**
+ * ![Key of F](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/key-f.png)
+ */
+F:13,"13":"F",
+/**
+ * ![Key of F#](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/key-f-sharp.png)
+ */
+FSharp:14,"14":"FSharp",
+/**
+ * ![Key of G](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/key-g.png)
+ */
+G:15,"15":"G",
+/**
+ * ![Key of G#](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/key-g-sharp.png)
+ */
+GSharp:16,"16":"GSharp",
+/**
+ * ![Key of G♭](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/key-g-flat.png)
+ */
+GFlat:17,"17":"GFlat", });
export const PitchName = Object.freeze({ Rest:0,"0":"Rest",A:1,"1":"A",B:2,"2":"B",C:3,"3":"C",D:4,"4":"D",E:5,"5":"E",F:6,"6":"F",G:7,"7":"G", });
-
-export const TempoMarking = Object.freeze({ Larghissimo:0,"0":"Larghissimo",Grave:1,"1":"Grave",Largo:2,"2":"Largo",Lento:3,"3":"Lento",Larghetto:4,"4":"Larghetto",Adagio:5,"5":"Adagio",Adagietto:6,"6":"Adagietto",Andante:7,"7":"Andante",Andantino:8,"8":"Andantino",MarciaModerato:9,"9":"MarciaModerato",AndanteModerato:10,"10":"AndanteModerato",Moderato:11,"11":"Moderato",Allegretto:12,"12":"Allegretto",AllegroModerato:13,"13":"AllegroModerato",Allegro:14,"14":"Allegro",Vivace:15,"15":"Vivace",Vivacissimo:16,"16":"Vivacissimo",Allegrissimo:17,"17":"Allegrissimo",AllegroVivace:18,"18":"AllegroVivace",Presto:19,"19":"Presto",Prestissimo:20,"20":"Prestissimo", });
-
-export const TimeSignatureType = Object.freeze({ CommonTime:0,"0":"CommonTime",CutTime:1,"1":"CutTime",Explicit:2,"2":"Explicit",None:3,"3":"None", });
+/**
+ * Represents a text-based tempo marking in music notation.
+ */
+export const TempoMarking = Object.freeze({
+/**
+ * Very, very slowly.
+ */
+Larghissimo:0,"0":"Larghissimo",
+/**
+ * Very slowly.
+ */
+Grave:1,"1":"Grave",
+/**
+ * Broadly.
+ */
+Largo:2,"2":"Largo",
+/**
+ * Slowly.
+ */
+Lento:3,"3":"Lento",
+/**
+ * Rather broadly.
+ */
+Larghetto:4,"4":"Larghetto",
+/**
+ * Slowly and stately.
+ */
+Adagio:5,"5":"Adagio",
+/**
+ * More slowly than andante.
+ */
+Adagietto:6,"6":"Adagietto",
+/**
+ * At a walking pace.
+ */
+Andante:7,"7":"Andante",
+/**
+ * At a brisk walking pace.
+ */
+Andantino:8,"8":"Andantino",
+/**
+ * Moderately, in the manner of a march.
+ */
+MarciaModerato:9,"9":"MarciaModerato",
+/**
+ * Between andante and moderato.
+ */
+AndanteModerato:10,"10":"AndanteModerato",
+/**
+ * Moderately.
+ */
+Moderato:11,"11":"Moderato",
+/**
+ * Moderately quickly.
+ */
+Allegretto:12,"12":"Allegretto",
+/**
+ * Brightly and moderately quickly.
+ */
+AllegroModerato:13,"13":"AllegroModerato",
+/**
+ * Quickly and brightly.
+ */
+Allegro:14,"14":"Allegro",
+/**
+ * Lively and fast.
+ */
+Vivace:15,"15":"Vivace",
+/**
+ * Very fast and lively.
+ */
+Vivacissimo:16,"16":"Vivacissimo",
+/**
+ * Very fast.
+ */
+Allegrissimo:17,"17":"Allegrissimo",
+/**
+ * Very lively and fast.
+ */
+AllegroVivace:18,"18":"AllegroVivace",
+/**
+ * Very, very fast.
+ */
+Presto:19,"19":"Presto",
+/**
+ * Extremely fast.
+ */
+Prestissimo:20,"20":"Prestissimo", });
+/**
+ * Represents a type of time signature marking, whether explicit or implicit.
+ */
+export const TimeSignatureType = Object.freeze({
+/**
+ * ![Common Time](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/common-time.png)
+ *
+ * Represents an explicit time signature of 4/4.
+ */
+CommonTime:0,"0":"CommonTime",
+/**
+ * ![Cut Time](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/cut-time.png)
+ *
+ * Represents an explicit time signature of 2/2.
+ */
+CutTime:1,"1":"CutTime",
+/**
+ * ![Explicit Time](https://hedgetechllc.github.io/amm-sdk/amm_sdk/images/explicit-time.png)
+ *
+ * Represents the number of beats in each measure and the
+ * note value which represents a beat.
+ */
+Explicit:2,"2":"Explicit",
+/**
+ * Represents an explicit lack of time signature,
+ * also called "senza misura".
+ */
+None:3,"3":"None", });
const ClefFinalization = (typeof FinalizationRegistry === 'undefined')
? { register: () => {}, unregister: () => {} }
: new FinalizationRegistry(ptr => wasm.__wbg_clef_free(ptr >>> 0, 1));
-
+/**
+ * Represents a clef which is used to determine the pitches for the notes on a staff.
+ */
export class Clef {
static __wrap(ptr) {
@@ -200,6 +461,7 @@ export class Clef {
wasm.__wbg_clef_free(ptr, 0);
}
/**
+ * The symbol used to designate the clef.
* @returns {ClefSymbol}
*/
get symbol() {
@@ -207,12 +469,14 @@ export class Clef {
return ret;
}
/**
+ * The symbol used to designate the clef.
* @param {ClefSymbol} arg0
*/
set symbol(arg0) {
wasm.__wbg_set_clef_symbol(this.__wbg_ptr, arg0);
}
/**
+ * The meaning of the clef.
* @returns {ClefType}
*/
get clef_type() {
@@ -220,12 +484,17 @@ export class Clef {
return ret;
}
/**
+ * The meaning of the clef.
* @param {ClefType} arg0
*/
set clef_type(arg0) {
wasm.__wbg_set_clef_clef_type(this.__wbg_ptr, arg0);
}
/**
+ * Creates a new clef with the given type and optional symbol.
+ *
+ * If the `symbol` parameter is `None`, the most common symbol for the
+ * given `clef_type` will be used instead.
* @param {ClefType} clef_type
* @param {ClefSymbol | undefined} [symbol]
* @returns {Clef}
@@ -344,7 +613,10 @@ export class Duration {
const KeyFinalization = (typeof FinalizationRegistry === 'undefined')
? { register: () => {}, unregister: () => {} }
: new FinalizationRegistry(ptr => wasm.__wbg_key_free(ptr >>> 0, 1));
-
+/**
+ * Represents the key of a musical piece, including both its
+ * mode (i.e., major or minor) and its signature.
+ */
export class Key {
static __wrap(ptr) {
@@ -367,6 +639,7 @@ export class Key {
wasm.__wbg_key_free(ptr, 0);
}
/**
+ * The mode of the key (i.e., major or minor).
* @returns {KeyMode}
*/
get mode() {
@@ -374,12 +647,14 @@ export class Key {
return ret;
}
/**
+ * The mode of the key (i.e., major or minor).
* @param {KeyMode} arg0
*/
set mode(arg0) {
wasm.__wbg_set_key_mode(this.__wbg_ptr, arg0);
}
/**
+ * The signature of the key (i.e., A, A♭, B, etc).
* @returns {KeySignature}
*/
get signature() {
@@ -387,12 +662,14 @@ export class Key {
return ret;
}
/**
+ * The signature of the key (i.e., A, A♭, B, etc).
* @param {KeySignature} arg0
*/
set signature(arg0) {
wasm.__wbg_set_key_signature(this.__wbg_ptr, arg0);
}
/**
+ * Creates a new key with the given signature and mode.
* @param {KeySignature} signature
* @param {KeyMode} mode
* @returns {Key}
@@ -402,6 +679,16 @@ export class Key {
return Key.__wrap(ret);
}
/**
+ * Creates a new key from the given circle of fifths value and
+ * optional mode.
+ *
+ * The circle of fifths represents the number of flats or sharps in
+ * a traditional key signature. Negative numbers are used for flats
+ * and positive numbers for sharps. For example, a key with two flats
+ * would be represented by a `fifths` value of `-2`.
+ *
+ * If the `mode` parameter is `None`, the key will default
+ * to [`KeyMode::Major`].
* @param {number} fifths
* @param {KeyMode | undefined} [mode]
* @returns {Key}
@@ -411,6 +698,12 @@ export class Key {
return Key.__wrap(ret);
}
/**
+ * Returns the circle of fifths value for the key.
+ *
+ * The circle of fifths represents the number of flats or sharps in
+ * a traditional key signature. Negative numbers are used for flats
+ * and positive numbers for sharps. For example, a key with two flats
+ * would be represented by a `fifths` value of `-2`.
* @returns {number}
*/
fifths() {
@@ -418,6 +711,9 @@ export class Key {
return ret;
}
/**
+ * Returns a new key with the same tonic as the current key,
+ * but with the opposite mode (i.e., the parallel key of C-Major
+ * would be C-Minor and vice versa).
* @returns {Key}
*/
to_parallel() {
@@ -425,15 +721,32 @@ export class Key {
return Key.__wrap(ret);
}
/**
+ * Returns a new key with the same accidentals as the current key,
+ * but with the opposite mode (i.e., the relative key of C-Major
+ * would be A-Minor and vice versa).
* @returns {Key}
*/
to_relative() {
const ret = wasm.key_to_relative(this.__wbg_ptr);
return Key.__wrap(ret);
}
+ /**
+ * Converts the current key into its parallel key.
+ *
+ * A parallel key is a key with the same tonic as the current key,
+ * but with the opposite mode (i.e., the parallel key of C-Major
+ * would be C-Minor and vice versa).
+ */
make_parallel() {
wasm.key_make_parallel(this.__wbg_ptr);
}
+ /**
+ * Converts the current key into its relative key.
+ *
+ * A relative key is a key with the same accidentals as the current
+ * key, but with the opposite mode (i.e., the relative key of C-Major
+ * would be A-Minor and vice versa).
+ */
make_relative() {
wasm.key_make_relative(this.__wbg_ptr);
}
@@ -518,7 +831,9 @@ export class Pitch {
const TempoFinalization = (typeof FinalizationRegistry === 'undefined')
? { register: () => {}, unregister: () => {} }
: new FinalizationRegistry(ptr => wasm.__wbg_tempo_free(ptr >>> 0, 1));
-
+/**
+ * Represents an explicit tempo marking in music notation.
+ */
export class Tempo {
static __wrap(ptr) {
@@ -541,6 +856,7 @@ export class Tempo {
wasm.__wbg_tempo_free(ptr, 0);
}
/**
+ * The base note which represents a "beat" in the tempo.
* @returns {Duration}
*/
get base_note() {
@@ -548,6 +864,7 @@ export class Tempo {
return Duration.__wrap(ret);
}
/**
+ * The base note which represents a "beat" in the tempo.
* @param {Duration} arg0
*/
set base_note(arg0) {
@@ -556,6 +873,7 @@ export class Tempo {
wasm.__wbg_set_tempo_base_note(this.__wbg_ptr, ptr0);
}
/**
+ * The number of beats per minute.
* @returns {number}
*/
get beats_per_minute() {
@@ -563,12 +881,14 @@ export class Tempo {
return ret;
}
/**
+ * The number of beats per minute.
* @param {number} arg0
*/
set beats_per_minute(arg0) {
wasm.__wbg_set_tempo_beats_per_minute(this.__wbg_ptr, arg0);
}
/**
+ * Creates a new tempo with the given base note and beats per minute.
* @param {Duration} base_note
* @param {number} beats_per_minute
* @returns {Tempo}
@@ -584,7 +904,9 @@ export class Tempo {
const TempoSuggestionFinalization = (typeof FinalizationRegistry === 'undefined')
? { register: () => {}, unregister: () => {} }
: new FinalizationRegistry(ptr => wasm.__wbg_temposuggestion_free(ptr >>> 0, 1));
-
+/**
+ * Represents a text-based tempo suggestion in music notation.
+ */
export class TempoSuggestion {
static __wrap(ptr) {
@@ -620,6 +942,7 @@ export class TempoSuggestion {
wasm.__wbg_set_temposuggestion_marking(this.__wbg_ptr, arg0);
}
/**
+ * Creates a new tempo suggestion with the given marking.
* @param {TempoMarking} marking
* @returns {TempoSuggestion}
*/
@@ -628,6 +951,7 @@ export class TempoSuggestion {
return TempoSuggestion.__wrap(ret);
}
/**
+ * Returns a description of the tempo suggestion.
* @returns {string}
*/
description() {
@@ -643,6 +967,7 @@ export class TempoSuggestion {
}
}
/**
+ * Returns the minimum beats per minute for the tempo suggestion.
* @returns {number}
*/
bpm_min() {
@@ -650,6 +975,7 @@ export class TempoSuggestion {
return ret;
}
/**
+ * Returns the maximum beats per minute for the tempo suggestion.
* @returns {number}
*/
bpm_max() {
@@ -657,6 +983,7 @@ export class TempoSuggestion {
return ret;
}
/**
+ * Returns the average beats per minute for the tempo suggestion.
* @returns {number}
*/
value() {
@@ -668,7 +995,12 @@ export class TempoSuggestion {
const TimeSignatureFinalization = (typeof FinalizationRegistry === 'undefined')
? { register: () => {}, unregister: () => {} }
: new FinalizationRegistry(ptr => wasm.__wbg_timesignature_free(ptr >>> 0, 1));
-
+/**
+ * Represents a time signature in music notation.
+ *
+ * Some `signature` types are implicit (e.g., `CommonTime` = `4/4`,
+ * `CutTime` = `2/2`), while others require an explicit `numerator` and `denominator`.
+ */
export class TimeSignature {
static __wrap(ptr) {
@@ -691,6 +1023,7 @@ export class TimeSignature {
wasm.__wbg_timesignature_free(ptr, 0);
}
/**
+ * The type of time signature marking, whether explicit or implicit.
* @returns {TimeSignatureType}
*/
get signature() {
@@ -698,25 +1031,30 @@ export class TimeSignature {
return ret;
}
/**
+ * The type of time signature marking, whether explicit or implicit.
* @param {TimeSignatureType} arg0
*/
set signature(arg0) {
wasm.__wbg_set_timesignature_signature(this.__wbg_ptr, arg0);
}
/**
+ * The number of beats in each measure.
* @returns {number}
*/
get numerator() {
- const ret = wasm.__wbg_get_timesignature_numerator(this.__wbg_ptr);
+ const ret = wasm.__wbg_get_pitch_octave(this.__wbg_ptr);
return ret;
}
/**
+ * The number of beats in each measure.
* @param {number} arg0
*/
set numerator(arg0) {
- wasm.__wbg_set_timesignature_numerator(this.__wbg_ptr, arg0);
+ wasm.__wbg_set_pitch_octave(this.__wbg_ptr, arg0);
}
/**
+ * The note value which represents a beat in the measure (e.g.,
+ * `4` = quarter note, `8` = eighth note, etc.).
* @returns {number}
*/
get denominator() {
@@ -724,12 +1062,20 @@ export class TimeSignature {
return ret;
}
/**
+ * The note value which represents a beat in the measure (e.g.,
+ * `4` = quarter note, `8` = eighth note, etc.).
* @param {number} arg0
*/
set denominator(arg0) {
wasm.__wbg_set_timesignature_denominator(this.__wbg_ptr, arg0);
}
/**
+ * Creates a new time signature with the given *implicit* type.
+ *
+ * **Note:** This method should only be used for implicit time
+ * signatures like [`TimeSignatureType::CommonTime`] and
+ * [`TimeSignatureType::CutTime`]. If you need to create an explicit
+ * time signature, use [`TimeSignature::new_explicit`] instead.
* @param {TimeSignatureType} signature
* @returns {TimeSignature}
*/
@@ -738,6 +1084,12 @@ export class TimeSignature {
return TimeSignature.__wrap(ret);
}
/**
+ * Creates a new time signature with the given *explicit* type.
+ *
+ * The `numerator` indicates the number of beats in each measure,
+ * and the `denominator` designates the note value which represents
+ * a beat in the measure (e.g., `4` = quarter note, `8` = eighth note,
+ * etc.).
* @param {number} numerator
* @param {number} denominator
* @returns {TimeSignature}
diff --git a/src/wasm/amm_sdk_netsblox_wasm/amm_sdk_netsblox_wasm_bg.wasm b/src/wasm/amm_sdk_netsblox_wasm/amm_sdk_netsblox_wasm_bg.wasm
index a9f0b0951..4be94c68f 100644
Binary files a/src/wasm/amm_sdk_netsblox_wasm/amm_sdk_netsblox_wasm_bg.wasm and b/src/wasm/amm_sdk_netsblox_wasm/amm_sdk_netsblox_wasm_bg.wasm differ
diff --git a/src/wasm/amm_sdk_netsblox_wasm/amm_sdk_netsblox_wasm_bg.wasm.d.ts b/src/wasm/amm_sdk_netsblox_wasm/amm_sdk_netsblox_wasm_bg.wasm.d.ts
index 7c66a978b..47ba34c67 100644
--- a/src/wasm/amm_sdk_netsblox_wasm/amm_sdk_netsblox_wasm_bg.wasm.d.ts
+++ b/src/wasm/amm_sdk_netsblox_wasm/amm_sdk_netsblox_wasm_bg.wasm.d.ts
@@ -3,12 +3,25 @@
export const memory: WebAssembly.Memory;
export function translate_musicxml(a: number, b: number): Array;
export function translate_midi(a: number, b: number): Array;
+export function __wbg_tempo_free(a: number, b: number): void;
+export function __wbg_get_tempo_base_note(a: number): number;
+export function __wbg_set_tempo_base_note(a: number, b: number): void;
+export function __wbg_get_tempo_beats_per_minute(a: number): number;
+export function __wbg_set_tempo_beats_per_minute(a: number, b: number): void;
+export function tempo_new(a: number, b: number): number;
export function __wbg_clef_free(a: number, b: number): void;
export function __wbg_get_clef_symbol(a: number): number;
export function __wbg_set_clef_symbol(a: number, b: number): void;
export function __wbg_get_clef_clef_type(a: number): number;
export function __wbg_set_clef_clef_type(a: number, b: number): void;
export function clef_new(a: number, b: number): number;
+export function __wbg_timesignature_free(a: number, b: number): void;
+export function __wbg_get_timesignature_signature(a: number): number;
+export function __wbg_set_timesignature_signature(a: number, b: number): void;
+export function __wbg_get_timesignature_denominator(a: number): number;
+export function __wbg_set_timesignature_denominator(a: number, b: number): void;
+export function timesignature_new(a: number): number;
+export function timesignature_new_explicit(a: number, b: number): number;
export function __wbg_pitch_free(a: number, b: number): void;
export function __wbg_get_pitch_name(a: number): number;
export function __wbg_set_pitch_name(a: number, b: number): void;
@@ -17,6 +30,20 @@ export function __wbg_set_pitch_octave(a: number, b: number): void;
export function pitch_new(a: number, b: number): number;
export function pitch_new_rest(): number;
export function pitch_is_rest(a: number): number;
+export function __wbg_set_timesignature_numerator(a: number, b: number): void;
+export function __wbg_get_timesignature_numerator(a: number): number;
+export function __wbg_key_free(a: number, b: number): void;
+export function __wbg_get_key_mode(a: number): number;
+export function __wbg_set_key_mode(a: number, b: number): void;
+export function __wbg_get_key_signature(a: number): number;
+export function __wbg_set_key_signature(a: number, b: number): void;
+export function key_new(a: number, b: number): number;
+export function key_from_fifths(a: number, b: number): number;
+export function key_fifths(a: number): number;
+export function key_to_parallel(a: number): number;
+export function key_to_relative(a: number): number;
+export function key_make_parallel(a: number): void;
+export function key_make_relative(a: number): void;
export function __wbg_temposuggestion_free(a: number, b: number): void;
export function __wbg_get_temposuggestion_marking(a: number): number;
export function __wbg_set_temposuggestion_marking(a: number, b: number): void;
@@ -36,33 +63,6 @@ export function duration_from_duration(a: number, b: number): number;
export function duration_value(a: number): number;
export function duration_beats(a: number, b: number): number;
export function duration_split(a: number, b: number): number;
-export function __wbg_key_free(a: number, b: number): void;
-export function __wbg_get_key_mode(a: number): number;
-export function __wbg_set_key_mode(a: number, b: number): void;
-export function __wbg_get_key_signature(a: number): number;
-export function __wbg_set_key_signature(a: number, b: number): void;
-export function key_new(a: number, b: number): number;
-export function key_from_fifths(a: number, b: number): number;
-export function key_fifths(a: number): number;
-export function key_to_parallel(a: number): number;
-export function key_to_relative(a: number): number;
-export function key_make_parallel(a: number): void;
-export function key_make_relative(a: number): void;
-export function __wbg_timesignature_free(a: number, b: number): void;
-export function __wbg_get_timesignature_signature(a: number): number;
-export function __wbg_set_timesignature_signature(a: number, b: number): void;
-export function __wbg_get_timesignature_numerator(a: number): number;
-export function __wbg_set_timesignature_numerator(a: number, b: number): void;
-export function __wbg_get_timesignature_denominator(a: number): number;
-export function __wbg_set_timesignature_denominator(a: number, b: number): void;
-export function timesignature_new(a: number): number;
-export function timesignature_new_explicit(a: number, b: number): number;
-export function __wbg_tempo_free(a: number, b: number): void;
-export function __wbg_get_tempo_base_note(a: number): number;
-export function __wbg_set_tempo_base_note(a: number, b: number): void;
-export function __wbg_get_tempo_beats_per_minute(a: number): number;
-export function __wbg_set_tempo_beats_per_minute(a: number, b: number): void;
-export function tempo_new(a: number, b: number): number;
export const __wbindgen_export_0: WebAssembly.Table;
export function __wbindgen_malloc(a: number, b: number): number;
export function __externref_table_dealloc(a: number): void;