Attention:

Welcome to the old forum. While it is no longer updated, there is a wealth of information here that you may search and learn from.

To partake in the current forum discussion, please visit https://forums.presonus.com

key-switch NOTE-OFF

A Forum to Discuss NOTION

key-switch NOTE-OFF

Postby derAbgang » Sat Jan 11, 2014 4:57 pm

I don't know what to make of this. Is it possible that Notion4 doesn't send NOTE OFF messages when using custom rules with

Code: Select all
  <key-switch type="note-on-prefix" midi-pitch="32" velocity="1" />


I'm monitoring the MIDI exiting Notion which uses a simple set of custom rules. For a C4, for example, I see
Code: Select all
  NOTE ON  (midi pitch=32)
  NOTE ON   (C4)
  NOTE OFF (C4)


No NOTE OFF for the KS note. If this is really the case, what are the ramifications (if any)?

Any insights?

David
derAbgang
 
Posts: 32
Joined: Wed Feb 23, 2011 4:09 am

Re: key-switch NOTE-OFF

Postby derAbgang » Wed Jan 15, 2014 12:48 pm

First, the question was simply: Does notion send a NOTE-OFF MIDI message for the rule action
Code: Select all
<key-switch/>


I appreciate your attempt at thoroughness, but in this case, a simple yes or no really would have been sufficient.

For "playable notes", the MIDI specification appears to be that they are done in pairs {NOTE ON, NOTE OFF}, but "keyswitch notes" are different, at least for some virtual instrument engines, and only need a NOTE ON event, since they persist . . .


I think you are slightly confused. If you really want to help, you should probably understand what it is you are talking about. MIDI does *not* define "playable" nor "key-swtich" notes. The fact that your software instrument has blue and pink virtual keys that react different to you pressing and releasing vs holding down has nothing whatsoever to do with the MIDI specification.

However, what actually happens depends on the details, and there is more information in MIDI messages than just "NOTE OFF (C4)",


... like time stamp, velocity and channel information?

so depending on the various parameters, it might be the case that the NOTE OFF for "Middle C" also functions as the NOTE OFF for the "keyswitch note"


I'm sorry, but this is plain nonsense.
derAbgang
 
Posts: 32
Joined: Wed Feb 23, 2011 4:09 am

Re: key-switch NOTE-OFF

Postby wcreed51 » Wed Jan 15, 2014 4:38 pm

No it doesn't. Nor do other music apps as far as I know.
Bill Reed
Notion 4, Sibelius 7.5, Finale 2011/14, Overture 4, Cubase 7.5
Win8 x64, 32GB RAM
M-Audio ProFire 2626
Kontakt, VSL VI Pro, VE Pro, EWQL Orch, Choirs and Pianos
User avatar
wcreed51
 
Posts: 754
Joined: Wed Oct 07, 2009 10:50 am
Location: Berkshires, MA USA

Re: key-switch NOTE-OFF

Postby Admin » Wed Jan 15, 2014 11:53 pm

Notion sends Note Offs when you use custom rules.

The point of these messages, are to tell Notion when to send a key switch. Sometimes it is useful to send the keyswitch at different points when the notes are being played.

Here is an example:

Say you have a sustain patch for a trumpet that you want to use for the start of the note, and a trumpet fall patch that is the release of the note. The key switch of the start of the note is C-1 (MIDI note 12) and the key switch for the release is C#-1 (MIDI note 13). To get both of those patches to work together for the note on (sustain) and the release sample (fall) patch you will write a rule like this:

<key-switch type="note-on-prefix" midi-pitch="12" velocity="1" />
<!--KS sent before the note is played, and sends to the instrument to play the sustain patch-->

<key-switch type="note-off-prefix" midi-pitch="13" velocity="1" />
<!--KS sent before the note ends, and sends a keyswitch to tell the patch for the release (fall) to be played-->

(There are some other conditions that you will have to use to get this to happen, but sending the key switches during the playback of the note is possible if you use these types of KS rules.)

There are four values that you can use, and which I have used, to do different things, but none of them have to do with whether Notion sends Note Offs relating to whether a note will cut off, but rather when the key switches are sent during the playback of a note. These are any of the following:

Before the Note On = "note-on-prefix"
After the Note On = "note-on-suffix"
Before the Note Off = "note-off-prefix"
After the Note Off = "note-off-suffix"

You see, this does not control whether the note off happens, but rather, you gain control of where within the Note On and Note Off, that a key switch can be sent.

Does that make sense?

-Admin
User avatar
Admin
Site Admin
 
Posts: 1006
Joined: Mon May 11, 2009 7:12 pm

Re: key-switch NOTE-OFF

Postby derAbgang » Thu Jan 16, 2014 10:00 am

No it doesn't. Nor do other music apps as far as I know.


You mean notation applications? Because if a sequencer neglected to calculate note length and send a note-off, I'm pretty sure the MIDI protocol would have collapsed years ago.

Notion sends Note Offs when you use custom rules.


