|
|
BlocSize // size of Usine audio blocs BlocDuration // duration of a bloc calculation according to the sampling rate RefreshSpeed // refresh speed in mS as defined in the setup (v5.5 and above)
procedure sTrace(S:string); procedure iTrace(I:Integer); procedure fTrace(F:single);
Procedure SetModuleColor(Color:integer); // set the color of the module // as it is displayed in the patch // Usine 5.50 and above
Type TParameter type TScale = (lsLinear,lsLog,lsExp); type TParamType = (ptTextField, ptChooseColor,ptMidi,ptGainFader, ptAudio,ptDataField,ptDataFader,ptButton,ptListBox, ptSwitch,ptArray,ptIpAddress,ptSmpte,ptMidiNoteFader, ptPointerBitMap,ptPointer,ptLed,ptOther); type TMidi = Record Msg : Byte; Data1 : Byte; Data2 : Byte; Channel : byte; end; function CreateParam (caption: string; typ: TParamType):TParameter; // Create a new parameter, // returns the parameter's number procedure SetIsInput (Param: TParameter; val: boolean); // set to true if the parameter has input port procedure SetIsOutput (Param: TParameter; val: boolean); // set to true if the parameter has output port procedure SetScale (Param: TParameter; val: TScale); // set the scale, if the param is a fader procedure SetColor (Param: TParameter; val: integer); // set the front color of the fader // or ON Color for switches procedure SetVisible (N : Tparameter; val: Boolean); // determines if the parameter is visible, // true by default procedure SetOffColor (Param: TParameter; val: integer); // set the off color only if the parameter is a // switch procedure SetMin (Param: TParameter; val: single); // set min parameter value procedure SetMax (Param: TParameter; val: single); // set max parameter value procedure SetDefaultValue (Param: TParameter; val: single); // set default param value, when created procedure SetCaption (Param: TParameter; val: string); // set or change displayed caption procedure SetSymbol (Param: TParameter; val: string); // set displayed symbol ie. 'ms','%' procedure SetFormat (Param: TParameter; val: string); // set format string of the displayed value // ie. '%g','%.0f','%.1f' procedure SetListBoxString (Param: TParameter; val: string); // set listbox items ie.'"item1","item2"' procedure SetReadOnly (Param: TParameter; val: boolean); // set to true if the user can't modify value procedure SetFastCallBack (Param: TParameter; val: boolean); // set to true to use a fast callback insteed the // Windows message processing procedure SetDontSave (Param: TParameter; val: boolean); // specifies if the parameter need to be save // in the patch or not procedure SetSavedName (Param: TParameter; val: string); // set name which will be used to store the value // by default value are stored according // their caption procedure SetIsSeparator (Param: TParameter; val: boolean); // determines if the parameter is followed by a // blank line in the module panel
access to parameter’s value
procedure SetStringValue (Param: TParameter; val: string); // set text value if param type = ptTextField function GetStringValue (Param: TParameter;) : string; // get text value if param type = ptTextField procedure SetLength (Param: TParameter; val: integer); function GetLength (Param: TParameter):integer; procedure SetValue (Param: TParameter; val: single); function GetValue (Param: TParameter):single; procedure SetDataArrayValue (Param: TParameter; I: integer; val: single); function GetDataArrayValue (Param: TParameter; I: intege):single; procedure SetMidiArrayValue (Param : TParameter; I: integer; val: TMidi); procedure GetMidiArrayValue (Param : TParameter; I: integer; var val:TMidi); function GetDataPointer(Param: TParameter):PSingle;
function GetSmptePos:double; procedure SetSmptePos(pos:double); function GetLoopMarkerPos(N:integer):double; // N from 0 to nbMarkers-1
function getarraylength (arr :array: integer; procedure setarraylength(arr :array; len:integer);
see Internal Messages Language (IML)
SendUsineMsg (msg:string); // obsolete since Usine 5.17 SendInternalMsg(msg:string); // version 5.17 and above SendInternalMsg(msg,arg1:string); // version 5.17 and above SendInternalMsg(msg,arg1,arg2:string); // version 5.17 and above SendInternalMsg(msg,arg1,arg2,arg3:string); // version 5.17 and above SendInternalMsg(msg,arg1,arg2,arg3,arg4:string); // version 5.17 and above SendInternalMsg(msg,arg1,arg2,arg3,arg4,arg6:string); // version 5.17 and above function GetVariableString(name:string):string; function GetVariableInteger(name:string):integer; function GetVariableFloat(name:string):double;
SendInternalMsg('SET_TARGET_PATCH','SENDER_PATCH'); SendInternalMsg ('GET_VALUE',GetStringValue(Input1),GetStringValue(Input2),'THEPARAMVALUE'); SendInternalMsg ('SET_VALUE','PARAM','1','THEPARAMVALUE'); SendInternalMsg('SET_VALUE',GetStringValue(Input1),GetStringValue(Input2),FloatTostr(GetValue(Input3)));
procedure winExec(cmd : string);
Function minS(const A,B:single):Single; Function MaxS(const A,B: Single): Single; Function maxI(const A,B:integer):integer; Function minI(const A,B:integer):integer; Function Timems :extended; Function Sin (e: Extended) : Extended; Function Cos (e: Extended) : Extended; Function Arctan (e: Extended) : Extended; Function Arcsin (e: Extended) : Extended; Function Arccos (e: Extended) : Extended; Function Sqrt (e: Extended) : Extended; Function Round (e: Extended) : Longint; Function Trunc (e: Extended) : Longint; Function Int (e: Extended) : Longint; Function Pi : Extended; Function Abs (e: Extended) : Extended; Function Ln (e: Extended) : Extended; Function Log (e: Extended) : Extended; Function Exp (e: Extended) : Extended; Function power (base,e: Extended) : Extended; Function Random : single;
TTimeStamp = record Time : INTEGER; Date : INTEGER; end; type TSystemTime = record wYear:WORD; wMonth:WORD; wDayOfWeek:WORD; wDay:WORD; wHour:WORD; wMinute:WORD; wSecond:WORD; wMilliSecond:WORD; end; { File open modes } const fmOpenRead; fmOpenWrite; fmOpenReadWrite; fmShareCompat; fmShareExclusive; fmShareDenyWrite; fmShareDenyRead; fmShareDenyNone; { File attribute constants } faReadOnly; faHidden; faSysFile; faVolumeID; faDirectory; faArchive; faAnyFile; { File mode magic numbers } fmClosed; fmInput; fmOutput; fmInOut; { Seconds and milliseconds per day } SecsPerDay; MSecsPerDay; { Days between 1/1/0001 and 12/31/1899 } DateDelta; function UpperCase(const S: string): string; function LowerCase(const S: string): string; function CompareStr(const S1, S2: string): Integer; function CompareMem(P1, P2: Pointer; Length: Integer): Boolean; function CompareText(const S1, S2: string): Integer; function SameText(const S1, S2: string): Boolean; function AnsiUpperCase(const S: string): string; function AnsiLowerCase(const S: string): string; function AnsiCompareStr(const S1, S2: string): Integer; function AnsiSameStr(const S1, S2: string): Boolean; function AnsiCompareText(const S1, S2: string): Integer; function AnsiSameText(const S1, S2: string): Boolean; function AnsiStrComp(S1, S2: PChar): Integer; function AnsiStrIComp(S1, S2: PChar): Integer; function AnsiStrLComp(S1, S2: PChar; MaxLen: Cardinal): Integer; function AnsiStrLIComp(S1, S2: PChar; MaxLen: Cardinal): Integer; function AnsiStrLower(Str: PChar): PChar; function AnsiStrUpper(Str: PChar): PChar; function AnsiLastChar(const S: string): PChar; function AnsiStrLastChar(P: PChar): PChar; function Trim(const S: string): string; function TrimLeft(const S: string): string; function TrimRight(const S: string): string; function QuotedStr(const S: string): string; function AnsiQuotedStr(const S: string; Quote: Char): string; function AnsiExtractQuotedStr(var Src: PChar; Quote: Char): string; function AdjustLineBreaks(const S: string): string; function IsValidIdent(const Ident: string): Boolean; function IntToStr(Value: Integer): string; function IntToHex(Value: Integer; Digits: Integer): string; function StrToInt(const S: string): Integer; function StrToIntDef(const S: string; Default: Integer): Integer; function LoadStr(Ident: Integer): string; function FileOpen(const FileName: string; Mode: LongWord): Integer; function FileCreate(const FileName: string): Integer; function FileRead(Handle: Integer; var Buffer; Count: LongWord): Integer; function FileWrite(Handle: Integer; const Buffer; Count: LongWord): Integer; function FileSeek(Handle, Offset, Origin: Integer): Integer; procedure FileClose(Handle: Integer); function FileAge(const FileName: string): Integer; function FileExists(const FileName: string): Boolean; function FileGetDate(Handle: Integer): Integer; function FileSetDate(Handle: Integer; Age: Integer): Integer; function FileGetAttr(const FileName: string): Integer; function FileSetAttr(const FileName: string; Attr: Integer): Integer; function DeleteFile(const FileName: string): Boolean; function RenameFile(const OldName, NewName: string): Boolean; function ChangeFileExt(const FileName, Extension: string): string; function ExtractFilePath(const FileName: string): string; function ExtractFileDir(const FileName: string): string; function ExtractFileDrive(const FileName: string): string; function ExtractFileName(const FileName: string): string; function ExtractFileExt(const FileName: string): string; function ExpandFileName(const FileName: string): string; function ExpandUNCFileName(const FileName: string): string; function ExtractRelativePath(const BaseName, DestName: string): string; function ExtractShortPathName(const FileName: string): string; function FileSearch(const Name, DirList: string): string; function GetCurrentDir: string; function SetCurrentDir(const Dir: string): Boolean; function CreateDir(const Dir: string): Boolean; function RemoveDir(const Dir: string): Boolean; function StrLen(const Str: PChar): Cardinal; function StrEnd(const Str: PChar): PChar; function StrMove(Dest: PChar; const Source: PChar; Count: Cardinal): PChar; function StrCopy(Dest: PChar; const Source: PChar): PChar; function StrECopy(Dest:PChar; const Source: PChar): PChar; function StrLCopy(Dest: PChar; const Source: PChar; MaxLen: Cardinal): PChar; function StrPCopy(Dest: PChar; const Source: string): PChar; function StrPLCopy(Dest: PChar; const Source: string; MaxLen: Cardinal): PChar; function StrCat(Dest: PChar; const Source: PChar): PChar; function StrLCat(Dest: PChar; const Source: PChar; MaxLen: Cardinal): PChar; function StrComp(const Str1, Str2: PChar): Integer; function StrIComp(const Str1, Str2: PChar): Integer; function StrLComp(const Str1, Str2: PChar; MaxLen: Cardinal): Integer; function StrLIComp(const Str1, Str2: PChar; MaxLen: Cardinal): Integer; function StrScan(const Str: PChar; Chr: Char): PChar; function StrRScan(const Str: PChar; Chr: Char): PChar; function StrPos(const Str1, Str2: PChar): PChar; function StrUpper(Str: PChar): PChar; function StrLower(Str: PChar): PChar; function StrPas(const Str: PChar): string; function StrAlloc(Size: Cardinal): PChar; function StrBufSize(const Str: PChar): Cardinal; function StrNew(const Str: PChar): PChar; procedure StrDispose(Str: PChar); function FloatToStr(Value: Extended): string; function FormatFloat(const Format: string; Value: Extended): string; function StrToFloat(S: string): Extended; function DateTimeToTimeStamp(DateTime: TDateTime): TTimeStamp; function TimeStampToDateTime(const TimeStamp: TTimeStamp): TDateTime; function EncodeDate(Year, Month, Day: Word): TDateTime; function EncodeTime(Hour, Min, Sec, MSec: Word): TDateTime; procedure DecodeDate(Date: TDateTime; var Year, Month, Day: Word); procedure DecodeTime(Time: TDateTime; var Hour, Min, Sec, MSec: Word); procedure DateTimeToSystemTime(DateTime: TDateTime; var SystemTime: TSystemTime); function SystemTimeToDateTime(const SystemTime: TSystemTime): TDateTime; function DayOfWeek(Date: TDateTime): Integer; function Date: TDateTime; function Time: TDateTime; function Now: TDateTime; function IncMonth(const Date: TDateTime; NumberOfMonths: Integer): TDateTime; procedure ReplaceTime(var DateTime: TDateTime; const NewTime: TDateTime); procedure ReplaceDate(var DateTime: TDateTime; const NewDate: TDateTime); function IsLeapYear(Year: Word): Boolean; function DateToStr(Date: TDateTime): string; function TimeToStr(Time: TDateTime): string; function DateTimeToStr(DateTime: TDateTime): string; function StrToDate(const S: string): TDateTime; function StrToTime(const S: string): TDateTime; function StrToDateTime(const S: string): TDateTime; function FormatDateTime(const Format: string; DateTime: TDateTime): string; procedure GetFormatSettings; function StringReplace(const S, OldPattern, NewPattern: string; Flags: TReplaceFlags): string; procedure FreeAndNil(var Obj); function Format(const S: string; const Args: array of const): string; { TStream seek origins } soFromBeginning; soFromCurrent; soFromEnd; { TFileStream create mode } fmCreate; { TParser special tokens } toEOF; toSymbol; toString; toInteger; toFloat; toWString; { Text alignment types } TAlignment; TLeftRight; TBiDiMode; { Types used by standard events } TShiftState; THelpContext;
{ Maximum TList size } MaxListSize; constructor Create; function Add(Item: Pointer): Integer; procedure Clear; procedure Delete(Index: Integer); procedure Exchange(Index1, Index2: Integer); function Expand: TList; function Extract(Item: Pointer): Pointer; function First: Pointer; function IndexOf(Item: Pointer): Integer; procedure Insert(Index: Integer; Item: Pointer); function Last: Pointer; procedure Move(CurIndex, NewIndex: Integer); function Remove(Item: Pointer): Integer; procedure Pack; procedure Sort(Compare: TListSortCompare); function _GetCapacity: Integer; procedure _SetCapacity(Value: Integer); property Capacity: Integer read _GetCapacity write _SetCapacity; function _GetCount: Integer; property Count: Integer read _GetCount; function _GetItem(I: Integer): Pointer; procedure _SetItem(I: Integer; Value: Pointer); property Items[Index: Integer]: Pointer read _GetItem write _SetItem; default; function _GetList: PPointerList; property List: PPointerList read _GetList;
constructor Create; function OpenBit: Integer; function _GetBit(I: Integer): Boolean; procedure _SetBit(I: Integer; Value: Boolean); property Bits[Index: Integer]: Boolean read _GetBit write _SetBit; default; function _GetSize: Integer; property Size: Integer read _GetSize;
constructor Create; procedure Assign(Source: TPersistent); function GetNamePath: string; dynamic;
constructor Create(Collection: TCollection); function GetNamePath: string; function _GetCollection: TCollection; procedure _SetCollection(Value: TCollection); property Collection: TCollection read _GetCollection write _SetCollection; function _GetID: Integer; property ID: Integer read _GetID; function _GetIndex: Integer; procedure _SetIndex(Value: Integer); property Index: Integer read _GetIndex write _SetIndex; function _GetDisplayName: String; procedure _SetDisplayName(const Value: String); property DisplayName: string read _GetDisplayName write _SetDisplayName;
constructor Create(ItemClass: TCollectionItemClass); function Add: TCollectionItem; procedure Assign(Source: TPersistent); procedure BeginUpdate; procedure Clear; procedure Delete(Index: Integer); procedure EndUpdate; function FindItemID(ID: Integer): TCollectionItem; function GetNamePath: string; function Insert(Index: Integer): TCollectionItem; function _GetCount: Integer; property Count: Integer read _GetCount; function _GetItemClass: TCollectionItemClass; property ItemClass: TCollectionItemClass read _GetItemClass; function _GetItem(I: Integer): TCollectionItem; procedure _SetItem(I: Integer; Value: TCollectionItem); property Items[Index: Integer]: TCollectionItem read _GetItem write _SetItem;
constructor Create; function Add(const S: string): Integer; function AddObject(const S: string; AObject: TObject): Integer; procedure Append(const S: string); procedure AddStrings(Strings: TStrings); procedure Assign(Source: TPersistent); procedure BeginUpdate; procedure Clear; procedure Delete(Index: Integer); procedure EndUpdate; function Equals(Strings: TStrings): Boolean; procedure Exchange(Index1, Index2: Integer); function GetText: PChar; function IndexOf(const S: string): Integer; function IndexOfName(const Name: string): Integer; function IndexOfObject(AObject: TObject): Integer; procedure Insert(Index: Integer; const S: string); procedure InsertObject(Index: Integer; const S: string; AObject: TObject); procedure LoadFromFile(const FileName: string); procedure LoadFromStream(Stream: TStream); procedure Move(CurIndex, NewIndex: Integer); procedure SaveToFile(const FileName: string); procedure SaveToStream(Stream: TStream); procedure SetText(Text: PChar); function _GetCapacity: Integer; procedure _SetCapacity(Value: Integer); property Capacity: Integer read _GetCapacity write _SetCapacity; function _GetCommaText: String; procedure _SetCommaText(const Value: String); property CommaText: string read _GetCommaText write _SetCommaText; function _GetCount: Integer; property Count: Integer read _GetCount; function _GetName(I: Integer): String; property Names[Index: Integer]: string read _GetName; function _GetObject(I: Integer): TObject; procedure _SetObject(I: Integer; Value: TObject); property Objects[Index: Integer]: TObject read _GetObject write _SetObject; function _GetValue(const I: String): String; procedure _SetValue(const I: String; const Value: String); property Values[const Name: string]: string read _GetValue write _SetValue; function _GetString(I: Integer): String; procedure _SetString(I: Integer; const Value: String); property Strings[Index: Integer]: string read _GetString write _SetString; default; function _GetText: String; procedure _SetText(const Value: String); property Text: string read _GetText write _SetText;
constructor Create; function Add(const S: string): Integer; procedure Clear; procedure Delete(Index: Integer); procedure Exchange(Index1, Index2: Integer); function Find(const S: string; var Index: Integer): Boolean; function IndexOf(const S: string): Integer; procedure Insert(Index: Integer; const S: string); procedure Sort; procedure CustomSort(Compare: TStringListSortCompare); function _GetItem(I: Integer): String; procedure _SetItem(I: Integer; Value: String); property Items[Index: Integer]: String read _GetItem write _SetItem; function _GetDuplicates: TDuplicates; procedure _SetDuplicates(Value: TDuplicates); property Duplicates: TDuplicates read _GetDuplicates write _SetDuplicates; function _GetSorted: Boolean; procedure _SetSorted(Value: Boolean); property Sorted: Boolean read _GetSorted write _SetSorted;
constructor Create; function Read(var Buffer; Count: Longint): Longint; function Write(const Buffer; Count: Longint): Longint; function Seek(Offset: Longint; Origin: Word): Longint; procedure ReadBuffer(var Buffer; Count: Longint); procedure WriteBuffer(const Buffer; Count: Longint); function CopyFrom(Source: TStream; Count: Longint): Longint; function ReadComponent(Instance: TComponent): TComponent; function ReadComponentRes(Instance: TComponent): TComponent; procedure WriteComponent(Instance: TComponent); procedure WriteResourceHeader(const ResName: string; out FixupInfo: Integer); procedure FixupResourceHeader(FixupInfo: Integer); procedure ReadResHeader; function _GetPosition: Integer; procedure _SetPosition(Value: Integer); property Position: Longint read _GetPosition write _SetPosition; function _GetSize: Longint; procedure _SetSize(Value: Longint); property Size: Longint read _GetSize write _SetSize;
constructor Create(AHandle: Integer); function Read(var Buffer; Count: Longint): Longint; function Write(const Buffer; Count: Longint): Longint; function Seek(Offset: Longint; Origin: Word): Longint; function _GetHandle: Integer; property Handle: Integer read _GetHandle;
constructor Create(const FileName: string; Mode: Word);
constructor Create; function Read(var Buffer; Count: Longint): Longint; function Seek(Offset: Longint; Origin: Word): Longint; procedure SaveToStream(Stream: TStream); procedure SaveToFile(const FileName: string); function _GetMemory: Pointer; property Memory: Pointer read _GetMemory;
constructor Create; procedure Clear; procedure LoadFromStream(Stream: TStream); procedure LoadFromFile(const FileName: string); procedure SetSize(NewSize: Longint); function Write(const Buffer; Count: Longint): Longint;
constructor Create(const AString: string); fonction Read(var Buffer; Count: Longint): Longint; function ReadString(Count: Longint): string; function Seek(Offset: Longint; Origin: Word): Longint; function Write(const Buffer; Count: Longint): Longint; procedure WriteString(const AString: string); function _GetDataString: String; property DataString: string read _GetDataString;
constructor Create(Instance: THandle; const ResName: string; ResType: PChar); constructor CreateFromID(Instance: THandle; ResID: Integer; ResType: PChar); function Write(const Buffer; Count: Longint): Longint;
constructor Create(Stream: TStream); procedure CheckToken(T: Char); procedure CheckTokenSymbol(const S: string); procedure Error(const Ident: string); procedure ErrorStr(const Message: string); procedure HexToBinary(Stream: TStream); function NextToken: Char; function SourcePos: Longint; function TokenComponentIdent: string; function TokenFloat: Extended; function TokenString: string; function TokenSymbolIs(const S: string): Boolean; function _GetFloatType: Char; property FloatType: Char read _GetFloatType; function _GetSourceLine: Integer; property SourceLine: Integer read _GetSourceLine; function _GetToken: Char; property Token: Char read _GetToken;