Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modifying fixed point type in vult runtime #51

Open
ul1t opened this issue Feb 26, 2023 · 1 comment
Open

Modifying fixed point type in vult runtime #51

ul1t opened this issue Feb 26, 2023 · 1 comment

Comments

@ul1t
Copy link

ul1t commented Feb 26, 2023

I'm developing platform for modular synth based on relatively cheap MCUs. I prefer Vult over other DSL's due to its native support of fixed-point math. But I'd like to use 8.24 format instead of default 16.16. Is it possible to implement new format only by modifying vultin.h/vultin.c? I have almost compatible header-only 8.24 fixed-point math library from previous projects. Or is 16.16 format hardcoded inside transpiler?

@modlfo
Copy link
Collaborator

modlfo commented Feb 26, 2023

The literals and computations resulting in constants are converted internally to 16.16. That part should be easy to change in the compiler so 8.24 is used

If you have the functions in vultin.* for 8.24 I could add an option so 8.24 is assumed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants