Subversion Repositories svn.mios32

Compare Revisions

Ignore whitespace Rev 2441 → Rev 2442

/trunk/apps/processing/midibox_cv_v2/src/components/MbCv.cpp
1163,29 → 1163,30
/////////////////////////////////////////////////////////////////////////////
bool MbCv::getNRPNEffectiveValue(u16 nrpnNumber, float *value)
{
u32 par = nrpnNumber & 0x3ff;
// quick hack to check if this makes sense...
if( (nrpnNumber & 0xf80) == 0x100 ) { // LFO1
if( (par & 0x3f0) == 0x100 ) { // LFO1
*value = (float)mbCvLfo[0].lfoOut / 32768.0;
return true;
} else if( (nrpnNumber & 0xf80) == 0x180 ) { // LFO2
} else if( (par & 0x3f0) == 0x180 ) { // LFO2
*value = (float)mbCvLfo[1].lfoOut / 32768.0;
return true;
} else if( (nrpnNumber & 0xf80) == 0x200 ) { // ENV1
} else if( (par & 0x3f0) == 0x200 ) { // ENV1
*value = (float)mbCvEnv1[0].envOut / 32768.0;
return true;
} else if( (nrpnNumber & 0xf80) == 0x280 ) { // ENV2
} else if( (par & 0x3f0) == 0x280 ) { // ENV2
*value = (float)mbCvEnv2[0].envOut / 32768.0;
return true;
} else if( (nrpnNumber & 0xff0) == 0x300 ) { // MOD1 Depth
} else if( (par & 0x3f0) == 0x300 ) { // MOD1 Depth
*value = (float)mbCvMod.modOut[0] / 32768.0;
return true;
} else if( (nrpnNumber & 0xff0) == 0x310 ) { // MOD2 Depth
} else if( (par & 0x3f0) == 0x310 ) { // MOD2 Depth
*value = (float)mbCvMod.modOut[1] / 32768.0;
return true;
} else if( (nrpnNumber & 0xff0) == 0x320 ) { // MOD3 Depth
} else if( (par & 0x3f0) == 0x320 ) { // MOD3 Depth
*value = (float)mbCvMod.modOut[2] / 32768.0;
return true;
} else if( (nrpnNumber & 0xff0) == 0x330 ) { // MOD4 Depth
} else if( (par & 0x3f0) == 0x330 ) { // MOD4 Depth
*value = (float)mbCvMod.modOut[3] / 32768.0;
return true;
}
/trunk/apps/processing/midibox_cv_v2/src/mbcv_lre.cpp
24,6 → 24,7
#include "mbcv_lre.h"
#include "mbcv_rgb.h"
#include "mbcv_hwcfg.h"
#include "scs_config.h"
 
 
/////////////////////////////////////////////////////////////////////////////
782,6 → 783,12
 
env->setNRPN(e->nrpn, new_value);
env->midiSendNRPNToActivePort(e->nrpn, new_value);
 
// change CV channel
u8 cv = e->nrpn >> 10;
if( cv < CV_SE_NUM ) {
SCS_CONFIG_CvSet(cv);
}
}
MbCvNrpnInfoT info;
/trunk/apps/processing/midibox_cv_v2/src/mbcv_rgb.cpp
100,7 → 100,13
// set colour
switch( ws2812->mode ) {
case MBCV_RGB_MODE_CHANNEL_HUE: {
WS2812_LED_SetHSV(led_pos, (float)SCS_CONFIG_CvGet() * (360.0/(float)CV_SE_NUM), saturation, value);
#if 0
float hue = (float)SCS_CONFIG_CvGet() * (360.0/(float)CV_SE_NUM);
#else
float hue = (float)MBCV_LRE_BankGet() * (360.0/(float)CV_SE_NUM); // quickfix: should depend on bank so that it corresponds with the encoder function
#endif
 
WS2812_LED_SetHSV(led_pos, hue, saturation, value);
} break;
 
default: // e.g. MBCV_RGB_MODE_DISABLED