Forums > MaxMSP

how do i stop the snap crackle and pop on a buffer groove

April 11, 2008 | 3:16 pm

i know this is an age old question asked many times but Ive trawled through the backlog of threads of the issue and come to no conclusion.

Ive heard it may be a driver/latency issue but also that the groove create a click when the playback position is changed.

Is there an object which can be used to stop this?

I understand people will have heard this question a million times but ive not been able to get to the bottom of it.


April 11, 2008 | 4:34 pm

On Apr 11, 2008, at 8:16 AM, Toiletmuck wrote:
> i know this is an age old question asked many times but Ive trawled
> through the backlog of threads of the issue and come to no conclusion.
>
> Ive heard it may be a driver/latency issue but also that the groove
> create a click when the playback position is changed.
>
> Is there an object which can be used to stop this?

Any time you change position of playback in an audio file you will
probably get clicks, unless both the source and destination points
happen to be at a zero crossing (highly unlikely).

If you want to post a patch, perhaps there’s something that can be
done with quick fadeins and fadeouts, using line~ and *~

-C

Chris Muir
cbm@well.com

http://www.xfade.com


April 11, 2008 | 5:31 pm

poor quality patch but if you could help that would be amazing

max v2;
#N vpatcher 15 55 1185 690;
#P origin 21 12;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 54 201 56 9109513 ^^^ open file;
#P window setfont "Arial Rounded MT Bold" 14.;
#P comment 34 225 138 11927566 sample cut tempo;
#P window setfont "Sans Serif" 9.;
#P message 94 102 14 9109513 2;
#P hidden newex 45 125 25 9109513 sig~;
#P hidden message 103 23 14 9109513 2;
#P user gain~ 236 64 29 162 158 0 1.071519 7.94321 10.;
#P user meter~ 155 162 213 174 100 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~ 155 178 213 190 100 0 168 0 103 103 103 255 153 0 255 0 0 217 217 0 153 186 0 12 3 3 3 3;
#P flonum 64 249 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 64 265 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 64 282 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 2;
#P comment 70 133 42 9109513 beat multiplier;
#P window linecount 3;
#P comment 113 120 57 9109513 beat divisions of a whole note;
#P window linecount 1;
#P comment 43 146 26 9109513 bpm;
#P toggle 24 67 33 0;
#P message 54 181 38 9109513 replace;
#P number 113 162 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 78 162 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 43 162 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 26 162 15 0;
#P message 26 181 27 9109513 write;
#P user led 204 46 17 17 1 150;
#P message 93 181 52 9109513 size 10000;
#P toggle 24 103 15 0;
#P message 77 102 16 9109513 -1;
#P message 55 102 21 9109513 0.5;
#P message 40 102 14 9109513 1;
#P window linecount 2;
#P comment 59 68 157 9109513 < --- all on [sig~ , tempo (groove) and tempo (random) ];
#P window setfont "Arial Rounded MT Bold" 14.;
#P window linecount 1;
#P comment 25 47 115 11927566 playback tempo;
#P window setfont "Sans Serif" 9.;
#P comment 98 265 56 9109513 b. multiplier;
#P comment 98 282 117 9109513 b divisions of a whole note;
#P comment 111 301 65 9109513 random range;
#P comment 114 320 100 9109513 sample beginning (ms);
#P window linecount 2;
#P comment 119 340 75 9109513 ms after sample start;
#P window linecount 1;
#P comment 98 249 26 9109513 bpm;
#P comment 84 372 54 9109513 sample end;
#P number 85 340 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 64 301 48 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 32 249 15 0;
#P toggle 49 249 15 0;
#P number 64 320 53 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 18.;
#P newex 32 340 52 9109522 + 25;
#B color 5;
#P window setfont "Sans Serif" 9.;
#P flonum 32 372 51 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden flonum 140 373 53 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden newex 21 22 45 9109513 loadbang;
#P user gain~ 281 91 13 65 158 6 1.071519 7.94321 150.;
#P user gain~ 267 91 13 65 158 6 1.071519 7.94321 150.;
#P window setfont "Arial Rounded MT Bold" 12.;
#P comment 266 73 55 11927564 puremix;
#B color 6;
#P window setfont "Sans Serif" 9.;
#P user waveform~ 171 448 529 152 139 9;
#W mode select;
#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 40 166 0;
#W brgb 99 2 0;
#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 flonum 290 603 77 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P user ezdac~ 269 223 313 256 0;
#P window setfont "Arial Rounded MT Bold" 12.;
#P message 172 603 48 11927564 set one;
#P message 253 603 36 11927564 clear;
#P window setfont "Sans Serif" 9.;
#P hidden newex 82 400 73 9109513 tempo 120 1 16;
#P window setfont "Arial Rounded MT Bold" 12.;
#P message 221 603 31 11927564 crop;
#P user pictslider 735 460 17 73 0 0 0 0 wfknob.pct 1 wfmodes.pct 1 2146 0 0 196608 1. 1.;
#P window setfont "Sans Serif" 9.;
#N vpatcher 40 55 278 404;
#P window setfont "Sans Serif" 9.;
#P newex 96 202 27 9109513 int;
#N coll ;
#T flags 1 0;
#T 0 mode select;
#T 1 mode loop;
#T 2 mode move;
#T 3 mode draw;
#P newobj 131 255 53 9109513 coll;
#P button 75 117 15 0;
#N comlet waveform~ mode messages;
#P inlet 74 164 15 0;
#P newex 113 88 27 9109513 < < 1;
#P newex 96 140 40 9109513 change;
#P newex 96 164 45 9109513 select 0;
#P newex 96 117 27 9109513 |;
#P outlet 131 284 15 0;
#P newex 45 62 78 9109513 modifiers 100;
#P connect 5 0 7 0;
#P connect 7 0 2 0;
#P connect 0 3 2 0;
#P connect 2 0 4 0;
#P connect 4 0 3 0;
#P connect 6 0 9 0;
#P connect 3 0 9 0;
#P connect 0 4 5 0;
#P connect 5 0 2 1;
#P connect 3 1 8 0;
#P connect 9 0 8 0;
#P connect 8 0 1 0;
#P pop;
#P hidden newobj 704 438 50 9109513 p wfkeys;
#P hidden newex 94 203 68 9109513 tempo 120 1 2;
#P hidden newex 157 401 67 9109513 random 10000;
#P window setfont "Sans Serif" 10.;
#P flonum 454 603 84 10 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 369 603 84 10 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 9.;
#P hidden newex 162 202 60 9109513 groove~ one;
#P hidden newex 8 203 85 9109513 buffer~ one 10000;
#P window linecount 2;
#P comment 296 151 27 9109513 rack in;
#P user panel 20 44 204 353;
#X brgb 149 208 122;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P hidden fasten 12 0 2 0 258 224 13 224;
#P hidden connect 42 0 2 0;
#P hidden connect 44 0 2 0;
#P hidden connect 49 0 2 0;
#P hidden connect 20 0 50 0;
#P hidden fasten 50 0 41 0 29 105 29 105;
#P hidden fasten 50 0 45 0 29 110 31 110;
#P hidden connect 11 0 26 0;
#P hidden connect 24 0 23 0;
#P connect 23 0 22 0;
#P hidden connect 38 0 61 0;
#P hidden connect 39 0 61 0;
#P hidden connect 40 0 61 0;
#P hidden connect 41 0 61 0;
#P hidden connect 62 0 61 0;
#P hidden fasten 50 0 25 0 29 194 54 194;
#P hidden connect 15 0 27 0;
#P hidden connect 6 0 24 0;
#P hidden connect 28 0 23 1;
#P hidden fasten 25 0 11 0 54 382 87 382;
#P hidden connect 45 0 7 0;
#P hidden connect 20 0 60 0;
#P hidden connect 56 0 11 1;
#P hidden connect 46 0 7 1;
#P hidden connect 55 0 11 2;
#P hidden connect 47 0 7 2;
#P hidden fasten 24 0 21 0 69 386 145 386;
#P hidden connect 54 0 11 3;
#P hidden connect 48 0 7 3;
#P hidden connect 3 0 58 0;
#P hidden connect 3 1 57 0;
#P hidden fasten 26 0 6 0 37 378 162 378;
#P hidden connect 43 0 3 0;
#P hidden connect 61 0 3 0;
#P hidden fasten 3 0 16 0 167 429 176 429;
#P hidden fasten 10 0 16 0 226 1294 176 1294;
#P hidden fasten 8 0 16 0 709 792 176 792;
#P hidden fasten 13 0 16 0 177 1228 176 1228;
#P hidden connect 12 0 16 0;
#P hidden fasten 2 1 13 0 88 371 177 371;
#P hidden connect 50 0 13 0;
#P hidden connect 4 0 3 1;
#P hidden connect 7 0 43 0;
#P hidden connect 5 0 3 2;
#P hidden connect 27 0 6 1;
#P hidden connect 59 1 18 0;
#P hidden connect 3 0 18 0;
#P hidden connect 18 0 14 0;
#P hidden connect 3 0 19 0;
#P hidden connect 59 1 19 0;
#P hidden connect 16 1 15 0;
#P hidden connect 19 0 14 1;
#P hidden fasten 21 0 4 0 145 443 374 443;
#P hidden connect 16 2 4 0;
#P hidden fasten 21 0 16 2 145 397 434 397;
#P hidden fasten 22 0 5 0 37 445 459 445;
#P hidden connect 16 3 5 0;
#P hidden fasten 22 0 16 3 37 399 563 399;
#P hidden fasten 9 1 8 0 747 617 762 617 762 221 709 221;
#P pop;


