aboutsummaryrefslogtreecommitdiff
path: root/desiredata/doc/3.audio.examples/E08.phase.mod.pd
blob: 53a6e0529241648ac47bdbba35ff5b574ddbe936 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
#N canvas 36 68 722 738 12;
#X obj 224 164 *~;
#X floatatom 224 107 0 0 0 0 - - -;
#X obj 312 144 line~;
#X floatatom 128 121 0 0 0 0 - - -;
#X obj 128 235 cos~;
#X obj 128 191 +~;
#X obj 224 132 osc~ 0;
#X obj 312 118 pack 0 50;
#X floatatom 312 65 0 0 0 0 - - -;
#X obj 312 92 / 100;
#X text 286 27 modulation index;
#X text 286 42 in hundredths;
#X text 125 78 carrier;
#X text 124 96 frequency;
#X text 209 83 frequency;
#X text 210 66 modulation;
#X text 33 132 carrier;
#X text 33 147 phase -->;
#X text 6 175 phase;
#X text 5 190 modulation-->;
#X text 12 217 output;
#X text 11 234 waveform -->;
#X text 129 1 PHASE MODULATION;
#X text 16 378 Most implementations of "FM" actually use phase \, not
frequency \, modulation \, because it extends in a more natural way
to "multi-operator FM" with three or more oscillators.;
#X text 16 434 To do phase modulation \, we split the "carrier oscillator"
into its phase calculation (phasor~) and its waveform lookup (cos~).
These together would be equivalent to an osc~ object \, but the "+~"
between them adds the modulating oscillator's output to the phase.
;
#X text 20 652 We also have to use a line~ to smooth changes in the
modulation index \, which wasn't necessary in the previous patch.;
#X obj 128 148 phasor~;
#X obj 117 557 cos~;
#X obj 117 529 phasor~;
#X text 60 539 this:;
#X text 219 532 is the same;
#X text 220 551 as this:;
#X obj 335 544 osc~;
#N canvas 0 0 450 300 graph2 0;
#X array phase-out 441 float 1;
#A 0 0.43245 0.433463 0.434452 0.435418 0.43636 0.43728 0.438178 0.439056
0.439912 0.440749 0.441567 0.442366 0.443148 0.443912 0.444659 0.445391
0.446107 0.446809 0.447497 0.448172 0.448834 0.449484 0.450122 0.450751
0.451369 0.451978 0.452579 0.453172 0.453758 0.454338 0.454911 0.45548
0.456045 0.456606 0.457164 0.457719 0.458274 0.458827 0.45938 0.459934
0.460489 0.461046 0.461605 0.462168 0.462735 0.463306 0.463883 0.464466
0.465056 0.465654 0.466259 0.466873 0.467497 0.468131 0.468776 0.469433
0.470102 0.470783 0.471479 0.472188 0.472913 0.473653 0.474409 0.475182
0.475973 0.476782 0.477611 0.478459 0.479327 0.480216 0.481127 0.48206
0.483015 0.483994 0.484997 0.486024 0.487077 0.488156 0.48926 0.490392
0.491552 0.49274 0.493957 0.495203 0.496479 0.497785 0.499123 0.500493
0.501896 0.503332 0.504801 0.506304 0.507842 0.509415 0.511023 0.512667
0.514348 0.516066 0.517821 0.519615 0.521447 0.523318 0.525228 0.527179
0.52917 0.531202 0.533275 0.53539 0.537547 0.539747 0.541992 0.54428
0.546613 0.548989 0.551411 0.553877 0.556389 0.558947 0.561551 0.564202
0.5669 0.569645 0.572437 0.575278 0.578166 0.581104 0.58409 0.587125
0.59021 0.593345 0.596529 0.599764 0.603051 0.606389 0.609778 0.613219
0.61671 0.620254 0.62385 0.627497 0.631197 0.634949 0.638754 0.642612
0.646522 0.650486 0.654503 0.658573 0.662696 0.666873 0.671104 -0.324611
-0.320273 -0.315881 -0.311434 -0.306931 -0.302375 -0.297764 -0.2931
-0.288381 -0.283608 -0.278781 -0.2739 -0.268964 -0.263975 -0.258931
-0.253833 -0.248682 -0.243476 -0.238217 -0.232904 -0.227537 -0.222116
-0.216642 -0.211115 -0.205534 -0.1999 -0.194211 -0.18847 -0.182675
-0.176829 -0.170929 -0.164978 -0.158975 -0.152919 -0.146813 -0.140655
-0.134446 -0.128186 -0.121875 -0.115514 -0.109103 -0.102642 -0.0961313
-0.0895714 -0.0829625 -0.0763049 -0.0695988 -0.0628447 -0.056041 -0.0491896
-0.0422913 -0.0353461 -0.0283546 -0.0213171 -0.0142339 -0.00710538
6.80089e-05 0.00728586 0.0145478 0.0218535 0.0292025 0.0365944 0.0440286
0.0515049 0.0590228 0.0665818 0.0741815 0.0818213 0.0895009 0.0972198
0.104978 0.112776 0.120611 0.128484 0.136393 0.144339 0.15232 0.160337
0.168388 0.176473 0.184592 0.192744 0.200929 0.209146 0.217393 0.225672
0.233981 0.24232 0.250688 0.259084 0.267509 0.27596 0.284439 0.292944
0.301475 0.310031 0.318611 0.327215 0.335842 0.344491 0.353162 0.361854
0.370566 0.379298 0.38805 0.39682 0.405608 0.414413 0.423234 0.432072
0.440924 0.449792 0.458673 0.467567 0.476474 0.485394 0.494324 0.503265
0.512216 0.521176 0.530145 0.539121 0.548104 0.557094 0.566089 0.575089
0.584094 0.593102 0.602113 0.611126 0.620141 0.629157 0.638173 0.647189
0.656203 0.665215 0.674225 0.683232 0.692234 0.701231 0.710224 0.71921
0.728189 0.737161 0.746124 0.755079 0.764024 0.772959 0.781884 0.790796
0.799697 0.808584 0.817458 0.826318 0.835162 0.843992 0.852804 0.861601
0.870379 0.879139 0.887879 0.8966 0.905301 0.913981 0.92264 0.931276
0.93989 0.94848 0.957046 0.965588 0.974105 0.982595 0.99106 0.999497
1.00791 1.01629 1.02464 1.03296 1.04126 1.04952 1.05775 1.06595 1.07412
1.08225 1.09035 1.09841 1.10645 1.11444 1.1224 1.13033 1.13822 1.14607
1.15388 1.16166 1.1694 1.17709 1.18475 1.19237 1.19995 1.20749 1.21498
1.22244 1.22985 1.23722 1.24454 1.25182 1.25906 1.26625 1.2734 0.280502
0.287559 0.29457 0.301536 0.308454 0.315325 0.32215 0.328926 0.335655
0.342335 0.348967 0.35555 0.362084 0.368568 0.375003 0.381388 0.387722
0.394004 0.400235 0.406415 0.412544 0.418621 0.424647 0.430621 0.436542
0.442412 0.448228 0.453993 0.459704 0.465363 0.470969 0.476521 0.48202
0.487466 0.492858 0.498196 0.503481 0.508712 0.513889 0.519011 0.524077
0.52909 0.534049 0.538953 0.543804 0.5486 0.553342 0.55803 0.562664
0.567243 0.571769 0.57624 0.580658 0.585021 0.589331 0.593587 0.597789
0.601938 0.606033 0.610075 0.614064 0.617999 0.621879 0.625706 0.629481
0.633203 0.636873 0.640491 0.644057 0.647571 0.651033 0.654445 0.657805
0.661114 0.664372 0.66758 0.670739 0.673847 0.676905 0.679914 0.682875
;
#X array cos-out 441 float 1;
#A 0 -0.911256 -0.913872 -0.916365 -0.918789 -0.921097 -0.923342 -0.925486
-0.927564 -0.92956 -0.931483 -0.93335 -0.935129 -0.936867 -0.938528
-0.940137 -0.941707 -0.943197 -0.944657 -0.946072 -0.947426 -0.948755
-0.95004 -0.951276 -0.952491 -0.953672 -0.954806 -0.955924 -0.957024
-0.958071 -0.959106 -0.960132 -0.961119 -0.962086 -0.963047 -0.963993
-0.964903 -0.965811 -0.966718 -0.967595 -0.968461 -0.969329 -0.970192
-0.971025 -0.971863 -0.972707 -0.973527 -0.974343 -0.975168 -0.975986
-0.976786 -0.977597 -0.978414 -0.979202 -0.980003 -0.980816 -0.981596
-0.982391 -0.983194 -0.983968 -0.984757 -0.985543 -0.98631 -0.987093
-0.987851 -0.98861 -0.98937 -0.990102 -0.990852 -0.991557 -0.992275
-0.99296 -0.993642 -0.994295 -0.994935 -0.995544 -0.996137 -0.996687
-0.997227 -0.997705 -0.998173 -0.998575 -0.998944 -0.999273 -0.999527
-0.999743 -0.999894 -0.999966 -0.999981 -0.999927 -0.999765 -0.999526
-0.999202 -0.998785 -0.99824 -0.997586 -0.996816 -0.995923 -0.994897
-0.99373 -0.992413 -0.990934 -0.989283 -0.987458 -0.985449 -0.983247
-0.980843 -0.978222 -0.975372 -0.972288 -0.968961 -0.965377 -0.96153
-0.95741 -0.952995 -0.948265 -0.943231 -0.937881 -0.932182 -0.926128
-0.919728 -0.912938 -0.905762 -0.898197 -0.890198 -0.881799 -0.87293
-0.863637 -0.853855 -0.843612 -0.832873 -0.821629 -0.809886 -0.797593
-0.784764 -0.771394 -0.757466 -0.742953 -0.727864 -0.712189 -0.695918
-0.679041 -0.661549 -0.643437 -0.624697 -0.605324 -0.585314 -0.564664
-0.543374 -0.521441 -0.498869 -0.475658 -0.451811 -0.427334 -0.402219
-0.376482 -0.350131 -0.323174 -0.295626 -0.267508 -0.238824 -0.2096
-0.179853 -0.149603 -0.118875 -0.0876953 -0.0560885 -0.0240874 0.00827867
0.040974 0.0739643 0.107208 0.140666 0.174297 0.208056 0.241893 0.275757
0.309603 0.343385 0.377036 0.410498 0.443712 0.476616 0.509148 0.541242
0.572835 0.603858 0.634244 0.66391 0.692797 0.720837 0.747961 0.774084
0.799131 0.823051 0.845758 0.867169 0.887248 0.90588 0.923037 0.938628
0.952605 0.964885 0.975433 0.984153 0.991037 0.995988 0.998986 0.999997
0.998938 0.995807 0.990576 0.983211 0.973668 0.961961 0.948075 0.932007
0.913757 0.893328 0.87073 0.845995 0.81915 0.790227 0.759268 0.726324
0.691452 0.654714 0.616181 0.57593 0.534037 0.490599 0.445716 0.399491
0.352033 0.303459 0.253886 0.203441 0.152259 0.100478 0.0482368 -0.00432081
-0.057045 -0.109786 -0.162386 -0.214696 -0.266564 -0.317814 -0.368301
-0.417864 -0.466337 -0.513584 -0.559424 -0.603732 -0.646344 -0.687125
-0.725934 -0.762631 -0.797101 -0.829205 -0.858847 -0.8859 -0.91028
-0.931885 -0.950636 -0.966466 -0.97929 -0.989092 -0.995773 -0.999358
-0.999773 -0.997042 -0.991152 -0.982099 -0.969941 -0.954655 -0.936332
-0.915008 -0.890737 -0.863625 -0.833713 -0.801132 -0.765979 -0.728348
-0.688394 -0.646219 -0.601975 -0.555817 -0.507869 -0.45832 -0.407319
-0.355036 -0.301652 -0.247328 -0.192258 -0.136617 -0.0805873 -0.0243537
0.0319027 0.0879985 0.143752 0.198986 0.253526 0.307194 0.359834 0.411262
0.461345 0.509907 0.556823 0.601935 0.645131 0.686266 0.725245 0.761935
0.796272 0.828125 0.857461 0.884158 0.9082 0.929508 0.948044 0.9638
0.976698 0.986778 0.99402 0.998404 0.999981 0.998763 0.994751 0.988022
0.978621 0.966582 0.95197 0.93487 0.915357 0.893512 0.869405 0.843139
0.814817 0.784538 0.752408 0.718535 0.68303 0.646007 0.607581 0.567872
0.526996 0.485074 0.442227 0.398573 0.354231 0.30932 0.263957 0.218256
0.172326 0.126282 0.0802317 0.0342922 -0.0114471 -0.0568861 -0.101931
-0.146492 -0.190474 -0.233802 -0.276394 -0.318171 -0.359072 -0.399015
-0.437958 -0.475821 -0.512573 -0.548149 -0.582512 -0.615632 -0.647446
-0.677951 -0.707119 -0.734897 -0.761296 -0.786293 -0.80988 -0.83204
-0.852773 -0.872085 -0.88998 -0.906462 -0.921542 -0.935229 -0.94754
-0.95849 -0.968102 -0.976397 -0.9834 -0.989136 -0.993613 -0.996882
-0.998976 -0.99993 -0.999748 -0.998484 -0.996188 -0.99286 -0.988563
-0.983336 -0.977186 -0.970195 -0.962347 -0.953732 -0.944344 -0.934249
-0.923482 -0.912051 -0.900028 -0.887441 -0.874296 -0.860659 -0.846562
-0.832035 -0.817101 -0.801792 -0.786149 -0.770201 -0.753977 -0.737507
-0.720826 -0.703952 -0.686912 -0.669731 -0.652436 -0.635043 -0.617572
-0.600055 -0.582513 -0.564966 -0.547418 -0.529898 -0.512429 -0.495016
-0.477676 -0.460438 -0.443287 -0.426265 -0.409364;
#X coords 0 1 440 -1 200 140 1;
#X restore 509 190 graph;
#X obj 213 246 tabwrite~ phase-out;
#X obj 213 273 tabwrite~ cos-out;
#X msg 213 221 bang;
#X text 260 220 <-- graph them;
#X obj 126 296 output~;
#X obj 127 270 hip~;
#X text 408 98 ramped to avoid;
#X text 407 114 clicks.);
#X text 407 82 (the index is;
#X text 435 704 updated for Pd version 0.37;
#X text 21 588 The "modulation" index \, which in true FM is in units
of Hertz \, is dimensionless for phase moduation. "Good" values tend
to be between 0 and 1... in this patch the index is in hundredths.
;
#X connect 0 0 5 1;
#X connect 1 0 6 0;
#X connect 2 0 0 1;
#X connect 3 0 26 0;
#X connect 4 0 35 0;
#X connect 4 0 39 0;
#X connect 5 0 4 0;
#X connect 5 0 34 0;
#X connect 6 0 0 0;
#X connect 7 0 2 0;
#X connect 8 0 9 0;
#X connect 9 0 7 0;
#X connect 26 0 5 0;
#X connect 28 0 27 0;
#X connect 36 0 34 0;
#X connect 36 0 35 0;
#X connect 39 0 38 0;
#X connect 39 0 38 1;