-
Notifications
You must be signed in to change notification settings - Fork 0
x31eq/regular_rust
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Rust regular temperament library ================================ This is a re-implementation of some of my Python temperament finding code in Rust. Native-code application ----------------------- The standard target 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
About
Regular temperament theory in Rust
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published