staff-rs / staff

Music theory and score rendering library with midi, notes, chords, scales, and more.

Home Page:https://staff-rs.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CLI install fails to compile

korreman opened this issue · comments

Trying to install with cargo install staff --features cli results in the following compile errors:

error[E0432]: unresolved import `staff::guitar`
 --> /home/korreman/.cargo/registry/src/github.com-1ecc6299db9ec823/staff-0.6.0/src/main.rs:3:5
  |
3 |     guitar::{Fretboard, STANDARD},
  |     ^^^^^^ could not find `guitar` in `staff`

error[E0599]: no method named `midi_notes` found for struct `staff::Chord` in the current scope
   --> /home/korreman/.cargo/registry/src/github.com-1ecc6299db9ec823/staff-0.6.0/src/main.rs:112:60
    |
112 |                     let midi_notes: Vec<_> = chord.clone().midi_notes().collect();
    |                                                            ^^^^^^^^^^ method not found in `staff::Chord`

error[E0308]: mismatched types
   --> /home/korreman/.cargo/registry/src/github.com-1ecc6299db9ec823/staff-0.6.0/src/main.rs:131:65
    |
131 | ...                   &(*note - MidiNote::new(chord.root(), Octave::FOUR))
    |                                 ------------- ^^^^^^^^^^^^ expected enum `Pitch`, found struct `staff::Chord`
    |                                 |
    |                                 arguments to this function are incorrect
    |
note: associated function defined here
   --> /home/korreman/.cargo/registry/src/github.com-1ecc6299db9ec823/staff-0.6.0/src/midi/mod.rs:30:18
    |
30  |     pub const fn new(pitch: Pitch, octave: Octave) -> Self {
    |

I have come across with the same issue, any progress?

Thanks for catching this! Fixed with c7b80e0

I hadn't built it with the CLI feature in a while... might have to add some automated CI