Forums > MaxMSP

problems with play~ in reverse

April 21, 2009 | 9:56 am

Hi All,

I have some problems with a patch I build. If I use a play~ object to play a recording in reverse it distorts a lot. If I use the file in a sample editor the file seems to be okay. I think it has to do with the way I build the patch (see below). It sounds like a digital sync problem but have no idea where the problem might be. Does someone have some ideas how to resolve this?

Thanx!!!

max v2;
#N vpatcher 0 44 1452 1064;
#P user ezdac~ 526 794 570 827 0;
#P window setfont "Sans Serif" 9.;
#P newex 650 165 31 196617 adc~;
#P flonum 861 263 59 9 0 0 32 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden newex 1129 445 27 196617 t i b;
#P hidden message 674 590 67 196617 size 360000;
#P hidden button 431 522 15 0;
#P hidden newex 431 541 78 196617 pv opname_pos;
#P hidden newex 378 522 49 196617 pipe 300;
#P hidden newex 395 487 32 196617 sel 1;
#P hidden newex 378 462 27 196617 t i i;
#P hidden newex 327 152 40 196617 t b b f;
#P hidden newex 327 128 71 196617 r setmaxcrop;
#P hidden newex 431 575 71 196617 s setmaxcrop;
#P hidden message 359 179 14 196617 0;
#P hidden message 327 179 30 196617 crop;
#P hidden message 526 608 29 196617 stop;
#P hidden message 1129 476 46 196617 toggle 0;
#P hidden newex 1129 424 32 196617 sel 1;
#P hidden message 565 596 46 196617 toggle 0;
#P hidden newex 565 552 32 196617 sel 1;
#P user ubumenu 329 263 58 196617 1 0 1 1;
#X setrgb 31 31 31 187 187 187 234 234 234 4 4 4 255 25 25 112 112 112;
#X add PLAY;
#X prefix_set 0 0 0;
#P hidden newex 378 437 64 196617 route toggle;
#P user ubumenu 269 263 58 196617 1 0 1 1;
#X setrgb 31 31 31 187 187 187 234 234 234 4 4 4 255 25 25 112 112 112;
#X add RECORD;
#X prefix_set 0 0
0;
#P hidden newex 1129 385 64 196617 route toggle;
#P hidden button 1232 708 15 0;
#P message 718 263 22 196617 set;
#P user meter~ 619 263 698 278 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~ 538 263 617 278 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 message 502 263 35 196617 write;
#P message 469 263 29 196617 stop;
#P flonum 390 263 78 9 0 0 160 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden newex 392 803 111 196617 scale 0. 360000. 0. 1.;
#P hidden user number~ 427 750 514 765 9 3 3 2 0. 0. 0 0. 20 0. 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden newex 1184 707 44 196617 del 150;
#P hidden message 698 632 33 196617 clear;
#P hidden newex 698 608 32 196617 sel 1;
#P hidden newex 526 710 32 196617 line~;
#P hidden flonum 577 671 58 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden newex 664 541 44 196617 t i i;
#P hidden newex 807 779 29 196617 gate;
#P hidden button 565 628 15 0;
#P hidden newex 564 647 78 196617 pv opname_pos;
#P hidden message 565 688 61 196617 $1 , 0 $1;
#P hidden newex 526 748 52 196617 play~ a 2;
#P hidden flonum 826 755 59 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden newex 826 729 111 196617 scale 0. 1. 0. 360000.;
#P user number~ 745 263 832 278 9 3 3 2 0. 0. 32 0. 20 0. 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden message 1236 773 51 196617 0 -1 0 -1;
#P user waveform~ 269 343 652 64 3 9;
#W mode select;
#W mouseoutput continuous;
#W unit ms;
#W grid 1000.;
#W ticks 0;
#W labels 0;
#W vlabels 0;
#W vticks 1;
#W bpm 120. 4.;
#W frgb 18 0 0;
#W brgb 255 255 255;
#W rgb2 255 255 255;
#W rgb3 0 0 0;
#W rgb4 0 0 0;
#W rgb5 255 255 255;
#W rgb6 0 0 0;
#W rgb7 190 190 190;
#P noclick;
#P hidden message 1184 790 50 196617 name a 2;
#P hidden newex 1184 748 45 196617 loadbang;
#P hidden message 1184 771 50 196617 name a 1;
#P user waveform~ 269 280 652 64 3 9;
#W mode select;
#W mouseoutput continuous;
#W unit ms;
#W grid 1000.;
#W ticks 0;
#W labels 0;
#W vlabels 0;
#W vticks 1;
#W bpm 120. 4.;
#W frgb 18 0 0;
#W brgb 255 255 255;
#W rgb2 255 255 255;
#W rgb3 0 0 0;
#W rgb4 0 0 0;
#W rgb5 255 255 255;
#W rgb6 0 0 0;
#W rgb7 190 190 190;
#P noclick;
#P hidden newex 826 681 63 196617 record~ a 2;
#P hidden newex 674 670 100 196617 buffer~ a 360000 2;
#P hidden connect 36 0 32 0;
#P hidden connect 40 0 2 0;
#P hidden connect 3 0 2 0;
#P hidden connect 5 0 6 0;
#P hidden connect 43 0 44 0;
#P hidden connect 44 0 40 0;
#P hidden connect 38 0 34 0;
#P hidden connect 44 1 41 0;
#P hidden connect 34 2 33 0;
#P hidden connect 33 0 45 0;
#P hidden connect 45 0 47 0;
#P hidden connect 23 0 24 0;
#P hidden fasten 22 1 23 0 509 787 397 787;
#P hidden connect 45 1 46 0;
#P hidden fasten 18 0 22 0 531 738 432 738;
#P hidden fasten 46 0 49 0 400 513 436 513;
#P hidden connect 49 0 48 0;
#P hidden connect 48 0 42 0;
#P hidden fasten 35 1 39 0 592 582 531 582;
#P hidden connect 12 0 18 0;
#P hidden connect 25 0 18 0;
#P hidden connect 39 0 18 0;
#P hidden connect 18 0 11 0;
#P hidden connect 11 0 54 0;
#P hidden connect 53 0 27 0;
#P hidden connect 11 1 54 1;
#P hidden connect 15 0 13 0;
#P hidden connect 14 0 13 0;
#P hidden fasten 47 0 35 0 383 545 570 545;
#P hidden connect 35 0 36 0;
#P hidden connect 35 0 14 0;
#P hidden connect 13 0 12 0;
#P hidden connect 13 0 17 0;
#P hidden connect 41 0 2 2;
#P hidden connect 53 1 28 0;
#P hidden fasten 31 0 16 0 1134 412 669 412;
#P hidden fasten 51 1 50 0 1151 526 679 526;
#P hidden connect 26 0 0 0;
#P hidden fasten 20 0 0 0 703 658 679 658;
#P hidden connect 50 0 0 0;
#P hidden connect 16 1 19 0;
#P hidden connect 19 0 20 0;
#P hidden connect 1 0 8 0;
#P hidden connect 44 2 2 3;
#P hidden connect 16 1 15 0;
#P hidden connect 53 0 1 0;
#P hidden fasten 16 0 1 0 669 580 831 580;
#P hidden connect 8 1 9 0;
#P hidden connect 9 0 10 0;
#P hidden connect 10 0 15 1;
#P hidden connect 53 1 1 1;
#P hidden connect 6 1 52 0;
#P hidden connect 7 0 2 4;
#P hidden connect 7 0 6 4;
#P hidden connect 32 2 31 0;
#P hidden connect 31 0 37 0;
#P hidden connect 37 0 51 0;
#P hidden connect 51 0 38 0;
#P hidden fasten 19 0 21 0 703 626 1189 626;
#P hidden connect 21 0 4 0;
#P hidden connect 30 0 4 0;
#P hidden connect 4 0 3 0;
#P hidden connect 4 0 5 0;
#P hidden connect 29 0 30 0;
#P hidden connect 4 0 7 0;
#P pop;


April 21, 2009 | 10:28 pm

Well, no replies yet!?

I have to say the distortion appears if you record a long file…say about 3 minutes. Hope someone has a solution.


April 22, 2009 | 6:52 am

CHeck out hr.play and the other HR objects from JKC (check maxobjects.com)

The problem arises because max uses 32bit floating point numbers to pass information around. At a certain point, the ‘current sample’ value becomes to big to accurately depict in a 32bit number (generally around 3 minutes). The HR objects pass around two 32 bit numbers, and interprets them as 64 bit numbers, so your sample value limit is something like 4 hours or more.


April 22, 2009 | 11:01 am

Hi MuShoo,

Thanx for your reply. [hr.play~] did the trick.

Funny thing is that I had a problem with the 32bit floating point a few weeks ago but never realised this applied to the play~ object as well.

Well, this is how you learn. Thanx again.


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