It is currently Fri Aug 14, 2020 10:35 am


Trying to detect a sustain switch (version 4)

Connecting Hauptwerk to MIDI organs, sequencers, ...
  • Author
  • Message
Offline

organsRgreat

Member

  • Posts: 426
  • Joined: Fri Nov 16, 2012 6:30 am
  • Location: England

Trying to detect a sustain switch (version 4)

PostFri Jul 31, 2020 5:12 pm

I have an Audiofront MIDI Expression

https://www.audiofront.net/MIDIExpression.php

connected to a microswitch, operated by a side switch on my Swell pedal. When I operate the side pedal I see the following values in MIDI Ox (in decimal):

Status 180; Data 1=64; Data 2=127 (Switch closed) or 0 (Switch open); Channel=5

Since 64 is the MIDI CC number for sustain, this should allow me to operate the Sustain switch on Neil Jensen's 3/35 theatre organ. However when I right click on the "Great Sustain" button, go to Auto-detect, then operate the pedal, Hauptwerk does not see anything.

The alternative would be to set this up manually, but I haven't enough knowledge of MIDI to choose the correct settings. The swell pedal itself, plugged into an adjacent input, was auto-detected and worked properly straight away. Could somebody sort me out please? Thanks!
Offline
User avatar

engrssc

Member

  • Posts: 6631
  • Joined: Mon Aug 22, 2005 11:12 pm
  • Location: Roscoe, IL, USA

Re: Trying to detect a sustain switch (version 4)

PostFri Jul 31, 2020 6:10 pm

You can check to see if or which MIDI messages are being sent to the computer by using

http://www.midiox.com

if you are using a PC, or

https://www.snoize.com. (use MIDI Monitor)

If using a Mac.

This MIDI information is what HW uses to make something happen.

It appears from what I saw on the web page you indicated that those interfaces are for audio and aren't a MIDI encoder which you need for your application.

Rgds,
Ef.
Offline

organsRgreat

Member

  • Posts: 426
  • Joined: Fri Nov 16, 2012 6:30 am
  • Location: England

Re: Trying to detect a sustain switch (version 4)

PostFri Jul 31, 2020 6:32 pm

Ed - They really are MIDI interfaces, and the code mine's producing is exactly what it should be for sustain. The same box is working perfectly for volume control via MIDI, that's why I'm so puzzled that Hauptwerk isn't seeing the sustain signal.
Offline
User avatar

engrssc

Member

  • Posts: 6631
  • Joined: Mon Aug 22, 2005 11:12 pm
  • Location: Roscoe, IL, USA

Re: Trying to detect a sustain switch (version 4)

PostFri Jul 31, 2020 7:02 pm

[quote="organsRgreat"]the code mine's producing is exactly what it should be for sustain. /quote]

I'm not familiar with Neil Jensen's sample set. Every other sustain input I'm aware of is simply by a MIDI note,on/note off message.

I had Jake [url]customhworgans@gmail.com[/url] write an extension to the ODF for Sustain and Sostenuto features to use with some classical sample eets. The kick switch on the Choir expression pedal applies the feature(s) with note on/note off via auto-detect. We also have one switch on the coupler rail to select either Sustain or Sostenuto and another switch to select which manual (Choir or Great) the.effect is applied. The MIDI coding (Sustain of Sostenuto) is done in the software, not by anything external such as the kick switch encoder.

Don't know if any of that applies in your case.

Rgds,
Ed
Offline

rayjcar

Member

  • Posts: 64
  • Joined: Mon Mar 17, 2014 10:56 am
  • Location: Toronto, Canada

Re: Trying to detect a sustain switch (version 4)

PostFri Jul 31, 2020 7:17 pm

Normally the sustain or sostenuto function in the theatre organ sample sets is a note-on/note off function. You are sending Control Change Messages.

First, confirm that Hauptwerk is in fact seeing the Midi Expression interface by going to the general settings, selecting midi, and confirming that it is seen and the the Midi Input box is checked for it.

There are a couple of approaches you can take. You can right click on the virtual sustain switch, select manual adjustment, and confirm that the midi input channel corresponds to what you're seeing in Midi-Ox. Then scroll down the input settings, and select Midi Stop or Hold Piston - CC on/off. Ed is right. Hauptwerk is not looking for CC number 64 as the type of message.

If that doesn't work, use the Midi Expression configuration software and change the output type from CC to note on/note off, and try auto-detecting again.

Ray
Offline
User avatar

mdyde

Moderator

  • Posts: 12240
  • Joined: Fri Mar 14, 2003 2:19 pm
  • Location: UK

