Using trapezoid~ to declick play~

May 17, 2006 at 12:33pm

Using trapezoid~ to declick play~

Hi all,

I know this topic has been covered a bunch of times, but I’m completely new to Max/MSP, and I’d appreciate a few veteran eyes looking at what I’m doing. As my first project, I’m trying to build an effect that continuously loop records into a buffer, and then whenever the button is pressed, the buffer is played out in reverse. Here’s the code:

max v2;
#N vpatcher 327 27 966 602;
#P origin 15 0;
#P window setfont “Sans Serif” 9.;
#P newex 315 106 44 9109513 loadbang;
#P newex 97 333 81 9109513 trapezoid~ 0.03 0.97;
#B color 5;
#P user scope~ 311 379 604 520 256 3 128 -1. 1. 0 0. 0 0. 102 255 51 7 7 7 0;
#P newex 105 398 27 9109513 *~;
#P newex 198 243 40 9109513 change;
#P message 341 243 30 9109513 pos 0;
#P button 206 138 15 0;
#P newex 99 116 30 9109513 r posi;
#P message 271 288 44 9109513 send posi;
#P newex 341 317 27 9109513 int;
#P user number~ 132 200 217 215 9 139 3 2 0. 0. 0 0. 250 0. 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 35 235 26 9109513 stop;
#P message 34 208 27 9109513 start;
#P message 111 146 41 9109513 $1 , 0 $1;
#P newex 110 173 27 9109513 line~;
#P newex 127 284 121 9109513 xplay~ 1 reverso @interp 1;
#P newex 444 117 44 9109513 loadbang;
#P message 68 30 28 9109513 clear;
#P message 444 171 34 9109513 loop $1;
#P toggle 444 146 15 0;
#P message 343 213 26 9109513 stop;
#P message 362 165 27 9109513 start;
#P newex 412 247 78 9109513 xrecord~ reverso;
#P user ezadc~ 394 71 438 104 0;
#P user number~ 408 309 447 324 9 139 3 2 0. 0. 0 0. 250 0. 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 68 63 94 9109513 buffer~ reverso 5000;
#P user ezdac~ 157 514 201 547 0;
#P comment 191 116 45 9109513 Reverse;
#P connect 21 0 15 0;
#P connect 10 0 2 0;
#P connect 12 0 26 0;
#P connect 26 0 24 0;
#P connect 14 0 13 0;
#P connect 20 0 14 0;
#P connect 12 0 24 1;
#P connect 13 0 12 0;
#P connect 15 0 12 0;
#P connect 16 0 12 0;
#P connect 13 0 17 0;
#P connect 4 0 1 0;
#P connect 24 0 1 0;
#P connect 4 0 1 1;
#P connect 24 0 1 1;
#P connect 17 1 23 0;
#P connect 21 0 19 0;
#P connect 26 0 25 0;
#P connect 21 0 22 0;
#P connect 19 0 18 0;
#P connect 3 1 18 0;
#P connect 21 0 7 0;
#P connect 27 0 6 0;
#P connect 23 2 6 0;
#P connect 5 0 3 0;
#P connect 4 0 5 0;
#P connect 22 0 5 0;
#P connect 9 0 5 0;
#P connect 7 0 5 0;
#P connect 6 0 5 0;
#P connect 11 0 8 0;
#P connect 8 0 9 0;
#P pop;

I’m getting two kinds of clicks:
1) A click each when I start or stop playback. I tried using trapezoid~ to duck the signal as described many times here on the forums, but not only does it not seem to work, it distorts the signal quite a bit. Any advice?
2) I also get occasional clicks when the buffer recording loops back around- it seems somehow tied to the playback signal path, but i ehar the clicks even when I’m not playing anything. Any advice here would be appreciated as well. Is this because the record head is crossing the play head at 0? I’m intentionally stopping recording during playback to try to avoid this.

I know this is wordy, but thanks in advance for any help.

-Al

#26014
May 17, 2006 at 9:40pm

blargh wrote:
> Hi all,
>
> I know this topic has been covered a bunch of times, but I’m
> completely new to Max/MSP, and I’d appreciate a few veteran eyes
> looking at what I’m doing. As my first project, I’m trying to build
> an effect that continuously loop records into a buffer, and then
> whenever the button is pressed, the buffer is played out in reverse.
> Here’s the code:

You would want to feed the trapezoid with a ramp going from 0 to 1, not
with the signal you want to control…

the send pos object is a messagebox and the position output of xrecord~
isn’t connected at all…. It’s better to clean up a patch from
nonfunctional or not yet functional parts before posting. Cleaning up is
good for you as well, usually you find the traps while doing that…

You migh come along with normal record~ and wave~ eventually as well…

Stefan


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

#77281
May 18, 2006 at 1:38pm

Thanks for the advice- I got it to work pretty well now!

-Al

#77282

You must be logged in to reply to this topic.