Comments (3)
It's the PI
as replacing PI
with 0.1
doesn't crash the engine
from glicol.
guess there is sth wrong with sin(PI)
from glicol.
Yup, with the current features rhai is used, using this code:
use rhai::{Engine, EvalAltResult};
pub fn main() -> Result<(), Box<EvalAltResult>> {
let engine = Engine::new();
let result = engine.eval::<f32>("PI")?;
println!("Answer: {result}");
Ok(())
}
I get Error: ErrorVariableNotFound("PI", 1:1)
EDIT: To fix it, you have to call it like a function:
use rhai::{Engine, EvalAltResult};
pub fn main() -> Result<(), Box<EvalAltResult>> {
let engine = Engine::new();
let result = engine.eval::<f32>("PI()")?;
println!("Answer: {result}");
Ok(())
}
and I've verified that this works in glicol today.
from glicol.
Related Issues (20)
- what to expect in v0.13
- TODO: get rid of proc macros and use workspace
- Bandlimited oscillators HOT 7
- Create `add node` and `add track` messages for synth context during rewriting
- Reverb got some noise...
- Support shared buffer to save memory space
- Use Enums for the AST HOT 4
- Help config Angular for Glicol HOT 1
- Add good real-time pitch shift and time stretch algorithm
- Use only one Rhai engine
- iOS or Android build? HOT 1
- Does glicol syntax resembles any other language? HOT 1
- tree-sitter parser HOT 2
- Feature idea HOT 4
- Panic when use specific code HOT 3
- Stop doesn't work in Glicol.js HOT 2
- API docs HOT 1
- Ideas List 2024
- Use `Result` in `process()` and other places
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glicol.