IT PLAYS A SINGLE SET OF NOTES
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user