Forums > MaxMSP

getting rid of dc offset… please help!

May 4, 2008 | 2:40 pm

Hi,
I’m having trouble when combining different waves of getting a signal that constantly oscillates around 0. I.e., I keep getting DC offset that I don’t know how to plan for. I’ve included a picture of 4 instances of what I believe should be the same combination but result in 4 different waveforms.

In this example, it’s a sine [cycle~] combined with a saw [phasor~] – [*~ 2.] – [-~ 1.], but the situation seems much more complicated when I introduce triangles, squares, noise, etc, as well as add a 3rd oscillator. Help! Thnx ahead of time.


May 4, 2008 | 6:40 pm

I’m beginning to think that it may have something to do with phase, though I can’t really find anything very descriptive about this in the tutorials. any ideas?

here’s what i’m working with….

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 169 30 34 9109513 freq;
#P comment 281 30 34 9109513 vol;
#P comment 123 30 34 9109513 vol;
#P comment 226 30 34 9109513 shape;
#P newex 276 318 33 9109513 *~ 0.5;
#P newex 276 294 45 9109513 +~;
#P comment 306 466 69 9109513 Osc1 + Osc2;
#P user scope~ 276 345 402 464 256 3 128 -1. 1. 0 0. 0 0. 102 255 51 135 135 135 0;
#P comment 189 466 41 9109513 Osc2;
#P user scope~ 144 345 270 464 256 3 128 -1. 1. 0 0. 0 0. 102 255 51 135 135 135 0;
#P flonum 276 44 35 9 0. 1. 3 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P user umenu 214 44 60 9109543 1 64 60 1;
#X add sine;
#X add triangle;
#X add saw;
#X add square;
#X add squine;
#X add noise;
#X add custom;
#X add draw;
#N vpatcher 15 55 508 327;
#P window setfont "Sans Serif" 9.;
#P newex 385 109 75 9109513 cycle~ custom1;
#P inlet 202 34 15 0;
#P newex 191 179 33 9109513 *~ 0.5;
#P newex 308 109 75 9109513 cycle~ custom1;
#P newex 271 109 35 9109513 noise~;
#P newex 191 156 48 9109513 +~;
#P newex 106 156 27 9109513 -~ 1.;
#P newex 106 132 28 9109513 *~ 2.;
#P newex 229 132 28 9109513 *~ 2.;
#P newex 149 132 28 9109513 *~ 2.;
#P newex 229 109 40 9109513 rect~;
#P newex 191 109 36 9109513 cycle~;
#P newex 149 109 40 9109513 rect~;
#P newex 106 109 41 9109513 phasor~;
#P newex 45 109 41 9109513 phasor~;
#P newex 45 132 59 9109513 triangle~ 0.5;
#P newex 7 109 36 9109513 cycle~;
#P outlet 7 133 15 0;
#P outlet 45 156 15 0;
#P outlet 106 180 15 0;
#P outlet 149 156 15 0;
#P outlet 191 203 15 0;
#P outlet 271 133 15 0;
#P outlet 308 133 15 0;
#P outlet 385 133 15 0;
#P connect 23 0 8 0;
#P connect 8 0 7 0;
#P connect 23 0 10 0;
#P connect 10 0 9 0;
#P connect 9 0 6 0;
#P connect 23 0 11 0;
#P connect 11 0 17 0;
#P connect 17 0 18 0;
#P connect 18 0 5 0;
#P connect 23 0 12 0;
#P connect 12 0 15 0;
#P connect 15 0 4 0;
#P connect 23 0 13 0;
#P connect 13 0 19 0;
#P connect 19 0 22 0;
#P connect 22 0 3 0;
#P connect 23 0 14 0;
#P connect 14 0 16 0;
#P connect 16 0 19 1;
#P connect 20 0 2 0;
#P connect 23 0 21 0;
#P connect 21 0 1 0;
#P connect 23 0 24 0;
#P connect 24 0 0 0;
#P pop;
#P newobj 286 130 208 9109513 p waveform;
#P newex 255 182 28 9109513 *~ 0.;
#P newex 255 130 27 9109513 + 1;
#P newex 255 154 239 9109513 selector~ 8;
#P flonum 166 44 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#N vpatcher 15 55 491 314;
#P inlet 202 34 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 191 179 33 9109513 *~ 0.5;
#P newex 385 109 63 9109513 cycle~ draw1;
#P newex 308 109 75 9109513 cycle~ custom1;
#P newex 271 109 35 9109513 noise~;
#P newex 191 156 48 9109513 +~;
#P newex 106 156 27 9109513 -~ 1.;
#P newex 106 132 28 9109513 *~ 2.;
#P newex 229 132 28 9109513 *~ 2.;
#P newex 149 132 28 9109513 *~ 2.;
#P newex 229 109 40 9109513 rect~;
#P newex 191 109 36 9109513 cycle~;
#P newex 149 109 40 9109513 rect~;
#P newex 106 109 41 9109513 phasor~;
#P newex 45 109 41 9109513 phasor~;
#P newex 45 132 59 9109513 triangle~ 0.5;
#P newex 7 109 36 9109513 cycle~;
#P outlet 7 133 15 0;
#P outlet 45 156 15 0;
#P outlet 106 180 15 0;
#P outlet 149 156 15 0;
#P outlet 191 203 15 0;
#P outlet 271 133 15 0;
#P outlet 308 133 15 0;
#P outlet 385 133 15 0;
#P connect 24 0 8 0;
#P connect 8 0 7 0;
#P connect 24 0 10 0;
#P connect 10 0 9 0;
#P connect 9 0 6 0;
#P connect 24 0 11 0;
#P connect 11 0 17 0;
#P connect 17 0 18 0;
#P connect 18 0 5 0;
#P connect 24 0 12 0;
#P connect 12 0 15 0;
#P connect 15 0 4 0;
#P connect 24 0 13 0;
#P connect 13 0 19 0;
#P connect 19 0 23 0;
#P connect 23 0 3 0;
#P connect 24 0 14 0;
#P connect 14 0 16 0;
#P connect 16 0 19 1;
#P connect 20 0 2 0;
#P connect 24 0 21 0;
#P connect 21 0 1 0;
#P connect 24 0 22 0;
#P connect 22 0 0 0;
#P pop;
#P newobj 41 130 202 9109513 p waveform;
#P user ezdac~ 6 30 50 63 0;
#P user scope~ 12 345 138 464 256 3 128 -1. 1. 0 0. 0 0. 102 255 51 135 135 135 0;
#P flonum 117 44 35 9 0. 1. 3 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P user umenu 55 44 60 9109543 1 64 60 1;
#X add sine;
#X add triangle;
#X add saw;
#X add square;
#X add squine;
#X add noise;
#X add custom;
#X add draw;
#P newex 12 182 28 9109513 *~ 0.;
#N vpatcher 30 205 397 478;
#P window setfont "Sans Serif" 9.;
#P newex 8 223 60 9109513 peek~ draw1;
#P newex 8 200 46 9109513 listfunnel;
#P user multiSlider 8 23 333 174 -1. 1. 512 2937 15 0 0 2 0 0 0;
#M frgb 0 0 0;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P connect 0 0 1 0;
#P connect 1 0 2 0;
#P pop;
#P newobj 151 85 40 9109513 p draw1;
#B color 5;
#P message 45 85 26 9109513 read;
#P newex 151 106 92 9109513 buffer~ draw1 11.61;
#P newex 45 106 104 9109513 buffer~ custom1 11.61;
#P newex 12 130 27 9109513 + 1;
#P newex 12 154 232 9109513 selector~ 8;
#P comment 58 466 41 9109513 Osc1;
#P comment 68 30 34 9109513 shape;
#P fasten 17 0 21 0 260 225 149 225;
#P fasten 17 0 25 1 260 207 316 207;
#P connect 8 0 11 0;
#P fasten 8 0 25 0 17 216 281 216;
#P hidden connect 14 0 13 0;
#P hidden connect 14 0 18 0;
#P connect 26 0 23 0;
#P connect 25 0 26 0;
#P hidden connect 20 0 17 1;
#P hidden connect 19 0 16 0;
#P connect 15 0 17 0;
#P connect 16 0 15 0;
#P connect 18 7 15 8;
#P connect 18 6 15 7;
#P connect 18 5 15 6;
#P connect 18 4 15 5;
#P connect 18 3 15 4;
#P connect 18 2 15 3;
#P connect 18 1 15 2;
#P connect 18 0 15 1;
#P connect 13 0 2 1;
#P connect 13 1 2 2;
#P connect 13 2 2 3;
#P connect 13 3 2 4;
#P connect 13 4 2 5;
#P connect 13 5 2 6;
#P connect 13 6 2 7;
#P connect 13 7 2 8;
#P hidden connect 10 0 8 1;
#P hidden connect 9 0 3 0;
#P connect 3 0 2 0;
#P connect 6 0 4 0;
#P connect 2 0 8 0;
#P window clipboard copycount 31;


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