abcjs 6.2.2 → 6.2.3
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/RELEASE.md +39 -0
- package/abc2xml_239/abc2xml.html +769 -0
- package/abc2xml_239/abc2xml.py +2248 -0
- package/abc2xml_239/abc2xml_changelog.html +124 -0
- package/abc2xml_239/lazy-river.abc +26 -0
- package/abc2xml_239/lazy-river.xml +3698 -0
- package/abc2xml_239/mean-to-me.abc +22 -0
- package/abc2xml_239/mean-to-me.xml +2954 -0
- package/abc2xml_239/pyparsing.py +3672 -0
- package/abc2xml_239/pyparsing.pyc +0 -0
- package/dist/abcjs-basic-min.js +2 -2
- package/dist/abcjs-basic.js +160 -71
- package/dist/abcjs-basic.js.map +1 -1
- package/dist/abcjs-plugin-min.js +2 -2
- package/package.json +1 -1
- package/src/api/abc_tablatures.js +3 -0
- package/src/api/abc_tunebook_svg.js +5 -3
- package/src/parse/abc_parse_music.js +18 -53
- package/src/parse/abc_parse_settings.js +165 -0
- package/src/synth/create-synth.js +4 -0
- package/src/synth/place-note.js +6 -0
- package/src/synth/play-event.js +7 -5
- package/src/tablatures/tab-absolute-elements.js +3 -2
- package/src/tablatures/tab-renderer.js +2 -1
- package/src/test/abc_parser_lint.js +12 -12
- package/src/write/creation/abstract-engraver.js +6 -0
- package/src/write/creation/decoration.js +2 -0
- package/src/write/creation/glyphs.js +1 -1
- package/src/write/draw/glissando.js +1 -0
- package/src/write/draw/set-paper-size.js +1 -1
- package/src/write/draw/tie.js +9 -1
- package/src/write/engraver-controller.js +7 -1
- package/src/write/interactive/selection.js +6 -0
- package/src/write/layout/layout.js +33 -3
- package/types/index.d.ts +28 -20
- package/version.js +1 -1
package/types/index.d.ts
CHANGED
|
@@ -71,6 +71,8 @@ declare module 'abcjs' {
|
|
|
71
71
|
"mark" | "marcato" | "umarcato" |
|
|
72
72
|
"D.C.alcoda" | "D.C.alfine" | "D.S.alcoda" | "D.S.alfine" | "editorial" | "courtesy"
|
|
73
73
|
|
|
74
|
+
export type TablatureInstrument = 'guitar' | 'mandolin' | 'fiddle' | 'violin' | '';
|
|
75
|
+
|
|
74
76
|
//
|
|
75
77
|
// Basic types
|
|
76
78
|
//
|
|
@@ -251,6 +253,14 @@ declare module 'abcjs' {
|
|
|
251
253
|
minSpacingLimit?: number;
|
|
252
254
|
}
|
|
253
255
|
|
|
256
|
+
export interface Tablature {
|
|
257
|
+
instrument?: TablatureInstrument,
|
|
258
|
+
capo?: number
|
|
259
|
+
label?: string,
|
|
260
|
+
tuning?: Array<string>,
|
|
261
|
+
highestNote?: string,
|
|
262
|
+
}
|
|
263
|
+
|
|
254
264
|
export interface AbcVisualParams {
|
|
255
265
|
add_classes?: boolean;
|
|
256
266
|
afterParsing?: AfterParsing;
|
|
@@ -258,6 +268,7 @@ declare module 'abcjs' {
|
|
|
258
268
|
clickListener?: ClickListener;
|
|
259
269
|
dragColor?: string;
|
|
260
270
|
dragging?: boolean;
|
|
271
|
+
expandToWidest?: boolean;
|
|
261
272
|
foregroundColor?: string;
|
|
262
273
|
format?: { [attr in FormatAttributes]?: any };
|
|
263
274
|
header_only?: boolean;
|
|
@@ -282,6 +293,7 @@ declare module 'abcjs' {
|
|
|
282
293
|
staffwidth?: number;
|
|
283
294
|
startingTune?: number;
|
|
284
295
|
stop_on_warning?: boolean;
|
|
296
|
+
tablature?: Array<Tablature>;
|
|
285
297
|
textboxpadding?: number;
|
|
286
298
|
viewportHorizontal?: boolean;
|
|
287
299
|
viewportVertical?: boolean;
|
|
@@ -399,7 +411,7 @@ declare module 'abcjs' {
|
|
|
399
411
|
//
|
|
400
412
|
|
|
401
413
|
// renderAbc
|
|
402
|
-
interface NoteTimingEvent {
|
|
414
|
+
export interface NoteTimingEvent {
|
|
403
415
|
milliseconds: number;
|
|
404
416
|
millisecondsPerMeasure: number;
|
|
405
417
|
type: NoteTimingEventType;
|
|
@@ -421,6 +433,11 @@ declare module 'abcjs' {
|
|
|
421
433
|
measureStart?: boolean;
|
|
422
434
|
}
|
|
423
435
|
|
|
436
|
+
// make an alias for backwards compatibility
|
|
437
|
+
export interface TimingEvent extends NoteTimingEvent {
|
|
438
|
+
|
|
439
|
+
}
|
|
440
|
+
|
|
424
441
|
export interface PercMapElement {
|
|
425
442
|
sound: number;
|
|
426
443
|
noteHead: NoteHeadType;
|
|
@@ -571,6 +588,7 @@ declare module 'abcjs' {
|
|
|
571
588
|
wordsfont: Font;
|
|
572
589
|
}
|
|
573
590
|
|
|
591
|
+
// Caution: The contents of this object may change at any time. If you reference this, be sure you retest for each abcjs release.
|
|
574
592
|
export interface EngraverController {
|
|
575
593
|
classes: any;
|
|
576
594
|
dragColor: string;
|
|
@@ -679,6 +697,7 @@ declare module 'abcjs' {
|
|
|
679
697
|
|
|
680
698
|
export interface VoiceItemBar {
|
|
681
699
|
el_type: "bar";
|
|
700
|
+
type: 'bar_dbl_repeat' | 'bar_right_repeat' | 'bar_left_repeat' |'bar_invisible' | 'bar_thick_thin' | 'bar_thin_thin' | 'bar_thin' | 'bar_thin_thick';
|
|
682
701
|
barNumber?: number;
|
|
683
702
|
chord?: Array<ChordProperties>;
|
|
684
703
|
decoration: Array<Decorations>;
|
|
@@ -829,6 +848,7 @@ declare module 'abcjs' {
|
|
|
829
848
|
setTiming: (bpm?: number, measuresOfDelay? : number) => void;
|
|
830
849
|
setUpAudio: (options: SynthOptions) => AudioTracks;
|
|
831
850
|
makeVoicesArray: () => Array<Selectable[]>
|
|
851
|
+
deline: () => Array<TuneLine>;
|
|
832
852
|
lineBreaks?: Array<number>;
|
|
833
853
|
visualTranspose?: number;
|
|
834
854
|
}
|
|
@@ -913,22 +933,6 @@ declare module 'abcjs' {
|
|
|
913
933
|
endTimings: Array<LineEndInfo>;
|
|
914
934
|
}
|
|
915
935
|
|
|
916
|
-
export interface TimingEvent {
|
|
917
|
-
type: "event";
|
|
918
|
-
milliseconds: number;
|
|
919
|
-
millisecondsPerMeasure: number;
|
|
920
|
-
line: number;
|
|
921
|
-
measureNumber: number;
|
|
922
|
-
top: number;
|
|
923
|
-
height: number;
|
|
924
|
-
left: number;
|
|
925
|
-
width: number;
|
|
926
|
-
elements: Array< HTMLElement>;
|
|
927
|
-
startCharArray: Array<number>;
|
|
928
|
-
endCharArray: Array<number>;
|
|
929
|
-
midiPitches: MidiPitches
|
|
930
|
-
}
|
|
931
|
-
|
|
932
936
|
export interface TimingCallbacksPosition {
|
|
933
937
|
top: number;
|
|
934
938
|
left: number;
|
|
@@ -1068,9 +1072,11 @@ declare module 'abcjs' {
|
|
|
1068
1072
|
// TimingCallbacks
|
|
1069
1073
|
export type BeatCallback = (beatNumber: number, totalBeats: number, totalTime: number, position: TimingCallbacksPosition, debugInfo: TimingCallbacksDebug) => void;
|
|
1070
1074
|
|
|
1071
|
-
|
|
1075
|
+
type EventCallbackReturn = "continue" | Promise<"continue"> | undefined
|
|
1076
|
+
|
|
1077
|
+
export type EventCallback = (event: NoteTimingEvent | null) => EventCallbackReturn;
|
|
1072
1078
|
|
|
1073
|
-
export type LineEndCallback = (info : LineEndInfo, event:
|
|
1079
|
+
export type LineEndCallback = (info : LineEndInfo, event: NoteTimingEvent, details: LineEndDetails) => void;
|
|
1074
1080
|
|
|
1075
1081
|
// Editor
|
|
1076
1082
|
export type OnChange = (editor: Editor) => void;
|
|
@@ -1125,6 +1131,7 @@ declare module 'abcjs' {
|
|
|
1125
1131
|
pause(shouldPause: boolean): void;
|
|
1126
1132
|
millisecondsPerMeasure(): number;
|
|
1127
1133
|
pauseMidi(shouldPause: boolean): void;
|
|
1134
|
+
fireChanged():void;
|
|
1128
1135
|
}
|
|
1129
1136
|
|
|
1130
1137
|
//
|
|
@@ -1149,6 +1156,7 @@ declare module 'abcjs' {
|
|
|
1149
1156
|
seek(position: number, units?: ProgressUnit): void
|
|
1150
1157
|
stop(): number
|
|
1151
1158
|
download(): string // returns audio buffer in wav format as a reference to a blob
|
|
1159
|
+
getIsRunning(): boolean
|
|
1152
1160
|
}
|
|
1153
1161
|
|
|
1154
1162
|
export interface SynthInitResponse {
|
|
@@ -1192,7 +1200,7 @@ declare module 'abcjs' {
|
|
|
1192
1200
|
export function activeAudioContext(): AudioContext
|
|
1193
1201
|
export function CreateSynthControl(element: Selector, options: AbcVisualParams): AudioControl
|
|
1194
1202
|
export function getMidiFile(source: string | TuneObject, options?: MidiFileOptions): MidiFile;
|
|
1195
|
-
export function playEvent(pitches: MidiPitches, graceNotes: MidiGracePitches | undefined, milliSecondsPerMeasure: number): Promise<void>;
|
|
1203
|
+
export function playEvent(pitches: MidiPitches, graceNotes: MidiGracePitches | undefined, milliSecondsPerMeasure: number, soundFontUrl? : string, debugCallback?: (message: string) => void): Promise<void>;
|
|
1196
1204
|
export function sequence(visualObj: TuneObject, options: AbcVisualParams): AudioSequence
|
|
1197
1205
|
}
|
|
1198
1206
|
|
package/version.js
CHANGED