MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / getValueAsBigInteger

Function getValueAsBigInteger

Source/Core/CtrlrUtilities.cpp:749–776  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

747}
748
749const BigInteger getValueAsBigInteger(const int inValue, const CtrlrSysExFormulaToken op)
750{
751 BigInteger i(0);
752 if (op == LSB7bitValue)
753 {
754 i.setBitRangeAsInt(0, 7, inValue);
755 return (i.getBitRangeAsInt(0, 14));
756 }
757 else if (op == MSB7bitValue)
758 {
759 i.setBitRangeAsInt(7, 7, inValue);
760 return (i.getBitRangeAsInt(0, 14));
761 }
762 else if (op == LSB4bitValue)
763 {
764 i.setBitRangeAsInt(0, 4, inValue);
765 return (i.getBitRangeAsInt(0, 8));
766 }
767 else if (op == MSB4bitValue)
768 {
769 i.setBitRangeAsInt(4, 4, inValue);
770 return (i.getBitRangeAsInt(0, 8));
771 }
772 else
773 {
774 return (BigInteger(inValue));
775 }
776}
777
778const MemoryBlock midiMessagePattern(const CtrlrMidiMessageEx &mEx, const Array<CtrlrSysexToken> tokens, const Array <int, CriticalSection> &globalVariables)
779{

Callers 1

getBitValueMethod · 0.85

Calls 2

setBitRangeAsIntMethod · 0.45
getBitRangeAsIntMethod · 0.45

Tested by

no test coverage detected