... but it doesn't, actually. The key-switch action sends a note-on at exactly the same timestamp as the note to which it is prefixing (note-on-prefix). It is simply queued before the note, which, as far as my experience goes with software instruments, appears to work.

Here is the dump of the rules (note I commented out the explicit note-on, verlocity=0 (a.k.a., note-off)
Code: Select all
    <rule name="default-slur">
      <if condition= "under-slur"/>
      <if not-flag="slur-begin" />
      <if flag="default"/>
        <unset-flag name="default" />
        <key-switch type="note-on-prefix" midi-pitch="26" velocity="1" />
        <!-- <key-switch type="note-on-suffix" midi-pitch="26" velocity="0" /> -->
    </rule>

    <rule name="default-keyswitch">
      <if flag="default"/>
      <key-switch type="note-on-prefix" midi-pitch="24" velocity="1" />
      <!-- <key-switch type="note-on-suffix" midi-pitch="24" velocity="0" /> -->
    </rule>


The MIDI dump for 2 scored notes (G#2 no-slur, A2 slurred) is ...
Code: Select all
TIMESTAMP IN PORT STATUS DATA1 DATA2 CHAN NOTE EVENT
000184B0   3  --     B0    0B    28    1  ---  CC: Expression
000184B0   3  --     90    18    01    1  C  1 Note On       
000184B0   3  --     90    2C    28    1  G# 2 Note On       
00018991   3  --     90    2C    00    1  G# 2 Note Off       
00018991   3  --     B0    0B    28    1  ---  CC: Expression
00018991   3  --     90    1A    01    1  D  1 Note On       
00018991   3  --     90    2D    28    1  A  2 Note On       
00018E73   3  --     90    2D    00    1  A  2 Note Off       


number of note-on = 4; number of note-off = 2 (ESC sends a bunch of reset events including CC all-notes-off)

In my opinion, the key-switch should immediately queue up a note-off, .e.g., 10 ticks after the note-on or, at the least, the next key-switch action should trigger a note-off of the previous key-switch.

You see, this does not control whether the note off happens, but rather, you gain control of where within the Note On and Note Off, that a key switch can be sent.

Does that make sense?


Makes perfect sense. So I imagine my hack of sending note-on, velocity=0 as a note-on-suffix is the only way to send a note-off for the key-switch itself.

I'm only interested because if I were to use this key-switch action mechanism to, say, control some hardware synthesizer, having these key-switch notes hanging would definitely grab up all the polyphony of the device.

thanks
derAbgang
 
Posts: 32
Joined: Wed Feb 23, 2011 4:09 am

Re: key-switch NOTE-OFF

Postby Admin » Thu Jan 16, 2014 11:43 am

I understand your point, and yes, it happens virtually at the same time. That is why the XML works. Order of operations causes nominal delay in time.

I can understand that you may want to turn your Key-Switches off. I have not run into a situation where this was ever necessary because my polyphony was being eaten up, even on hardware devices. I have set this up with both hardware synths and virtual instruments across the board.

I suppose if you want to be very specific in your rules, you can send the Keyswitch note-off by following the suggestions you have provided. That is also the beauty of writing your own custom rules. You gain tons of flexibility and customization.

Internally though, there are not key switches, so this is not really a Notion issue:

derAbgang wrote:Is it possible that Notion4 doesn't send NOTE OFF messages when using custom rules


More accurately, this would be stated, "Is it possible that I [the user and developer of my own custom rules] am not sending Note-Offs to my Key Switches when they are no longer needed?" And the answer to that question is, "Quite possibly so." Or, "It depends, are you sending Note-Offs to your Key-switches?"

And this all brings up some interesting points. Thanks for your input. Good discussion.

-Admin
User avatar
Admin
Site Admin
 
Posts: 1006
Joined: Mon May 11, 2009 7:12 pm

Re: key-switch NOTE-OFF

Postby rst » Sun Jan 26, 2014 1:36 pm

I am also emulating note-off by repeating key switch note with zero velocity. Have not found better solution.
That does not look very elegant, it would be good to make simple key-switch to send not off.
And for permanent keyswitches create separate keyword, e.g. "latch-key-switch" or similar.

Code: Select all
      <rule name="staccato">
         <if articulation = "staccato"/>
         <unset-flag name="main"/>
         <key-switch type="note-on-prefix" midi-pitch="27" velocity="1" />
         <key-switch type="note-on-suffix" midi-pitch="27" velocity="0" />
      </rule>

rst
 
Posts: 3
Joined: Fri Jul 12, 2013 4:41 am

Re: key-switch NOTE-OFF

Postby Admin » Wed Jan 29, 2014 1:22 pm

Let me know how that performs, if you will. I am wondering what it does when there are repeated articulations sending that type of data to Notion.

-Admin
User avatar
Admin
Site Admin
 
Posts: 1006
Joined: Mon May 11, 2009 7:12 pm


Return to NOTION

Who is online

Users browsing this forum: Google [Bot] and 27 guests


cron