-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathVagiExtract.1sc
40 lines (40 loc) · 1.03 KB
/
VagiExtract.1sc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//------------------------------------------------
//--- 010 Editor v10.0.2 Script File
//
// File:
// Authors:
// Version:
// Purpose:
// Category:
// History:
//------------------------------------------------
local int FileNum;
local string FileName;
local int NewFileNum;
local float Length;
local float Offset;
local float SampleRate;
local float StartPos;
local float EndPos;
local int Index;
int r = 0;
void FrontierSNDVagi (int r){
RunTemplate("VagiSampl.bt");
FileNum = GetFileNum();
FileName = GetFileName();
FileNew("Text",true);
NewFileNum = GetFileNum();
FileSelect(FileNum);
for(i=0;i<Vagi.structCount+1;i++){
Offset = Vagi.offset[i];
Length = Vagi.length[i];
SampleRate = Vagi.sampleRate[i];
StartPos = ((Offset/2.0)/SampleRate);
EndPos = (StartPos + (Length/SampleRate));
Index = i;
FPrintf(NewFileNum, "%0.8f %0.8f %u\n", StartPos, EndPos, Index);
};
FileSelect(NewFileNum);
FileSave(FileName+".txt");
};
FrontierSNDVagi(r);