diff --git a/README.md b/README.md index dd16e7c..332a2c1 100644 --- a/README.md +++ b/README.md @@ -24,23 +24,20 @@ sudo apt update && sudo apt install -y libasound2-dev pkg-config ``` - install the Rust toolchain -- run `cargo build --release` +- run `cargo build --release --path ` and choose where to install the binary. ##### listen -- start the application with cargo or directly running the binary and pick your vibe: +- start the application by picking your current vibe: ``` sh -cargo run -- jazz -``` -or - -``` sh -./target/release/chaintrak ambient +chaintrak jazz +chaintrak ambient ``` #### TODO - lazy load of samples depending on the vibe - normalize volumes +- add more vibez #### license [![License: WTFPL](https://img.shields.io/badge/License-WTFPL-brightgreen.svg)](http://www.wtfpl.net/about/) diff --git a/src/engine/ambient.rs b/src/engine/ambient.rs index 5acf0e6..613346a 100644 --- a/src/engine/ambient.rs +++ b/src/engine/ambient.rs @@ -60,7 +60,8 @@ pub fn play(events: Receiver) -> anyhow::Result<()> { output.play_raw(badger.decoder()?.convert_samples())?; } - thread::sleep(Duration::from_millis(10)); + // sleep to avoid looping too much + thread::sleep(Duration::from_millis(20)); } } diff --git a/src/engine/jazz.rs b/src/engine/jazz.rs index df34582..b4dcb0c 100644 --- a/src/engine/jazz.rs +++ b/src/engine/jazz.rs @@ -54,7 +54,7 @@ pub fn play(events: Receiver) -> anyhow::Result<()> { } if sax { - log::info!("Oh yeah 🎷"); + log::info!("epic sax guy 🎷"); let sax = &samples.saxes.choose(&mut rng).context("no saxes")?; output.play_raw(sax.decoder()?.convert_samples())?; } @@ -65,6 +65,7 @@ pub fn play(events: Receiver) -> anyhow::Result<()> { output.play_raw(bass.decoder()?.convert_samples())?; } - thread::sleep(Duration::from_millis(10)); + // sleep to avoid looping too much + thread::sleep(Duration::from_millis(20)); } }