# Mapping Note Length to Velocity in Custom Expression Maps

Hello

I’m having difficulties mapping Note Length to Velocity in custom Expression Maps. I’ve constructed a minimal working example to illustrate my problem.

Consider this passage set to ♩=80.

I will set up two Expression Maps; CustomPlaybackTriggerVelocity and CustomNoteLengthTriggerVelocity, both of which effectively create a Base Switch for each bar. I will then show that CustomPlaybackTriggerVelocity works while CustomNoteLengthTriggerVelocity does not work, and I would like to know why.

CustomPlaybackTriggerVelocity maps five custom Playback Techniques,

each of which is triggered with a custom Playing Technique,

to a restricted Velocity,

with

• P1 set to Velocity = 101,
• P2 set to Velocity = 102,
• P3 set to Velocity = 103,
• P4 set to Velocity = 104,
• P5 set to Velocity = 105.

CustomNoteLengthTriggerVelocity, instead, uses Note Length to create the same effect,

where

• L1: Note LengthVery Short, with Velocity = 101,
• L2: Very Short < Note LengthShort, with Velocity = 102,
• L3: Short < Note LengthMedium, with Velocity = 103,
• L4: Medium < Note LengthLong, with Velocity = 104,
• L5: Note Length > Long, with Velocity = 105,

all with Playback Technique set to Natural.

The idea is to play the passage, via either Expression Map to the following VST:

If the Expression Maps work correctly by sending Velocity = 101, 102, 103, 104, 105 at each bar, then I should hear |CCCCCCCCCCCCCCCC|DDDDDDDD|EEEE|FF|G| from the VST.

First up is CustomPlaybackTriggerVelocity.

I insert the custom Playing Techniques,

the Expression Map is assigning the correct Base Switches,

and when I press play, I hear |CCCCCCCCCCCCCCCC|DDDDDDDD|EEEE|FF|G|, as expected.

Now I switch to CustomNoteLengthTriggerVelocity,

the Expression Map is assigning the correct Base Switches, now by Note Length,

but when I press play, I hear |CCCCCCCCCCCCCCCC|CCCCCCCC|CCCC|CC|C|, not what I expected.

So, my fundamental question is this. Why is CustomPlaybackTriggerVelocity sending the correct Velocity information to the VST but CustomNoteLengthTriggerVelocity is not?

Some additional information. Audio export with CustomNoteLengthTriggerVelocity produces the same incorrect results. However, MIDI export from Dorico 4 with CustomNoteLengthTriggerVelocity and then MIDI import into Cubase 12, sent to the same VST, produces the correct results.

Thank you.

~ Robert

I will need some time to digest this post and potentially do some experiments of my own before I can come back to you. It may take a while (some number of days). Thanks for your patience.

Fwiw I just tested this scenario with note length conditions in a minimal file and it produced velocity output as expected… (this was in Dorico 3.5 as I’m away from the studio)

Thank you, @dspreadbury. I’m happy to wait. Thank you also, @fratveno, for checking this on your own system. FYI, I’m using Dorico Version 4.3.20.1130 and AudioEngine Version 5.5.0.67.

When you use NoteLength conditions, you should see in the Playing Techniques lane those conditions. In your case it should show: L1, Note Length=Short (or whatever condition you have set up for that Playing Technique). However, I do believe that Note Length Conditions are designed to work specifically with the ‘Natural’ PT. Once you assign a custom PT with a Note Length Condition, it overrides the note length condition and simply triggers whatever you have set up for your L1 PT. So it then doesn’t matter how long the note actually is, it will just trigger what is assigned to L1.
Note Length Conditions are designed to be somewhat automatic so that you don’t need to enter anything into the score for the notes to trigger whatever articulation you have assigned to the different conditions.
For your system to work as desired I think you will need to assign your Note Length Conditions using the ‘Natural’ PT and then set them to the appropriate articulations you want to trigger.

I suspected that too, but for me it worked just as fine with a custom technique… perhaps the OP could attach the Xmap here in order to make Ts easier…

Yes, I found it worked, but the actual note length became inconsequential. Is that you also found?

Nope. The note length conditions were respected. I only tried two, but they adjusted themselves correctly in the PT lane as I varied the tempo

Interesting. Isn’t the point of using Note Length Conditions one in which you shouldn’t have to enter anything into the score. If you are using custom PT’s in the score, there’s no need for NLC’s.

Say, if you have 5 NLCs assosiated with a playback tech called TEST, you just enter Test in the score and the NLC switches are automatically positioned according to this scheme: (and hence will reposition if the tempo changes)
Note length can be one of five values:
§ Very short: dotted 16th at 120bpm (0.1875 seconds)
§ Short: dotted eighth at 120bpm (0.375 seconds)
§ Medium: dotted quarter at 120bpm (0.75 seconds)
§ Long: dotted minim at 120bpm (1.5 seconds)
§ Very long: any longer duration

Hello @Grainger2001

This is what L1, L2, L3, L4 and L5 are claiming to do; they are indeed using the Natural Playback Technique.

It feels to me more like a problem of communication between the Expression Map and the VST, rather than the Expression Map assigning the Base Switches correctly. I just can’t get the correct Velocity data into the VST; Velocity=101 is being sent on all occasions.