Re: Trying to detect a sustain switch (version 4)

PostSat Aug 01, 2020 4:29 am

Hlelo organsRgreat,

To add to others replies, and briefly (since we only officially support Hauptwerk v4 for people for bought a licence for it less than 12 months ago, although the following also applies to v5):

If you're have problems auto-detecting something, you could also could also turn on the 'Diagnostics: log all MIDI messages received and sent' option on the 'General settings | General preferences | Advanced ....' screen tab, then try auto-detecting the relevant virtual control, then use 'Help | View activity log' to see what MIDI messages Hauptwerk received, and whether auto-detection considered them to be valid/invalid/conflicting events.
Best regards, Martin.
Hauptwerk software designer/developer, Milan Digital Audio.
Offline

organsRgreat

Member

  • Posts: 426
  • Joined: Fri Nov 16, 2012 6:30 am
  • Location: England

Re: Trying to detect a sustain switch (version 4)

PostSat Aug 01, 2020 8:58 am

Thanks everyone. I've done quite a lot of experimenting; I'll begin with something that may be of over-riding importance. With Neil Jensen's 3/35 loaded, I tried using my right hand on the trackball (I can't get on with mice) to operate the Sustain or Sostenuto switches, whilst playing notes with my left hand. I couldn't get any of the switches to do anything at all! I tried Great Sustain, Great Sostenuto, Solo Sustain, Solo Sostenuto, Piano Sustain.

I have the Paramount 450 on the same computer, so I loaded that, then operated the Sostenuto switch with the trackball. The switch is quite hard to find - it's on the Console view page, between the swell pedals for the Solo and Percussion chambers. Anyway that did exactly what I expected. Any notes that I was holding when I operated the switch stayedon; notes I played subsequently did not, which is what a Sostenuto pedal is expected to do. But when I manually set up the foot switch as I had for Neil Jensen's organ, I again couldn't get Hauptwerk to respond.

So part 2 of this message explains what I'd done earlier this morning; I'll just emphasise first that I always have the "Audio, MIDI and Performance" panel open so that I can check that a message is arriving on the expected channel.

===============================

rayjcar's first suggestion was:

"There are a couple of approaches you can take. You can right click on the virtual sustain switch, select manual adjustment, and confirm that the midi input channel corresponds to what you're seeing in Midi-Ox. Then scroll down the input settings, and select Midi Stop or Hold Piston - CC on/off. Ed is right. Hauptwerk is not looking for CC number 64 as the type of message."

That enabled me to turn the "Great Sustain" switch on and off; but notes played on a Great stop did not sustain. I tried an 8ft Tibia and the Piano.

Ray's second suggestion was:

"If that doesn't work, use the Midi Expression configuration software and change the output type from CC to note on/note off, and try auto-detecting again."

I used the Midi Expression configuration software and changed the output to MIDI note G8 (the highest note available); Channel 5, Velocity 127. MIDI Ox confirmed that is what's being output by the switch, but Hauptwerk wouldn't auto-detect it. A message was definitely being received by Hauptwerk as a light flashed on the "Audio MIDI and Performance" panel.

I used the Midi Expression software to change the note to Middle C, and that duly played a note on Channel 5.

I then followed Martin's suggestion, which produced masses of data. The final lines appear to be the most relevant - they are as follows:

2020-08-01-12-23-37: INF:2550 Diag: IN: MIDI note on: port: 828mk3 Hybrid #1, channel (1-16): 05, note (0-127): 127, velocity (0-127): 127. (Raw hex bytes: 94 7F 7F.)
2020-08-01-12-23-37: INF:2646 Diag: auto-detection: valid event received. Valid events so far: 0, spurious events so far: 0.
2020-08-01-12-23-37: INF:2644 Diag: auto-detection: event list now valid. Valid events so far: 1, spurious events so far: 0.
2020-08-01-12-23-37: INF:2550 Diag: IN: MIDI note on: port: Hauptwerk VST Link, channel (1-16): 05, note (0-127): 127, velocity (0-127): 127. (Raw hex bytes: 94 7F 7F.)
2020-08-01-12-23-37: INF:2642 Diag: auto-detection: conflicting event received. Reason code: 2716. Starting detection again.
2020-08-01-12-23-37: INF:2647 Diag: auto-detection: event being ignored. Valid events so far: 0, spurious events so far: 0. Reason code: 2717.
2020-08-01-12-23-38: INF:2551 Diag: IN: MIDI note off: port: 828mk3 Hybrid #1, channel (1-16): 05, note (0-127): 127, velocity (0-127): 064. (Raw hex bytes: 84 7F 40.)
2020-08-01-12-23-38: INF:2551 Diag: IN: MIDI note off: port: Hauptwerk VST Link, channel (1-16): 05, note (0-127): 127, velocity (0-127): 064. (Raw hex bytes: 84 7F 40.)
2020-08-01-12-23-38: INF:2646 Diag: auto-detection: valid event received. Valid events so far: 0, spurious events so far: 0.
2020-08-01-12-23-38: INF:2644 Diag: auto-detection: event list now valid. Valid events so far: 1, spurious events so far: 0.
2020-08-01-12-23-38: INF:2642 Diag: auto-detection: conflicting event received. Reason code: 2775. Starting detection again.
2020-08-01-12-23-38: INF:2647 Diag: auto-detection: event being ignored. Valid events so far: 0, spurious events so far: 0. Reason code: 2776.
2020-08-01-12-23-40: INF:2641 Diag: auto-detection: finished for SwitchInputOutput '282: TOGGLE_Great Sustain' (ID: 2423). Valid events: 0, spurious events: 0.
I don't fully understand all this, but I'm sure somebody here will. It seems that I can either activate the switch in the sample set, but it doesn't do anything; or I can send MIDI note on/off data, which Hauptwerk doesn't recognise.

