Weird Idea

I’ve been messing around setting up expression maps for VSL, and a weird idea occurred to me. Sample libraries frequently have samples of the same note with varying durations, but this is hard to take advantage of from a notation program, because MIDI uses note-on and note-off events rather than note-with-duration events. The sample player finds out how long the note is only when the note-off event arrives, and that’s too late to affect the choice of which sample to play.

But (unlike live playing) Dorico actually knows the duration of a note when it starts. What if the expression map could access that duration and pass it on to the sample player when the note starts? You could map the duration to a number between 0 and 127, maybe using a curve similar to the dynamics curve, and in the expression map setup you could specify an action using something like “Control change : 13 : {{duration}}”. Dorico would map the note duration to the range 0-127 and set CC-13 to that value. Then the sample player could use CC-13, in addition to other key-switches and CCs, to map to the appropriate sample. For long notes, the sample player would probably just use the “long” sample and stop the note when note-off arrived. But for short notes it could choose an appropriate, shorter, sample.

I think this is a fascinating idea. I think there could be a real application of this principal for many sound libraries.

(Even if it was as simple as setting two or three global values for all instruments. It would still be a step in the right direction.)

I don’t think it’s a weird idea. I thought using note lengths for expressions would be the logical route to take.

It would allow for an unprecedented quality of playback automatically — if the user owns the right libraries !

It’s a great idea. Anything that can automatically improve the quality of playback - without slowing the system right down - is well worth pursuing.

This is certainly a reasonable idea, and the sort of thing we may consider in the future. As usual though, the devil is in the details. The complexity arises from how exactly you define ‘short’ and ‘long’, how you map note durations to a CC value (linear, log, power law, inverse?) and how it relates to the current tempo (is it independent of tempo, or is ‘note length’ in an absolute time unit?). It raises some very interesting possibilities though, if the sample library you have is able to respond to a CC value in order to select the right sample.

Question: which sample libraries would be able to respond to this?

Yes, there are a lot of details, and I haven’t thought them through very far.

Samples tend to have an absolute duration, so I think absolute note lengths make more sense. Some sample players allow some sort of time stretch functionality, but that also is independent of tempo (I think).

I think one would want a lot more precision for small lengths, so something like
CC = K * log(1 + seconds),
capped at 127, might make sense as a mapping. Larger K gives you more precision for short notes, at the expense of reaching the maximum duration sooner. But there might be better functions.

VSL supports using a CC to control one axis of a 12x12 matrix of samples. It also supports creating time-stretched samples. So it would be possible to create up to 12 different note lengths for an articulation and control it using a CC. I think 11 different “short” lengths (maybe up to 1 second in length or so) plus a “sustain” length would be pretty cool.

Hauptwerk could make use of this. Some pipe organ samples have upwards of 4 samples per note. More often than not organs have 2-3 samples based on length, with some long-value samples being quite long (20 seconds). Hauptwerk has very flexible controls allowing all sorts of midi input data. Depending on the sample set, the program determines the sample selected based on velocity and/or speed of attack/release.

Hauptwerk samples also have looping points so a note can be any arbitrary length.
And they often have several samples of the same note which so that a different sample of the same note can be invoked on repeated notes.

I have not used it myself, but Embertone’s string bundle advertises length control (via cc) for their shorts.