Search:
Submit Search


Controlling stops (VirtualSwitches) via MIDI

Connecting Hauptwerk to MIDI organs, sequencers, ...

Controlling stops (VirtualSwitches) via MIDI

Postby aah » Sun Mar 11, 2018 4:34 pm

I've just started making recordings using Hauptwerk and I love it. So far all I've needed to do is send MIDI from my controllers. Works great for live playing. I can easily assign buttons to select pistons and general cancel, no problems.

What I haven't been able to get working is remote sequenced MIDI control of the organ stops using NRPN messages. As far as I could figure out, these messages are defined for the organ in the xml file having the suffix "- MIDI Recorder MIDI Implimentation (raw data).xml" which exists in this directory:

/Hauptwerk/HauptwerkUserData/OrganMIDIImplementationExports

An HTML version of that file is displayed when I go to Recording > view MIDI recorder/player/sequencer MIDI Implementation (for this organ). For example, in the HTML this is listed for the organ I am using:

Name: Hoofdwerk HW-Bourdon-16-8-B
Role: Stops: manual 1 stop 01
NRPN chan (1-16): 2
NRPN num (0-16383): 2101
Prog change chan (1-16): (none)
Prog change num (1-128): (none)
Note on/off chan (1-16): 9
Note on/off num (0-127): 36
Sys-ex object ID: 2219
Message type recorded: NRPN

which is given in the XML file as:

Code: Select all
      <VirtualSwitch>
         <Name>Hoofdwerk HW-Bourdon-16-8-B</Name>
         <RoleCode>2101</RoleCode>
         <RoleDesc>Stops: manual 1 stop 01</RoleDesc>
         <NRPNChan>2</NRPNChan>
         <NRPNNum>2101</NRPNNum>
         <PrgChan></PrgChan>
         <PrgNum></PrgNum>
         <NoteChan>9</NoteChan>
         <NoteNum>36</NoteNum>
         <SysExObjID>2219</SysExObjID>
         <TypeRecorded>NRPN</TypeRecorded>
      </VirtualSwitch>


My software reads this XML file and creates the needed NRPNs for this stop as follows:

NRPN_MSB = floor( 2101 / 128 ) = 16
NRPN_LSB = 2101 mod 128 = 53

The messages are sent like this:

NRPN MSB: CC 177 99 16
NRPN LSB: CC 177 98 53
CC 177 6 127

(From the user guide I assume a value of 127 to pull a stop on.)

The message is sent and received by Hauptwerk, but nothing happens. No stop is drawn (switched on).

What am I doing wrong?

Thanks for your help.
aah
Member
 
Posts: 13
Joined: Sun Mar 11, 2018 3:30 pm

Re: Controlling stops (VirtualSwitches) via MIDI

Postby mdyde » Mon Mar 12, 2018 6:37 am

Hello Aah,

Welcome to the forum.

Hauptwerk's MIDI recorder/player/sequencer MIDI implementation is used for, and only for, whichever MIDI IN port, and/or MIDI OUT port, you've ticked specifically in the 'Sequencer MIDI IN/OUT' columns on the 'General settings | MIDI ports | MIDI IN/OUT ports' screen tabs. Ticking the MIDI port(s) there tells Hauptwerk to use them for that particular (fixed, pre-defined) MIDI implementation. The 'MIDI recorder/player/sequencer MIDI implementation' section in the main user guide (pages 226-227 in the current v4.2.1 version) covers it in more depth.

With the port(s) selected appropriately, if Hauptwerk still isn't responding to your MIDI messages in the way you expected, then my recommendation would be temporarily to turn on the 'Diagnostics: log all MIDI messages received and sent' option on the 'General settings | General preferences | Advanced ....' screen tab, then use 'Help | View activity log' after sending the relevant MIDI messages to Hauptwerk to see what it actually received, and what was triggered as a result.
Best regards,
Martin.

[Please use email or the Contact page if you need to contact us privately, rather than private forum messages.]

Image
User avatar
mdyde
Moderator
 
Posts: 10644
Joined: Fri Mar 14, 2003 2:19 pm
Location: UK

Re: Controlling stops (VirtualSwitches) via MIDI

Postby aah » Sun Mar 18, 2018 8:08 am

Thanks for the help, Martin. I got it working using the "Sequencer MIDI IN" option, but it sounds like there must be a better (more general) way to go about doing this, so let me explain what I'm trying to do.

In my software, I want users to be able to:
(1) load a stop list for a Hauptwerk organ
(2) send MIDI messages to Hauptwerk to set any registration for that organ

Ideally, the Hauptwerk file will give me:
- the name and unique ID of the organ
- a list of its stops (names and IDs)
- which MIDI messages need to be sent to turn each stop on and off

What file(s) should I be importing?
Which MIDI messages should I be sending?

Selecting the special "Sequencer MIDI IN" option in Hauptwerk is not such a good option, since doing so appears to destroy normal MIDI connections for the given port. I need to keep those because my app sends MIDI to Hauptwerk for normal live Note ON / OFF control of the instrument and I don't want user to have to alter their setup to use my software.

Thanks for your help!
Last edited by aah on Sun Mar 18, 2018 8:47 am, edited 1 time in total.
aah
Member
 
Posts: 13
Joined: Sun Mar 11, 2018 3:30 pm

Re: Controlling stops (VirtualSwitches) via MIDI

Postby mdyde » Sun Mar 18, 2018 8:40 am

Hello aah,

Thanks for the additional information.

The MIDI recorder/player/sequencer implementation (as described by the HTML and XML files generated by 'Recording | View MIDI recorder/player/sequencer implementation (for this organ') is the only predefined MIDI implementation.

