Showing posts with label pitch. Show all posts
Showing posts with label pitch. Show all posts

Sunday, February 8, 2026

JP80x0 midi to coefficient mapping tables

Pitch

MidiPitch
01555
11647
21745
31849
41959
52075
62198
72329
82468
92615
102770
112935
123110
133295
143491
153698
163918
174151
184397
194658
204936
215230
225541
235871
246220
256590
266982
277396
287836
298302
308794
319317
329873
3310460
3411082
3511742
3612441
3713181
3813965
3914792
4015672
4116604
4217589
4318635
4419747
4520921
4622164
4723485
4824883
4926362
5027930
5129585
5231345
5333209
5435179
5537270
5639494
5741842
5844329
5946970
6049767
6152725
6255860
6359171
6462691
6566418
6670358
6774541
6878988
6983684
7088659
7193941
7299534
73105450
74111720
75118342
76125382
77132836
78140716
79149082
80157976
81167368
82177318
83187882
84199068
85210900
86223440
87236684
88250764
89265672
90281432
91298164
92315952
93334736
94354636
95375764
96398136
97421800
98446880
99473368
100501528
101531344
102562864
103596328
104631904
105669472
106709272
107751528
108796272
109843600
110893760
111946736
1121003056
1131062688
1141125728
1151192656
1161263808
1171338944
 

Detune:

MidiuC
01
11
22
32
43
53
64
74
85
95
106
116
127
137
148
158
169
179
1810
1910
2011
2111
2212
2312
2413
2513
2614
2714
2815
2915
3016
3116
3217
3317
3418
3518
3619
3719
3820
3920
4021
4121
4222
4322
4423
4523
4624
4724
4825
4925
5026
5126
5227
5327
5428
5528
5629
5729
5830
5930
6031
6131
6232
6332
6433
6534
6635
6736
6837
6938
7039
7140
7241
7342
7443
7544
7645
7746
7847
7948
8049
8151
8253
8355
8457
8559
8661
8763
8865
8967
9069
9171
9273
9375
9477
9579
9681
9783
9885
9987
10089
10191
10293
10395
10497
10599
106101
107103
108105
109107
110109
111111
112113
113115
114117
115119
116121
117123
118125
119127
120129
121137
122145
123153
124169
125193
126225
127321
 

Mix

MidiMix
0102400
1118784
2135168
3151552
4167936
5184320
6200704
7217088
8233472
9249856
10266240
11282624
12299008
13315392
14331776
15348160
16364544
17380928
18397312
19413696
20430080
21446464
22462848
23479232
24495616
25512000
26528384
27544768
28561152
29577536
30593920
31610304
32626688
33643072
34659456
35675840
36692224
37708608
38724992
39741376
40757760
41774144
42790528
43806912
44823296
45839680
46856064
47872448
48888832
49905216
50921600
51937984
52954368
53970752
54987136
551003520
561019904
571036288
581052672
591069056
601085440
611101824
621118208
631134592
641150976
651167360
661183744
671200128
681216512
691232896
701249280
711265664
721282048
731298432
741314816
751331200
761347584
771363968
781380352
791396736
801413120
811429504
821445888
831462272
841478656
851495040
861511424
871527808
881544192
891560576
901576960
911593344
921609728
931626112
941642496
951658880
961675264
971691648
981708032
991724416
1001740800
1011757184
1021773568
1031789952
1041806336
1051822720
1061839104
1071855488
1081871872
1091888256
1101904640
1111921024
1121937408
1131953792
1141970176
1151986560
1162002944
1172019328
1182035712
1192052096
1202068480
1212084864
1222101248
1232117632
1242134016
1252150400
1262166784
1272183168
 

Thursday, March 2, 2023

Frequency modulation

While testing filter FM I realised that I needed to know a little bit more about what is actually going on, so here we go. I'll explain things using VCO frequency modulation as it is a bit more intuitive, but the same happens with filter FM.

Linear FM

In linear FM, the change in Lin FM CV is directly propotional to the change in frequency. For example, if a 1V increase in Lin FM CV leads to a 200Hz increase, a 1V decrease leads to a 200Hz decrease - as long as the base frequency set by the (1V/oct) Pitch CV stays the same. 

