Comments (2)
Hi Pierre,
if(c,t,e)
is very slow compared to pattern matching. Therefore I suggest replacing all remaining if
in your code with the equivalent using pattern matching.
Let me know if that solves the problem...
Cheers
Yann
from faust.
Hi Yann,
Thank you for the suggestion. That solved it up to M=4
!
I've replaced ba.if
occurrences with:
case{
(1) => t;
(0) => f;
}(test)
Unfortunately, the compilation never stops at order M=5
. My guess is that the recurrence formula brings very long trigonometric formula, if intermediate simplifications are not done by the compiler.
For example, the term rot(2,1,1)
gives:
rot(2,1,1) = cos(pitch)^2*cos(roll)*cos(yaw) +
sin(pitch)*(-cos(roll)*cos(yaw)*sin(pitch) + sin(roll)*sin(yaw))
Which, after factorization gives
rot(2,1,1) = cos(roll)*cos(yaw)*(cos(pitch)^2 - sin(pitch)^2)) + sin(pitch)*sin(roll)*sin(yaw)
However, knowing that cos(pitch)^2 - sin(pitch)^2 = cos(2*pitch)
the latter expression could be simplified with:
rot(2,1,1) = cos(roll)*cos(yaw)*cos(2*pitch) + sin(pitch)*sin(roll)*sin(yaw)
which is a simpler expression. This kind of simplification can be done for majority of terms in the rotation matrix.
I'm not sure if the compiler implements trigonometric simplifications, but this would be a great feature !
from faust.
Related Issues (20)
- Build error on Fedora 40 HOT 2
- [Android] Custom input/output support HOT 1
- Slow compilation
- faust CLI broken on macOS (Apple Silicon) HOT 3
- int64_t has not been decalred HOT 5
- Cannot use a synth as lv2 instrument HOT 2
- Portable builds HOT 5
- GUI class leaves dangling pointers in fZoneMap when it's moved or copied and destroyed HOT 5
- update linux to c++17
- oscillator.lib : 136 : ERROR : undefined symbol : ma HOT 1
- JUCE getBusesProperties call to discreteChannels() causes debug errors HOT 11
- Faust 2.7.4 stopped working with HISE HOT 6
- 2.74.6 segfaults when built with LTO HOT 6
- Faust built with mingw64 segfaults HOT 3
- Many faust tools do not natively support Windows HOT 1
- Compile error in compiler/generator/llvm/clang_code_container.hh HOT 4
- Controlling plugin parameters with Bitwig macros fails HOT 1
- Rust: Any way to access 'self' in an ffunction? HOT 5
- make install fails on mac HOT 1
- Compile error HOT 1
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 faust.