Hence if you want your software to be able to control Hauptwerk, without the user having to configure (or auto-detect) all of the MIDI settings manually and one by one, then it is indeed the MIDI recorder/player/sequencer implementation that your software would need to use.

aah wrote:Ideally, the Hauptwerk file will give me:
- the name and unique ID of the organ
- a list of its stops (names and IDs)
- which MIDI messages need to be sent to turn each stop on and off


The XML generated by 'Recording | View MIDI recorder/player/sequencer implementation (for this organ' contains all of the information you should need for that, i.e. all of the information (virtual control names and MIDI messages) that you would need in order to be able to control and automate the relevant organ entirely (keyboards, stops, pistons, expression pedals, etc.). It also contains the organ name and ID.

(It doesn't contains raw internal stop IDs, but I see no reason that your software would need to know those.)

aah wrote:Selecting the special sequencer MIDI input in Hauptwerk is not a good option for this, since doing so appears to destroy normal MIDI connections for the given port. I need to keep those because my app sends MIDI to Hauptwerk for normal live Note ON / OFF control of the instrument.


If you want a predfined MIDI implementation (as above) then you would definitely need your software to communicate via a pair of MIDI/IN ports ticked in the 'Sequencer MIDI IN/OUT' columns.

Hence you would either need:

1. The user to use a different MIDI IN port for live playing than the one that your software is using (e.g. with your software using a virtual MIDI cable, such as the Mac built-in IAC driver port, or the freeware loopMIDI on Windows), or:

2. For live playing the user's MIDI would need to go via your software, with your software handling auto-detection of the user's hardware MIDI implementation and translating it to Hauptwerk's MIDI recorder/player/sequencer implementation.

(I know from experience that implementing auto-detction for the very wide range of current and vintage MIDI organ console hardware that Hauptwerk users have is a very, very large task indeed -- several years of work -- so my recommendation would be to go with option 1, unless your software also specifically needs to interact with the user's MIDI console hardware, in which case option 2 would presumably be needed anyway.)
Best regards,
Martin.

[Please use email or the Contact page if you need to contact us privately, rather than private forum messages.]

Image
User avatar
mdyde
Moderator
 
Posts: 10644
Joined: Fri Mar 14, 2003 2:19 pm
Location: UK

Re: Controlling stops (VirtualSwitches) via MIDI

Postby aah » Sun Mar 18, 2018 9:09 am

Hi Martin.

Thanks very much for the detailed reply!

In that case what I've got now using the Sequencer option will do, at least for the time being. I've got the registration changes working now, but it appears that MIDI Note ON / OFF channel assignments for the manuals / pedal are not settable when using this option. I've tried editing the xml file to change the channel assignments, but this does nothing. If there is really no way to change channel assignments when using the sequencer option, this would mean that MIDI files have to be edited to fit the implementation, which seems a bit backward to me.
aah
Member
 
Posts: 13
Joined: Sun Mar 11, 2018 3:30 pm

Re: Controlling stops (VirtualSwitches) via MIDI

Postby mdyde » Sun Mar 18, 2018 9:24 am

Thanks, aah.

aah wrote:but it appears that MIDI Note ON / OFF channel assignments for the manuals / pedal are not settable when using this option. I've tried editing the xml file to change the channel assignments, but this does nothing. If there is really no way to change channel assignments when using the sequencer option, this would mean that MIDI files have to be edited to fit the implementation, which seems a bit backward to me.


If you want your software to use a predefined MIDI implementation for stops, then yes -- it would also need to use the MIDI channel assignments in Hauptwerk's predefined MIDI recorder/player/sequencer implementation (i.e. as described by the HTML and XML files generated by 'Recording | View MIDI recorder/player/sequencer implementation (for this organ')').

That's a fixed, predefined MIDI implementation, specifically so that it applies equally to all users of the same organ (sample set), thus allowing any MIDI file recorded from Hauptwerk (using it's built-in MIDI recorder, or from its Sequencer MIDI OUT port) immediately to be playable by any other user of the same organ in Hauptwerk, regardless of any MIDI hardware or settings that they might have. (The user guide covers that in more depth.)

If you want to use third-party MIDI files (ones not recorded from or by Hauptwerk) then yes -- your software would need to translate the MIDI files' MIDI channels to use the appropriate ones for Hauptwerk. However, you'd potentially need to do that in any case, since there's no guarantee that any given two (non-Hauptwerk) MIDI files from the Internet would use the same MIDI channels for any given virtual keyboard/division (e.g. the Great), and the divisions that (real, and virtual, and MIDI) organs have differ widely amongst organs and organ styles.
Best regards,
Martin.

[Please use email or the Contact page if you need to contact us privately, rather than private forum messages.]

Image
User avatar
mdyde
Moderator
 
Posts: 10644
Joined: Fri Mar 14, 2003 2:19 pm
Location: UK

Re: Controlling stops (VirtualSwitches) via MIDI

Postby aah » Sun Mar 18, 2018 9:28 am

Thanks very much for your time, Martin. That all makes very good sense indeed.
aah
Member
 
Posts: 13
Joined: Sun Mar 11, 2018 3:30 pm

Re: Controlling stops (VirtualSwitches) via MIDI

Postby mdyde » Sun Mar 18, 2018 9:37 am

Thanks. You're very welcome. Best wishes with the project.
Best regards,
Martin.

[Please use email or the Contact page if you need to contact us privately, rather than private forum messages.]

Image
User avatar
mdyde
Moderator
 
Posts: 10644
Joined: Fri Mar 14, 2003 2:19 pm
Location: UK


Return to Audio / MIDI interfacing

Who is online

Users browsing this forum: No registered users and 2 guests