Skip to content

Commit a489bd2

Browse files
authored
feat: Add SoundFont3 support with dynamic sample decoding (#1807)
1 parent e7e6e37 commit a489bd2

File tree

100 files changed

+6635
-2588
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+6635
-2588
lines changed

LICENSE

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
alphaTab is licensed under MPL-2.0.
2+
Copyright © 2025, Daniel Kuschny and Contributors, All rights reserved.
3+
4+
See LICENSE.header for further licenses of integrated submodules.
5+
16
Mozilla Public License Version 2.0
27
==================================
38

LICENSE.header

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,40 @@ This Source Code Form is subject to the terms of the Mozilla Public
66
License, v. 2.0. If a copy of the MPL was not distributed with this
77
file, You can obtain one at http://mozilla.org/MPL/2.0/.
88

9-
SoundFont loading and Audio Synthesis based on TinySoundFont (licensed under MIT)
10-
Copyright (C) 2017, 2018 Bernhard Schelling (https://github.com/schellingb/TinySoundFont)
9+
Integrated Libraries:
1110

12-
TinySoundFont is based on SFZero (licensed under MIT)
13-
Copyright (C) 2012 Steve Folta (https://github.com/stevefolta/SFZero)
11+
Library: TinySoundFont
12+
License: MIT
13+
Copyright: Copyright (C) 2017, 2018 Bernhard Schelling
14+
URL: https://github.com/schellingb/TinySoundFont
15+
Purpose: SoundFont loading and Audio Synthesis
16+
17+
Library: SFZero
18+
License: MIT
19+
Copyright: Copyright (C) 2012 Steve Folta ()
20+
URL: https://github.com/stevefolta/SFZero
21+
Purpose: TinySoundFont is based on SFZEro
22+
23+
Library: Haxe Standard Library
24+
License: MIT
25+
Copyright: Copyright (C)2005-2025 Haxe Foundation
26+
URL: https://github.com/HaxeFoundation/haxe/tree/development/std
27+
Purpose: XML Parser & Zip Inflate Algorithm
28+
29+
Library: SharpZipLib
30+
License: MIT
31+
Copyright: Copyright © 2000-2018 SharpZipLib Contributors
32+
URL: https://github.com/icsharpcode/SharpZipLib
33+
Purpose: Zip Deflate Algorithm for writing compressed Zips
34+
35+
Library: NVorbis
36+
License: MIT
37+
Copyright: Copyright (c) 2020 Andrew Ward
38+
URL: https://github.com/NVorbis/NVorbis
39+
Purpose: Vorbis Stream Decoding
40+
41+
Library: libvorbis
42+
License: BSD-3-Clause
43+
Copyright: Copyright (c) 2002-2020 Xiph.org Foundation
44+
URL: https://github.com/xiph/vorbis
45+
Purpose: NVorbis adopted some code from libvorbis.

font/sonivox/README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1-
SONiVOX EAS Version 2.00 Editing Software: Synthfont Viena
2-
Ported from Samsung GT-E1272 and Android Soundfont of SONiVOX EAS Full Presets and Full Keys Range (no reverb). Frequency 11khz - 32khz
3-
Using a Creative Sound Blaster GM bank. Using a Software Creative Vienna Soundfont Studio. Copy a Soundfont wt22khz.sf2 from in Floppy Disk 1.44MB Assembled of Indonesia.
4-
Sonivox Corporation Tokyo Japan.
5-
Copyright 1993 Sonivox Corporation
1+
SONiVOX EAS Version 2.10 Editing Software: Synthfont Viena
62

7-
https://musical-artifacts.com/artifacts/824
3+
Ported from Samsung GT-E1272, SM-B109E, SM-B310E, Spreadtrum, and Android Soundfont of SONiVOX EAS Full Presets and Full Keys Range (no reverb). Frequency 11khz - 32khz
4+
Using a Creative Sound Blaster GM bank. Using a Software Creative Vienna Soundfont Studio. Copy a Soundfont wt210k_G.sf2 from in 3.5 Floppy Disk 1.44MB Assembled of Indonesia.
85

6+
Recommended Synthesizer: CoolSoft VirtualMIDISynth and BASSMIDI Driver.
7+
8+
Windows OS Update 2021
9+
Microsoft Community https://answers.microsoft.com/
10+
English: SONiVOX Sound That Rocks Japanese: SONiVOX 揺れる音
11+
Available in country: Hong Kong Taiwan Japan
12+
Powered by BASSMIDI Copyright 1993 Sonic Network, Inc. All Rights Reserved Sonivox Corporation Tokyo Japan. Made in Japan
13+
14+
https://musical-artifacts.com/artifacts/1517
915

1016
This soundfont is based on the Sonivox EAS synthesizer, Copyright Sonic Network Inc. 2006.
1117
Sonivox EAS belongs to the Android Open Source Project.

font/sonivox/sonivox.sf2

60.6 KB
Binary file not shown.

font/sonivox/sonivox.sf3

954 KB
Binary file not shown.

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
"terser": "^5.34.1",
9999
"tslib": "^2.7.0",
100100
"tsx": "^4.19.1",
101-
"typescript": "^5.6.3",
101+
"typescript": "^5.7.2",
102102
"vite": "^5.4.8",
103103
"webpack": "^5.95.0",
104104
"webpack-cli": "^6.0.1"
@@ -111,6 +111,7 @@
111111
"/dist/font/Bravura*.txt",
112112
"/dist/font/*.txt",
113113
"/dist/soundfont/*",
114+
"LICENSE",
114115
"LICENSE.header"
115116
],
116117
"dependencies": {

src.compiler/AstPrinterBase.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -494,9 +494,9 @@ export default abstract class AstPrinterBase {
494494
if (cs.isBlock(s.statement)) {
495495
this.writeStatement(s.statement);
496496
} else {
497-
this._indent++;
497+
this.beginBlock();
498498
this.writeStatement(s.statement);
499-
this._indent--;
499+
this.endBlock();
500500
}
501501
}
502502

@@ -516,9 +516,9 @@ export default abstract class AstPrinterBase {
516516
if (cs.isBlock(s.thenStatement)) {
517517
this.writeStatement(s.thenStatement);
518518
} else {
519-
this._indent++;
519+
this.beginBlock();
520520
this.writeStatement(s.thenStatement);
521-
this._indent--;
521+
this.endBlock();
522522
}
523523

524524
if (s.elseStatement) {
@@ -530,9 +530,9 @@ export default abstract class AstPrinterBase {
530530
this.writeStatement(s.elseStatement);
531531
} else {
532532
this.writeLine();
533-
this._indent++;
533+
this.beginBlock();
534534
this.writeStatement(s.elseStatement);
535-
this._indent--;
535+
this.endBlock();
536536
}
537537
}
538538
}

src.compiler/TranspilerBase.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ interface Emitter {
2424
}
2525

2626
export default function (emitters: Emitter[], handleErrors: boolean = false) {
27-
console.log('Parsing...');
27+
console.log(`Parsing using typescript ${ts.version}...`);
2828
const commandLine = ts.parseCommandLine(ts.sys.args);
2929
if (!commandLine.options.project) {
3030
commandLine.options.project = 'tsconfig.json';

src.compiler/csharp/CSharpAst.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,8 @@ export enum PrimitiveType {
272272
Void,
273273
Object,
274274
Dynamic,
275-
Var
275+
Var,
276+
Long
276277
}
277278

278279
export interface PrimitiveTypeNode extends TypeNode {

0 commit comments

Comments
 (0)