mod hum_parse;
mod hum_process;
pub mod hum_error;
pub mod hum_io;
pub const VERSION: &str = "0.6.0";
pub const AUTHOR: &str = "Connor Bulakites <connor@bulakites.net>";
pub const ABOUT: &str = "Hum is a music notation language and synthesizer.";
fn parse_score_contents(score_contents: String) -> Result<Vec<f32>, hum_error::HumError> {
let score_commands = hum_parse::hum_grammar::score(&score_contents[..])?;
Ok(hum_process::run_commands(score_commands)?)
}
pub fn convert_to_wav(score_contents: String, outfname: &str) -> Result<(), hum_error::HumError> {
let waveform = parse_score_contents(score_contents)?;
Ok(hum_io::save(waveform, outfname)?)
}