Forums > MaxMSP

Poly Synth Distortion Help

December 22, 2006 | 11:24 am

Hi guys,

I am still trying to work on my synth project and have managed to get it working to a certain extent. I have managed to get it playing 4 different oscillator types and get amplitude envelope working.

However the output seems very distorted when I play chords on my midi keyboard. I am not sure if this is a result of something I am doing wrong with the poly~ object or what ..? I have attached a clip object to the output with thresholds -0.99 & 0.99 but I seem to have very little control over the volume and this apparent distortion.

Could someone have a little look and see if they can identify anything that might be going wrong with the patch.

Thanks
Freddy

Main Patch:

max v2;
#N vpatcher 90 37 985 691;
#P origin 0 74;
#P window setfont "Sans Serif" 9.;
#P comment 137 356 50 9109513 Rectangle;
#P comment 137 334 25 9109513 Saw;
#P comment 137 314 40 9109513 Triangle;
#P user led 112 352 17 17 0 150;
#P user led 112 331 17 17 0 150;
#P user led 112 310 17 17 0 150;
#P user led 113 288 17 17 0 150;
#P comment 128 121 44 9109513 previous;
#P user pictctrl 182 117 21 21 purplebutton.pict 0 0 1 0 2 0 0 0 21 21 128 0 1 1 1 0;
#P user pictctrl 386 123 21 21 purplebutton.pict 0 0 1 0 2 0 0 0 21 21 128 0 1 1 1 0;
#P user dial 558 257 40 40 128 1 0 0 159 270 1 1. 170 170 170 221 221 221 120 120 120 225 225 225 0 0 0 0 0 0;
#P user dial 511 267 40 40 128 1 0 0 159 270 1 1. 170 170 170 221 221 221 120 120 120 225 225 225 0 0 0 0 0 0;
#P user dial 461 268 40 40 128 1 0 0 159 270 1 1. 170 170 170 221 221 221 120 120 120 225 225 225 0 0 0 0 0 0;
#P comment 417 225 15 9109513 A;
#P user dial 411 268 40 40 128 1 0 0 159 270 1 1. 170 170 170 221 221 221 120 120 120 225 225 225 0 0 0 0 0 0;
#N vpatcher 50 212 371 501;
#P window setfont "Sans Serif" 9.;
#P window linecount 0;
#P message 283 204 14 9109513 0;
#P message 260 204 14 9109513 1;
#P outlet 260 236 15 0;
#P message 231 204 14 9109513 0;
#P message 213 204 14 9109513 1;
#P outlet 213 236 15 0;
#P message 183 204 14 9109513 0;
#P message 166 204 14 9109513 1;
#P outlet 166 236 15 0;
#P message 137 204 14 9109513 0;
#P message 118 204 14 9109513 1;
#P window linecount 1;
#P newex 260 173 28 9109513 sel 4;
#P newex 213 173 28 9109513 sel 3;
#P newex 166 173 28 9109513 sel 2;
#P window linecount 0;
#P newex 118 173 28 9109513 sel 1;
#P inlet 8 25 15 0;
#P outlet 118 236 15 0;
#P window linecount 1;
#P newex 8 49 28 9109513 sel 1;
#P number 8 131 35 9 0 6 3 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 8 73 20 9109513 inc;
#N counter 1 4;
#X flags 0 0;
#P newobj 8 104 66 9109513 counter 1 4;
#P newex 8 173 83 9109513 s oscillator1select;
#P connect 6 0 4 0;
#P connect 4 0 2 0;
#P fasten 2 0 1 0 13 94 13 94;
#P connect 1 0 3 0;
#P connect 3 0 0 0;
#P fasten 3 0 7 0 13 167 123 167;
#P connect 7 0 11 0;
#P connect 11 0 5 0;
#P fasten 12 0 5 0 142 226 123 226;
#P fasten 8 0 12 0 171 200 142 200;
#P fasten 3 0 8 0 13 162 171 162;
#P connect 8 0 14 0;
#P fasten 15 0 13 0 188 227 171 227;
#P connect 14 0 13 0;
#P fasten 7 0 15 0 123 200 188 200;
#P fasten 9 0 15 0 218 200 188 200;
#P fasten 10 0 15 0 265 200 188 200;
#P fasten 3 0 9 0 13 156 218 156;
#P connect 9 0 17 0;
#P connect 17 0 16 0;
#P fasten 18 0 16 0 236 227 218 227;
#P fasten 7 0 18 0 123 200 236 200;
#P fasten 10 0 18 0 265 200 236 200;
#P fasten 3 0 10 0 13 151 265 151;
#P connect 10 0 20 0;
#P fasten 21 0 19 0 288 226 265 226;
#P connect 20 0 19 0;
#P fasten 7 0 21 0 123 200 288 200;
#P fasten 9 0 21 0 218 200 288 200;
#P pop;
#P newobj 67 379 73 9109513 p osc1button;
#P user pictctrl 67 258 26 11 oblongbutton.jpg 0 0 1 0 26 0 0 0 26 11 128 0 1 10 2 1;
#P newex 558 302 28 9109513 * 20.;
#P newex 446 515 72 9109513 clip~ -0.99 0.99;
#P newex 447 541 33 9109513 *~ 0.1;
#N vpatcher 5 40 127 263;
#P outlet 19 167 15 0;
#P inlet 55 38 15 0;
#P inlet 19 38 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 19 58 28 9109513 sel 1;
#P newex 55 58 28 9109513 sel 1;
#P number 19 145 35 9 0 6 3 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 19 82 23 9109513 dec;
#P message 55 82 20 9109513 inc;
#N counter 6;
#X flags 0 0;
#P newobj 19 118 66 9109513 counter 6;
#P connect 6 0 5 0;
#P connect 5 0 2 0;
#P connect 2 0 0 0;
#P fasten 1 0 0 0 60 108 24 108;
#P connect 0 0 3 0;
#P connect 3 0 8 0;
#P connect 7 0 4 0;
#P connect 4 0 1 0;
#P pop;
#P newobj 224 152 133 9109513 p filtercontrols;
#P user filtergraph~ 225 47 143 70 139 9 0. 22050. 0.0625 16. 1 1 1 0 0 1 0;
#X frgb 173 255 241;
#X brgb 80 102 170;
#X rgb2 141 243 255;
#X rgb3 207 253 255;
#X rgb4 173 215 255;
#X rgb5 255 235 75;
#X rgb6 248 255 25;
#X rgb7 255 251 43;
#X linmarkers 5512.5 11025. 16537.5;
#X logmarkers 10. 100. 1000. 10000.;
#X nfilters 1;
#X setfilter 0 3 0 0 0 86.727432 1. 0.653136 1. 22050. 0.0001 16. 0.5 25.;
#X done;
#P message 687 334 45 9109513 steal $1;
#P toggle 687 315 15 0;
#P message 615 329 40 9109513 target 0;
#P newex 558 330 27 9109513 t f b;
#P newex 511 330 27 9109513 t f b;
#P newex 461 330 27 9109513 t f b;
#P newex 411 330 27 9109513 t f b;
#P newex 282 333 84 9109513 prepend midinote;
#P newex 282 304 39 9109513 pack;
#P newex 282 278 40 9109513 notein;
#P newex 447 413 90 9109513 poly~ Synthpoly4 4;
#P window setfont "Arial Black" 9.;
#P user umenu 266 126 75 11534375 3 64 143 0;
#X setrgb 157 255 244 80 102 170 255 255 255 221 221 221 170 170 170 119 119 119 187 187 187;
#X add lowpass;
#X add highpass;
#X add bandpass;
#X add bandstop;
#X add peaknotch;
#X add lowshelf;
#X add highshelf;
#P window setfont "Sans Serif" 9.;
#P comment 442 203 133 9109513 AMP ENVELOPE CONTROLS;
#P comment 568 223 15 9109513 R;
#P comment 519 223 15 9109513 S;
#P comment 468 223 15 9109513 D;
#P user meter~ 499 580 579 611 50 0 168 0 103 103 103 255 153 0 255 0 0 217 217 0 153 186 0 12 3 3 3 3;
#P user ezdac~ 446 579 490 612 0;
#P user gain~ 447 448 24 32 100 0 1.071519 1. 10.;
#P comment 268 261 69 9109513 MIDI NOTE IN;
#P comment 435 129 26 9109513 next;
#P comment 137 288 26 9109513 Sine;
#P comment 104 254 87 9109513 Choose OSC Type;
#P connect 28 0 29 0;
#P fasten 29 1 39 0 93 413 48 413 48 366 102 366 102 308 117 308;
#P fasten 29 2 40 0 114 419 37 419 37 356 109 356 109 330 117 330;
#P fasten 29 3 41 0 135 417 151 417 151 375 130 375 130 350 117 350;
#P fasten 29 0 38 0 72 406 56 406 56 372 97 372 97 276 118 276;
#P fasten 36 0 24 0 187 142 229 142;
#P fasten 11 1 23 0 336 145 379 145 379 41 230 41;
#P fasten 24 0 11 0 229 176 213 176 213 122 271 122;
#P connect 13 0 14 0;
#P connect 14 0 15 0;
#P fasten 13 1 14 1 302 300 316 300;
#P fasten 35 0 24 1 391 149 352 149;
#P connect 30 0 16 0;
#P connect 4 0 26 0;
#P connect 25 0 5 0;
#P fasten 20 0 12 0 620 370 452 370;
#P fasten 15 0 12 0 287 393 452 393;
#P fasten 22 0 12 0 692 400 542 400 542 400 452 400;
#P connect 12 0 4 0;
#P connect 26 0 25 0;
#P connect 32 0 17 0;
#P fasten 23 1 12 1 252 100 201 100 201 188 678 188 678 409 468 409;
#P fasten 16 0 12 2 416 364 484 364;
#P connect 25 0 5 1;
#P fasten 17 0 12 3 466 364 500 364;
#P connect 25 0 6 0;
#P connect 33 0 18 0;
#P connect 18 0 12 4;
#P fasten 19 0 12 5 563 365 532 365;
#P connect 34 0 27 0;
#P connect 27 0 19 0;
#P fasten 19 1 20 0 580 355 606 355 606 320 620 320;
#P fasten 18 1 20 0 533 355 606 355 606 320 620 320;
#P fasten 17 1 20 0 483 355 606 355 606 320 620 320;
#P fasten 16 1 20 0 433 355 606 355 606 320 620 320;
#P connect 21 0 22 0;
#P pop;

