diff --git a/README.md b/README.md index 8a7f621..ce77b49 100644 --- a/README.md +++ b/README.md @@ -1,48 +1,114 @@ -# guitar-tab-generator +# Guitar Tab Generator [![Build + Test](https://github.com/noahbaculi/guitar-tab-generator/actions/workflows/rust_build_and_test.yml/badge.svg)](https://github.com/noahbaculi/guitar-tab-generator/actions/workflows/rust_build_and_test.yml) [![Coverage](https://codecov.io/gh/noahbaculi/guitar-tab-generator/branch/main/graph/badge.svg?token=BB01PPL4LF)](https://codecov.io/gh/noahbaculi/guitar-tab-generator) -Guitar tab generator from note names considering difficulty of different finger positions. +Guitar Tab Generator logo -Old versions: +Generate fingerstyle guitar tabs from note names and account for the difficulty +of different finger positions. Built with Rust. Designed for compilation to +WebAssembly for use in web applications. + +[Rust][https://www.rust-lang.org/] + +Web Assembly[https://webassembly.org/] + +## Table of Contents + +- [Guitar Tab Generator](#guitar-tab-generator) + - [Table of Contents](#table-of-contents) + - [Demo](#demo) + - [Features](#features) + - [Pathfinding Visualization](#pathfinding-visualization) + - [Previous versions](#previous-versions) + - [Contributing and Installation](#contributing-and-installation) + - [Build from source](#build-from-source) + - [Run examples](#run-examples) + - [Background code runner](#background-code-runner) + - [Calculate code coverage](#calculate-code-coverage) + - [Screen for potentially unused feature flags](#screen-for-potentially-unused-feature-flags) + - [Build WASM binary](#build-wasm-binary) + - [Future Improvements](#future-improvements) + +## Demo + +[Example web application 🚀](https://noahbaculi.com/guitartab) + +IMAGE + +## Features + +- Input pitch parsing +- Alternate tunings +- Capo consideration +- Any number of strings (not just 6 string guitars!) +- Configurable number of frets +- Tab width and padding formatting +- Playback indicator for playback applications + +## Pathfinding Visualization + +The pathfinding calculation is initiated by the +`Arrangement::create_arrangements()` function. + +## Previous versions -- [Java](https://github.com/noahbaculi/guitar-tab-generator_java) (2019 - 2022) - [Typescript](https://github.com/noahbaculi/guitar-tab-generator_typescript) (2022) +- [Java](https://github.com/noahbaculi/guitar-tab-generator_java) (2019 - 2022) + +## Contributing and Installation + +### Build from source + +Requires: -Commands: +- The [Rust toolchain](https://www.rust-lang.org/tools/install) +- The [Git version control system](https://git-scm.com/) + +```shell +git clone https://github.com/noahbaculi/guitar-tab-generator.git +cd guitar-tab-generator +``` + +### Run examples ```shell -# Run code cargo run --example basic -cargo run --example core_usage -# Background code runner -bacon -- --example basic +cargo run --example advanced +``` +### Background code runner -# Background code checker -cargo clippy -# Background code checker +```shell bacon +``` + +### Calculate code coverage -# Calculate code coverage +```shell cargo tarpaulin --out Html --output-dir dev/tarpaulin-coverage -cargo llvm-cov --open +``` -# Screen for potentially unused feature flags +### Screen for potentially unused feature flags + +```shell unused-features analyze --report-dir 'dev/unused-features-report' unused-features build-report --input 'dev/unused-features-report/report.json' +``` + +### Build WASM binary + +```shell +wasm-pack build --target web --out-dir pkg/wasm_guitar_tab_generator -# Build WASM binary using [wasm-pack](https://rustwasm.github.io/docs/wasm-pack/introduction.html) and [wasm-bindgen](https://rustwasm.github.io/wasm-bindgen/introduction.html) -wasm-pack build --target web -ls -l pkg/guitar_tab_generator_bg.wasm # get size in bytes 1137837 -> 905075 +# check binary size +ls -l pkg/wasm_guitar_tab_generator/guitar_tab_generator_bg.wasm ``` ## Future Improvements -- [ ] add filter for max_fret_span in `arrangements` -- [ ] re-examine namespace of functions (object functions vs standalone) (public vs private) -- [ ] filter unplayable fingering options from beat_fingering_candidates (based on the fret span and whether there are any candidates with smaller fret spans) -- [ ] [property testing](https://altsysrq.github.io/proptest-book/) -- [ ] borrowed types vs box vs RC -- [ ] [Rayon](https://docs.rs/rayon/latest/rayon/#how-to-use-rayon) parallelism +- [ ] Borrowed types vs box vs RC +- [ ] Parallelism with [Rayon](https://docs.rs/rayon/latest/rayon/#how-to-use-rayon) +- [ ] Add filter for max_fret_span in `arrangements` +- [ ] Audit namespace of functions (object functions vs standalone) (public vs private) +- [ ] Property testing with [Proptest](https://altsysrq.github.io/proptest-book/) diff --git a/examples/logo.jpeg b/examples/logo.jpeg new file mode 100644 index 0000000..92bcac9 Binary files /dev/null and b/examples/logo.jpeg differ