Surface SDK Question

Author
soundman32
Max Output Level: -90 dBFS
  • Total Posts : 45
  • Joined: 2007/10/09 03:57:32
  • Status: offline
2016/12/28 11:44:40 (permalink)

Surface SDK Question

I've been writing a surface plugin for Sonar for literally years (I started with V8!) and I've been stuck on the same problem since almost the beginning:
 
How do I map the ProChannel to my surface?
 
I've read the docs, I've seen Azslow3's updates to the vs-700 code to support PC and I just don't get it.  I'm happy to give access to the git repo to anyone who can point me in the right direction, or even just talk me through it.
 
I would love to release my plugin to the community, but until I get PC fixed, it's just not ready for big time.
 
Can anyone help?
#1

5 Replies Related Threads

    azslow3
    Max Output Level: -42.5 dBFS
    • Total Posts : 3297
    • Joined: 2012/06/22 19:27:51
    • Location: Germany
    • Status: offline
    Re: Surface SDK Question 2016/12/28 14:56:30 (permalink)
    I have not updated VS-700, but MackieControl...
     
    In former times, Sonar had build-in effects which are called "FILTER" in SDK. The position was fixed, EQ (0), Compressor (1), other "not implemented yet". When CW has introduced ProChannel, originally that was the "filter" replacements. So they have adopted Filter SDK API to access it. They have introduced "dynamic ProChannel" then, when modules can have arbitrary position and there can be more modules.
     
    They have tried to adopt to the change, I guess when working with VS-700 plug-in. But probably the "knowledge" how to do this correctly was lost and so the API is not working in any logical way. They have made the decision to use Plug-ins Dynamic Mapping (AKA "ACT Learn") only for VS-700 (unlike Mackie Control, which does not support it at all), so the code responsible for ProChannel direct access was no longer in focus and so it is still in half-made state.
     
    The logic for ProChannel access throw Filter API is the following: if you access ProChannel for strip in focus (as seen in the Track Inspectors), the index (what is defined as EQ, COMP, etc.) is not valid, the index is "normal" in respect to current modules sequence. And you can access all modules. If you try to access ProChannel for strip which is NOT in focus, you can access EQ and Compressor only. But the index is still not as defined in SDK, it depends from positions of EQ and Compressor in focused strip (so, think it is "random").
     
    SDK also has a bug, it can not return the name of ProChannel module (what it can do for FXes and Synth Rack). AZ Controller and my moded MackieControl are "searching" for ProChannel modules by the number of parameters and when required by the name of the last parameter. Note that names are localized, in German version it is not the same as in English and so on. But that method is pretty "stable" for me so far. Also that is the only way to distinguish between different "FX Chain"s, they are all represented as a singed "FX Chain", also for Dynamic Mapping. Since they can have different number of controls, the mapping is never right then...
     
    Recently found bug: do not try to get the name for ProChannel Compressor parameter 0, which is always "Type". Getting this string, when done continuously, for example to update display with parameter name, crash Sonar.
     
    I think the simplest way to work with ProChannel is using Dynamic Mapping ("ACT Learn"). You just need "Focus" the module (with "Filter" API) and then "ACT Lock". You will have to evaporate current ACT XML files (another nasty Sonar bug) and then use  "AZ ACT Fix" periodically (after "ACT Learning") or "ACT Editor" from MarKo. But that should work fine.
     
    I hope that information can help you to advance.

    Sonar 8LE -> Platinum infinity, REAPER, Windows 10 pro
    GA-EP35-DS3L, E7500, 4GB, GTX 1050 Ti, 2x500GB
    RME Babyface Pro (M-Audio Audiophile Firewire/410, VS-20), Kawai CN43, TD-11, Roland A500S, Akai MPK Mini, Keystation Pro, etc.
    www.azslow.com - Control Surface Integration Platform for SONAR, ReaCWP, AOSC and other accessibility tools
    #2
    soundman32
    Max Output Level: -90 dBFS
    • Total Posts : 45
    • Joined: 2007/10/09 03:57:32
    • Status: offline
    Re: Surface SDK Question 2016/12/29 15:30:18 (permalink)
    So, are you saying that as long as the channel is selected, the 'index' of the PC module is in order of display (top to bottom)?  I can work with that, as I can make sure the correct channel is selected before sending or receiving commands.
     
    I don't seem to be notified when the PC is re-ordered, is that normal? Is there some other way I should be working out which module is at which index?
     
     
    #3
    bitman
    Max Output Level: -34 dBFS
    • Total Posts : 4105
    • Joined: 2003/11/06 14:11:54
    • Location: Keystone Colorado
    • Status: offline
    Re: Surface SDK Question 2016/12/29 19:54:38 (permalink)
    To get the order of the Re-Orderable PC Modules do this.
     
    DWORD MIX_PARAM_FILTER_INDEX = 0x42;
    float fVal;
     
    m_pMixer->GetMixParam(SONAR_MIXER_STRIP StripNo, DWORD StripNo,MIX_PARAM_FILTER_INDEX,MIX_FILTER_EQ, &fVal );


    fVal will be 1.0, 2.0, or 3.0 representing the position of in the above EQ.
     
    Change MIX_FILTER_EQ to MIX_FILTER_COMP or MIX_FILTER_SAT to check the position of the others.
     
    post edited by bitman - 2016/12/29 21:01:44
    #4
    soundman32
    Max Output Level: -90 dBFS
    • Total Posts : 45
    • Joined: 2007/10/09 03:57:32
    • Status: offline
    Re: Surface SDK Question 2016/12/30 15:47:25 (permalink)
    Does this processing need to be done as part of the surface refresh?
    #5
    bitman
    Max Output Level: -34 dBFS
    • Total Posts : 4105
    • Joined: 2003/11/06 14:11:54
    • Location: Keystone Colorado
    • Status: offline
    Re: Surface SDK Question 2016/12/30 17:55:23 (permalink)
    soundman32
    Does this processing need to be done as part of the surface refresh?


    No, do it on the fly as needed. And adjust the fx# from the (int)fVal return as part of the param # variable in your Get/Set Param call. - Because the end user is free to re-order the PC modules at will.
     
    Addendum: The return may actually be zero based. It's been a while since I played with this section and I forget.
    post edited by bitman - 2016/12/30 18:35:02
    #6
    Jump to:
    © 2025 APG vNext Commercial Version 5.1