tja-parser 0.1.0 → 0.1.2
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/dist/class/Bar.d.ts +25 -0
- package/dist/class/Bar.d.ts.map +1 -0
- package/dist/class/Bar.js +96 -0
- package/dist/class/Bar.js.map +1 -0
- package/dist/class/BarLine.d.ts +14 -0
- package/dist/class/BarLine.d.ts.map +1 -0
- package/dist/class/BarLine.js +26 -0
- package/dist/class/BarLine.js.map +1 -0
- package/dist/class/Branch.d.ts +27 -0
- package/dist/class/Branch.d.ts.map +1 -0
- package/dist/class/Branch.js +38 -0
- package/dist/class/Branch.js.map +1 -0
- package/dist/class/Command.d.ts +65 -0
- package/dist/class/Command.d.ts.map +1 -0
- package/dist/class/Command.js +172 -0
- package/dist/class/Command.js.map +1 -0
- package/dist/class/Course.d.ts +47 -0
- package/dist/class/Course.d.ts.map +1 -0
- package/dist/class/Course.js +396 -0
- package/dist/class/Course.js.map +1 -0
- package/dist/class/Item.d.ts +12 -0
- package/dist/class/Item.d.ts.map +1 -0
- package/dist/class/Item.js +59 -0
- package/dist/class/Item.js.map +1 -0
- package/dist/class/Note.d.ts +88 -0
- package/dist/class/Note.d.ts.map +1 -0
- package/dist/class/Note.js +188 -0
- package/dist/class/Note.js.map +1 -0
- package/dist/class/Song.d.ts +31 -0
- package/dist/class/Song.d.ts.map +1 -0
- package/dist/class/Song.js +72 -0
- package/dist/class/Song.js.map +1 -0
- package/dist/exception/ParseException.d.ts +12 -0
- package/dist/exception/ParseException.d.ts.map +1 -0
- package/dist/exception/ParseException.js +26 -0
- package/dist/exception/ParseException.js.map +1 -0
- package/dist/exception/TjaException.d.ts +3 -0
- package/dist/exception/TjaException.d.ts.map +1 -0
- package/dist/exception/TjaException.js +8 -0
- package/dist/exception/TjaException.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +26 -0
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/package.json +2 -1
- package/src/index.ts +9 -1
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.Course = void 0;
|
|
37
|
+
const ParseException_js_1 = require("../exception/ParseException.js");
|
|
38
|
+
const Bar_js_1 = require("./Bar.js");
|
|
39
|
+
const BarLine_js_1 = require("./BarLine.js");
|
|
40
|
+
const Branch_js_1 = require("./Branch.js");
|
|
41
|
+
const Command_js_1 = require("./Command.js");
|
|
42
|
+
const Note_js_1 = require("./Note.js");
|
|
43
|
+
const Song_js_1 = require("./Song.js");
|
|
44
|
+
const math = __importStar(require("mathjs"));
|
|
45
|
+
class Course {
|
|
46
|
+
static parse(courseTja, song) {
|
|
47
|
+
if (typeof (courseTja) === "string") {
|
|
48
|
+
courseTja = courseTja.split('\n');
|
|
49
|
+
}
|
|
50
|
+
const metadata = new Course.Metadata();
|
|
51
|
+
let difficulty;
|
|
52
|
+
let i = 0;
|
|
53
|
+
for (; i < courseTja.length; i++) {
|
|
54
|
+
if (courseTja[i].startsWith('#START')) {
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
const parsedMetadata = Song_js_1.Song.parseMetadata(courseTja[i]);
|
|
58
|
+
if (parsedMetadata.key === "course") {
|
|
59
|
+
if (parsedMetadata.value === "0" || parsedMetadata.value === "Easy") {
|
|
60
|
+
difficulty = 'easy';
|
|
61
|
+
}
|
|
62
|
+
else if (parsedMetadata.value === "1" || parsedMetadata.value === "Normal") {
|
|
63
|
+
difficulty = 'normal';
|
|
64
|
+
}
|
|
65
|
+
else if (parsedMetadata.value === "2" || parsedMetadata.value === "Hard") {
|
|
66
|
+
difficulty = 'hard';
|
|
67
|
+
}
|
|
68
|
+
else if (parsedMetadata.value === "3" || parsedMetadata.value === "Oni") {
|
|
69
|
+
difficulty = 'oni';
|
|
70
|
+
}
|
|
71
|
+
else if (parsedMetadata.value === "4" || parsedMetadata.value === "Edit") {
|
|
72
|
+
difficulty = 'edit';
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
metadata[parsedMetadata.key] = parsedMetadata.value;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
if (!difficulty) {
|
|
80
|
+
throw new ParseException_js_1.UnknownCourseDifficultyException(courseTja[0]);
|
|
81
|
+
}
|
|
82
|
+
const course = new Course(difficulty, metadata, song);
|
|
83
|
+
course.pushBar(...this.parseBar(courseTja.slice(i), course.getBalloonIterator(), course.getBPM()));
|
|
84
|
+
return course;
|
|
85
|
+
}
|
|
86
|
+
static parseBar(lines, getNextBalloon, bpmInit) {
|
|
87
|
+
const lineGroups = this.groupLines(lines);
|
|
88
|
+
return this.convertLineGroupToBar(lineGroups, getNextBalloon, bpmInit).bars;
|
|
89
|
+
}
|
|
90
|
+
static groupLines(lines) {
|
|
91
|
+
const LineGroup = Course.LineGroup;
|
|
92
|
+
const BranchedLineGroup = Course.BranchedLineGroup;
|
|
93
|
+
const bars = [];
|
|
94
|
+
let currentBar = null;
|
|
95
|
+
let currentBranchedLineGroup = null;
|
|
96
|
+
let currentCourse = null;
|
|
97
|
+
for (const line of lines) {
|
|
98
|
+
if (line === "#START")
|
|
99
|
+
continue;
|
|
100
|
+
if (line === "#END")
|
|
101
|
+
break;
|
|
102
|
+
if (line.startsWith("#BRANCHSTART")) {
|
|
103
|
+
const branchRawDatas = line.replaceAll('#BRANCHSTART', '').split(',').map(e => e.trim());
|
|
104
|
+
const type = branchRawDatas[0] === "r" ? Branch_js_1.Branch.Type.ROLL : Branch_js_1.Branch.Type.ACCURACY;
|
|
105
|
+
const criteria = [Number(branchRawDatas[1]) || 0, Number(branchRawDatas[2]) || 0];
|
|
106
|
+
currentCourse = null;
|
|
107
|
+
currentBranchedLineGroup = new BranchedLineGroup(type, criteria);
|
|
108
|
+
currentBar = new LineGroup();
|
|
109
|
+
bars.push(currentBranchedLineGroup);
|
|
110
|
+
}
|
|
111
|
+
else if (line === "#BRANCHEND") {
|
|
112
|
+
currentCourse = null;
|
|
113
|
+
currentBar = new LineGroup();
|
|
114
|
+
bars.push(currentBar);
|
|
115
|
+
}
|
|
116
|
+
else if (line === "#N") {
|
|
117
|
+
currentCourse = "normal";
|
|
118
|
+
currentBar = new LineGroup();
|
|
119
|
+
currentBranchedLineGroup?.addNormal(currentBar);
|
|
120
|
+
}
|
|
121
|
+
else if (line === "#E") {
|
|
122
|
+
currentCourse = 'advanced';
|
|
123
|
+
currentBar = new LineGroup();
|
|
124
|
+
currentBranchedLineGroup?.addAdvanced(currentBar);
|
|
125
|
+
}
|
|
126
|
+
else if (line === "#M") {
|
|
127
|
+
currentCourse = 'master';
|
|
128
|
+
currentBar = new LineGroup();
|
|
129
|
+
currentBranchedLineGroup?.addMaster(currentBar);
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
if (!currentBar) {
|
|
133
|
+
currentBar = new LineGroup();
|
|
134
|
+
bars.push(currentBar);
|
|
135
|
+
}
|
|
136
|
+
currentBar.add(line);
|
|
137
|
+
if (line.endsWith(',')) {
|
|
138
|
+
if (!currentCourse) {
|
|
139
|
+
currentBar = new LineGroup();
|
|
140
|
+
bars.push(currentBar);
|
|
141
|
+
}
|
|
142
|
+
else if (currentCourse === "normal") {
|
|
143
|
+
currentBar = new LineGroup();
|
|
144
|
+
currentBranchedLineGroup?.addNormal(currentBar);
|
|
145
|
+
}
|
|
146
|
+
else if (currentCourse === "advanced") {
|
|
147
|
+
currentBar = new LineGroup();
|
|
148
|
+
currentBranchedLineGroup?.addAdvanced(currentBar);
|
|
149
|
+
}
|
|
150
|
+
else if (currentCourse === "master") {
|
|
151
|
+
currentBar = new LineGroup();
|
|
152
|
+
currentBranchedLineGroup?.addMaster(currentBar);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
return bars;
|
|
158
|
+
}
|
|
159
|
+
static convertLineGroupToBar(lineGroups, getNextBalloon, currentBPM, currentTiming = math.fraction(0), currentMeasure = math.fraction(1), currentScroll = 1, barlineHidden = false) {
|
|
160
|
+
function getBarLength() {
|
|
161
|
+
return math.fraction(math.divide(math.multiply(1000, 240, currentMeasure), math.fraction(currentBPM)));
|
|
162
|
+
}
|
|
163
|
+
const bars = [];
|
|
164
|
+
for (const lineGroup of lineGroups) {
|
|
165
|
+
if (lineGroup instanceof Course.LineGroup) {
|
|
166
|
+
if (lineGroup.lines.length === 0)
|
|
167
|
+
continue;
|
|
168
|
+
let barlinePushed = false;
|
|
169
|
+
let barLength = 0;
|
|
170
|
+
let items = [];
|
|
171
|
+
for (const line of lineGroup.lines) {
|
|
172
|
+
if (line.startsWith('#')) {
|
|
173
|
+
const command = Command_js_1.Command.parse(line);
|
|
174
|
+
if (command)
|
|
175
|
+
items.push(command);
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
if (!barlinePushed) {
|
|
179
|
+
items.push(new BarLine_js_1.BarLine(math.fraction(0)));
|
|
180
|
+
barlinePushed = true;
|
|
181
|
+
}
|
|
182
|
+
for (const char of line) {
|
|
183
|
+
if (char === ',')
|
|
184
|
+
break;
|
|
185
|
+
const note = Note_js_1.Note.parse(char);
|
|
186
|
+
if (note) {
|
|
187
|
+
items.push(note);
|
|
188
|
+
barLength++;
|
|
189
|
+
}
|
|
190
|
+
;
|
|
191
|
+
if (note instanceof Note_js_1.BalloonNote) {
|
|
192
|
+
note.setCount(getNextBalloon());
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
const bar = new Bar_js_1.Bar(math.fraction(currentTiming), math.fraction(currentTiming));
|
|
198
|
+
bar.setBarLength(barLength);
|
|
199
|
+
if (barLength === 0) {
|
|
200
|
+
items.forEach((item) => {
|
|
201
|
+
item.setTiming(currentTiming);
|
|
202
|
+
});
|
|
203
|
+
currentTiming = math.add(currentTiming, getBarLength());
|
|
204
|
+
bar.setEnd(currentTiming);
|
|
205
|
+
}
|
|
206
|
+
else {
|
|
207
|
+
const notes = [];
|
|
208
|
+
items.forEach((item) => {
|
|
209
|
+
item.setTiming(currentTiming);
|
|
210
|
+
if (item instanceof Note_js_1.Note) {
|
|
211
|
+
const delay = math.fraction(math.divide(getBarLength(), barLength));
|
|
212
|
+
item.setDelay(delay);
|
|
213
|
+
item.setBpm(currentBPM);
|
|
214
|
+
item.setScroll(currentScroll);
|
|
215
|
+
currentTiming = math.add(currentTiming, delay);
|
|
216
|
+
notes.push(item);
|
|
217
|
+
}
|
|
218
|
+
else if (item instanceof Command_js_1.Command) {
|
|
219
|
+
if (item instanceof Command_js_1.MeasureCommand) {
|
|
220
|
+
currentMeasure = math.fraction(item.value);
|
|
221
|
+
}
|
|
222
|
+
else if (item instanceof Command_js_1.BPMChangeCommand) {
|
|
223
|
+
currentBPM = item.value;
|
|
224
|
+
}
|
|
225
|
+
else if (item instanceof Command_js_1.ScrollCommand) {
|
|
226
|
+
currentScroll = item.value;
|
|
227
|
+
}
|
|
228
|
+
else if (item instanceof Command_js_1.BarlineCommand) {
|
|
229
|
+
barlineHidden = item.getHide();
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
else if (item instanceof BarLine_js_1.BarLine) {
|
|
233
|
+
if (barlineHidden) {
|
|
234
|
+
item.hide();
|
|
235
|
+
}
|
|
236
|
+
else {
|
|
237
|
+
item.show();
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
bar.setEnd(currentTiming);
|
|
242
|
+
let rollEnd = null;
|
|
243
|
+
let delaySum = math.fraction(0);
|
|
244
|
+
let lengthSum = 1;
|
|
245
|
+
for (let i = notes.length - 1; i >= 0; i--) {
|
|
246
|
+
const note = notes[i];
|
|
247
|
+
if (note instanceof Note_js_1.EmptyNote) {
|
|
248
|
+
delaySum = math.add(delaySum, note.getDelay());
|
|
249
|
+
lengthSum++;
|
|
250
|
+
}
|
|
251
|
+
else if (note instanceof Note_js_1.RollEndNote) {
|
|
252
|
+
delaySum = math.add(delaySum, note.getDelay());
|
|
253
|
+
rollEnd = note.getTiming();
|
|
254
|
+
lengthSum++;
|
|
255
|
+
}
|
|
256
|
+
else if (note instanceof Note_js_1.HitNote) {
|
|
257
|
+
note.setDelay(math.add(delaySum, note.getDelay()));
|
|
258
|
+
note.setNoteLength(lengthSum);
|
|
259
|
+
delaySum = math.fraction(0);
|
|
260
|
+
lengthSum = 1;
|
|
261
|
+
}
|
|
262
|
+
else if (note instanceof Note_js_1.RollNote || note instanceof Note_js_1.BalloonNote) {
|
|
263
|
+
note.setDelay(math.add(delaySum, note.getDelay()));
|
|
264
|
+
note.setNoteLength(lengthSum);
|
|
265
|
+
delaySum = math.fraction(0);
|
|
266
|
+
lengthSum = 1;
|
|
267
|
+
note.end = rollEnd ? rollEnd : note.getTiming();
|
|
268
|
+
rollEnd = null;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
items = items.filter((item) => {
|
|
272
|
+
if (item instanceof Note_js_1.EmptyNote || item instanceof Note_js_1.RollEndNote) {
|
|
273
|
+
return false;
|
|
274
|
+
}
|
|
275
|
+
return true;
|
|
276
|
+
});
|
|
277
|
+
bar.pushItem(...items);
|
|
278
|
+
}
|
|
279
|
+
bars.push(bar);
|
|
280
|
+
}
|
|
281
|
+
else {
|
|
282
|
+
const branch = new Branch_js_1.Branch(lineGroup.type, lineGroup.criteria, math.fraction(currentTiming), math.fraction(currentTiming));
|
|
283
|
+
let result;
|
|
284
|
+
if (lineGroup.normal) {
|
|
285
|
+
result = this.convertLineGroupToBar(lineGroup.normal, getNextBalloon, currentBPM, currentTiming, currentMeasure, currentScroll, barlineHidden);
|
|
286
|
+
branch.normal = result.bars;
|
|
287
|
+
}
|
|
288
|
+
if (lineGroup.advanced) {
|
|
289
|
+
result = this.convertLineGroupToBar(lineGroup.advanced, getNextBalloon, currentBPM, currentTiming, currentMeasure, currentScroll, barlineHidden);
|
|
290
|
+
branch.advanced = result.bars;
|
|
291
|
+
}
|
|
292
|
+
if (lineGroup.master) {
|
|
293
|
+
result = this.convertLineGroupToBar(lineGroup.master, getNextBalloon, currentBPM, currentTiming, currentMeasure, currentScroll, barlineHidden);
|
|
294
|
+
branch.master = result.bars;
|
|
295
|
+
}
|
|
296
|
+
if (result) {
|
|
297
|
+
currentBPM = result.currentBPM;
|
|
298
|
+
currentTiming = result.currentTiming;
|
|
299
|
+
currentMeasure = result.currentMeasure;
|
|
300
|
+
barlineHidden = result.barlineHidden;
|
|
301
|
+
branch.setEnd(result.currentTiming);
|
|
302
|
+
}
|
|
303
|
+
bars.push(branch);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
return {
|
|
307
|
+
bars,
|
|
308
|
+
getNextBalloon,
|
|
309
|
+
currentBPM,
|
|
310
|
+
currentTiming,
|
|
311
|
+
currentMeasure,
|
|
312
|
+
currentScroll,
|
|
313
|
+
barlineHidden
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
difficulty;
|
|
317
|
+
metadata;
|
|
318
|
+
bars = [];
|
|
319
|
+
song;
|
|
320
|
+
constructor(difficulty, metadata, song) {
|
|
321
|
+
this.difficulty = difficulty;
|
|
322
|
+
this.metadata = metadata;
|
|
323
|
+
this.song = song;
|
|
324
|
+
}
|
|
325
|
+
getBPM() {
|
|
326
|
+
return this.song?.getBPM() || 160;
|
|
327
|
+
}
|
|
328
|
+
getLevel() {
|
|
329
|
+
return Number(this.metadata.level) || 1;
|
|
330
|
+
}
|
|
331
|
+
pushBar(...bars) {
|
|
332
|
+
this.bars.push(...bars);
|
|
333
|
+
}
|
|
334
|
+
getBalloon() {
|
|
335
|
+
return (this.metadata.balloon ?? '').split(',').map((e) => Number(e));
|
|
336
|
+
}
|
|
337
|
+
getBalloonIterator() {
|
|
338
|
+
let index = 0;
|
|
339
|
+
const balloons = this.getBalloon();
|
|
340
|
+
function getNext() {
|
|
341
|
+
const balloon = balloons[index];
|
|
342
|
+
index++;
|
|
343
|
+
return balloon;
|
|
344
|
+
}
|
|
345
|
+
return getNext;
|
|
346
|
+
}
|
|
347
|
+
toJSON() {
|
|
348
|
+
return {
|
|
349
|
+
metadata: this.metadata,
|
|
350
|
+
difficulty: this.difficulty,
|
|
351
|
+
bars: this.bars
|
|
352
|
+
};
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
exports.Course = Course;
|
|
356
|
+
(function (Course) {
|
|
357
|
+
class Metadata {
|
|
358
|
+
level;
|
|
359
|
+
}
|
|
360
|
+
Course.Metadata = Metadata;
|
|
361
|
+
class LineGroup {
|
|
362
|
+
lines = [];
|
|
363
|
+
add(line) {
|
|
364
|
+
this.lines.push(line);
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
Course.LineGroup = LineGroup;
|
|
368
|
+
class BranchedLineGroup {
|
|
369
|
+
type;
|
|
370
|
+
criteria;
|
|
371
|
+
normal;
|
|
372
|
+
advanced;
|
|
373
|
+
master;
|
|
374
|
+
constructor(type, criteria) {
|
|
375
|
+
this.type = type;
|
|
376
|
+
this.criteria = criteria;
|
|
377
|
+
}
|
|
378
|
+
addNormal(lineGroup) {
|
|
379
|
+
if (!this.normal)
|
|
380
|
+
this.normal = [];
|
|
381
|
+
this.normal.push(lineGroup);
|
|
382
|
+
}
|
|
383
|
+
addAdvanced(lineGroup) {
|
|
384
|
+
if (!this.advanced)
|
|
385
|
+
this.advanced = [];
|
|
386
|
+
this.advanced.push(lineGroup);
|
|
387
|
+
}
|
|
388
|
+
addMaster(lineGroup) {
|
|
389
|
+
if (!this.master)
|
|
390
|
+
this.master = [];
|
|
391
|
+
this.master.push(lineGroup);
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
Course.BranchedLineGroup = BranchedLineGroup;
|
|
395
|
+
})(Course || (exports.Course = Course = {}));
|
|
396
|
+
//# sourceMappingURL=Course.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Course.js","sourceRoot":"","sources":["../../src/class/Course.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sEAA0G;AAE1G,qCAA+B;AAC/B,6CAAuC;AACvC,2CAAqC;AACrC,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AiB,EAAE,QAA0B;YACrD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;YACjB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAC7B,CAAC;QAED,SAAS,CAAC,SAAoB;YAC1B,IAAI,CAAC,IAAI,CAAC,MAAM;gBAAE,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;YACnC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAChC,CAAC;QACD,WAAW,CAAC,SAAoB;YAC5B,IAAI,CAAC,IAAI,CAAC,QAAQ;gBAAE,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;YACvC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAClC,CAAC;QACD,SAAS,CAAC,SAAoB;YAC1B,IAAI,CAAC,IAAI,CAAC,MAAM;gBAAE,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;YACnC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAChC,CAAC;KACJ;IAxBY,wBAAiB,oBAwB7B,CAAA;AACL,CAAC,EArCgB,MAAM,sBAAN,MAAM,QAqCtB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as math from 'mathjs';
|
|
2
|
+
export declare class Item {
|
|
3
|
+
private timing;
|
|
4
|
+
constructor(timing: math.Fraction);
|
|
5
|
+
setTiming(timing: math.Fraction): void;
|
|
6
|
+
getTiming(): math.Fraction;
|
|
7
|
+
getTimingMS(): number;
|
|
8
|
+
toJSON(): {
|
|
9
|
+
timing: number;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=Item.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Item.d.ts","sourceRoot":"","sources":["../../src/class/Item.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAE/B,qBAAa,IAAI;IACb,OAAO,CAAC,MAAM,CAAgB;gBAElB,MAAM,EAAE,IAAI,CAAC,QAAQ;IAIjC,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ;IAI/B,SAAS;IAIT,WAAW;IAIX,MAAM;;;CAKT"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.Item = void 0;
|
|
37
|
+
const math = __importStar(require("mathjs"));
|
|
38
|
+
class Item {
|
|
39
|
+
timing;
|
|
40
|
+
constructor(timing) {
|
|
41
|
+
this.timing = timing;
|
|
42
|
+
}
|
|
43
|
+
setTiming(timing) {
|
|
44
|
+
this.timing = math.fraction(timing);
|
|
45
|
+
}
|
|
46
|
+
getTiming() {
|
|
47
|
+
return math.fraction(this.timing);
|
|
48
|
+
}
|
|
49
|
+
getTimingMS() {
|
|
50
|
+
return this.timing.valueOf();
|
|
51
|
+
}
|
|
52
|
+
toJSON() {
|
|
53
|
+
return {
|
|
54
|
+
timing: this.getTimingMS()
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.Item = Item;
|
|
59
|
+
//# sourceMappingURL=Item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Item.js","sourceRoot":"","sources":["../../src/class/Item.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAE/B,MAAa,IAAI;IACL,MAAM,CAAgB;IAE9B,YAAY,MAAqB;QAC7B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;IAED,SAAS,CAAC,MAAqB;QAC3B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IACxC,CAAC;IAED,SAAS;QACL,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACtC,CAAC;IAED,WAAW;QACP,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;IACjC,CAAC;IAED,MAAM;QACF,OAAO;YACH,MAAM,EAAE,IAAI,CAAC,WAAW,EAAE;SAC7B,CAAA;IACL,CAAC;CACJ;AAxBD,oBAwBC"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { Item } from "./Item.js";
|
|
2
|
+
import * as math from 'mathjs';
|
|
3
|
+
export declare abstract class Note extends Item {
|
|
4
|
+
static parse(char: string): Note | null;
|
|
5
|
+
protected type: Note.Type;
|
|
6
|
+
private delay;
|
|
7
|
+
private scroll;
|
|
8
|
+
private bpm;
|
|
9
|
+
private noteLength;
|
|
10
|
+
constructor(type: Note.Type, timing: math.Fraction, delay: math.Fraction);
|
|
11
|
+
getScroll(): number;
|
|
12
|
+
setScroll(scroll: number): void;
|
|
13
|
+
getBPM(): number;
|
|
14
|
+
setBpm(bpm: number): void;
|
|
15
|
+
getDelay(): math.Fraction;
|
|
16
|
+
setDelay(delay: math.Fraction): void;
|
|
17
|
+
getNoteLength(): number;
|
|
18
|
+
setNoteLength(noteLength: number): void;
|
|
19
|
+
toJSON(): {
|
|
20
|
+
type: Note.Type;
|
|
21
|
+
delay: number;
|
|
22
|
+
scroll: number;
|
|
23
|
+
bpm: number;
|
|
24
|
+
noteLength: number;
|
|
25
|
+
timing: number;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export declare namespace Note {
|
|
29
|
+
enum Type {
|
|
30
|
+
EMPTY = 0,
|
|
31
|
+
DON_SMALL = 1,
|
|
32
|
+
KA_SMALL = 2,
|
|
33
|
+
DON_BIG = 3,
|
|
34
|
+
KA_BIG = 4,
|
|
35
|
+
ROLL_SMALL = 5,
|
|
36
|
+
ROLL_BIG = 6,
|
|
37
|
+
BALLOON = 7,
|
|
38
|
+
ROLL_END = 8
|
|
39
|
+
}
|
|
40
|
+
type HitType = Type.DON_SMALL | Type.KA_SMALL | Type.DON_BIG | Type.KA_BIG;
|
|
41
|
+
type RollType = Type.ROLL_SMALL | Type.ROLL_BIG | Type.BALLOON;
|
|
42
|
+
}
|
|
43
|
+
export declare class HitNote extends Note {
|
|
44
|
+
type: Note.HitType;
|
|
45
|
+
constructor(type: Note.HitType, timing: math.Fraction, delay: math.Fraction);
|
|
46
|
+
}
|
|
47
|
+
export declare class RollNote extends Note {
|
|
48
|
+
type: Note.RollType;
|
|
49
|
+
end: math.Fraction;
|
|
50
|
+
constructor(type: Note.RollType, timing: math.Fraction, end: math.Fraction, delay: math.Fraction);
|
|
51
|
+
getEnd(): math.Fraction;
|
|
52
|
+
setEnd(end: math.Fraction): void;
|
|
53
|
+
toJSON(): {
|
|
54
|
+
end: number;
|
|
55
|
+
type: Note.Type;
|
|
56
|
+
delay: number;
|
|
57
|
+
scroll: number;
|
|
58
|
+
bpm: number;
|
|
59
|
+
noteLength: number;
|
|
60
|
+
timing: number;
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
export declare class BalloonNote extends RollNote {
|
|
64
|
+
type: Note.Type.BALLOON;
|
|
65
|
+
private count;
|
|
66
|
+
constructor(count: number, timing: math.Fraction, end: math.Fraction, delay: math.Fraction);
|
|
67
|
+
getCount(): number;
|
|
68
|
+
setCount(count: number): void;
|
|
69
|
+
toJSON(): {
|
|
70
|
+
count: number;
|
|
71
|
+
end: number;
|
|
72
|
+
type: Note.Type;
|
|
73
|
+
delay: number;
|
|
74
|
+
scroll: number;
|
|
75
|
+
bpm: number;
|
|
76
|
+
noteLength: number;
|
|
77
|
+
timing: number;
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
export declare class EmptyNote extends Note {
|
|
81
|
+
type: Note.Type.EMPTY;
|
|
82
|
+
constructor(type: Note.Type.EMPTY, timing: math.Fraction, delay: math.Fraction);
|
|
83
|
+
}
|
|
84
|
+
export declare class RollEndNote extends Note {
|
|
85
|
+
type: Note.Type.ROLL_END;
|
|
86
|
+
constructor(timing: math.Fraction, delay: math.Fraction);
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=Note.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Note.d.ts","sourceRoot":"","sources":["../../src/class/Note.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,I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