Two divisions playable from the same MIDI keyboard

Using the CODM to create your own organ definitions, exchange CODM organ definitions, ...
Post Reply
PCF
Member
Posts: 52
Joined: Wed Nov 27, 2019 7:44 am

Two divisions playable from the same MIDI keyboard

Post by PCF »

Hello,

In my current CODM, I have a split Swell division (see particulars below) which I would like to play from ONE MIDI keyboard. Currently, I use HW's auto-detect function to configure them to one MIDI keyboard. Is there a way to set this in CODM to avoid using the auto-detect function?

Division.Name = Swell-A
Division.DivisionCode = 3
Division.AccessibleForMIDIInputAndOutput = Y
Division.WindModel_EnableWindModel = Y
Rank.WindSupply_DivisionCodeOfWindchest = 3
Stop.StopCode = 2201 upwards

Division.Name = Swell-B
Division.DivisionCode = 7
Division.AccessibleForMIDIInputAndOutput = Y
Division.WindModel_EnableWindModel = Y
Rank.WindSupply_DivisionCodeOfWindchest = 3
Stop.StopCode = 2601 upwards

Best
Pharny
User avatar
mdyde
Moderator
Posts: 15681
Joined: Fri Mar 14, 2003 1:19 pm

Re: Two divisions playable from the same MIDI keyboard

Post by mdyde »

Hello Pharny,

You could change those two Division objects to be non-displayed and to have AccessibleForMIDIInputAndOutput=N, and then create an additional Division object which was displayed, had AccessibleForMIDIInputAndOutput=Y, and was coupled by default to both of your current Division objects, e.g. using two Coupler objects that were non-displayed and had:

DefaultToEngaged=Y
StoreInDivisionalCombinations=N
StoreInGeneralCombinations=N
AccessibleForMIDIInputAndOutput=N

You would then only need to auto-detect MIDI to the new Division object (instead of to the previous two).
Best regards, Martin.
Hauptwerk software designer/developer, Milan Digital Audio.
PCF
Member
Posts: 52
Joined: Wed Nov 27, 2019 7:44 am

Re: Two divisions playable from the same MIDI keyboard

Post by PCF »

Thank you Martin,

Just to confirm, the additional division should be a standard division to allow the two additional (custom) couplers? I have a few divisions, both standard (all of them) and non-standard (a few). So I will have to move the two swell divisions to non-standard divisions if the additional division should be a standard division. Then I can connect them with custom couplers.

In addition, as most of the divisions have octave couplers, should I set the two new couplers to:
Coupler.CoupleDestinationKeyboardRatherThanKeyAction = Y

P
User avatar
mdyde
Moderator
Posts: 15681
Joined: Fri Mar 14, 2003 1:19 pm

Re: Two divisions playable from the same MIDI keyboard

Post by mdyde »

Hello Pharny,
PCF wrote:Just to confirm, the additional division should be a standard division to allow the two additional (custom) couplers? I have a few divisions, both standard (all of them) and non-standard (a few). So I will have to move the two swell divisions to non-standard divisions if the additional division should be a standard division. Then I can connect them with custom couplers.
It doesn't particularly matter whether you make the new division a 'standard division' and the other two 'non-standard', or the other way around. Depending on which approach you choose, you would just need to set the relevant stop codes, coupler codes, Rank.WindSupply_DivisionCodeOfWindchest attributes, Stop/Coupler/Tremulant.OverrideSourceDivisionToSpecifiedDivisionCode attributes, and Coupler.OverrideSourceDivisionToSpecifiedDivisionCode/OverrideDestDivisionToSpecifiedDivisionCode attributes, accordingly (depending on how you want stops'/couplers'/tremulants' states to be stored in divisional combinations, how you want the wind supply model to be configured, coupling, etc.).
PCF wrote:In addition, as most of the divisions have octave couplers, should I set the two new couplers to:
Coupler.CoupleDestinationKeyboardRatherThanKeyAction = Y
For each logical Swell coupling function (e.g. a Swell Octave coupler, and/or Swell to Great coupler), assuming you want to have just one user-accessible coupler which affects both of your existing 'split' divisions equally, you would probably want to keep coupling at the division level, setting the couplers' target divisions (e.g. OverrideDestDivisionToSpecifiedDivisionCode) to be Swell-A (not the new division), and then also create a duplicate set of non-displayed couplers (with AccessibleForMIDIInputAndOutput=N, StoreInDivisionalCombinations=N, StoreInGeneralCombinations=N) which perform the same coupling as their Swell-A counterparts, but this time with targets of Swell-B, and which copy their states from the counterparts (CouplerCodeFromWhichToCopyState).

Have a look at ExampleCustomOrgan2. It has a 'split' Swell division (Swell reeds, and all other Swell ranks), so you could use it as an example for how to do what you're aiming for, including how the relevant divisions, couplers, combinations, wind model, etc., are implemented.
Best regards, Martin.
Hauptwerk software designer/developer, Milan Digital Audio.
PCF
Member
Posts: 52
Joined: Wed Nov 27, 2019 7:44 am

Re: Two divisions playable from the same MIDI keyboard

Post by PCF »

Thank you Martin!
User avatar
mdyde
Moderator
Posts: 15681
Joined: Fri Mar 14, 2003 1:19 pm

Re: Two divisions playable from the same MIDI keyboard

Post by mdyde »

Thanks, Pharny. Hope it helps.
Best regards, Martin.
Hauptwerk software designer/developer, Milan Digital Audio.
Post Reply