Skip to content

Commit

Permalink
readme updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mwylde committed Oct 31, 2021
1 parent 5c98a75 commit 6c2c8cd
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ jobs:
- name: Install dependencies
run: brew install jack sdl2
- name: Build
run: cargo build -v --features=coreaudio-rs
run: cargo build -v
- name: Run tests
run: cargo test --verbose --features=coreaudio-rs
run: cargo test --verbose
40 changes: 33 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ written in Rust, designed for ease of use and rock-solid stability. It
can be used as a practice tool, compositional aid, or for performing
looped works in a live setting.

Currently it runs only on Linux as a standalone
Currently it runs on Linux as a standalone
[Jack](https://jackaudio.org/) application, which allows it to
interface with other Jack clients like effect racks, software
instruments, and DAWs.
instruments, and DAWs, or on MacOS using Jack or (experimentally)
directly with CoreAudio.

![video of loopers](docs/demo.gif)

Expand All @@ -36,25 +37,27 @@ size, and loop lengths are limited only by available memory.

## Getting started

### Linux

To build loopers, you will need jack and sdl2.

For Ubuntu/Debian these can be installed with:

``` bash
```bash
$ sudo apt install jackd2 libjack-jackd2-dev libgl1-mesa-dev libsdl2-dev
```

Now you're ready to install loopers itself. First get a rust toolchain
installed (https://rustup.rs), then:

``` bash
$ cargo install loopers-jack
```bash
$ cargo install loopers
```

Then start it with the command

``` bash
$ loopers-jack
```bash
$ loopers
```

(If you get an error about Jack not running, you will need to start
Expand All @@ -65,6 +68,29 @@ This will create a Jack client, which can be hooked up to your
inputs/outputs/effects with any number of tools (I recommend
[Claudia](https://kx.studio/Applications:Claudia) from KXStudio).

Loopers should also be fully compatible with pipewire.

### MacOS

Loopers has experimental support for running on CoreAudio, the native
audio system for MacOS (you can also run it on top of [jack](https://jackaudio.org/) on
MacOS which is currently better supported). To build on Mac with coreaudio:

```bash
$ brew install jack sdl2
$ cargo install loopers
$ loopers
```

By default it will run using CoreAudio. To run with jack instead,

```bash
$ loopers --driver jack
```

**Note: midi is not currently supported via coreaudio, and there is no ability to choose
audio sources and sinks (the default devices are used).**

## Current state

Loopers has just had its initial release, 0.1. The software is usable
Expand Down
4 changes: 3 additions & 1 deletion loopers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ rand = "0.8"
hound = "3.4.0"
chrono = "0.4.11"
dirs = "2"
coreaudio-rs = {version = "0.10.0", optional = true}

[target.'cfg(target_os = "macos")'.dependencies]
coreaudio-rs = {version = "0.10.0"}

[dependencies.loopers-common]
path = "../loopers-common"
Expand Down
8 changes: 4 additions & 4 deletions loopers/src/looper_coreaudio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ pub fn coreaudio_main(gui: Option<Gui>,
channels_per_frame: 2,
};

println!("input={:#?}", &in_stream_format);
println!("output={:#?}", &out_stream_format);
println!("input_asbd={:#?}", &in_stream_format.to_asbd());
println!("output_asbd={:#?}", &out_stream_format.to_asbd());
debug!("input={:#?}", &in_stream_format);
debug!("output={:#?}", &out_stream_format);
debug!("input_asbd={:#?}", &in_stream_format.to_asbd());
debug!("output_asbd={:#?}", &out_stream_format.to_asbd());

let mut host = CoreAudioHost {};

Expand Down
10 changes: 5 additions & 5 deletions loopers/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ extern crate log;

mod loopers_jack;

#[cfg(feature = "coreaudio-rs")]
#[cfg(target_os = "macos")]
mod looper_coreaudio;

use clap::{App, Arg};
Expand Down Expand Up @@ -57,10 +57,10 @@ fn setup_logger(debug_log: bool) -> Result<(), fern::InitError> {
Ok(())
}

#[cfg(feature = "coreaudio-rs")]
#[cfg(target_os = "macos")]
const DEFAULT_DRIVER: &str = "coreaudio";

#[cfg(not(feature = "coreaudio-rs"))]
#[cfg(not(target_os = "macos"))]
const DEFAULT_DRIVER: &str = "jack";


Expand Down Expand Up @@ -139,8 +139,8 @@ fn main() {
jack_main(gui, gui_sender, gui_to_engine_receiver, beat_normal, beat_emphasis, restore);
}
"coreaudio" => {
if cfg!(feature = "coreaudio-rs") {
#[cfg(feature = "coreaudio-rs")]
if cfg!(target_os = "macos") {
#[cfg(target_os = "macos")]
crate::looper_coreaudio::coreaudio_main(
gui, gui_sender, gui_to_engine_receiver, beat_normal, beat_emphasis, restore)
.expect("failed to set up coreaudio");
Expand Down

0 comments on commit 6c2c8cd

Please sign in to comment.