diff --git a/src/compiler.rs b/src/compiler.rs index 39e3c27..816b982 100644 --- a/src/compiler.rs +++ b/src/compiler.rs @@ -1,8 +1,5 @@ use std::{ - any::{Any, TypeId}, - collections::{BTreeMap, HashMap}, - fmt::Debug, - str::FromStr, + any::{Any, TypeId}, collections::{BTreeMap, HashMap}, f64, fmt::Debug, str::FromStr }; use cfg_if::cfg_if; @@ -393,7 +390,7 @@ impl Context { let mut map = self.namespace_generator().collect::>(); map.insert('n'.to_string(), note as f64); while self.current_length()? > *self.get('t')? - curr_t + (1f64 / SAMPLE_RATE as f64) { - result.push(self.eval_with(&self.instrument, &mut map)?); + result.push(self.eval_with(&self.instrument, &mut map)? * f64::MAX); self.tick()?; map = self.namespace_generator().fold(map, |mut acc, (k, v)| { acc.insert(k, v);