Midi Array Module?
+1 for bsork, I approuved at 127%
PatcherKit at work.
It's a good suggestion but do you have noticed that the Pianoroll can work as a midi array?
http://www.sensomusic.com/wiki/doku.php ... _pianoroll
http://www.sensomusic.com/wiki/doku.php ... _pianoroll
Olivier Sens
www.brainmodular.com
www.brainmodular.com
Yes, I know about that one, but I was more thinking of an "ARRAY OF tMidi" kind of module.
Bjørn S
It's not so easy to implement because the midi event contains 4 x 8bit elements.
and TMIDI is in fact an array.
So it means array of array.
But more basically what is your idea behind that?
Why do you need array's of Tmidi?
and TMIDI is in fact an array.
So it means array of array.
But more basically what is your idea behind that?
Why do you need array's of Tmidi?
Olivier Sens
www.brainmodular.com
www.brainmodular.com
I don't want you to put much effort into this, as I can easily spread the MIDI data out in a "conventional" array just like you've done in the piano roll - I've done that before and was about to do it again when I came up with this suggestion.
My ideas behind it was to ease programming/storing sets of MIDI messages to be used as some kind of cross between a SysEx array and a Create Midi Message.
Just because I'm curious (again
): I thought the MIDI messages was declared as a 4 byte record and "packed" to look like a Single when passing between modules. It certainly looked like that when tracing values through the wires sometimes.
My ideas behind it was to ease programming/storing sets of MIDI messages to be used as some kind of cross between a SysEx array and a Create Midi Message.
Just because I'm curious (again
Bjørn S
still not very clear in my mind... Sometime I'm slow...My ideas behind it was to ease programming/storing sets of MIDI messages to be used as some kind of cross between a SysEx array and a Create Midi Message.
Let me think about it.
exactly, 4 bytes packed so can look like a 32bits float if they are connected,for example, to a math module.Just because I'm curious (again): I thought the MIDI messages was declared as a 4 byte record and "packed" to look like a Single when passing between modules. It certainly looked like that when tracing values through the wires sometimes
Olivier Sens
www.brainmodular.com
www.brainmodular.com
This idea remins me a bit of the midiCCreset vst plugin by pizmidi http://www.kvraudio.com/forum/viewtopic.php?t=192282bsork wrote:My ideas behind it was to ease programming/storing sets of MIDI messages to be used as some kind of cross between a SysEx array and a Create Midi Message.
.
that he kindly made at my request some time ago.
The idea is that the plugin will store whichever CC#'s and CC values last received and then release them when triggered. Is this something like what you are getting at? Kind of like a battery that stores multiple midi values? (which I suppose is like what an array is)
Well, sort of. My immediate interest in such a module would by for storing messages to be sent when triggered from my foot controller. This is all built around a script so it's not much hassle to use a normal array to store the values outside of the script and construct the MIDI messages when needed, but in other cases something more similar to the VST you mention could be done without scripting.
Bjørn S
ok, I understand the idea of creating a midi buffer.
But the midiCCreset can be implemented in usine with 2 data array's?
just an off-topic suggestion:
did you try the sampler to record midi data's. Normally it should work?
But the midiCCreset can be implemented in usine with 2 data array's?
just an off-topic suggestion:
did you try the sampler to record midi data's. Normally it should work?
Olivier Sens
www.brainmodular.com
www.brainmodular.com
a bit OT too, but im interested. is there a way, a math trick or i don't know, to do the reverse: 'unpack' some 32bit floats via modules, a bit like what does the shr fonction in scripts on 24bit colors to get the 3x8bits independant RGB? get 4x 8bits.senso wrote:exactly, 4 bytes packed so can look like a 32bits float if they are connected,for example, to a math module.
it could be virtually some arrays of arrays if can pack 4 values, manipulate in arraysas float32, be able to save to pm then redepack
on needz?
@bsork: didn't test but can't we store some tmidi arrays to a selector/dispatcher as they can handle arrays, then use 4xGetArray to unpack selected output to create midi module?
edit: mmm no doesn't work, as it's perceived as a single 32bit float? so wouldn't this kind of bits manipulation tool/math trick to encode ie 3 or 4x 8bits to 24 / 32 and demultiplex be useful? a script could actually do that. or indeed use 2x arrays is probably simpler at patch level in fact...
still, by curiosity im interested in that pack/unpack possible trick, a bit abstact to think in binary
you're right a Bit manipulation pack is missing.
the only solution is a script with a a couple of AND and SHR operators.
the only solution is a script with a a couple of AND and SHR operators.
Olivier Sens
www.brainmodular.com
www.brainmodular.com
thanks for infos gonna experiment with script.
im just wondering how that works for 32bits to repack:
so to recompile a 24bit we do byte1 + byte2*$100 + byte3*$10000.. so + byte4*$10000000 for 32bit?
im just wondering how that works for 32bits to repack:
so to recompile a 24bit we do byte1 + byte2*$100 + byte3*$10000.. so + byte4*$10000000 for 32bit?
yesso to recompile a 24bit we do byte1 + byte2*$100 + byte3*$10000.. so + byte4*$10000000 for 32bit?
Olivier Sens
www.brainmodular.com
www.brainmodular.com
mmm but midi shown is float32 is not like it was an int32
i don't manage to extract bytes as shr is awaiting an integer, what's the trick? how to convert a float32 to Dword?
or extract bytes from a float?
i don't manage to extract bytes as shr is awaiting an integer, what's the trick? how to convert a float32 to Dword?
or extract bytes from a float?
You can use both functions like Round and Trunc as well as type casting to explicit convert between data types. When type casting, you use the data type name - Byte, Integer, Single, DWord, whatever - like any other function name. For instance floatVar := Float(intVar);
BTW, remember that X shr N and X shl N do the same as raising X to the power of N. In the case of shl it's like using positive values for N, for shr it's like using negative numbers.
BTW, remember that X shr N and X shl N do the same as raising X to the power of N. In the case of shl it's like using positive values for N, for shr it's like using negative numbers.
Bjørn S
woa i dindn't knew the float(intVar) thing go to try this out maybe this is exactly what im after, but i mnot sure, i guess it rounds.
cause in the midi case, i think we can't trunc or round the value, as it would mess the 4bytes we are trying to extract?
in fact let's say midi look like 2,7643678 , that's a float 32 ,so can't use shr, but it's 4 bytes corespond to some int midich,msg,code1,2.
if i round/trunc i get 2or3 , extracting the bytes of 2 value with shr will not be the same as what would be extracting first byte of 2,776.
i must admit i don't catch shl r, and the binary world very well, i got to try that out.
from what i understand it needs first to transform a float32(1+23+8) in 'what would be an int32' if adding it's 4bytes(8,8,8,8),(or inother words directly extract its bytes and convert to int) wich is not the same of rounding it .. from dk i see what i mean?
anyway that's complex for nothing really useful in most cases as we saw. more curiosity..
cause in the midi case, i think we can't trunc or round the value, as it would mess the 4bytes we are trying to extract?
in fact let's say midi look like 2,7643678 , that's a float 32 ,so can't use shr, but it's 4 bytes corespond to some int midich,msg,code1,2.
if i round/trunc i get 2or3 , extracting the bytes of 2 value with shr will not be the same as what would be extracting first byte of 2,776.
i must admit i don't catch shl r, and the binary world very well, i got to try that out.
from what i understand it needs first to transform a float32(1+23+8) in 'what would be an int32' if adding it's 4bytes(8,8,8,8),(or inother words directly extract its bytes and convert to int) wich is not the same of rounding it .. from dk i see what i mean?
anyway that's complex for nothing really useful in most cases as we saw. more curiosity..
Who is online
Users browsing this forum: No registered users and 12 guests
