Skip to content

ytanimura/sound-shader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple sound shader player by Rust

Crates.io Docs.rs

A simple CLI application for playing sound GLSL shader by Rust.

How to start

Clone repository, and run

cd sound-shader
mkdir workspace
cd workspace
cargo run -- --init
cargo run

Examples

There are some examples in examples. A very cool sound shader by Inigo Quilez can be played with the following command!

git submodule update --init
cargo run -- resources/pirates.comp

Help

sound-shader 0.1.1
Yoshinori Tanimura <[email protected]>
Simple sound shader player

USAGE:
    sound-shader.exe [FLAGS] [OPTIONS] [--] [FILE]

FLAGS:
    -h, --help       Prints help information
        --init       init default config file "default.json" and prepare sample shader source "sample.comp"
    -V, --version    Prints version information

OPTIONS:
    -c, --config <FILE>          read configuration json
    -o, --output <FILE>          recording wav file
    -r, --resources <FILE>...    add audio resource, wav is supported.
    -s, --silent <SECONDS>       not play, just recording.

ARGS:
    <FILE>    run shader source

The json settings specified in --cofig will be treated as the basic settings. If other arguments are specified for shaders, resources, or output, the settings will be overridden at runtime. For example, if only a different shader is specified in the other arguments, the result will be output to the destination specified json. If no arguments are specified, default.json will be loaded, but if other arguments are specified, they will be ignored; if you want to use default.json as the default setting, you must load it explicitly with --config.

License

This crate is distributed under Apach-2.0.

Submodules loaded from external repositories contain non-commercially licensed resources, but they are for testing and are not loaded into the source code by macros.

Operating environment

The unit tests and examples are done on my Windows and Mac machines. Since this program using both GPU and audio devices, I haven't established a valid CI.

Future works

  • loop back
  • other audio resources: flac, mp3, and so on.

About

sound shader player by Rust

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages