I want to generate svp programmatically, is there any source / SDK for it , or at least a document?
For example how long is a beat, in 64 bit integer ?
There is no documentation about the SVP, but the scripting documentation does specify the internal timing units:
QUARTER :number
Number of blicks in a quarter. The value is 705600000.
We denote musical time (e.g. a quarter, a beat) differently from physical time (e.g. one second). A blick is the smallest unit of musical time that the GUI works with internally. It is a large number chosen to be divisible by a lot of similarly purposed numbers used in music software. The name originates from Flicks.
(source: SV - Synthesizer V Studio Scripting Manual (dreamtonics.com))
Unofficially, you can refer to the UtaFormatix source code. It is a web-based tool that converts project files between different singing synthesizers, and therefore already has code for both reading and writing SVP files:
The two things that you should do is examine some files using a JSON display tool, such as this:
And read through the Scripting Manual:
https://resource.dreamtonics.com/scripting/
As claire stated, note events and durations are specified in terms of blicks. Blicks are always integer values, which is why the value of one blick is so large - 705600000. This avoids having to deal with floating point numbers, which generate rounding errors.
Open an svp file in a text editor such as Notepad++, and then drop it into the online JSON viewer:
Click the Viewer tab and you can see the structure:
Click the disclosure widgets to drill down int the structure:
The Scripting Manual hasn’t been updated in a while, so there’s a lot in the file that’s not been documented. But it will explain most of the structures, as they map directly to classes.