cmajor-lang / cmajor

The Cmajor public repository
https://cmajor.dev
Other
534 stars 31 forks source link

some errors in the outputted js for examples in vscode #22

Closed zeukterialpneumaion closed 1 year ago

zeukterialpneumaion commented 1 year ago

..there are a few trailing ")" in your js code outputs... ... specifically on the lines:: 331 -341of the Cmajorwrapper:: this.memoryInt64_0[(byteOffset) / 8)] = sourceValue["frameIndex"];

...there is an extra ")" after the 8 in these lines.

......

in the function _unpack_o3_i64_f64_f64:: there is again an extra ")" after the "/8" and also an unnecessary semicolon - " / 8)];, " should be " / 8], " i think... eg.. this.memoryFloat64_4[(sourceOffset + 8) / 8)];, this.memoryFloat64_4[(sourceOffset + 16) / 8)]; };


... porting these to typescript so i have some code completion...perhaps it might be a 'more elegant solution for you to generate ts files?


... needing a very reliable clock for mid event output from web app so i'm looking at your midi hello world and timeline examples ...

Loving your library and the ideas behind it ! fantastic work, keep going there! All bests, jez.

LucasThompson commented 1 year ago

Thanks for the detailed report. I've got a fix for this, and it will be included in the next public release. The issue is localised to the use of int64 or float64 types (or structs etc containing members of that type).

As for generating TypeScript, this is something we want to do but isn't an immediate priority. I'll close this issue for now. Thanks again.