From de97e43b635fc1aa6619e8ee1887464a4693f3ab Mon Sep 17 00:00:00 2001 From: brevalferrari Date: Wed, 28 May 2025 16:59:31 +0200 Subject: [PATCH] =?UTF-8?q?really=20replace=20=CF=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/cli-design.txt | 4 ++-- src/cli/main.rs | 2 +- src/compiler.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/cli-design.txt b/doc/cli-design.txt index ab3bdc8..7007309 100644 --- a/doc/cli-design.txt +++ b/doc/cli-design.txt @@ -14,7 +14,7 @@ modes: -n NOTE[,...], --notes NOTE[,...] available notes: a list of comma-separated alphabetical note names -i EXPR, --instrument EXPR - signal expression (instrument) to generate music samples (you can use the floating-point number t for the current time in seconds, n for the indice of the currently playing note in the list of available notes starting with 0 and N for the number of available notes) [default: "sin(2*PI*(442+442*((n+1)/N))*t)"] + signal expression (instrument) to generate music samples (you can use the floating-point number t for the current time in seconds, n for the indice of the currently playing note in the list of available notes starting with 0 and N for the number of available notes) [default: "sin(2*pi()*(442+442*((n+1)/N))*t)"] -l EXPR, --length EXPR expression to generate note length in seconds [default: "2^(2-log(2, l))*(60/T)"] -v VARIABLE=VALUE, --variable VARIABLE=VALUE @@ -32,7 +32,7 @@ modes: -n NOTE[,...], --notes NOTE[,...] available notes: a list of comma-separated alphabetical note names -i EXPR, --instrument EXPR - signal expression (instrument) to generate music samples (you can use the floating-point number t for the current time in seconds, n for the indice of the currently playing note in the list of available notes starting with 0 and N for the number of available notes) [default: "sin(2*PI*(442+442*((n+1)/N))*t)"] + signal expression (instrument) to generate music samples (you can use the floating-point number t for the current time in seconds, n for the indice of the currently playing note in the list of available notes starting with 0 and N for the number of available notes) [default: "sin(2*pi()*(442+442*((n+1)/N))*t)"] -l EXPR, --length EXPR expression to generate note length in seconds [default: "2^(2-log(2, l))*(60/T)"] -v VARIABLE=VALUE, --variable VARIABLE=VALUE diff --git a/src/cli/main.rs b/src/cli/main.rs index eb1d56b..535a06b 100644 --- a/src/cli/main.rs +++ b/src/cli/main.rs @@ -28,7 +28,7 @@ use nom_locate::{LocatedSpan, position}; use strum::{EnumDiscriminants, EnumString, IntoDiscriminant, IntoStaticStr}; use thiserror::Error; -const DEFAULT_INSTRUMENT: &str = "sin(2*PI*(442+442*((n+1)/N))*t)"; +const DEFAULT_INSTRUMENT: &str = "sin(2*pi()*(442+442*((n+1)/N))*t)"; const DEFAULT_LENGTH: &str = "2^(2-log(2, l))*(60/T)"; fn main() { diff --git a/src/compiler.rs b/src/compiler.rs index a102322..a209f8b 100644 --- a/src/compiler.rs +++ b/src/compiler.rs @@ -458,7 +458,7 @@ mod tests { ('l', 4.0), ('T', 60.0), ], - "sin(2*PI*(442+442*((n+1)/N))*t)".parse().unwrap(), + "sin(2*pi()*(442+442*((n+1)/N))*t)".parse().unwrap(), [('L', "2^(2-log(2, l))*(60/T)")].map(|(c, e)| (c, e.parse().unwrap())), ) }