Forums > MaxMSP

Where is this patch going wrong?

April 22, 2008 | 10:47 pm

trying to organise my patch to hand it in and it stopped working properly and i don’t know why, can anyone help? also not sure if the wavetable and buffer is working as well as it should
cheers
max v2;
#N vpatcher 2 44 1280 896;
#P origin -3 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P hidden message 861 704 39 196617 set $1;
#P number 907 685 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden newex 848 729 51 196617 ctlin 104;
#P user dial 907 717 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 hidden newex 332 828 53 196617 pan2 100;
#P hidden newex 714 778 51 196617 cascade~;
#P window setfont Helvetica 9.;
#P user filtergraph~ 905 578 266 57 21 9 20. 20000. 0.0625 16. 0 1 1 0 0 1 0;
#X frgb 170 170 170;
#X brgb 210 210 210;
#X rgb2 0 0 0;
#X rgb3 130 130 130;
#X rgb4 0 0 0;
#X rgb5 118 121 166;
#X rgb6 122 74 74;
#X rgb7 255 22 22;
#X linmarkers 5512.5 11025. 16537.5;
#X logmarkers 50. 500. 5000.;
#X nfilters 4;
#X setfilter 3 5 1 0 0 535.064148 0.790694 1.263821 30. 19845. 0.0625 16. 0.5 25.;
#X setfilter 2 5 1 0 0 122.429024 1.166041 2.365923 30. 19845. 0.0625 16. 0.5 25.;
#X setfilter 1 5 1 0 0 5266.420898 0.0625 1.270767 30. 19845. 0.0625 16. 0.5 25.;
#X setfilter 0 5 0 0 0 70.6 1.560204 1.075685 30. 19845. 0.0625 16. 0.5 25.;
#X done;
#P window setfont "Sans Serif" 9.;
#P hidden message 10 264 66 196617 loadmess 64;
#P hidden number 284 683 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden message 106 257 39 196617 set $1;
#P number 191 337 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#N vpatcher 616 203 1216 603;
#P window setfont "Sans Serif" 9.;
#P newex 289 174 27 196617 t b i;
#P user ubumenu 289 150 93 196617 0 1 1 0;
#X add select waveform;
#X add mywave1;
#X add mywave2;
#X add mywave3;
#X add mywave4;
#X prefix_set 0 0 0;
#P newex 276 198 53 196617 gate 4;
#P newex 121 74 27 196617 t b i;
#P message 50 202 35 196617 write;
#P message 50 181 35 196617 write;
#P message 50 154 35 196617 write;
#P newex 102 103 53 196617 gate 4;
#P message 211 155 30 196617 read;
#P message 211 131 30 196617 read;
#P newex 100 198 106 196617 buffer~ mywave4 12;
#P newex 100 176 106 196617 buffer~ mywave3 12;
#P newex 100 153 106 196617 buffer~ mywave2 12;
#P message 50 126 35 196617 write;
#P newex 100 131 106 196617 buffer~ mywave1 12;
#P user ubumenu 121 50 93 196617 0 1 1 0;
#X add select waveform;
#X add mywave1;
#X add mywave2;
#X add mywave3;
#X add mywave4;
#X prefix_set 0 0
0;
#P connect 8 0 2 0;
#P connect 8 1 9 0;
#P connect 2 0 1 0;
#P connect 6 0 1 0;
#P connect 7 0 3 0;
#P connect 9 0 3 0;
#P connect 12 1 8 0;
#P connect 0 0 12 0;
#P connect 12 0 8 1;
#P connect 13 0 6 0;
#P connect 13 1 7 0;
#P connect 15 1 13 0;
#P connect 14 0 15 0;
#P connect 15 0 13 1;
#P pop;
#P hidden newobj 834 758 51 196617 p buffers;
#P hidden newex 106 274 51 196617 ctlin 106;
#P user dial 191 597 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 hidden newex 190 724 53 196617 pan2 100;
#P hidden newex 541 457 66 196617 loadmess 90;
#N vpatcher 10 59 610 459;
#P window setfont "Sans Serif" 9.;
#P newex 284 194 50 196617 mtof;
#P newex 226 196 50 196617 mtof;
#P newex 105 195 50 196617 mtof;
#P newex 154 104 76 196617 unpack 0 0 0 0;
#P newex 154 50 51 196617 stripnote;
#P newex 154 77 62 196617 quickthresh;
#P newex 208 304 81 196617 cycle~ mywave;
#P newex 122 304 81 196617 cycle~ mywave;
#P newex 162 195 62 196617 prepend set;
#P newex 136 270 81 196617 cycle~ mywave;
#P newex 50 270 81 196617 cycle~ mywave;
#P newex 50 195 50 196617 mtof;
#P inlet 297 34 15 0;
#P inlet 46 34 15 0;
#P inlet 162 146 15 0;
#P outlet 50 292 15 0;
#P outlet 136 292 15 0;
#P outlet 122 326 15 0;
#P outlet 208 326 15 0;
#P connect 15 0 7 0;
#P connect 10 0 8 0;
#P connect 7 0 8 0;
#P connect 8 0 3 0;
#P connect 15 1 16 0;
#P connect 10 0 11 0;
#P connect 17 0 11 0;
#P connect 11 0 1 0;
#P connect 10 0 9 0;
#P connect 16 0 9 0;
#P connect 9 0 2 0;
#P connect 5 0 14 0;
#P connect 14 0 13 0;
#P connect 13 0 15 0;
#P connect 4 0 10 0;
#P connect 6 0 14 1;
#P connect 10 0 12 0;
#P connect 18 0 12 0;
#P connect 12 0 0 0;
#P connect 15 2 17 0;
#P connect 15 3 18 0;
#P pop;
#P hidden newobj 659 229 70 196617 p polyphonics;
#P hidden newex 378 501 41 196617 *~ 0.5;
#P hidden newex 334 500 41 196617 *~ 0.5;
#P message 889 159 33 196617 clear;
#P window setfont Helvetica 9.;
#P user filtergraph~ 193 215 266 57 21 9 20. 20000. 0.0625 16. 0 1 1 0 0 1 0;
#X frgb 170 170 170;
#X brgb 210 210 210;
#X rgb2 0 0 0;
#X rgb3 130 130 130;
#X rgb4 0 0 0;
#X rgb5 118 121 166;
#X rgb6 122 74 74;
#X rgb7 255 22 22;
#X linmarkers 5512.5 11025. 16537.5;
#X logmarkers 50. 500. 5000.;
#X nfilters 4;
#X setfilter 3 5 1 0 0 568.189331 7.670454 3.740991 30. 19845. 0.0625 16. 0.5 25.;
#X setfilter 2 5 1 0 0 122.429024 1.166041 2.365923 30. 19845. 0.0625 16. 0.5 25.;
#X setfilter 1 5 1 0 0 5140.878906 0.403817 1.270767 30. 19845. 0.0625 16. 0.5 25.;
#X setfilter 0 5 0 0 0 58.665329 1.058151 1.075685 30. 19845. 0.0625 16. 0.5 25.;
#X done;
#P window setfont "Sans Serif" 9.;
#P hidden newex 35 599 41 196617 *~ 0.5;
#P hidden newex 8 549 51 196617 cascade~;
#P window linecount 2;
#P comment 247 150 68 196617 Speed of Loop Playback;
#P user ubumenu 1108 505 50 196617 0 1 1 0;
#X add draw;
#X add select;
#X add zoom;
#X add move;
#X prefix_set 0 0
0;
#P window linecount 1;
#P hidden newex 1095 346 71 196617 prepend mode;
#P user ubumenu 905 432 93 196617 0 1 1 0;
#X add select waveform;
#X add mywave1;
#X add mywave2;
#X add mywave3;
#X add mywave4;
#X prefix_set 0 0
0;
#P hidden newex 1005 402 62 196617 prepend set;
#P hidden user meter~ 635 500 673 623 50 0 168 0 103 103 103 255 153 0 255 0 0 217 217 0 153 186 0 20 3 3 3 3;
#P user gain~ 905 294 24 100 100 0 1.071519 7.94321 10.;
#P number 193 84 35 9 0 127 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden message 250 115 39 196617 set $1;
#P hidden newex 248 132 51 196617 ctlin 105;
#P hidden newex 1069 138 32 196617 sel 0;
#P hidden newex 731 290 32 196617 line~;
#P user waveform~ 905 465 200 74 3 9;
#W mode draw;
#W mouseoutput continuous;
#W unit ms;
#W grid 1000.;
#W ticks 0;
#W labels 1;
#W vlabels 0;
#W vticks 1;
#W bpm 120. 4.;
#W frgb 33 0 0;
#W brgb 60 178 173;
#W rgb2 0 95 255;
#W rgb3 0 0 0;
#W rgb4 0 0 0;
#W rgb5 190 137 255;
#W rgb6 100 100 100;
#W rgb7 100 100 100;
#P hidden button 1012 145 15 0;
#N vpreset 2;
#X append 1 1 55 183 925 function clear ; 55 183 925 function add 0. 0. 0 ; 55 183 925 function add 10.638297 0.893333 0 ; 55 183 925 function add 250. 0.2 0 ; 55 183 925 function add 1000. 0.;
#X append 1 1 0 ; 55 183 925 function domain 1000. ; 55 183 925 function range 0. 1. ;;
#X append 2 1 55 183 925 function clear ; 55 183 925 function add 0. 0. 0 ; 55 183 925 function add 10.638297 0.893333 0 ; 55 183 925 function add 250. 0.2 0 ; 55 183 925 function add 606.382935 0.76;
#X append 2 1 0 ; 55 183 925 function add 1000. 0. 0 ; 55 183 925 function domain 1000. ; 55 183 925 function range 0. 1. ;;
#P preset 925 148 47 27;
#P user function 925 183 1125 283 1 1 0 0;
#X frgb 82 82 82;
#X brgb 204 204 204;
#X rgb2 85 85 85;
#X rgb3 255 255 255;
#X rgb4 0 0 0;
#X rgb5 0 0 0;
#X add 0. 0. 0;
#X add 95.744675 0.973333 0;
#X add 898.936157 0.973333 0;
#X add 1000. 0. 0;
#X domain 1000.;
#X range 0. 1.;
#X done;
#P objectname function;
#P hidden newex 666 311 50 196617 *~;
#P number 671 122 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden newex 704 85 40 196617 ctlin;
#P hidden message 272 194 14 196617 0;
#P hidden message 251 195 14 196617 1;
#P hidden newex 251 163 41 196617 sel 1 2;
#P hidden newex 97 185 79 196617 sfinfo~;
#P toggle 193 178 15 0;
#P hidden newex 306 473 35 196617 gate~;
#B color 1;
#P hidden newex 352 232 99 196617 scale 0 127 0.2 0.7;
#P hidden newex 304 890 31 196617 dac~;
#B color 1;
#P user meter~ 218 437 243 591 50 0 168 0 0 0 0 255 153 0 255 0 0 217 217 0 153 186 0 20 5 5 7 6;
#P user meter~ 188 437 213 592 50 0 168 0 0 0 0 255 153 0 255 0 0 217 217 0 153 186 0 20 3 5 7 6;
#P hidden flonum 259 269 51 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden user gain~ 390 555 24 100 100 0 1.071519 7.94321 10.;
#P hidden newex 179 191 72 196617 s drum_length;
#P hidden newex 101 163 105 196617 info~ drum;
#P hidden newex 259 293 50 196617 phasor~;
#B color 14;
#P hidden newex 524 380 72 196617 r drum_length;
#P hidden newex 402 414 85 196617 *~ 3478.458008;
#B color 1;
#P hidden newex 402 444 70 196617 play~ drum 2;
#B color 1;
#P window linecount 2;
#P hidden comment 496 415 77 196617 length of drum loop in ms;
#P window linecount 1;
#P message 193 53 43 196617 replace;
#P hidden newex 101 130 70 196617 buffer~ drum;
#P hidden newex 805 196 67 196617 prepend port;
#P comment 532 143 100 196617 choose audio dirver;
#P hidden newex 636 23 48 196617 loadbang;
#P hidden button 559 66 15 0;
#P user umenu 512 123 132 196647 1 64 139 1;
#X add None;
#X add CoreAudio "Built-in Output";
#X add NonRealTime;
#X add ad_rewire;
#P hidden newex 559 96 80 196617 adstatus driver;
#P user umenu 756 121 103 196647 1 64 137 1;
#X add "Keystation 49e";
#X add "to MaxMSP 1";
#X add "to MaxMSP 2";
#P hidden newex 798 96 46 196617 midiinfo;
#P hidden message 798 71 60 196617 controllers;
#P hidden newex 829 28 40 196617 notein;
#P user kslider 907 41 54 0 36 48 31 12 1 128 128 128 128 128 128 255 255 255 0 0 0 0 0 0;
#P comment 751 139 109 196617 choose MIDI controller;
#P user ezdac~ 421 35 465 68 0;
#P user dial 193 130 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 panel 901 28 348 79;
#X brgb 36 228 48;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P comment 239 53 85 196617 Change/Load Loop;
#P window linecount 2;
#P comment 230 82 100 196617 set MIDI input port for tempo controll;
#P window linecount 1;
#P comment 231 179 113 196617 click if loop is in mono;
#P comment 189 641 100 196617 Pan Loop;
#P comment 292 198 100 196617 EQ Loop;
#P comment 904 761 100 196617 Synth Pan Comtroll;
#P comment 905 539 234 196617 Click and drag pencill to Draw your own Waveform;
#P comment 905 450 212 196617 seect which waveform to draw and store;
#P window linecount 4;
#P comment 1107 454 62 196617 Select to choose what to do with the pencill;
#P window linecount 3;
#P comment 907 646 100 196617 Set MIDI input port for the synth panning controll;
#P window linecount 1;
#P comment 413 72 100 196617 Audio ON/OFF;
#P window linecount 3;
#P comment 184 291 100 196617 Set MIDI input port for Loop Panning controll;
#P window linecount 1;
#P comment 987 291 100 196617 Amplitude Envelope;
#P window linecount 2;
#P comment 931 326 46 196617 Volume of Synth;
#P user gain~ 257 472 24 100 100 0 1.071519 7.94321 10.;
#P comment 257 443 44 196617 Volume of Loop;
#P hidden fasten 1 0 71 0 262 684 338 684 338 531 13 531;
#P hidden fasten 40 0 71 0 395 694 330 694 330 537 13 537;
#P hidden connect 71 0 72 0;
#P hidden connect 73 0 71 1;
#P hidden connect 31 1 48 0;
#P hidden connect 32 0 31 0;
#P hidden fasten 31 1 38 0 166 155 106 155;
#P hidden fasten 83 0 84 0 196 358 182 358 182 245 111 245;
#P hidden fasten 86 0 81 0 15 287 93 287 93 279 111 279;
#P hidden connect 84 0 81 0;
#P hidden connect 38 6 39 0;
#P hidden fasten 79 0 42 0 195 750 173 750 173 430 193 430;
#P hidden connect 72 0 79 0;
#P hidden connect 81 0 80 0;
#P hidden connect 61 0 17 0;
#P hidden connect 51 0 47 0;
#P hidden connect 50 0 47 0;
#P hidden fasten 79 1 43 0 238 753 253 753 253 428 223 428;
#P hidden connect 80 0 79 2;
#P hidden connect 62 0 61 0;
#P hidden connect 63 0 62 0;
#P hidden connect 48 0 49 0;
#P hidden connect 49 0 50 0;
#P hidden connect 76 0 1 0;
#P hidden fasten 78 0 1 0 546 637 428 637 428 538 262 538;
#P hidden connect 45 0 41 0;
#P hidden connect 41 0 37 0;
#P hidden connect 49 1 51 0;
#P hidden fasten 80 0 85 0 196 672 289 672;
#P hidden connect 79 0 44 0;
#P hidden connect 89 0 44 0;
#P hidden connect 47 0 46 0;
#P hidden connect 79 1 44 1;
#P hidden connect 89 1 44 1;
#P hidden fasten 34 0 46 1 407 467 336 467;
#P hidden connect 88 0 89 0;
#P hidden fasten 46 0 75 0 321 520;
#P hidden connect 17 0 45 0;
#P hidden fasten 90 0 89 2 912 823 365 823;
#P hidden connect 34 0 76 0;
#P hidden connect 1 1 40 0;
#P hidden connect 34 1 40 0;
#P hidden connect 75 0 40 0;
#P hidden connect 37 0 35 0;
#P hidden connect 35 0 34 0;
#P lcolor 7;
#P hidden fasten 36 0 35 1 529 404 482 404;
#P hidden connect 25 0 26 0;
#P hidden fasten 28 0 27 0 641 48 564 48;
#P hidden fasten 26 0 25 0 517 149 549 149 549 88 564 88;
#P hidden connect 27 0 25 0;
#P hidden connect 64 0 65 0;
#P hidden connect 21 0 77 0;
#P hidden connect 77 3 54 0;
#P hidden connect 77 1 54 0;
#P hidden connect 77 2 54 0;
#P hidden connect 77 0 54 0;
#P hidden connect 52 1 53 0;
#P hidden fasten 67 1 77 1 951 451 847 450 762 452 762 185 694 185;
#P hidden fasten 30 0 52 0 810 224 798 224 767 78 709 78;
#P hidden connect 59 0 54 1;
#P hidden fasten 64 0 88 0 719 416;
#P hidden connect 21 1 77 2;
#P hidden fasten 55 1 59 0 993 285 736 285;
#P hidden connect 87 0 88 1;
#P hidden connect 23 0 24 0;
#P hidden fasten 28 0 22 0 641 53 803 53;
#P hidden connect 22 0 23 0;
#P hidden fasten 24 1 30 0 854 171 810 171;
#P hidden fasten 30 0 21 0 810 223 747 223 747 23 834 23;
#P hidden connect 93 0 91 0;
#P hidden connect 92 0 93 0;
#P hidden fasten 54 0 64 0 671 344 889 344 889 280 910 280;
#P hidden fasten 68 0 58 0 1100 425 910 425;
#P hidden connect 66 0 58 0;
#P hidden fasten 21 0 20 0 834 55 868 55 878 55 878 33 912 33;
#P fasten 91 0 90 0 853 754 902 754 902 708 912 708;
#P hidden fasten 56 0 55 0 930 172 930 172;
#P hidden connect 57 0 55 0;
#P hidden connect 74 0 55 0;
#P hidden fasten 67 1 66 0 951 397 1010 397;
#P hidden connect 60 1 57 0;
#P hidden fasten 20 1 60 0 1239 124 1071 124 1074 136;
#P hidden fasten 69 1 68 0 1133 398 1100 398;
#P hidden fasten 21 1 20 1 849 112 1239 112;
#P pop;


April 22, 2008 | 11:09 pm

What exactly is going wrong? Both your loop player and wavetable synth seem to be working for me, but perhaps not the way you intended.


April 22, 2008 | 11:25 pm

well i don’t know then i just basically want to be able to load up a loop change the tempo and play along with a wave you can draw in and select different ones you have drawn adding eq to both channels, also need to somehow put a mixer in for this project in tomorrow. is that what you could do when you opened it?
cheers for looking at it tho


April 23, 2008 | 12:04 am

I don’t have a MIDI interface plugged in at the moment, so I just tested things with the mouse and your interface. To get the note input for your wavetable synth, I just connecting the outputs of keyboard into the appropriate spots on your subpatch with the 4 [cycle~]s. As far as I can tell, using a MIDI keyboard would have worked like you planned. Now when I say the wave table worked, each playing one note would trigger all four since I couldn’t play chords with the mouse, I am not sure if this is a desired effect or not.

Speed change on the loop worked. Looks like you already have pan and volume set up for your mixer.

Sorry I can’t help more, but maybe I don’t get the problem.


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