In other words, if the initial frequency is 440Hz, the output should be between 240Hz and 640Hz. What we hear is close to the average of the two extremes (this moves into the field of psychoacoustics apparently, so this is not an exact science or at very least not something I'm proficient in). The average here, at least with a symmetrical waveform, is 440Hz, so the output stays in tune as we increase/decrease the CV.

BUT: Once you change the Pitch CV, 1V no longer corresponds to a 200Hz increase. However, increasing and decreasing the Lin FM CV will add or subtract the same number of Hz so the average stays the same as the base frequency. Also, the relationship between the modulated frequency in both cases to the base frequency stays the same.

For example - if a 1V Lin FM CV adds 200Hz when the base frequency is 440Hz, adding 1V will add 400Hz (one octave up) when the base frequency is 880Hz (one octave up), and 100Hz (one octave down) when the base frequency is 220Hz (one octave down). 

Linear FM stays in tune both as we change the FM CV and the Pitch CV, as long as the modulated frequency does not reach either 0Hz or the upper limit of the VCO pitch or filter cutoff.

Linear FM is usually implemented by modulating the reference current in the exponential converter.


Exponential FM

With exponential FM,  we modulate pitch as "semitones". If we use a 1V/oct input, and FM CV is, say, +/- 1V, frequency will go between +1 and -1 octave of the original frequency. For example, if the original frequency is 440Hz, the modulated signal will go from 220Hz to 880Hz.

What is the effect of this? Well, what we hear is not the original 440Hz tone, but again closer to the average of the two extreme. In our case this means 220 + (880-220)/2 = 550Hz

If we drop the original pitch by an octave to 220Hz, we would expect an output between 110 and 440Hz. The average is now 110 + (440-110)/2 = 275Hz, which is one octave down from 550Hz. In other words, the modulated output tracks the original pitch.

But what if we change the FM CV? If we go from +/-1V to +/-2V but keep the original frequency at 440Hz, we would now get a range of +/-2 octaves, or from  110Hz to 1760Hz.

The average of these is 935Hz, whereas for the +/-1V FM CV it was 550Hz. The perceived pitch increases. Similarly, if we decrease the CV the perceived pitch drops. As long as the CV range stays the same we're good though.

Exponential FM is usually implemented by mixing the FM CV with the normal V/Oct CV.


Through zero modulation

An exponential FM will always halve the cutoff frequency for every 1V decrease of CV. This means that the cutoff frequency will never reach zero.

For linear FM however, which controls the reference current in the exponential converter, cutoff WILL reach zero. 

Through zero modulation means that we detect when the CV changes polarity, and (at least for a VCO) reverse the polarity of the output. The frequency should be the same as for a positive CV of the same magnitude. In other words, we use the absolute value of the CV for frequency, and the sign to control the output phase. I am not sure how this will work for a filter but it will be interesting to test.

A bit of maths for the linear FM case

The output current of the exponential converter, which linearly controls the VCO pitch, is defined as

I_c = I_ref * e^(-V_b/V_T)

where -V_b is the exponential CV presented at the exponential converter (scaled down from 1V/oct)

Let's call E = e^(-V_b/V_T), giving us

I_c = I_ref * E

Now, say we increase I_ref with a current I_linfm that is 50% of I_ref. We now have that

1.5 * I_ref * E = 1.5 * I_c

In other words, we increased the pitch by 50%

The absolute increase in I_c is 0.5. 


Now, let's double E, going one octave up

I_ref * 2 * E =  2 * I_c

Again, we increase I_linfm by 50%:

1.5 * I_ref * 2 * E = 1.5 * 2 * I_c = 3 * I_c

We have still increased the pitch by 50%, but this time the absolute increase in I_c is 1. In other words, doubling E doubles the effect of changing I_ref. 


Substituting with numbers: Let's assume that E gives us an I_c that produces 440Hz

increasing I_ref by 50% would then produce a 1.5 * 440Hz = 660Hz wave. The change in Hz is 220.


If we double E without changing I_ref, we get an 880Hz wave.

Now if we increase I_ref by 50%, we get 1.5 * 880Hz = 1320Hz. The change in Hz is 440.


Comparing the two, we see that an increase in E makes a change in I_ref span more Hz. We also see that the relationship between the changed pitches - 660Hz and 1320Hz (2x, or one octave between), is the  same as the change in E.


Some sources

https://ask.video/video/fm-synthesis-explored/3-3-exponential-vs-linear-vs-thru-zero-fm

difference between linear and exponential applications: https://modwiggler.com/forum/viewtopic.php?t=52340

Exponential FM vs linear FM: https://gearspace.com/board/electronic-music-instruments-and-electronic-music-production/1100357-exponential-fm-vs-linear-fm.html

Understanding the Differences Between Exponential, Linear, and Through Zero FM: https://learningmodular.com/understanding-the-differences-between-exponential-linear-and-through-zero-fm/

Adding through-zero lin fm to CEM3340:

http://jhaible.com/legacy/tonline_stuff/hj2vco.gif

http://jhaible.com/legacy/tonline_stuff/hj_modul.html

SSI2130 VCO with TZFM

https://www.soundsemiconductor.com/downloads/ssi2130datasheet.pdf

SSI2130 TZFM control circuit


The SSI2130 has built-in time reverse that changes the direction of the waveforms. This little circuit both outputs the absolute value of the lin freq FM and a control signal for the direction control ("time reverse")