Crates.io | ngen_nsl |
lib.rs | ngen_nsl |
version | 0.1.0 |
source | src |
created_at | 2024-04-11 00:42:00.893549 |
updated_at | 2024-04-11 00:42:00.893549 |
description | Library designed for generating NSL (NGEN Scripting Language) scripts for the Spektro Audio NGEN. |
homepage | https://github.com/spektroaudio/ngen_nsl |
repository | https://github.com/spektroaudio/ngen_nsl |
max_upload_size | |
id | 1204258 |
size | 24,813 |
ngen_nsl is Rust library for generating NSL (NGEN Scripting Language) scripts for the Spektro Audio NGEN.
For more information about NGEN and NSL, please visit the https://spektroaudio.com/ngen.
use ngen_nsl::*;
fn main() {
let mut script = NSLScript::new();
// Add commands to the script
script.add_command(Commands::Set(step_pitch(0), constant(36))); // Set the pitch of the first step to 36
script.add_command(Commands::Set(step_velocity(0), constant(100))); // Set the velocity of the first step to 100
script.add_command(Commands::End); // End the script
println!("Commands added to the script: {}", script.commands.len());
let code = script.code();
println!("Converted script: {:?}", code);
let path = "output/path/test.nsl";
script.export_hex(path);
}
To run the included examples (after cloning the repository), use the following command:
cargo run --example example_name
(where example_name
is the name of the example you want to run).
Spektro Audio
@spektroaudio
spektroaudio.com