This is a Rust player for the Note Block Studio format. It is a work in progress and is not yet complete.
A web version is available at https://tomast1337.github.io/nbs-player-rs, it also demostrate a way to make playlists commanded by the browser.
- Play Note Block Studio songs
- Support for custom instruments
- Support for custom themes and fonts
- Play songs in a web browser using WebAssembly
- Support for custom key bindings
- Rust 1.85.0 or later
- Emscripten SDK (for WebAssembly)
you need to have the Emscripten SDK installed. You can find instructions on how to install it here. After installing the SDK, you need to activate it. You can do this by running the following command in your terminal:
On Linux or MacOS:
EMCC_CFLAGS="-sUSE_GLFW=3 -sGL_ENABLE_GET_PROC_ADDRESS -sASYNCIFY" cargo build --release --target wasm32-unknown-emscripten
On Windows:
set EMCC_CFLAGS=-sUSE_GLFW=3 -sGL_ENABLE_GET_PROC_ADDRESS -sASYNCIFY
cargo build --release --target wasm32-unknown-emscripten
After building the project, you can run the following command to start a local server and serve the files:
With node.js:
npx serve .
With python:
python3 -m http.server
Then, open your browser the link given by the server.
cargo run -- "$(cat <<EOF
{
"font_id": "PixelPlay",
"background": "Plasma",
"window_width": 1280,
"window_height": 720,
"theme": {
"background_color": "#FFE4E1",
"accent_color": "#D4A59A",
"text_color": "#5D4037",
"white_key_color": "#FFF0F5",
"black_key_color": "#E6C7C2",
"white_text_key_color": "#5D4037",
"black_text_key_color": "#D4A59A"
}
}
EOF
)"
The program will always look for a file called song.nbsx
in the current working directory, so you need to place your song there.
You can change the arguments as you like.
This project is licensed under the GNU Affero General Public License v3.0. See the LICENSE file for details.
The assets are licensed under different licenses, please check the test-assets
folder for more information.