SynthPoly4 Subpatch:

max v2;
#N vpatcher 247 72 786 583;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#N in 6;
#P newobj 262 127 23 9109513 in 6;
#N in 5;
#P newobj 240 100 23 9109513 in 5;
#N in 4;
#P newobj 218 77 23 9109513 in 4;
#P newex 43 176 44 9109513 sah~ 0.5;
#N vpatcher 302 117 902 466;
#P window setfont "Sans Serif" 9.;
#P newex 19 84 81 9109513 r oscillator1select;
#P outlet 19 159 15 0;
#P newex 19 127 66 9109513 selector~ 4;
#P inlet 112 51 15 0;
#P newex 259 85 40 9109513 rect~;
#P newex 211 85 29 9109513 saw~;
#P newex 158 85 40 9109513 tri~;
#P newex 112 86 36 9109513 cycle~;
#P connect 7 0 5 0;
#P fasten 5 0 6 0 24 151 24 151;
#P fasten 0 0 5 1 117 112 38 112;
#P fasten 1 0 5 2 163 112 52 112;
#P fasten 2 0 5 3 216 112 66 112;
#P fasten 3 0 5 4 264 112 80 112;
#P fasten 4 0 0 0 117 75 117 75;
#P fasten 4 0 1 0 117 75 163 75;
#P fasten 4 0 2 0 117 75 216 75;
#P fasten 4 0 3 0 117 75 264 75;
#P pop;
#P newobj 43 205 41 9109513 p oscs1;
#P newex 174 153 100 9109513 adsr~ 2. 100. 0.6 300.;
#P newex 43 309 33 9109513 pass~;
#P newex 343 239 66 9109513 sel 0;
#N in 3;
#P newobj 196 55 23 9109513 in 3;
#P message 343 264 54 9109513 mute 1 , 0;
#P number 393 318 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 343 319 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 399 264 54 9109513 mute 0 , 1;
#P newex 87 126 41 9109513 / 127.;
#P newex 343 290 60 9109513 thispoly~;
#P comment 312 84 45 9109513 velocity;
#P user meter~ 90 201 170 214 50 0 168 0 103 103 103 255 153 0 255 0 0 217 217 0 153 186 0 12 3 3 3 3;
#P user meter~ 164 315 244 328 50 0 168 0 103 103 103 255 153 0 255 0 0 217 217 0 153 186 0 12 3 3 3 3;
#N out~ 1;
#P newobj 43 338 34 9109513 out~ 1;
#N in 2;
#P newobj 9 210 23 9109513 in 2;
#P newex 43 246 79 9109513 biquad~;
#P newex 43 283 27 9109513 *~;
#P newex 43 126 25 9109513 sig~;
#P newex 43 99 28 9109513 mtof;
#P newex 43 68 54 9109513 unpack 0 0;
#N in 1;
#P newobj 43 41 23 9109513 in 1;
#P connect 0 0 1 0;
#P connect 1 0 2 0;
#P connect 2 0 3 0;
#P fasten 3 0 22 0 48 152 48 152;
#P connect 22 0 21 0;
#P connect 21 0 5 0;
#P fasten 5 0 4 0 48 269 48 269;
#P connect 4 0 19 0;
#P connect 19 0 7 0;
#P fasten 6 0 5 1 14 239 61 239;
#P fasten 20 0 4 1 179 272 65 272;
#P fasten 20 1 22 1 209 179 96 179 96 170 82 170;
#P lcolor 7;
#P fasten 1 1 12 0 92 93 92 93;
#P fasten 22 0 9 0 48 198 95 198;
#P fasten 4 0 8 0 48 304 169 304;
#P fasten 12 0 20 0 92 149 179 149;
#P connect 17 0 20 1;
#P connect 23 0 20 2;
#P connect 24 0 20 3;
#P connect 25 0 20 4;
#P fasten 1 1 18 0 92 123 348 123;
#P connect 18 0 16 0;
#P fasten 13 0 11 0 404 286 348 286;
#P fasten 20 2 11 0 239 285 348 285;
#P fasten 20 0 11 0 179 285 348 285;
#P connect 11 0 14 0;
#P connect 11 1 15 0;
#P connect 18 1 13 0;
#P pop;


