You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since processor.frequency is described as a compile-time constant in the syntax guide (here), it seems like this should work.
Similarly, changing float[processor.frequency] buffer to float<processor.frequency> buffer also fails, with the error:
simple_delay.soul:6:10: error: Cannot resolve vector size expression in this context
float<processor.frequency> buffer;
I suppose the sizes should technically be converted to int; doing so doesn't change the errors produced.
I would like to use this in order to have a buffer for delays with a maximum delay time specified (at compile time) in seconds. This requires the buffer size to be an expression using processor.frequency.
The text was updated successfully, but these errors were encountered:
Yep - absolutely, it should work, and one day we will make it work, but for enormously complicated reasons, it's a really really difficult one to fix.
We've had it on our to-do-list for ages, but... (deep breath...) processor constants are only known at a late stage in the compile process, so they get resolved in HEART code, not SOUL. You're trying to us this constant as part of a type, but the HEART type system is much simpler than the SOUL one, and it can only represent concrete types, not ones that contain unresolved constants.
So despite this seeming like a trivial problem, to get it working means probably about a month's work to completely re-implement the HEART type system (!)
Using the soul command line version 0.9.53, the following minimum example fails to compile with the error:
example.soul:
Since
processor.frequency
is described as a compile-time constant in the syntax guide (here), it seems like this should work.Similarly, changing
float[processor.frequency] buffer
tofloat<processor.frequency> buffer
also fails, with the error:I suppose the sizes should technically be converted to int; doing so doesn't change the errors produced.
I would like to use this in order to have a buffer for delays with a maximum delay time specified (at compile time) in seconds. This requires the buffer size to be an expression using processor.frequency.
The text was updated successfully, but these errors were encountered: