UNIX date/time into HISE.....
-
So I have a UNiX date in hise in this sort of format:
date="18c1054942c"
..anyone have any idea how I can get this into a date in HISE, it will probably end up as some sort of milisecond count - so it should be just a very large number...
-
@Lindon the forum gods strike again, as soon as I post..this
var secs = "0x" + "18c1054942c"; Console.print(parseInt(secs,10));
-
There is actually a date time class in HISE script (Greg added it if I remember correctly) and it seems to be totally undocumented except for some forum posts.
HISE/hi_scripting/scripting/api/ScriptingApi.cpp at develop · christophhart/HISE
The open source framework for sample based instruments - HISE/hi_scripting/scripting/api/ScriptingApi.cpp at develop · christophhart/HISE
GitHub (github.com)
-
@d-healey @Lindon yeah I added this a while ago, I'm surprised it's not documented
Here's a thread with some examples:
https://forum.hise.audio/topic/4692/days-since/12 -
@ustk if you‘ve been a good boy and have documented each method with a comment, it might just not be picked up by the doc generator (I have to manually add each class so it might just got lost at this step). I‘ll take a look…
-
@Christoph-Hart Yeah I always comment using the same paradigm but it might be the
Date
class itself that is not caught by the generator if I missed something... -
@ustk yupp that was the case, now it should pop up (in the new_dispatcher branch)