Synth Forum

Notifications
Clear all

MONTAGE Velocity Sensitivity

18 Posts
9 Users
0 Likes
7,652 Views
Bad Mister
Posts: 12304
 

Please see the follow post concerning volume output: Piano sounds different than audition

 
Posted : 03/02/2019 1:13 am
Posts: 801
Prominent Member
 

The link in the original post of this thread appears to be broken. I believe it should point here...

https://yamahasynth.com/montage-category/montage-understanding-velocity-sensitivity

 
Posted : 30/06/2020 3:51 am
Posts: 0
Trusted Member
 

David, this is how the math works.

First, here is the actual set of levels produced by Velocity/Level = 32, offset = 0, and curve = 3.

Notice that many levels are duplicates. This is not a rendering error. Here are the actual levels, normalized:

[code type=markup]0.00006109667016452, // 1 0.00787401574803150 Factor: 128.87798511487434894
0.00024421929252065, // 2 0.01574803149606299 Factor: 64.48315910476921431
0.00053246166518723, // 3 0.02362204724409449 Factor: 44.36384586632738092
0.00097654239380771, // 4 0.03149606299212598 Factor: 32.25263254503197174
0.00150582368438364, // 5 0.03937007874015748 Factor: 26.14521152008066807
0.00222391879398856, // 6 0.04724409448818898 Factor: 21.24362392003423139
0.00301164736876728, // 7 0.05511811023622047 Factor: 18.30164806405646871
0.00390616957523084, // 8 0.06299212598425197 Factor: 16.12631627251598587
0.00485040605851320, // 9 0.07086614173228346 Factor: 14.61035238645692047
0.00602346212567200, // 10 0.07874015748031496 Factor: 13.07224248073617723
0.00748057586206146, // 11 0.08661417322834646 Factor: 11.57854352732648096
0.00889584256409166, // 12 0.09448818897637795 Factor: 10.62161209527048022
0.01013183657092679, // 13 0.10236220472440945 Factor: 10.10302564671609815
0.01204675686320656, // 14 0.11023622047244094 Factor: 9.15069688250507696
0.01372147517826418, // 15 0.11811023622047244 Factor: 8.60769229882568787
0.01562501307719824, // 16 0.12598425196850394 Factor: 8.06298537774372903
0.01779168512818332, // 17 0.13385826771653545 Factor: 7.52364190081659068
0.01940162423405281, // 18 0.14173228346456693 Factor: 7.30517619322846024
0.02209473197727739, // 19 0.14960629921259844 Factor: 6.77112984970608167
0.02409368111455057, // 20 0.15748031496062992 Factor: 6.53616664933466751
0.02744295035652836, // 21 0.16535433070866143 Factor: 6.02538460917798258
0.02992247083638329, // 22 0.17322834645669291 Factor: 5.78923937812185496
0.03263851075443674, // 23 0.18110236220472442 Factor: 5.54873240287491054
0.03558353764450409, // 24 0.18897637795275590 Factor: 5.31078106512952353
0.03880308107996817, // 25 0.19685039370078741 Factor: 5.07306090707343582
0.04232794047811744, // 26 0.20472440944881889 Factor: 4.83662581113901968
0.04418946395455479, // 27 0.21259842519685040 Factor: 4.81106594584379454
0.04818719484096369, // 28 0.22047244094488189 Factor: 4.57533254783819388
0.05255133836022229, // 29 0.22834645669291340 Factor: 4.34520725481191228
0.05488590071305673, // 30 0.23622047244094488 Factor: 4.30384614941284394
0.05984494167276657, // 31 0.24409448818897639 Factor: 4.07878228913130680
0.06250005230879295, // 32 0.25196850393700787 Factor: 4.03149268887186452
0.06814571940826954, // 33 0.25984251968503935 Factor: 3.81304243232491658
0.07116690790087074, // 34 0.26771653543307089 Factor: 3.76181210241670927
0.07431028973380097, // 35 0.27559055118110237 Factor: 3.70864589773960418
0.08105469256741432, // 36 0.28346456692913385 Factor: 3.49720118540172642
0.08465571356809742, // 37 0.29133858267716534 Factor: 3.44145209339959468
0.08837892790910958, // 38 0.29921259842519687 Factor: 3.38556492485304084
0.09231572951349140, // 39 0.30708661417322836 Factor: 3.32648201765387608
0.09637455707006483, // 40 0.31496062992125984 Factor: 3.26808900083744858
0.10510250933230714, // 41 0.32283464566929132 Factor: 3.07161691685753269
0.10977180142611345, // 42 0.33070866141732286 Factor: 3.01269230458899129
0.11462404875413847, // 43 0.33858267716535434 Factor: 2.95385375796307237
0.11968988334553314, // 44 0.34645669291338582 Factor: 2.89461968906092748
0.12499993722944847, // 45 0.35433070866141730 Factor: 2.83464709275022964
0.13055421040588444, // 46 0.36220472440944884 Factor: 2.77436264432512925
0.13629143881653907, // 47 0.37007874015748032 Factor: 2.71534839877683476
0.14233398318987892, // 48 0.37795275590551181 Factor: 2.65539365536695859
0.14862057946760193, // 49 0.38582677165354329 Factor: 2.59605212841772248
0.15521232431987270, // 50 0.39370078740157483 Factor: 2.53653045353671791
0.16210938513482864, // 51 0.40157480314960631 Factor: 2.47718417299288962
0.16931142713619485, // 52 0.40944881889763779 Factor: 2.41831768725376905
0.17675785581821915, // 53 0.41732283464566927 Factor: 2.36098606601593630
0.17675785581821915, // 54 0.42519685039370081 Factor: 2.40553297292189727
0.18463129163884537, // 55 0.43307086614173229 Factor: 2.34559842103502181
0.19274894675199222, // 56 0.44094488188976377 Factor: 2.28766428725093007
0.20129394378001583, // 57 0.44881889763779526 Factor: 2.22966915551263245
0.21020501866461427, // 58 0.45669291338582679 Factor: 2.17260708753337717
0.21020501866461427, // 59 0.46456692913385828 Factor: 2.21006583042188343
0.21954343546408947, // 60 0.47244094488188976 Factor: 2.15192471541316710
0.22924809750827693, // 61 0.48031496062992124 Factor: 2.09517533995055105
0.23937993407920372, // 62 0.48818897637795278 Factor: 2.03938971850675488
0.25000004184703434, // 63 0.49606299212598426 Factor: 1.98425163636375168
0.25000004184703434, // 64 0.50393700787401574 Factor: 2.01574769408381105
0.26110842081176888, // 65 0.51181102362204722 Factor: 1.96014752044710194
0.27258304502121561, // 66 0.51968503937007871 Factor: 1.90652004540352360
0.27258304502121561, // 67 0.52755905511811019 Factor: 1.93540671275812248
0.28466796637975783, // 68 0.53543307086614178 Factor: 1.88090383921826243
0.29724115893520386, // 69 0.54330708661417326 Factor: 1.82783262102880495
0.29724115893520386, // 70 0.55118110236220474 Factor: 1.85432294886980209
0.31042481602788285, // 71 0.55905511811023623 Factor: 1.80093565090498764
0.32421877026965729, // 72 0.56692913385826771 Factor: 1.74860059270086321
0.32421877026965729, // 73 0.57480314960629919 Factor: 1.77288671204393067
0.33862302166052716, // 74 0.58267716535433067 Factor: 1.72072519611047037
0.35351554424830089, // 75 0.59055118110236215 Factor: 1.67050979995259574
0.35351554424830089, // 76 0.59842519685039375 Factor: 1.69278326395196399
0.36926275066582814, // 77 0.60629921259842523 Factor: 1.64191815043675526
0.36926275066582814, // 78 0.61417322834645671 Factor: 1.66324176278008973
0.38549806089212185, // 79 0.62204724409448819 Factor: 1.61361964481726017
0.40258788756003167, // 80 0.62992125984251968 Factor: 1.56468010913167199
0.40258788756003167, // 81 0.63779527559055116 Factor: 1.58423861049581793
0.42041020471736595, // 82 0.64566929133858264 Factor: 1.53580784694000050
0.42041020471736595, // 83 0.65354330708661412 Factor: 1.55453721092707364
0.43908687092817894, // 84 0.66141732283464572 Factor: 1.50634730078921719
0.43908687092817894, // 85 0.66929133858267720 Factor: 1.52428000675099340
0.45849602762841640, // 86 0.67716535433070868 Factor: 1.47692741817931439
0.45849602762841640, // 87 0.68503937007874016 Factor: 1.49410099280930653
0.47875970077026997, // 88 0.69291338582677164 Factor: 1.44730933850938737
0.49999991630593127, // 89 0.70078740157480313 Factor: 1.40157503775664138
0.49999991630593127, // 90 0.70866141732283461 Factor: 1.41732307188873841
0.52221684162353776, // 91 0.71653543307086609 Factor: 1.37210326431297136
0.52221684162353776, // 92 0.72440944881889768 Factor: 1.38718132216256462
0.54516592265429376, // 93 0.73228346456692917 Factor: 1.34323044441516259
0.54516592265429376, // 94 0.74015748031496065 Factor: 1.35767378252715365
0.56933593275951566, // 95 0.74803149606299213 Factor: 1.31386665239510969
0.56933593275951566, // 96 0.75590551181102361 Factor: 1.32769682768347930
0.59448231787040773, // 97 0.76377952755905509 Factor: 1.28478090028836278
0.59448231787040773, // 98 0.77165354330708658 Factor: 1.29802606420886124
0.59448231787040773, // 99 0.77952755905511806 Factor: 1.31127122812935992
0.62084963205576571, // 100 0.78740157480314965 Factor: 1.26826454289083634
0.62084963205576571, // 101 0.79527559055118113 Factor: 1.28094718831974475
0.64843754053931457, // 102 0.80314960629921262 Factor: 1.23859208649644481
0.64843754053931457, // 103 0.81102362204724410 Factor: 1.25073514616797854
0.67724604332105431, // 104 0.81889763779527558 Factor: 1.20915824591546572
0.67724604332105431, // 105 0.82677165354330706 Factor: 1.22078476751080678
0.70703125588473925, // 106 0.83464566929133854 Factor: 1.18049331248716838
0.70703125588473925, // 107 0.84251968503937003 Factor: 1.19163004185025478
0.70703125588473925, // 108 0.85039370078740162 Factor: 1.20276677121334141
0.73852533394351894, // 109 0.85826771653543310 Factor: 1.16213713611220792
0.73852533394351894, // 110 0.86614173228346458 Factor: 1.17279894470039325
0.77099612178424370, // 111 0.87401574803149606 Factor: 1.13361886439693582
0.77099612178424370, // 112 0.88188976377952755 Factor: 1.14383164695907058
0.80517577512006333, // 113 0.88976377952755903 Factor: 1.10505532707424337
0.80517577512006333, // 114 0.89763779527559051 Factor: 1.11483457775631623
0.80517577512006333, // 115 0.90551181102362199 Factor: 1.12461382843838931
0.84082024204659445, // 116 0.91338582677165359 Factor: 1.08630332750842351
0.84082024204659445, // 117 0.92125984251968507 Factor: 1.09566801136625469
0.87817374185635788, // 118 0.92913385826771655 Factor: 1.05802965174480712
0.87817374185635788, // 119 0.93700787401574803 Factor: 1.06699600472569545
0.87817374185635788, // 120 0.94488188976377951 Factor: 1.07596235770658355
0.91699205525683281, // 121 0.95275590551181100 Factor: 1.03900126511451774
0.91699205525683281, // 122 0.96062992125984248 Factor: 1.04758805242951358
0.95751940154053994, // 123 0.96850393700787396 Factor: 1.01147186725371951
0.95751940154053994, // 124 0.97637795275590555 Factor: 1.01969521576797750
0.95751940154053994, // 125 0.98425196850393704 Factor: 1.02791856428223527
1.00000000000000000, // 126 0.99212598425196852 Factor: 0.99212598425196852
1.00000000000000000, // 127 1.00000000000000000 Factor: 1.00000000000000000[/code]
X, // Y Z Factor: W
The left-most value (X) is the level produced.
Y is the velocity from 1-127 (level 0 = note-off).
Z is simply Y / 127.0 (a linear level for comparison; you can ignore this.
W is Z/X. You can ignore this.

There are only 93 unique values in the table.

The Yamaha MONTAGE uses this same table for curve 3 regardless of the offset and Velocity/Level settings.
Offset simply indexes into the above table by the offset value.
For example, if offset is 1, you go 1 deeper into the table by shifting the whole thing up (in the list) by 1 and adding an extra 1.0 at the end.
[code type=markup]0.00024421929252065, // 1 0.00787401574803150 Factor: 32.24157955238460715
0.00053246166518723, // 2 0.01574803149606299 Factor: 29.57589724421825395
0.00097654239380771, // 3 0.02362204724409449 Factor: 24.18947440877397881
0.00150582368438364, // 4 0.03149606299212598 Factor: 20.91616921606453516

0.95751940154053994, // 124 0.97637795275590555 Factor: 1.01969521576797750
1.00000000000000000, // 125 0.98425196850393704 Factor: 0.98425196850393704
1.00000000000000000, // 126 0.99212598425196852 Factor: 0.99212598425196852
1.00000000000000000, // 127 1.00000000000000000 Factor: 1.00000000000000000[/code]
If offset = 8, shift the whole table up by 8 (and fill with 1.0’s at the end).
[code type=markup]0.00485040605851320, // 1
0.00602346212567200, // 2
0.00748057586206146, // 3
0.00889584256409166, // 4

0.95751940154053994, // 116
0.95751940154053994, // 117
1.00000000000000000, // 118
1.00000000000000000, // 119
1.00000000000000000, // 120
1.00000000000000000, // 121
1.00000000000000000, // 122
1.00000000000000000, // 123
1.00000000000000000, // 124
1.00000000000000000, // 125
1.00000000000000000, // 126
1.00000000000000000, // 127[/code]

When Velocity/Level is greater than 32, set to 0.0 the indices in the table found via (“Velocity/Level” - 32).
So if Velocity/Level is 33, the table is not shifted, but rather the first value is set to 0.
[code type=markup]0.00000000000000000, // 1 0.00787401574803150 Factor: ∞
0.00024421929252065, // 2 0.01574803149606299 Factor: 64.48315910476921431
0.00053246166518723, // 3 0.02362204724409449 Factor: 44.36384586632738092
…[/code]

I didn’t check what happens when Velocity/Level is below 32 because there are a lot of things I have to check so I pick my fights based on what I need the most. By feeling is that it does the opposite shift compared to offset. Offset = 1 shifts the list up by 1, and I think (Velocity/Level < 32) = shifts the list down by (32 - “Velocity/Level”), truncating the last value.

If you are using a filter, such as LPF18s, the filter gain usually defaults to 230 but should be set to 255 if you want the maximum level. This might help you already.

The envelopes and track levels use log10(X)*40 for final dB (standard MIDI equation) instead of log20(X)*20, which is the standard linear -> dB conversion. This means that setting the part level to 90 is roughly 50%, level 64 is not. Same math applies to levels inside the envelope.

After the note is played and insertion effects are applied, the sound image is split into 2 channels with equal levels (it will already be a stereo image if the sample played was stereo) and then their levels are adjusted to create the part’s panning effect.
The levels are adjusted as follows:
Frac = (clamp( PAN, 1, 127 ) - 1.0) / 126.0
LeftLevel = cos( Frac * HALFPI )
RightLevel = cos( (1.0 - Frac) * HALFPI )

Since the stereo split happens after Insertion Effects are applied, stereo insertion effects such as Delay LR produce strange results unless you keep the part centered.

So far we have NoteVelocity * FilterGain * PartVolume * PanLevel.
There is also a system volume, which uses the same MIDI level curve: log10(X)*40.

NoteVelocity * FilterGain * PartVolume * PanLevel * SystemLevel.

For whatever reason, there is a multiply by 0.71217286586761475. If you max out all levels (make sure pan = 0 so that LeftLevel = 1.0) and use a sample that is maximally loud (samples from -1 to 1 to -1 to 1, etc.) you still only reach a maximum output level of 0.71217286586761475.

This is extremely close to 0.70710678118654752, which is the level you get with Pan = 64, but I haven’t narrowed down what exactly it actually is. One of my ideas was that it was the FIR filter warm-up distortion, but this happens with no filter and the output waveform has no filter warm-up distortion during the first 0.3 seconds (the period for most filters to warm up).

But even if you select No Filter (Thru), it actually does some filtering, and I think this mysterious multiply lies somewhere inside the math behind the filter.

NoteVelocity * FilterGain * 0.71217286586761475 * PartVolume * PanLevel * SystemLevel.

Since your complaint appears to be aimed at generating higher values with the same power behind your key presses, there is no real way to do that besides gaining finger strength. The above math can simply interpret the input key level as a higher value, but you lose precision and there are only 93 unique values in the velocity table already (WHY??). As you can see from the image, it is not round at all when viewed linearly (it is rounded relative to a fully exponential curve, which is curve #2).

In my table, the 3rd number, Z, is simply Y / 127.0. This is a velocity equation that was used in old retro MIDI consoles and as you can see in the first table it produces much higher levels at lower inputs. At level = 1, it is 128.87798511487434894 times louder.

This would be ideal for us weak-fingered engineers, and would help me with my retro-music task significantly.

See my official requests for these features (a linear curve and full use of all 127 values instead of only 93) here: https://yamahasynth.ideascale.com/a/dtd/Full-Velocity-Resolution/253160-45978

Anne

 
Posted : 02/07/2020 7:29 pm
Page 2 / 2
Share:

© 2024 Yamaha Corporation of America and Yamaha Corporation. All rights reserved.    Terms of Use | Privacy Policy | Contact Us