katyo / aubio-rs

Rust bindings for Aubio library
37 stars 7 forks source link

How do I import the aubio-rs crate in the main file and how do I get started with it? #12

Closed Joe23232 closed 3 years ago

Joe23232 commented 4 years ago

So with this crate: https://docs.rs/aubio-rs/0.1.3/aubio_rs/

I already put it in the Cargo.toml file, but in the main.rs file how would I import this library?

I additionally want to know how do I get started with this as I am very lost. How would I import a music and start analysing the data on the song etc?

Another question is am I able to determine beats per second, the loudness in the current point of the music, the pitch/key signature and play the audio file or do I need another library/crate?

katyo commented 4 years ago

Fisrt, you can load wave (sound) data using another crates (ex. hound for .wav). To determine beats rate use Tempo detection.

See example notes.rs which demonstrates how to determine notes in music. See also aubio docs.

Joe23232 commented 4 years ago

Fisrt, you can load wave (sound) data using another crates (ex. hound for .wav).

Does this crate support mp3 formats as well?

katyo commented 4 years ago

Fisrt, you can load wave (sound) data using another crates (ex. hound for .wav).

Does this crate support mp3 formats as well?

I don't know, I assume that only .wav is supported. But there is several crates to decode mp3.