April 11, 2008 | 7:39 pm

some sort of windowing / ramping should help it out alright


April 11, 2008 | 7:51 pm

clipping the buffer size or something?


April 11, 2008 | 7:59 pm

ah the rampsmooth object seems to work fairly well, the clicks are almost inaudible :)

is there a windowing function?


April 12, 2008 | 6:57 pm

One of the tap tools could help too: tap.snap~ is very clever, as it snaps to the nearest zero point. You could use that to dodge clicks, rather than palying around with ramps, which I always find cheating, somehow.

It could be fiddly, but then, it also means sustaining sounds stay that way.

Best,

Lee Morgan


April 12, 2008 | 7:12 pm

use grooveduck

u find it in examples into max folders…

On 12 Apr 2008, at 19:57, Lee Morgan wrote:

>
> One of the tap tools could help too: tap.snap~ is very clever, as
> it snaps to the nearest zero point. You could use that to dodge
> clicks, rather than palying around with ramps, which I always find
> cheating, somehow.
>
> It could be fiddly, but then, it also means sustaining sounds stay
> that way.
>
> Best,
>
> Lee Morgan


April 13, 2008 | 6:49 am

grooveduck? i dont have that


April 13, 2008 | 7:24 am

Quote: Lee Morgan wrote on Sat, 12 April 2008 12:57
—————————————————-
> One of the tap tools could help too: tap.snap~ is very clever, as it snaps to the nearest zero point. You could use that to dodge clicks, rather than palying around with ramps, which I always find cheating, somehow.

