Skip to content

Commit

Permalink
feat: Add SoundFont3 support with dynamic sample decoding (#1807)
Browse files Browse the repository at this point in the history
  • Loading branch information
Danielku15 authored Jan 13, 2025
1 parent e7e6e37 commit a489bd2
Show file tree
Hide file tree
Showing 100 changed files with 6,635 additions and 2,588 deletions.
5 changes: 5 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
alphaTab is licensed under MPL-2.0.
Copyright © 2025, Daniel Kuschny and Contributors, All rights reserved.

See LICENSE.header for further licenses of integrated submodules.

Mozilla Public License Version 2.0
==================================

Expand Down
40 changes: 36 additions & 4 deletions LICENSE.header
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,40 @@ This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.

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

TinySoundFont is based on SFZero (licensed under MIT)
Copyright (C) 2012 Steve Folta (https://github.com/stevefolta/SFZero)
Library: TinySoundFont
License: MIT
Copyright: Copyright (C) 2017, 2018 Bernhard Schelling
URL: https://github.com/schellingb/TinySoundFont
Purpose: SoundFont loading and Audio Synthesis

Library: SFZero
License: MIT
Copyright: Copyright (C) 2012 Steve Folta ()
URL: https://github.com/stevefolta/SFZero
Purpose: TinySoundFont is based on SFZEro

Library: Haxe Standard Library
License: MIT
Copyright: Copyright (C)2005-2025 Haxe Foundation
URL: https://github.com/HaxeFoundation/haxe/tree/development/std
Purpose: XML Parser & Zip Inflate Algorithm

Library: SharpZipLib
License: MIT
Copyright: Copyright © 2000-2018 SharpZipLib Contributors
URL: https://github.com/icsharpcode/SharpZipLib
Purpose: Zip Deflate Algorithm for writing compressed Zips

Library: NVorbis
License: MIT
Copyright: Copyright (c) 2020 Andrew Ward
URL: https://github.com/NVorbis/NVorbis
Purpose: Vorbis Stream Decoding

Library: libvorbis
License: BSD-3-Clause
Copyright: Copyright (c) 2002-2020 Xiph.org Foundation
URL: https://github.com/xiph/vorbis
Purpose: NVorbis adopted some code from libvorbis.
18 changes: 12 additions & 6 deletions font/sonivox/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
SONiVOX EAS Version 2.00 Editing Software: Synthfont Viena
Ported from Samsung GT-E1272 and Android Soundfont of SONiVOX EAS Full Presets and Full Keys Range (no reverb). Frequency 11khz - 32khz
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.
Sonivox Corporation Tokyo Japan.
Copyright 1993 Sonivox Corporation
SONiVOX EAS Version 2.10 Editing Software: Synthfont Viena

https://musical-artifacts.com/artifacts/824
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
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.

Recommended Synthesizer: CoolSoft VirtualMIDISynth and BASSMIDI Driver.

Windows OS Update 2021
Microsoft Community https://answers.microsoft.com/
English: SONiVOX Sound That Rocks Japanese: SONiVOX 揺れる音
Available in country: Hong Kong Taiwan Japan
Powered by BASSMIDI Copyright 1993 Sonic Network, Inc. All Rights Reserved Sonivox Corporation Tokyo Japan. Made in Japan

https://musical-artifacts.com/artifacts/1517

This soundfont is based on the Sonivox EAS synthesizer, Copyright Sonic Network Inc. 2006.
Sonivox EAS belongs to the Android Open Source Project.
Expand Down
Binary file modified font/sonivox/sonivox.sf2
Binary file not shown.
Binary file added font/sonivox/sonivox.sf3
Binary file not shown.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
"terser": "^5.34.1",
"tslib": "^2.7.0",
"tsx": "^4.19.1",
"typescript": "^5.6.3",
"typescript": "^5.7.2",
"vite": "^5.4.8",
"webpack": "^5.95.0",
"webpack-cli": "^6.0.1"
Expand All @@ -111,6 +111,7 @@
"/dist/font/Bravura*.txt",
"/dist/font/*.txt",
"/dist/soundfont/*",
"LICENSE",
"LICENSE.header"
],
"dependencies": {
Expand Down
12 changes: 6 additions & 6 deletions src.compiler/AstPrinterBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -494,9 +494,9 @@ export default abstract class AstPrinterBase {
if (cs.isBlock(s.statement)) {
this.writeStatement(s.statement);
} else {
this._indent++;
this.beginBlock();
this.writeStatement(s.statement);
this._indent--;
this.endBlock();
}
}

Expand All @@ -516,9 +516,9 @@ export default abstract class AstPrinterBase {
if (cs.isBlock(s.thenStatement)) {
this.writeStatement(s.thenStatement);
} else {
this._indent++;
this.beginBlock();
this.writeStatement(s.thenStatement);
this._indent--;
this.endBlock();
}

if (s.elseStatement) {
Expand All @@ -530,9 +530,9 @@ export default abstract class AstPrinterBase {
this.writeStatement(s.elseStatement);
} else {
this.writeLine();
this._indent++;
this.beginBlock();
this.writeStatement(s.elseStatement);
this._indent--;
this.endBlock();
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src.compiler/TranspilerBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ interface Emitter {
}

export default function (emitters: Emitter[], handleErrors: boolean = false) {
console.log('Parsing...');
console.log(`Parsing using typescript ${ts.version}...`);
const commandLine = ts.parseCommandLine(ts.sys.args);
if (!commandLine.options.project) {
commandLine.options.project = 'tsconfig.json';
Expand Down
3 changes: 2 additions & 1 deletion src.compiler/csharp/CSharpAst.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,8 @@ export enum PrimitiveType {
Void,
Object,
Dynamic,
Var
Var,
Long
}

export interface PrimitiveTypeNode extends TypeNode {
Expand Down
Loading

0 comments on commit a489bd2

Please sign in to comment.