Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Regular temperament theory in Rust
Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Type||Name||Latest commit message||Commit time|
|Failed to load latest commit information.|
Rust regular temperament library ================================ This is a re-implementation of some of my Python temperament finding code in Rust. Native-code application ----------------------- The standard targe finds regular temperaments and shows the results in a machine-readable format that is JSON-consistent, and works with the latest Python library: https://bitbucket.org/x31eq/regular Supply the number of results for each rank, the cangwu parameter (cents/octave), and the prime limit. 7-limit: cargo run 5 1 7 2.3.7-limit: cargo run 5 1 2 3 7 11-limit as inharmonic timbre: cargo run 5 1 cents <<FIN 1200.0 1901.9550008653875 2786.3137138648344 3368.825906469125 4151.317942364757 FIN For other build targets, this project includes a makefile, because I like makefiles. To do a faster calculation for a big limit (currently incomplete results): make release && target/release/regular 5 0.1 257 WebAssembly (Wasm) application ------------------------------ You can also run the code in a web browser without Python or other server-side support. You need wasm-pack: https://rustwasm.github.io/wasm-pack/installer/ If you don't have curl, this might work: wget -O - https://rustwasm.github.io/wasm-pack/installer/init.sh | sh If that doesn't work (like your platform isn't supported) you can build it yourself from this repository: https://github.com/rustwasm/wasm-pack Once you have it, make wasm and run a web server from the project root. For example, python3 -m http.server If you have wasm-opt, you can also try make wasm-release This should make the code smaller, and maybe faster, and put it in the root folder. If you don't have wasm-opt, you can get it from https://github.com/webassembly/binaryen To get documentation including the Wasm code: make doc