ArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArray
BrainModularBrainModular Users Forum2010-06-08T01:16:44+02:00https://brainmodular.org/forums/app.php/feed/topic/22042010-06-08T01:16:44+02:002010-06-08T01:16:44+02:00https://brainmodular.org/forums/viewtopic.php?t=2204&p=14171#p14171 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..
]]>2010-06-07T07:50:33+02:002010-06-07T07:50:33+02:00https://brainmodular.org/forums/viewtopic.php?t=2204&p=14153#p14153 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.
]]>2010-06-06T17:21:11+02:002010-06-06T17:21:11+02:00https://brainmodular.org/forums/viewtopic.php?t=2204&p=14148#p14148 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?
]]>2010-05-13T20:31:13+02:002010-05-13T20:31:13+02:00https://brainmodular.org/forums/viewtopic.php?t=2204&p=13912#p13912Statistics: Posted by 23fx23 — 13 May 2010, 20:31
]]>2010-05-13T17:11:40+02:002010-05-13T17:11:40+02:00https://brainmodular.org/forums/viewtopic.php?t=2204&p=13910#p13910im 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?
]]>2010-05-13T17:00:10+02:002010-05-13T17:00:10+02:00https://brainmodular.org/forums/viewtopic.php?t=2204&p=13909#p13909the only solution is a script with a a couple of AND and SHR operators.
exactly, 4 bytes packed so can look like a 32bits float if they are connected,for example, to a math module.
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. 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
]]>2010-05-13T08:44:57+02:002010-05-13T08:44:57+02:00https://brainmodular.org/forums/viewtopic.php?t=2204&p=13906#p13906But 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?
]]>2010-05-12T22:33:15+02:002010-05-12T22:33:15+02:00https://brainmodular.org/forums/viewtopic.php?t=2204&p=13905#p13905Statistics: Posted by bsork — 12 May 2010, 22:33
]]>2010-05-12T20:54:35+02:002010-05-12T20:54:35+02:00https://brainmodular.org/forums/viewtopic.php?t=2204&p=13902#p13902
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. .
This idea remins me a bit of the midiCCreset vst plugin by pizmidi http://www.kvraudio.com/forum/viewtopic.php?t=192282 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)
Statistics: Posted by gurulogic — 12 May 2010, 20:54
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.
still not very clear in my mind... Sometime I'm slow... Let me think about it.
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
exactly, 4 bytes packed so can look like a 32bits float if they are connected,for example, to a math module.
]]>2010-05-12T19:16:00+02:002010-05-12T19:16:00+02:00https://brainmodular.org/forums/viewtopic.php?t=2204&p=13900#p13900 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.
]]>2010-05-12T18:22:55+02:002010-05-12T18:22:55+02:00https://brainmodular.org/forums/viewtopic.php?t=2204&p=13899#p13899and 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?
]]>2010-05-12T12:07:11+02:002010-05-12T12:07:11+02:00https://brainmodular.org/forums/viewtopic.php?t=2204&p=13895#p13895Statistics: Posted by jeanrene — 12 May 2010, 12:07
]]>2010-05-11T22:13:21+02:002010-05-11T22:13:21+02:00https://brainmodular.org/forums/viewtopic.php?t=2204&p=13892#p13892Statistics: Posted by bsork — 11 May 2010, 22:13
]]>BrainModularBrainModular Users Forum2010-06-08T01:16:44+02:00https://brainmodular.org/forums/app.php/feed/topic/22042010-06-08T01:16:44+02:002010-06-08T01:16:44+02:00https://brainmodular.org/forums/viewtopic.php?t=2204&p=14171#p14171 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..
]]>2010-06-07T07:50:33+02:002010-06-07T07:50:33+02:00https://brainmodular.org/forums/viewtopic.php?t=2204&p=14153#p14153 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.
]]>2010-06-06T17:21:11+02:002010-06-06T17:21:11+02:00https://brainmodular.org/forums/viewtopic.php?t=2204&p=14148#p14148 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?
]]>2010-05-13T20:31:13+02:002010-05-13T20:31:13+02:00https://brainmodular.org/forums/viewtopic.php?t=2204&p=13912#p13912Statistics: Posted by 23fx23 — 13 May 2010, 20:31
]]>2010-05-13T19:06:30+02:002010-05-13T19:06:30+02:00https://brainmodular.org/forums/viewtopic.php?t=2204&p=13911#p13911
so to recompile a 24bit we do byte1 + byte2*$100 + byte3*$10000.. so + byte4*$10000000 for 32bit?
]]>2010-05-13T17:11:40+02:002010-05-13T17:11:40+02:00https://brainmodular.org/forums/viewtopic.php?t=2204&p=13910#p13910im 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?
]]>2010-05-13T17:00:10+02:002010-05-13T17:00:10+02:00https://brainmodular.org/forums/viewtopic.php?t=2204&p=13909#p13909the only solution is a script with a a couple of AND and SHR operators.
exactly, 4 bytes packed so can look like a 32bits float if they are connected,for example, to a math module.
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. 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
]]>2010-05-13T08:44:57+02:002010-05-13T08:44:57+02:00https://brainmodular.org/forums/viewtopic.php?t=2204&p=13906#p13906But 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?
]]>2010-05-12T22:33:15+02:002010-05-12T22:33:15+02:00https://brainmodular.org/forums/viewtopic.php?t=2204&p=13905#p13905Statistics: Posted by bsork — 12 May 2010, 22:33
]]>2010-05-12T20:54:35+02:002010-05-12T20:54:35+02:00https://brainmodular.org/forums/viewtopic.php?t=2204&p=13902#p13902
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. .
This idea remins me a bit of the midiCCreset vst plugin by pizmidi http://www.kvraudio.com/forum/viewtopic.php?t=192282 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)
Statistics: Posted by gurulogic — 12 May 2010, 20:54
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.
still not very clear in my mind... Sometime I'm slow... Let me think about it.
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
exactly, 4 bytes packed so can look like a 32bits float if they are connected,for example, to a math module.
]]>2010-05-12T19:16:00+02:002010-05-12T19:16:00+02:00https://brainmodular.org/forums/viewtopic.php?t=2204&p=13900#p13900 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.
]]>2010-05-12T18:22:55+02:002010-05-12T18:22:55+02:00https://brainmodular.org/forums/viewtopic.php?t=2204&p=13899#p13899and 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?
]]>2010-05-12T12:07:11+02:002010-05-12T12:07:11+02:00https://brainmodular.org/forums/viewtopic.php?t=2204&p=13895#p13895Statistics: Posted by jeanrene — 12 May 2010, 12:07
]]>2010-05-11T22:13:21+02:002010-05-11T22:13:21+02:00https://brainmodular.org/forums/viewtopic.php?t=2204&p=13892#p13892Statistics: Posted by bsork — 11 May 2010, 22:13
]]>