Sounds like an interesting object. I may download the demo of that object collection at some point, but I like to save my 30 day demos for times when I really have time to use them.

Could you tell me a little more about this tap.snap~ object? It sounds neat, but before I go wasting demo time on that collection (who knows, I may want to try it later for other reasons) I want to find out if it really does what I’d be interested in.

How do you control this object? My guess is that you tell it a time in your buffer and then it outputs the time that corresponds to the closet zero crossing? Is that right or am I completely off base? Also, do you have any idea if it finds the closest crossing in either direction? or does it only look for the next zero crossing after the time you enter or something else like that?

Any other info you got on this object would help me figure out if I want to check it out. Sounds like a tempting external, but as I’m saving up for the IRCAM Forum subscription, not really sure what I think about paying for more objects.


April 13, 2008 | 9:59 am

I confess – my tap.tools has expired too, and by coincidence, I’m thinking of getting the IRCAM stuff. But FYI, here’s the tap.snap help file, useless without the object I know, but it’ll give you a handle on how it works. As I remember, it looks either side of the given point, and ‘snaps’ to the nearest zero crossing – usually it’s very close, of course…I built a similar patch to yours, and it certainly worked for removing the clicks.

Lee

ps looking at it again, I see it refers to a "built-in snap-to-zero-crossing feature" on the waveform object – news to me! Worth checking the manual for….

