kordweb 0.5.19 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,10 +1,9 @@
1
1
  [![Build and Test](https://github.com/twitchax/kord/actions/workflows/build.yml/badge.svg)](https://github.com/twitchax/kord/actions/workflows/build.yml)
2
2
  [![codecov](https://codecov.io/gh/twitchax/kord/branch/main/graph/badge.svg?token=35MZN0YFZF)](https://codecov.io/gh/twitchax/kord)
3
3
  [![Version](https://img.shields.io/crates/v/kord.svg)](https://crates.io/crates/kord)
4
- [![Downloads](https://img.shields.io/crates/d/kord.svg)](https://crates.io/crates/kord)
4
+ [![Crates.io](https://img.shields.io/crates/d/kord?label=crate)](https://crates.io/crates/kord)
5
5
  [![GitHub all releases](https://img.shields.io/github/downloads/twitchax/kord/total?label=binary)](https://github.com/twitchax/kord/releases)
6
- [![Downloads](https://img.shields.io/crates/d/kord.svg)](https://crates.io/crates/kord)
7
- [![npm](https://img.shields.io/npm/dw/kordweb?label=npm)](https://www.npmjs.com/package/kordweb)
6
+ [![npm](https://img.shields.io/npm/dt/kordweb?label=npm)](https://www.npmjs.com/package/kordweb)
8
7
  [![Documentation](https://docs.rs/kord/badge.svg)](https://docs.rs/kord)
9
8
  [![Rust](https://img.shields.io/badge/rust-nightly-blue.svg?maxAge=3600)](https://github.com/twitchax/kord)
10
9
  [![License:MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
package/klib.d.ts CHANGED
@@ -1,61 +1,57 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  /**
4
- * The main entrypoint which sets up global state.
4
+ * The chord modifiers.
5
5
  */
6
- export function main(): void;
6
+ export enum KordModifier {
7
7
  /**
8
- * An enum representing the extension of a chord.
9
- *
10
- * Extensions are not really "special" in the sense that they do not change how the
11
- * chord is interpreted by the system. E.g., an `add2` just adds a 2 to the chord,
12
- * and the chord is still interpreted as a major chord.
8
+ * Minor modifier.
13
9
  */
14
- export enum KordExtension {
10
+ Minor = 0,
15
11
  /**
16
- * Sus2 extension.
12
+ * Flat 5 modifier.
17
13
  */
18
- Sus2 = 0,
14
+ Flat5 = 1,
19
15
  /**
20
- * Sus4 extension.
16
+ * Sharp 5 modifier.
21
17
  */
22
- Sus4 = 1,
18
+ Augmented5 = 2,
23
19
  /**
24
- * Flat 11 extension.
20
+ * Major 7 modifier.
25
21
  */
26
- Flat11 = 2,
22
+ Major7 = 3,
27
23
  /**
28
- * Flat 13 extension.
24
+ * Dominant 7 modifier.
29
25
  */
30
- Flat13 = 3,
26
+ Dominant7 = 4,
31
27
  /**
32
- * Sharp 13 extension.
28
+ * Dominant 9 modifier.
33
29
  */
34
- Sharp13 = 4,
30
+ Dominant9 = 5,
35
31
  /**
36
- * Add2 extension.
32
+ * Dominant 11 modifier.
37
33
  */
38
- Add2 = 5,
34
+ Dominant11 = 6,
39
35
  /**
40
- * Add4 extension.
36
+ * Dominant 13 modifier.
41
37
  */
42
- Add4 = 6,
38
+ Dominant13 = 7,
43
39
  /**
44
- * Add6 extension.
40
+ * Flat 9 modifier.
45
41
  */
46
- Add6 = 7,
42
+ Flat9 = 8,
47
43
  /**
48
- * Add9 extension.
44
+ * Sharp 9 modifier.
49
45
  */
50
- Add9 = 8,
46
+ Sharp9 = 9,
51
47
  /**
52
- * Add11 extension.
48
+ * Sharp 11 modifier.
53
49
  */
54
- Add11 = 9,
50
+ Sharp11 = 10,
55
51
  /**
56
- * Add13 extension.
52
+ * Diminished modifier.
57
53
  */
58
- Add13 = 10,
54
+ Diminished = 11,
59
55
  }
60
56
  /**
61
57
  * An enum representing the interval between two notes.
@@ -255,57 +251,57 @@ export enum KordInterval {
255
251
  ThreePerfectOctavesAndMajorSeventh = 47,
256
252
  }
257
253
  /**
258
- * The chord modifiers.
259
- */
260
- export enum KordModifier {
261
- /**
262
- * Minor modifier.
254
+ * An enum representing the extension of a chord.
255
+ *
256
+ * Extensions are not really "special" in the sense that they do not change how the
257
+ * chord is interpreted by the system. E.g., an `add2` just adds a 2 to the chord,
258
+ * and the chord is still interpreted as a major chord.
263
259
  */
264
- Minor = 0,
260
+ export enum KordExtension {
265
261
  /**
266
- * Flat 5 modifier.
262
+ * Sus2 extension.
267
263
  */
268
- Flat5 = 1,
264
+ Sus2 = 0,
269
265
  /**
270
- * Sharp 5 modifier.
266
+ * Sus4 extension.
271
267
  */
272
- Augmented5 = 2,
268
+ Sus4 = 1,
273
269
  /**
274
- * Major 7 modifier.
270
+ * Flat 11 extension.
275
271
  */
276
- Major7 = 3,
272
+ Flat11 = 2,
277
273
  /**
278
- * Dominant 7 modifier.
274
+ * Flat 13 extension.
279
275
  */
280
- Dominant7 = 4,
276
+ Flat13 = 3,
281
277
  /**
282
- * Dominant 9 modifier.
278
+ * Sharp 13 extension.
283
279
  */
284
- Dominant9 = 5,
280
+ Sharp13 = 4,
285
281
  /**
286
- * Dominant 11 modifier.
282
+ * Add2 extension.
287
283
  */
288
- Dominant11 = 6,
284
+ Add2 = 5,
289
285
  /**
290
- * Dominant 13 modifier.
286
+ * Add4 extension.
291
287
  */
292
- Dominant13 = 7,
288
+ Add4 = 6,
293
289
  /**
294
- * Flat 9 modifier.
290
+ * Add6 extension.
295
291
  */
296
- Flat9 = 8,
292
+ Add6 = 7,
297
293
  /**
298
- * Sharp 9 modifier.
294
+ * Add9 extension.
299
295
  */
300
- Sharp9 = 9,
296
+ Add9 = 8,
301
297
  /**
302
- * Sharp 11 modifier.
298
+ * Add11 extension.
303
299
  */
304
- Sharp11 = 10,
300
+ Add11 = 9,
305
301
  /**
306
- * Diminished modifier.
302
+ * Add13 extension.
307
303
  */
308
- Diminished = 11,
304
+ Add13 = 10,
309
305
  }
310
306
  /**
311
307
  * The [`Chord`] wrapper.
@@ -647,112 +643,9 @@ export class KordNote {
647
643
  }
648
644
  /**
649
645
  * A handle to a [`Chord`] playback.
650
- *
646
+ *
651
647
  * Should be dropped to stop the playback, or after playback is finished.
652
648
  */
653
649
  export class KordPlaybackHandle {
654
650
  free(): void;
655
651
  }
656
-
657
- export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
658
-
659
- export interface InitOutput {
660
- readonly memory: WebAssembly.Memory;
661
- readonly __wbg_kordnote_free: (a: number) => void;
662
- readonly kordnote_parse: (a: number, b: number, c: number) => void;
663
- readonly kordnote_fromAudio: (a: number, b: number, c: number, d: number) => void;
664
- readonly kordnote_fromAudioMl: (a: number, b: number, c: number, d: number) => void;
665
- readonly kordnote_name: (a: number, b: number) => void;
666
- readonly kordnote_toString: (a: number, b: number) => void;
667
- readonly kordnote_pitch: (a: number, b: number) => void;
668
- readonly kordnote_octave: (a: number) => number;
669
- readonly kordnote_frequency: (a: number) => number;
670
- readonly kordnote_addInterval: (a: number, b: number) => number;
671
- readonly kordnote_subInterval: (a: number, b: number) => number;
672
- readonly kordnote_distanceTo: (a: number, b: number) => number;
673
- readonly kordnote_harmonicSeries: (a: number) => number;
674
- readonly kordnote_copy: (a: number) => number;
675
- readonly __wbg_kordchord_free: (a: number) => void;
676
- readonly kordchord_parse: (a: number, b: number, c: number) => void;
677
- readonly kordchord_fromNotesString: (a: number, b: number, c: number) => void;
678
- readonly kordchord_fromNotes: (a: number, b: number) => void;
679
- readonly kordchord_name: (a: number, b: number) => void;
680
- readonly kordchord_preciseName: (a: number, b: number) => void;
681
- readonly kordchord_description: (a: number, b: number) => void;
682
- readonly kordchord_display: (a: number, b: number) => void;
683
- readonly kordchord_root: (a: number, b: number) => void;
684
- readonly kordchord_slash: (a: number, b: number) => void;
685
- readonly kordchord_inversion: (a: number) => number;
686
- readonly kordchord_isCrunchy: (a: number) => number;
687
- readonly kordchord_chord: (a: number) => number;
688
- readonly kordchord_chordString: (a: number, b: number) => void;
689
- readonly kordchord_scale: (a: number) => number;
690
- readonly kordchord_scaleString: (a: number, b: number) => void;
691
- readonly kordchord_modifiers: (a: number) => number;
692
- readonly kordchord_extensions: (a: number) => number;
693
- readonly kordchord_withInversion: (a: number, b: number) => number;
694
- readonly kordchord_withSlash: (a: number, b: number) => number;
695
- readonly kordchord_withOctave: (a: number, b: number, c: number) => void;
696
- readonly kordchord_withCrunchy: (a: number, b: number) => number;
697
- readonly kordchord_play: (a: number, b: number, c: number, d: number) => number;
698
- readonly kordchord_copy: (a: number) => number;
699
- readonly __wbg_kordplaybackhandle_free: (a: number) => void;
700
- readonly kordchord_minor: (a: number) => number;
701
- readonly kordchord_flat5: (a: number) => number;
702
- readonly kordchord_aug: (a: number) => number;
703
- readonly kordchord_maj7: (a: number) => number;
704
- readonly kordchord_seven: (a: number) => number;
705
- readonly kordchord_nine: (a: number) => number;
706
- readonly kordchord_eleven: (a: number) => number;
707
- readonly kordchord_thirteen: (a: number) => number;
708
- readonly kordchord_flat9: (a: number) => number;
709
- readonly kordchord_sharp9: (a: number) => number;
710
- readonly kordchord_sharp11: (a: number) => number;
711
- readonly kordchord_dim: (a: number) => number;
712
- readonly kordchord_halfDim: (a: number) => number;
713
- readonly kordchord_sus2: (a: number) => number;
714
- readonly kordchord_sus4: (a: number) => number;
715
- readonly kordchord_flat11: (a: number) => number;
716
- readonly kordchord_flat13: (a: number) => number;
717
- readonly kordchord_sharp13: (a: number) => number;
718
- readonly kordchord_add2: (a: number) => number;
719
- readonly kordchord_add4: (a: number) => number;
720
- readonly kordchord_add6: (a: number) => number;
721
- readonly kordchord_add9: (a: number) => number;
722
- readonly kordchord_add11: (a: number) => number;
723
- readonly kordchord_add13: (a: number) => number;
724
- readonly main: () => void;
725
- readonly kordchord_toString: (a: number, b: number) => void;
726
- readonly __wbindgen_malloc: (a: number) => number;
727
- readonly __wbindgen_realloc: (a: number, b: number, c: number) => number;
728
- readonly __wbindgen_export_2: WebAssembly.Table;
729
- readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h4bf4f1a270d9cb63: (a: number, b: number, c: number) => void;
730
- readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__haff74cc1bdcde5c1: (a: number, b: number) => void;
731
- readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hfb32af8e4ede5824: (a: number, b: number) => void;
732
- readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
733
- readonly __wbindgen_free: (a: number, b: number) => void;
734
- readonly __wbindgen_exn_store: (a: number) => void;
735
- readonly wasm_bindgen__convert__closures__invoke2_mut__h2d4abc1ddedd8c19: (a: number, b: number, c: number, d: number) => void;
736
- readonly __wbindgen_start: () => void;
737
- }
738
-
739
- export type SyncInitInput = BufferSource | WebAssembly.Module;
740
- /**
741
- * Instantiates the given `module`, which can either be bytes or
742
- * a precompiled `WebAssembly.Module`.
743
- *
744
- * @param {SyncInitInput} module
745
- *
746
- * @returns {InitOutput}
747
- */
748
- export function initSync(module: SyncInitInput): InitOutput;
749
-
750
- /**
751
- * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
752
- * for everything else, calls `WebAssembly.instantiate` directly.
753
- *
754
- * @param {InitInput | Promise<InitInput>} module_or_path
755
- *
756
- * @returns {Promise<InitOutput>}
757
- */
758
- export default function init (module_or_path?: InitInput | Promise<InitInput>): Promise<InitOutput>;