Loop word
This commit is contained in:
@@ -647,6 +647,13 @@ impl Forth {
|
||||
}
|
||||
}
|
||||
|
||||
Op::Loop => {
|
||||
let beats = stack.pop().ok_or("stack underflow")?.as_float()?;
|
||||
let dur = beats * 60.0 / ctx.tempo / ctx.speed;
|
||||
cmd.set_param("fit".into(), dur.to_string());
|
||||
cmd.set_param("dur".into(), dur.to_string());
|
||||
}
|
||||
|
||||
Op::ListStart => {
|
||||
stack.push(Value::Marker);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user