accept notes via --play or -p
This commit is contained in:
@@ -13,6 +13,9 @@ pub struct Flags {
|
||||
|
||||
#[arg(long, default_value = "super_small_font.sf2")]
|
||||
pub sound_font: String,
|
||||
|
||||
#[arg(short, long, default_value = "c 2e+")]
|
||||
pub play: Option<String>,
|
||||
}
|
||||
|
||||
impl Flags {
|
||||
|
||||
@@ -13,7 +13,9 @@ fn main() {
|
||||
flags.sound_font,
|
||||
flags.sample_rate,
|
||||
));
|
||||
syn_seq.append("c 2e g");
|
||||
if let Some(play) = flags.play {
|
||||
syn_seq.append(play);
|
||||
}
|
||||
|
||||
play(syn_seq, flags.sample_rate, flags.bpm);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user