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

Method setModulatorValuesFromData

Source/Lua/CtrlrLuaManager.cpp:863–881  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

861}
862
863void CtrlrPanel::setModulatorValuesFromData (const MemoryBlock &dataSource, const String &propertyToIndexBy, const CtrlrByteEncoding byteEncoding, int propertyOffset, int bytesPerValue, const bool useMappedValues)
864{
865 for (unsigned int index = 0; index<dataSource.getSize() / bytesPerValue; index++)
866 {
867 CtrlrModulator *m = getModulatorWithProperty (propertyToIndexBy, propertyOffset + index);
868 if (m)
869 {
870 const int v = dataSource.getBitRange (index * bytesPerValue * 8, bytesPerValue * 8);
871
872 if (!m->isStatic())
873 {
874 if (useMappedValues)
875 m->setValueMapped (v, false, true);
876 else
877 m->setValueNonMapped (v, false, true);
878 }
879 }
880 }
881}
882
883void CtrlrPanel::wrapForLua (lua_State *L)
884{

Callers

nothing calls this directly

Calls 5

setValueMappedMethod · 0.80
setValueNonMappedMethod · 0.80
getSizeMethod · 0.45
getBitRangeMethod · 0.45
isStaticMethod · 0.45

Tested by

no test coverage detected