View Single Post
Old 12-06-2022, 02:38 AM   #21200
Geoff Waddington
Human being with feelings
 
Geoff Waddington's Avatar
 
Join Date: Mar 2009
Location: Dartmouth, Nova Scotia
Posts: 11,183
Default

Quote:
Originally Posted by jacksoonbrowne View Post
Hi Geoff,

Found some time to work on the X32 again.

I made a small mod to the code that will select the appropriate fader bank on the X32 when a channel is selected on reaper.

For example,

If I select any channels on reaper between 1 and 16, the X32 will automatically select X32 channel bank 1.
If I select any channels on reaper between 17 and 32, the X32 will automatically select X32 channel bank 2.
etc ... in banks of 16 channels.

Thus any channel selected in Repear will automatically select the approprite channel bank on the X32.

Old Code:
Code:
void OSC_IntFeedbackProcessor::ForceValue(map<string, string> &properties, double value)
{
    lastDoubleValue_ = value;
    
    if (surface_->IsX32() && oscAddress_.find("/-stat/selidx") != string::npos)
    {
        if (value != 0.0)
            surface_->SendOSCMessage(this, "/-stat/selidx", widget_->GetChannelNumber() - 1);
    }
    else
        surface_->SendOSCMessage(this, oscAddress_, (int)value);
}
New channel banking code:
Code:
void OSC_IntFeedbackProcessor::ForceValue(map<string, string> &properties, double value)
{
    lastDoubleValue_ = value;
    
    if (surface_->IsX32() && oscAddress_.find("/-stat/selidx") != string::npos)
    {
        if (value != 0.0)
        {
            surface_->SendOSCMessage(this, "/-stat/selidx",       widget_->GetChannelNumber() -1);
            surface_->SendOSCMessage(this, "/-stat/chfaderbank", (widget_->GetChannelNumber() -1) / 16);
        }
    }
    else
        surface_->SendOSCMessage(this, oscAddress_, (int)value);
}
Could you add this to the next build?
Cool, will add it in the next few days.
__________________
To install you need the CSI Software and Support Files
For installation instructions and documentation see the Wiki
Donate -- via PayPal to waddingtongeoff@gmail.com
Geoff Waddington is offline   Reply With Quote