#P window setfont "Sans Serif" 9.;
#P window linecount 2;
#P newex 8 226 103 196617 tap.buffer.snap~ data @channel 1;
#B color 5;
#P flonum 139 265 37 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P comment 180 259 245 196617 int , float , or signal specify the location in the buffer – from which to find the nearest zero-crossing;
#P window setfont Arial 12.;
#P window linecount 1;
#P comment 131 235 253 131137548 Messages;
#P user panel 129 233 402 20;
#X brgb 128 140 187;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 129 255 402 36;
#X brgb 206 206 206;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P window setfont "Sans Serif" 9.;
#P window linecount 4;
#P comment 371 615 156 196617 Note: As with all buffer-based operations , tap.buffer.snap~ will not function properly until the dsp has been started.;
#P comment 5 132 117 196617 Can perform on signals as well for sample-accurate loop-point control…;
#P window linecount 1;
#P hidden message 112 357 44 196617 set data;
#P flonum 8 184 78 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P comment 263 634 68 196617 select end ms;
#P comment 183 634 75 196617 select start ms;
#P flonum 266 615 64 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden message 85 359 14 196617 1;
#P window linecount 7;
#P comment 396 523 131 196617 tap.buffer.snap~ is most useful when building patches in which you want to snap your edit/loop points to zero-crossings without the added overhead of the waveform~ object.;
#P flonum 303 344 56 9 0. 2000. 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 2;
#P newex 303 380 80 196617 tap.buffer.snap~ data;
#B color 5;
#P flonum 203 344 56 9 0. 2000. 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 203 380 80 196617 tap.buffer.snap~ data;
#B color 5;
#P window linecount 1;
#P message 186 165 62 196617 mode samps;
#P message 140 165 45 196617 mode ms;
#P flonum 186 615 64 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 227 417 55 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#N coll ;
#T flags 1 0;
#T 0 mode select;
#T 1 mode loop;
#T 2 mode move;
#T 3 mode draw;
#P hidden newobj 16 354 53 196617 coll;
#P user pictslider 7 437 19 76 0 0 0 0 wfknob.pct 1 wfmodes.pct 1 2146 0 0 196608 1. 1.;
#N vpatcher 40 55 418 371;
#P button 183 82 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 129 145 60 196617 prepend set;
#N comlet waveform~ mode messages;
#P inlet 129 121 15 0;
#P newex 259 64 27 196617 < < 1;
#P newex 206 121 40 196617 change;
#P newex 206 145 107 196617 select 0 1 2;
#P newex 206 98 27 196617 |;
#P newex 47 121 40 196617 change;
#P outlet 129 252 15 0;
#P message 47 145 65 196617 constrain $1;
#P newex 129 195 45 196617 loadbang;
#P newex 47 40 225 196617 modifiers;
#P message 270 169 58 196617 mode move;
#P message 206 213 61 196617 mode move;
#P message 238 191 52 196617 mode loop;
#P connect 3 0 7 0;
#P connect 7 0 5 0;
#P connect 12 0 13 0;
#P fasten 5 0 6 0 52 243 134 243;
#P fasten 0 0 6 0 243 243 134 243;
#P fasten 1 0 6 0 211 243 134 243;
#P fasten 2 0 6 0 275 243 134 243;
#P connect 11 0 14 0;
#P connect 3 3 8 0;
#P connect 14 0 8 0;
#P connect 8 0 10 0;
#P connect 10 0 9 0;
#P connect 4 0 1 0;
#P connect 9 0 1 0;
#P connect 13 0 1 0;
#P connect 11 0 8 1;
#P connect 9 1 0 0;
#P connect 3 4 11 0;
#P connect 9 2 2 0;
#P pop;
#P hidden newobj 21 382 50 196617 p wfkeys;
#P hidden message 125 621 35 196617 set $1;
#P hidden message 29 621 35 196617 set $1;
#P message 10 288 65 196617 startwindow;
#P user ezdac~ 76 280 120 313 0;
#P hidden newex 103 338 45 196617 loadbang;
#P window linecount 2;
#P comment 117 374 61 196617 set vertical zoom;
#P flonum 82 378 35 9 0. 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P message 27 378 55 196617 vzoom $1;
#P window setfont "Sans Serif" 12.;
#P comment 302 321 100 196620 select end ms;
#P comment 196 321 105 196620 select start ms;
#P window setfont "Sans Serif" 9.;
#P comment 114 403 83 196617 display length ms;
#P flonum 328 417 49 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 127 417 49 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 26 417 49 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P user waveform~ 25 437 367 167 3 9;
#W mode move;
#W mouseoutput continuous;
#W clipdraw 1;
#W unit ms;
#W grid 500.;
#W ticks 0;
#W labels 1;
#W vlabels 1;
#W vticks 1;
#W bpm 120. 4.;
#W frgb 16 0 0;
#W brgb 173 171 191;
#W rgb2 81 90 151;
#W rgb3 0 0 0;
#W rgb4 0 0 0;
#W rgb5 94 87 161;
#W rgb6 108 108 108;
#W rgb7 78 74 220;
#P comment 13 403 83 196617 display start ms;
#P user number~ 8 259 69 274 9 3 3 2 0. 0. 0 0. 100 0. 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 26 614 135 196617 buffer~ data vibes-a1.aif -1;
#P newex 8 203 27 196617 sig~;
#P window linecount 10;
#P comment 396 394 131 196617 When working with the waveform~ object , it probably makes more sense to use the built-in snap-to-zero-crossing feature than to use tap.buffer.snap~. The waveform~ is used here to demonstrate how this object works , and simply because it is pretty.;
#P window setfont "Sans Serif" 14.;
#P window linecount 2;
#P comment 360 340 101 196622 < - Set select points in ms;
#P window setfont "Sans Serif" 9.;
#P comment 252 161 156 196617 Can work with position in either milliseconds or samples;
#P window linecount 1;
#P comment 195 203 203 196617 define the channel of the buffer to look at;
#P message 140 202 51 196617 channel 1;
#P window setfont Arial 12.;
#P comment 130 135 253 131137548 Attributes;
#P comment 133 34 309 131137548 snap to zero-crossings;
#B frgb 223 223 223;
#P window setfont Arial 24.;
#P comment 133 5 309 131137560 tap.buffer.snap~;
#B frgb 223 223 223;
#P user panel 128 133 402 20;
#X brgb 128 140 187;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 128 155 402 36;
#X brgb 206 206 206;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 128 192 402 36;
#X brgb 206 206 206;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P window setfont Arial 12.;
#P comment 131 298 253 131137548 Example;
#P user panel 129 296 402 20;
#X brgb 128 140 187;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 2 318 529 350;
#X brgb 206 206 206;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user fpic -1 -1 130 130 ttblue_icon.bmp 0 0 0 0. 0 0 0;
#P background;
#P window setfont "Sans Serif" 9.;
#P hidden newex 262 60 22 196617 b 1;
#P background;
#P window linecount 3;
#P hidden message 262 86 108 196617 ; max launch_browser http://www.electrotap.com;
#P background;
#P window setfont Arial 12.;
#P user umenu 133 106 126 131137584 3 64 124 1;
#X setrgb 0 0 0 221 221 221 255 255 255 221 221 221 170 170 170 119 119 119 187 187 187;
#X add electrotap.com;
#P background;
#P window setfont Arial 14.;
#P window linecount 1;
#P comment 133 87 125 131137550 by timothy place;
#P background;
#P user panel 128 0 402 128;
#X brgb 99 99 99;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P background;
#P fasten 48 1 27 0 343 414 333 414;
#P connect 49 0 48 0;
#P connect 27 0 24 3;
#P connect 24 3 52 0;
#P hidden connect 4 0 3 0;
#P hidden connect 2 0 4 0;
#P fasten 46 1 42 0 243 414 232 414;
#P connect 42 0 24 2;
#P connect 47 0 46 0;
#P connect 24 2 43 0;
#P hidden connect 38 0 26 0;
#P hidden connect 24 1 38 0;
#P connect 26 0 24 1;
#P hidden connect 34 0 56 0;
#P hidden connect 34 0 51 0;
#P hidden connect 51 0 32 0;
#P hidden connect 36 0 35 0;
#P hidden connect 24 0 37 0;
#P hidden connect 32 0 31 0;
#P hidden connect 37 0 25 0;
#P hidden connect 39 0 24 0;
#P hidden connect 56 0 24 0;
#P hidden connect 31 0 24 0;
#P connect 25 0 24 0;
#P hidden connect 41 0 24 0;
#P hidden connect 41 0 39 0;
#P hidden connect 40 1 41 0;
#P connect 64 0 22 0;
#P hidden connect 15 0 64 0;
#P connect 20 0 64 0;
#P hidden connect 44 0 64 0;
#P hidden connect 45 0 64 0;
#P connect 55 0 20 0;
#P window clipboard copycount 65;



