ArrayArrayArrayArray
Statistics: Posted by 23fx23 — 07 Jun 2010, 19:29
but as you point its descent regarding audio, and what I could gain in space would propably be lost by the cpu increase of pack/unpacking .. so Ill stop to bother with such brainy things... works nice with normal system.
]]>
Statistics: Posted by 23fx23 — 06 Jun 2010, 16:00
var midi_32bits : Tparameter;
var ch,msg,code1,code2 : Tparameter;
// initialisation : create parameters
procedure init;
begin
midi_32bits := CreateParam('midi_32bits',ptDataField);setMax(midi_32bits,$100000000);
Ch := CreateParam('Ch',ptDataField);
Msg := CreateParam('msg',ptDataField);
code1 := CreateParam('code1',ptDataField);
code2 := CreateParam('code2',ptDataField);
SetIsOutPut(midi_32bits,false);
SetIsinPut(Ch,false);
SetIsInPut(Msg,false);
SetIsInPut(Code1,false);
SetIsInPut(Code2,false);
end;
procedure Callback(n:integer);
begin
if (n=midi_32bits) then DECODE_MIDI;
end;
// no process bloc
/////////////////////////////////////////////////
Procedure Decode_Midi;
var valout: dword;
BEGIN
valout:= round(getvalue(midi_32bits));
setvalue(CH, GetChValue(valout));
setvalue(MSG, GetMSGValue(valout));
setvalue(Code1, GetCode1Value(valout));
setvalue(Code2, GetCode2Value(valout));
END;
///////////////////////////////////////
function GetCHValue(midi: DWORD): Byte;
begin
Result := Byte(midi);
end;
///////////////////////////////////////
function GetMSGValue(midi: DWORD): Byte;
begin
Result := Byte(midi shr;
end;
///////////////////////////////////////
function GetCode1Value(midi: DWORD): Byte;
begin
Result := Byte(midi shr 16);
end;
////////////////////////////////////
function GetCode2Value(midi: DWORD): Byte;
begin
Result := Byte(midi shr 24);
end;
////////////////////////////////////]
Statistics: Posted by 23fx23 — 06 Jun 2010, 10:55
Statistics: Posted by 23fx23 — 07 Jun 2010, 19:29
Statistics: Posted by 23fx23 — 06 Jun 2010, 16:00
var midi_32bits : Tparameter;
var ch,msg,code1,code2 : Tparameter;
// initialisation : create parameters
procedure init;
begin
midi_32bits := CreateParam('midi_32bits',ptDataField);setMax(midi_32bits,$100000000);
Ch := CreateParam('Ch',ptDataField);
Msg := CreateParam('msg',ptDataField);
code1 := CreateParam('code1',ptDataField);
code2 := CreateParam('code2',ptDataField);
SetIsOutPut(midi_32bits,false);
SetIsinPut(Ch,false);
SetIsInPut(Msg,false);
SetIsInPut(Code1,false);
SetIsInPut(Code2,false);
end;
procedure Callback(n:integer);
begin
if (n=midi_32bits) then DECODE_MIDI;
end;
// no process bloc
/////////////////////////////////////////////////
Procedure Decode_Midi;
var valout: dword;
BEGIN
valout:= round(getvalue(midi_32bits));
setvalue(CH, GetChValue(valout));
setvalue(MSG, GetMSGValue(valout));
setvalue(Code1, GetCode1Value(valout));
setvalue(Code2, GetCode2Value(valout));
END;
///////////////////////////////////////
function GetCHValue(midi: DWORD): Byte;
begin
Result := Byte(midi);
end;
///////////////////////////////////////
function GetMSGValue(midi: DWORD): Byte;
begin
Result := Byte(midi shr;
end;
///////////////////////////////////////
function GetCode1Value(midi: DWORD): Byte;
begin
Result := Byte(midi shr 16);
end;
////////////////////////////////////
function GetCode2Value(midi: DWORD): Byte;
begin
Result := Byte(midi shr 24);
end;
////////////////////////////////////]
Statistics: Posted by 23fx23 — 06 Jun 2010, 10:55