Forums > MaxMSP

clic in volume fades

August 22, 2008 | 1:53 am

i want to manipulate volume throu data…
pretty easy thing to do… but…
my sounds always make some "clics" when volume is changed…

is there a better way of changing volume by the fade object or the [*~] object ?

we want some smooth fade of volume… any idea ?

thnx !!


August 22, 2008 | 2:12 am

Send your amplitude value through a message "$1 50" then to [line~] and use that to drive [*~]. This will smooth whatever value you input over 50ms. You can increase/decrease the time until you find one that works best for you.

lh

– Pasted Max Patch, click to expand. –

August 22, 2008 | 2:16 am

Use line~ (see help-file or try this patch below) to set a gradual ramp:

– Pasted Max Patch, click to expand. –

August 22, 2008 | 4:32 am

All right thnx guys i’ll try the [line] trick when i’ll get to work.

but for your demos… i work with max 4.6.3… so i cannot read your max 5 patches…

If you can make it to 4.6.3 it would be great !

Thnx again !


August 22, 2008 | 5:15 am

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 190 92 66 196617 loadmess 40;
#P comment 198 133 100 196617 ramp time;
#P flonum 140 112 35 9 0. 1. 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 162 132 35 9 20 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 140 157 32 196617 line~;
#P user ezdac~ 123 225 167 258 0;
#P newex 123 187 27 196617 *~;
#P newex 123 92 61 196617 cycle~ 440;
#P comment 179 114 100 196617 new volume;
#P connect 8 0 5 0;
#P connect 4 0 2 1;
#P connect 6 0 4 0;
#P connect 5 0 4 1;
#P connect 2 0 3 0;
#P connect 2 0 3 1;
#P connect 1 0 2 0;
#P window clipboard copycount 9;


August 22, 2008 | 7:22 am

On Aug 21, 2008, at 9:32 PM, Louis-A. Larose wrote:

> but for your demos… i work with max 4.6.3… so i cannot read your
> max 5 patches…

Max 5 is fast becoming the lingua franca of the list.

You should investigate Fredrik Olofsson’s Max5 -> Max4 converter.

http://www.fredrikolofsson.com/pages/code-sc.html

-C

Chris Muir
cbm@well.com

http://www.xfade.com


August 22, 2008 | 8:08 am

here’s the patch i posted in max4:

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 239 264 78 196617 < -Turn On Audio;
#P comment 104 106 136 196617 < -2. Toggle the sound on/off;
#P user ezdac~ 196 256 240 289 0;
#P newex 196 216 35 196617 *~ 1.;
#P newex 196 166 64 196617 cycle~ 440.;
#P newex 349 191 32 196617 line~;
#P window linecount 0;
#P message 417 169 48 196617;
#P message 349 169 48 196617;
#P window linecount 1;
#P message 417 150 48 196617 set 0 $2;
#P message 349 150 54 196617 set $1 $2;
#P newex 349 129 49 196617 pak 1. 1.;
#P flonum 409 106 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 349 106 35 9 0. 1. 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 2;
#P comment 409 82 63 196617 Fade-Time In Milliseconds;
#P window linecount 1;
#P comment 348 94 40 196617 Volume;
#P newex 88 128 41 196617 sel 0 1;
#P toggle 88 108 15 0;
#P window linecount 2;
#P comment 265 83 100 196617 1. Set your volume and fade time->;
#P connect 14 0 15 0;
#P connect 14 0 15 1;
#P fasten 12 0 14 1 354 213 226 213;
#P connect 13 0 14 0;
#P fasten 2 1 10 0 108 154 313 154 313 170 354 170;
#P fasten 2 0 11 0 93 152 310 152 310 167 419 167 419 173;
#P connect 11 0 12 0;
#P connect 10 0 12 0;
#P connect 9 0 11 0;
#P connect 8 0 10 0;
#P connect 7 0 8 0;
#P connect 7 0 9 0;
#P connect 6 0 7 1;
#P connect 5 0 7 0;
#P connect 1 0 2 0;
#P window clipboard copycount 18;


August 22, 2008 | 12:15 pm

You really need to read MSP Tutorial 2.

This is fundamental stuff you need to understand, otherwise you’re going to keep on running into brick walls. Takes a few minutes.

Once you’ve read that, then you can go to the shortcut of gain~, which is even easier.


August 27, 2008 | 10:47 pm

Thnx you all you really help me out !


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