My final attempt (after the above) was to change the MIDI note channel from 5 to 16, in case Hauptwerk was not happy with note G8 arriving from a "Non-keyboard" input. That still produced a note on Channel 5; I realised that was because my MIDI processing box is set to re-channelise notes on that input. So I set up an extra input to just allow through top G on Channel 16. Despite my setting up Hauptwerk manually to receive G8 on Channel 16 for "TOGGLE: Great Sustain", that switch still doesn't operate.

Thanks . . .
Offline
User avatar

mdyde

Moderator

  • Posts: 12240
  • Joined: Fri Mar 14, 2003 2:19 pm
  • Location: UK

Re: Trying to detect a sustain switch (version 4)

PostSat Aug 01, 2020 2:18 pm

Hello organsRgreat,

The reason that the auto-detection attempt in your log excerpt is failing is that Hauptwerk is receiving *two* MIDI note-on message (one via your '828mk3 Hybrid #1' MIDI IN port, and one via the Hauptwerk VST Link), and likewise two MIDI note-off messages.

The pairs or MIDI messages are identical, so somehow I think your hardware must be sending the same MIDI events to Hauptwerk both via the '828mk3 Hybrid #1' MIDI IN port, and via the Hauptwerk VST Link, simultaneously.
Best regards, Martin.
Hauptwerk software designer/developer, Milan Digital Audio.
Offline
User avatar

engrssc

Member

  • Posts: 6631
  • Joined: Mon Aug 22, 2005 11:12 pm
  • Location: Roscoe, IL, USA

Re: Trying to detect a sustain switch (version 4)

PostSat Aug 01, 2020 4:42 pm

A "personal" question, how can a 828 be involved with auto-detect as an 828 is an audio interface? Just curious, never ran into that. I can see where auto-detection is being ignored after simultaneous inputs. . I've used 828's but never did any auto-detection, just used MOTU Discovery.

Rgds,
Ed
Offline

organsRgreat

Member

  • Posts: 426
  • Joined: Fri Nov 16, 2012 6:30 am
  • Location: England

Re: Trying to detect a sustain switch (version 4)

PostSat Aug 01, 2020 4:55 pm

Hello Ed: The 828 is an audio AND MIDI interface - does that make sense?

Hello Martin: Thank you so much - that's brilliant! I'd never have found the source of the problem on my own. I'm about to have a quick look; if I don't find it now I'll try again in the morning with a clear head. I'll let you know what I discover.
Offline
User avatar

engrssc

Member

  • Posts: 6631
  • Joined: Mon Aug 22, 2005 11:12 pm
  • Location: Roscoe, IL, USA

Re: Trying to detect a sustain switch (version 4)

PostSat Aug 01, 2020 5:39 pm

organsRgreat wrote:The 828 is an audio AND MIDI interface - does that make sense?

Was aware it had MIDI ports, just never used that feature. So you probably ticked the MIDI In and Out ports and then have your MIDI interface with the sustain switch connected to the computer via the USB or Thunderbolt ports of the 828.?

Just guessing you would have to track down as to how the VST is getting a simultaneous sustain switch closure?
You could un-tick the VST In port to test if the sustain switch could then be auto-detected.

That "tells-all" log is an amazing piece of work. Right up there with the operating part of the Hauptwerk software. 8)

Rgds,
Ed
Offline
User avatar

mdyde

