You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
collective: create OSC message to make a bitmask value #189
I guess OSCMKtlDevice:send should convert its outValues
to a bitmasked array if an entry in its desc says so.
Generally, not sure how much sense it makes to implement every single-device case,
could be considered just-in-case coding.
@LFSaw, does off/amber/red work with strings as in your example already?
// roughly, this would be the place to do it:
send { |key, val|
var elDesc, oscPath, outvalues,valIndex;
// ... dont set if no destination
// prepare outmessage value for a collective - array of values to send
if ( val.isKindOf( Array ) ){
elDesc = mktl.collectiveDescriptionFor( key );
valIndex = 0;
oscPath = elDesc[\oscPath];
outvalues = List.new;
elDesc[\argTemplate].do { |it|
if ( it.isNil ) {
outvalues.add( val.at( valIndex ) ); valIndex = valIndex + 1;
}{
outvalues.add( it )
};
};
if ( valIndex < val.size ) {
outvalues = outvalues ++ (val.copyToEnd( valIndex ) ) };
outvalues = outvalues.asArray;
////// ADD HERE: elDesc[\bitMask] describes bitMask conversion properties ////
if (elDesc[\bitMask].notNil) {
// do conversions here
outvalues = ...
};
} {
// prepare outmessage for value of a single element:
// ...
};
// and send
destination.sendMsg(oscPath, *outvalues);
}
Activity
sensestage commentedon May 23, 2015
It may be easier to fix this in MantaOSC
LFSaw commentedon Feb 11, 2017
here's some starting points.
Create Manta MKtl
LFSaw commentedon Feb 11, 2017
you have an idea for this, @adcxyz ?
adcxyz commentedon Feb 12, 2017
I guess OSCMKtlDevice:send should convert its outValues
to a bitmasked array if an entry in its desc says so.
Generally, not sure how much sense it makes to implement every single-device case,
could be considered just-in-case coding.
@LFSaw, does off/amber/red work with strings as in your example already?
adcxyz commentedon Feb 12, 2017