That is because the conditions aren’t met as you are (as it looks) overruling the system by adding the L1 L2… switches explicitly

That was precisely my point when I said that that the actual note lengths become inconsequential. When you put custom PT’s into the score, they override any NLC’s that might be associated with them.

I’m sorry, @fratveno and @Grainger2001 , I’m not sure what you mean. The L1, L2, L3, L4, L5 switches are not custom Playback Techniques, they are sorting themselves out based on the Note Length through the custom Expression Map with the Natural Playback Technique (L1, L2, L3, L4, L5 are just the names of the Base Switches in the custom Expression Map).

If I set ♩=1, then L5 is being used for the whole passage,

and if I set ♩=1000 then L1 is used apart from the last note, which is long enough to qualify for L2,

which is what I expect of my custom Expression Map.

That’s not my problem. My problem is that while

• L1 should be sending Velocity=101 to the VST,
• L2 should be sending Velocity=102 to the VST,
• L3 should be sending Velocity=103 to the VST,
• L4 should be sending Velocity=104 to the VST,
• L5 should be sending Velocity=105 to the VST,

I have that

• L1 is sending Velocity=101 to the VST,
• L2 is sending Velocity=101 to the VST,
• L3 is sending Velocity=101 to the VST,
• L4 is sending Velocity=101 to the VST,
• L5 is sending Velocity=101 to the VST.

I apologise if I have misunderstood.

The NLC must he associated with a single Playback technique, not 5 different ones…(?)

Where did these come from then? They are not default Dorico Playing Techniques, or default Playback Techniques, therefore you must have created them and therefore they are custom PT’s? Note Length Conditions are not associated with Playing Techniques because as I believe we’ve established, a PT in the score will override a Note Length Condition. Maybe we’re all getting confused!..Can you explain where those L1, L2 Playing Techniques etc came from?

@Grainger2001 and @fratveno, I think you’ve misunderstood the meaning of L1, L2, L3, L4 and L5. These are simply the names of my Base Switches, which I like to rename to keep everything in order in my Expression Maps. This image shows all of L1, L2, L3, L4 and L5, before and after renaming, with all of their settings. This should demonstrate that my Note Length Conditions are all being used alongside the single Natural Playback Technique. (Sorry, you’ll have to zoom in!)

I think the confusion may have come from my use of P1, P2, P3, P4 and P5 in my control, which were indeed custom Key Switches. I apologise for any confusion.

I’m convinced there’s a Velocity miscommunication between the Expression Map and the VST when using Note Length Conditions. @dspreadbury, I have some new analysis that might help you. Recall the original passage.

It’s a little hard to take screenshots of the whole Expression Map, so I’ve typed in the relevant information into a spreadsheet and set it alongside the relevant slots in HALion Sonic 7.

This setup produces the correct results, |CCCCCCCCCCCCCCCC|DDDDDDDD|EEEE|FF|G|, when using the Note Length Condition to set the Channel.

This setup produces the incorrect results, |CCCCCCCCCCCCCCCC|CCCCCCCC|CCCC|CC|C|, when trying to use Note Length Condition to set the Velocity.

If I delete the L1 Base Switch from the Expression Map and adjust L2 to cover for the shortest notes, then I hear |DDDDDDDDDDDDDDDD|DDDDDDDD|DDDD|DD|D|.

I then wondered whether the Velocity from the (alphabetically) first Base Switch is being sent. If I instead, rename L1 to X1, strangely I still get |CCCCCCCCCCCCCCCC|CCCCCCCC|CCCC|CC|C|.

My suspicion is that the Velocity from the lowest of the Note Length Conditions is being sent at all times, but I can’t be sure.

I’m actually just trying to build quite a simple Expression Map, for a VST in which the incoming Velocity determines the sample played back, so it seems a good idea to drive this via the Note Length Conditions.

Well I freely admit that I was indeed confused earlier! Having read all your detailed posts again, and seeing as your NLC’s do seem to be working inasmuch as they are triggering the correct switches based on the note lengths, it does appear from your tests that velocity information included in the switches is not being conveyed to the VST correctly. Now that I understand the specific issue clearly, I will test it myself in the morning.

I got confused too, but still, the attached file still works fine for me on Dorico 3.5. I won’t be able to check it on 4.3 until later today or tomorrow
customTriggers.dorico (439.2 KB)

EDIT: when opened in Dorico 4.3.20 it DOES NOT work. This indicates that something changed, or a bug was introduced somewhere after D3.5.1

Thank you for checking this on your system, @fratveno (and a thanks in advance for you too, @Grainger2001 ).

@fratveno, I’ve noticed in your AAAAAAAAAAAAAAA Expression Map (nice name, 14 A’s weren’t enough ) that you’ve set Transpose=2 in the first Base Switch.

You’ll need to set that back to Transpose=0 if you want to test the problem properly with your VST setup,

otherwise, you’ll get the same results (|DDDDDDDDDDDDDDDD|DDDDDDDD|DDDDDDDDDDDDDDDD|DD|D| in your case) whether or not there is a bug.