Moderator

  • Posts: 12240
  • Joined: Fri Mar 14, 2003 2:19 pm
  • Location: UK

Re: Trying to detect a sustain switch (version 4)

PostSun Aug 02, 2020 4:18 am

Thanks, organRgreat. You're very welcome.

(And thanks, Ed, for the compliment on the logging function!)
Best regards, Martin.
Hauptwerk software designer/developer, Milan Digital Audio.
Offline

organsRgreat

Member

  • Posts: 426
  • Joined: Fri Nov 16, 2012 6:30 am
  • Location: England

Re: Trying to detect a sustain switch (version 4)

PostSun Aug 02, 2020 6:51 am

All working now! There proved to be two parts to the solution. Once Martin had explained why auto-detect wasn't working, it was easy to see where MIDI messages were being duplicated - on the MIDI Ports dialogue, for Console IN, I had ticked both the Hauptwerk VST entry and the MOTU 828 - exactly as Ed deduced. I unticked the Hauptwerk VST box and was immediately able to auto-detect.

That still left the problem of the Sustain and Sostenuto switches on Neil Jensen's theatre organ lighting up but not doing anything. On the Paramount 450 and MDA's Masterworks theatre organ I had sostenuto switches working as expected. Well . . . at the very bottom of the Overview screen on the Jensen organ is a small panel labelled "Sustain", with an indicator "light" beside it. I discovered that this is a a master switch for all the sustain/sostenuto functions; if the light isn't illuminated those functions don't work. Finding out how to actuate it was a piece of detective work in the Sherlock Holmes category, especially as going to "Organ > Show organ information" led to a completely blank page in my Firefox browser.

It turns out that you have to click right in the CENTRE of the red light - clicking elsewhere on the panel doesn't do anything. I set my hardware switch to operate the Sustain switch and the red light simultaneously - and everything worked! The "sustain" functions on this sample set are unusually comprehensive, as they offer Sustain or Sostenuto on both Great and Solo manuals; so it seems a pity that the means to access them is not explained in any documentation I could find.

Why had I ticked two inputs for Console IN? The official explanation of using Hauptwerk with a Digital Audio Workstation such as Reaper, is that Hauptwerk should only communicate with the DAW via it's (HW's) VST. That works perfectly so long as Hauptwerk is the only audio source on the system. However I found that when I wanted to use Pianoteq via Reaper (theatre organs often had piano attachments) I needed the 828 enabled as an input to Reaper. It seems that the way I had set things up, Reaper was not able to access MIDI data from Hauptwerk to pass it on to plug-ins. Maybe I've set up Reaper incorrectly? For the moment everything's working so I'll leave well alone.

I entirely agree that Hauptwerk's error-logging function is a brilliant idea - in this case it enabled Martin so see straight away what the basic problem was. It reminds me of the computer diagnostic facility built into modern cars. Much more useful than having to call a service technician to sort out the software built in to other digital organs.

A big thank-you to everyone who helped solve a problem that only 24 hours ago looked intractable :-)
Offline
User avatar

mdyde

Moderator

  • Posts: 12240
  • Joined: Fri Mar 14, 2003 2:19 pm
  • Location: UK

Re: Trying to detect a sustain switch (version 4)

PostSun Aug 02, 2020 7:33 am

Excellent -- glad to hear you have it all working now. Thanks again for the thanks!
Best regards, Martin.
Hauptwerk software designer/developer, Milan Digital Audio.
Offline
User avatar

engrssc

Member

  • Posts: 6631
  • Joined: Mon Aug 22, 2005 11:12 pm
  • Location: Roscoe, IL, USA

Re: Trying to detect a sustain switch (version 4)

PostSun Aug 02, 2020 9:28 am

organsRgreat wrote:It turns out that you have to click right in the CENTRE of the red light - clicking elsewhere on the panel doesn't do anything. I set my hardware switch to operate the Sustain switch and the red light simultaneously

Something like those "hidden" Blower switches. :wink:

Indeed, you now can boast of being a virtual, digital Sherlock. :) Except for the f/f (frustration factor), I actually enjoy this stuff. For me, I've found it best many times to step away from "the" problem in order to let the brain settle down (re-boot). And, too, one needs to have an open mind, just not too open that the brain falls out. :roll:

Have what I refer to as my "thinking chair", off in a quiet corner where I can sort things out. That piece of "equipment" helped yesterday to find an intermittent issue. Simply a bad stick of RAM. Been bugging me for weeks. Even after you think you know something, these intermittents can be very humbling. :o

Rgds,
Ed

Return to Audio / MIDI interfacing

Who is online

Users browsing this forum: No registered users and 3 guests