IT PLAYS A SINGLE SET OF NOTES

This commit is contained in:
2026-03-11 13:11:44 -06:00
parent 63f96b2d5f
commit 85b189fad2
2 changed files with 6 additions and 5 deletions

View File

@@ -13,10 +13,7 @@ fn main() {
flags.sound_font, flags.sound_font,
flags.sample_rate, flags.sample_rate,
)); ));
syn_seq.append("c"); syn_seq.append("c 2e g");
syn_seq.append("2e");
syn_seq.append("g");
//syn.tone_on(0, tone::new("c+5"));
play(syn_seq, flags.sample_rate, flags.bpm); play(syn_seq, flags.sample_rate, flags.bpm);
} }

View File

@@ -68,7 +68,11 @@ impl Seq {
} }
fn append<S: ToString>(&mut self, s: S) { fn append<S: ToString>(&mut self, s: S) {
self.append_one(s.to_string()); let s: String = s.to_string();
let s: &str = s.as_ref();
for split in s.split_whitespace() {
self.append_one(split.to_string());
}
} }
fn append_one(&mut self, s: String) { fn append_one(&mut self, s: String) {