kjg
April 13, 2008 | 2:36 pm

I think all you need is [waveform~]
you can set the zero-crossing snapping behavior in its inspector.

regards,
kjg

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 197 195 115 196617 3 make a selection >>;
#P comment 40 111 142 196617 2 record a few seconds >>;
#P user ezdac~ 213 55 257 88 0;
#P newex 324 59 104 196617 loadmess set penguin;
#P user waveform~ 324 136 452 190 3 9;
#W mode select;
#W snap zero;
#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 toggle 175 108 15 0;
#P newex 459 69 107 196617 buffer~ penguin 5000;
#P newex 198 153 82 196617 record~ penguin;
#P newex 198 110 49 196617 cycle~ 1;
#P comment 130 61 100 196617 1 enable DSP >>;
#P connect 4 0 2 0;
#P connect 1 0 2 0;
#P connect 6 0 5 0;


April 13, 2008 | 3:51 pm

ok, it says to use the built in snap to zero function would make more sense than this tap object.

so where is the built in snap to zero function on the waveform~?



kjg
April 13, 2008 | 4:26 pm

Quote: Nano59 wrote on Sun, 13 April 2008 17:51
—————————————————-
> ok, it says to use the built in snap to zero function would make more sense than this tap object.
>
> so where is the built in snap to zero function on the waveform~?
—————————————————-