December 22, 2006 | 11:55 am

You should keep in mind that you are using 4 oscillators in your poly synth patch and the outputs of all of these add up and will already be distorted before it leaves the poly object.

So limit the output of the polypatch to for example 0.2 (to be on the safe side).

Hope it helps
Grtz, Stan


December 22, 2006 | 12:05 pm

>You should keep in mind that you are using 4 oscillators in your
>poly synth patch and the outputs of all of these add up and will
>already be distorted before it leaves the poly object.
>
>So limit the output of the polypatch to for example 0.2 (to be on
>the safe side).
>

or use limi~

kasper

Kasper T. Toeplitz
noise, composition, bass, computer

http://www.sleazeArt.com

(http://www.myspace.com/sleazeart)


December 22, 2006 | 12:27 pm

Hi, is limi~ a Mac object as it doesnt appear on my PC Version
Thanks,


December 27, 2006 | 6:48 am

Stan Wijnans wrote:
> You should keep in mind that you are using 4 oscillators in your poly
> synth patch and the outputs of all of these add up and will already
> be distorted before it leaves the poly object.

This is not true, Max is using 32-bit floating point internally, its not
distorting before it leaves the poly~. But it will distort on leaving
the DACs. You just need a gain~ before the your dac~’s.

Stefan


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com


Viewing 5 posts - 1 through 5 (of 5 total)