you can set the zero-crossing snapping behavior in its inspector.

regards,
kjg


April 13, 2008 | 4:54 pm

tried that, its still the same.

Could someone test the patch with a soundfile and see if it’s different for them please ?



kjg
April 13, 2008 | 5:08 pm

works fine here. try it with the vibes sample. swithc between "none" and "zero" for the snapping options and then make your selection…

regards,
kjg

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 540 495 41 196617 *~ 0.1;
#P newex 261 387 65 196617 prepend snap;
#P user umenu 281 356 68 196647 1 64 372 0;
#X add none;
#X add grid;
#X add zero;
#P toggle 539 392 15 0;
#P message 539 417 41 196617 loop $1;
#P newex 540 468 83 196617 groove~ penguin;
#P newex 485 403 38 196617 sig~ 1;
#P message 474 32 43 196617 replace;
#P user ezdac~ 540 524 584 557 0;
#P newex 324 64 104 196617 loadmess set penguin;
#P user waveform~ 324 124 452 190 3 9;
#W mode select;
#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 newex 459 69 138 196617 buffer~ penguin vibes-a1.aif;
#P connect 9 1 10 0;
#P connect 10 0 1 0;
#P connect 2 0 1 0;
#P connect 4 0 0 0;
#P connect 8 0 7 0;
#P connect 7 0 6 0;
#P connect 5 0 6 0;
#P connect 6 0 11 0;
#P connect 11 0 3 0;
#P connect 11 0 3 1;
#P connect 1 2 6 1;
#P connect 1 3 6 2;


April 13, 2008 | 5:51 pm

ive tried other sound files and some seem to be fine really, even though a lot of them were recorded with the same mic. The two that have clicks all over them are a recording of a bass guitar and a recording of my accoustic guitar with my rubbish laptop onboard mic (only to test it)

maybe its my soundcard or my speakers. Or the fact that I have no ASIO driver


April 13, 2008 | 6:01 pm

I looked at your original patch Nano as well as what KJG posted I think I have figured out the info you need.

If I understand correctly, in your original patch you want to send a start and end point to [waveform~] and have [waveform~] readjust those points to be at a zero-crossing. From my past experience, [waveform~] does not operate in this way regarding snap-to-zero but in the way that KJG demonstrated where it snaps on mouse input only. In playing around with KJGs patch, I made a discovery new to me which is that if you resend the "snap zero" command after you have sent your int/float start/end points to [waveform~] via inlets it will readjust the values you sent to be at zero-crossings.

If you want to see this in action, add numberbox input to KJG’s [waveform~]. When you enter some numbers in your boxes you will hear clicks. To remove the clicks, reselect "zero" from the pulldown menu and [waveform~] will readjust.

Before I get into how to automatically do what I just described so that you don’t have to hear clicks until you reselect "snap zero" there are a few other things about your original patch that I want to point out that may be other sources of clicks. I may be misunderstanding your goals, but there are a few problems I see.

-The LED you have going into [groove~] tells [groove~] to start playback at sample zero or sample one depending on the output of the LED. So this will cause a click because sample 0 or 1 is not necessarily a zero crossing for one thing and also the point you are jumping from in playback also may not be a zero-crossing. It looks like you are going to need to trigger [groove~] in another way. Possibly look into using a "startloop" message.

-The number boxes going into [groove~] are another source of a problem. I noticed these number boxes have two different inputs, one coming from [waveform~] and one coming from the pre-[waveform~] numberboxes. The is possibly defeating the purpose of using [waveform~] even if snap-to-zero is working correctly because of the non-[waveform~] inputs to your numberboxes. You will want to disconnect these so the numbers going to [groove~] are only being supplied by [waveform~].

Here is a version of KJG’s patch that demonstrates how you can use [waveform~] to snap-to-zero on int/float input by resending the "snap zero" message after inputting your loop-points. This was a quick fix I made, so if someone has some better logic for how to program this more efficiently, please feel free to correct me.

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 445 449 21 196617 t 0;
#P newex 505 429 29 196617 gate;
#P flonum 612 92 92 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 612 108 29 196617 t b f;
#P flonum 479 88 92 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 369 387 53 196617 snap zero;
#P newex 479 108 29 196617 t b f;
#P newex 369 408 29 196617 t 1 l;
#P newex 470 537 40 196617 unpack;
#P newex 524 340 30 196617 pack;
#P message 315 635 51 196617 startloop;
#P newex 405 661 41 196617 *~ 0.1;
#P toggle 404 558 15 0;
#P message 404 583 41 196617 loop $1;
#P newex 405 634 83 196617 groove~ penguin;
#P newex 350 569 38 196617 sig~ 1;
#P message 481 39 43 196617 replace;
#P user ezdac~ 405 690 449 723 0;
#P newex 331 71 104 196617 loadmess set penguin;
#P user waveform~ 331 131 452 190 3 9;
#W mode select;
#W snap zero;
#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 newex 466 76 138 196617 buffer~ penguin vibes-a1.aif;
#P connect 17 1 1 3;
#P connect 18 0 17 0;
#P connect 14 1 1 2;
#P connect 1 3 11 1;
#P connect 11 0 19 1;
#P connect 1 2 11 0;
#P connect 13 0 19 0;
#P fasten 20 0 19 0 450 471 426 471 426 413 510 413;
#P connect 16 0 14 0;
#P connect 12 1 6 2;
#P connect 19 0 20 0;
#P connect 19 0 12 0;
#P connect 4 0 0 0;
#P connect 12 0 6 1;
#P connect 9 0 3 1;
#P connect 9 0 3 0;
#P connect 6 0 9 0;
#P connect 7 0 6 0;
#P connect 5 0 6 0;
#P connect 10 0 6 0;
#P connect 8 0 7 0;
#P connect 15 0 13 0;
#P connect 14 0 15 0;
#P connect 17 0 15 0;
#P connect 2 0 1 0;
#P fasten 13 1 1 0 393 432 324 432 324 121 336 121;
#P window clipboard copycount 21;


April 13, 2008 | 6:06 pm

P.S.

As far as I know, the solution I posted should be click free.

Keep in mind that even if you go to a zero-crossing it is still possible to create a very drastic zero to non-zero transition that while you will not have a true discontinuity click, it can be too harsh for some speakers to smoothly replicate and you may end up with a pop (I guess by pop I mean mellower than a true click).

I’m not saying you should give up on solving clicks by just blaming your soundcard or speakers, but I just thought I should mention that I have made pieces that were pop free on some speakers and then when I played them back elsewhere things were too harsh for the other system.


April 13, 2008 | 8:33 pm

in the inspector snap grid , or check the docu on waveform~
On Apr 13, 2008, at 5:51 PM, Toiletmuck wrote:

>
> ok, it says to use the built in snap to zero function would make
> more sense than this tap object.
>
> so where is the built in snap to zero function on the waveform~?

Jacopo Carreras
music weaver
http://www.myspace.com/jacopocarreras
http://www.lan-muzic.com


April 15, 2008 | 7:36 pm

On 2008 Apr 13, at 10:51 AM, Toiletmuck wrote:
>
> ok, it says to use the built in snap to zero function would make
> more sense than this tap object.
>
> so where is the built in snap to zero function on the waveform~?

In the case of that help patcher, yes. But sometimes you don’t want
the extra CPU expense of waveform~.

Also, the tap.snap~ object can function as a signal object, meaning
that if you are recording into the buffer~ at the same time as you are
playing back then the zero-crossings will be updated with sample-
accurate timing. So it is still (for me, at least) more useful than
the feature in waveform~.

Also, because Tap.Tools 3 is coming soon, you could "game" the system
on demos. The demo period for Tap.Tools 2 and Tap.Tools 3 are
independent of each other. So you could download TT2 now, and then
when that demo expires you still could download TT3 whenever you want
and get 30 days more demo. :-)

best,
Tim
____________________________________
Tap.Tools – Objects for Max, MSP, and Jitter

http://electrotap.com/taptoolsmax/


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