Forums > MaxMSP

Changing the internal synthesizer volume within Max.

January 16, 2006 | 9:31 pm

I am trying to change the volume of the computer or of the Midi synthesizer from within Max.

I need this functionality for Windows and Mac.

Does anyone know how this can be accomplished?

Syndey B.


January 16, 2006 | 11:13 pm

this maybe can help:

max v2;
#N vpatcher 10 59 616 293;
#P window setfont "Sans Serif" 9.;
#P comment 103 54 100 196617 volume;
#P user hslider 51 70 25 180 128 1 0 0;
#P window setfont "Sans Serif" 18.;
#P number 51 99 63 18 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 9.;
#P user umenu 307 106 203 196647 1 64 122 1;
#X add;
#P newex 307 55 45 196617 loadbang;
#P newex 307 81 45 196617 midiinfo;
#P newex 128 150 113 196617 ctlout 7;
#P comment 376 90 100 196617 choose your device;
#P connect 6 0 5 0;
#P fasten 4 1 1 0 505 131 133 131;
#P fasten 5 0 1 0 56 131 133 131;
#P connect 3 0 2 0;
#P connect 2 0 4 0;
#P pop;

best

Francisco


January 17, 2006 | 12:08 am

On 16-janv.-06, at 22:31, Syndey Bristo wrote:

>
> I am trying to change the volume of the computer or of the Midi
> synthesizer from within Max.
>
> I need this functionality for Windows and Mac.

If I remember well, volume is defined as MIDI controller 7, also for
the internal synth.

p

_____________________________
Patrick Delges

Centre de Recherches et de Formation Musicales de Wallonie

http://users.skynet.be/crfmw/max


January 17, 2006 | 12:51 pm

Thanks for the previous replies but unfortunately they don’t solve my problem.

I’m trying to change the "general volume" of the synthesizer while maintaining the internal midi volume values of each midi channel. The solution proposed by francisco colasanto and Patrick Delges will affect the volume of a particular midi channel but not of all channels as a whole.

What I’m trying to do would be equivalent in Windows to going into the Sound control panel and adjusting the "SW Synth" slider.

Help.


January 17, 2006 | 10:43 pm

Ok, I don’t know if this is the best solution but…
its obvious that you can make a object with this patcher

best

Francisco Colasanto

max v2;
#N vpatcher 32 143 1354 755;
#P window setfont "Sans Serif" 9.;
#P hidden message 84 29 26 196617 127;
#P hidden newex 27 24 45 196617 loadbang;
#P newex 1154 273 27 196617 t b f;
#P newex 1154 253 49 196617 r master;
#P newex 1149 359 35 196617 r port;
#P number 1140 332 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 1140 307 27 196617 * 1.;
#P user uslider 1140 52 18 128 128 1 0 0;
#P window setfont "Sans Serif" 18.;
#P number 1140 202 63 18 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 9.;
#P newex 1149 387 59 196617 ctlout 7 16;
#P newex 1089 273 27 196617 t b f;
#P newex 1089 253 49 196617 r master;
#P newex 1084 359 35 196617 r port;
#P number 1075 332 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 1075 307 27 196617 * 1.;
#P user uslider 1075 52 18 128 128 1 0 0;
#P window setfont "Sans Serif" 18.;
#P number 1075 202 63 18 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 9.;
#P newex 1084 387 59 196617 ctlout 7 15;
#P newex 1023 274 27 196617 t b f;
#P newex 1023 253 49 196617 r master;
#P newex 1018 360 35 196617 r port;
#P number 1009 333 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 1009 308 27 196617 * 1.;
#P user uslider 1009 52 18 128 128 1 0 0;
#P window setfont "Sans Serif" 18.;
#P number 1009 202 63 18 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 9.;
#P newex 1018 388 59 196617 ctlout 7 14;
#P newex 958 274 27 196617 t b f;
#P newex 958 253 49 196617 r master;
#P newex 953 360 35 196617 r port;
#P number 944 333 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 944 308 27 196617 * 1.;
#P user uslider 944 52 18 128 128 1 0 0;
#P window setfont "Sans Serif" 18.;
#P number 944 202 63 18 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 9.;
#P newex 953 388 59 196617 ctlout 7 13;
#P newex 892 275 27 196617 t b f;
#P newex 892 253 49 196617 r master;
#P newex 887 361 35 196617 r port;
#P number 878 334 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 878 309 27 196617 * 1.;
#P user uslider 878 52 18 128 128 1 0 0;
#P window setfont "Sans Serif" 18.;
#P number 878 202 63 18 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 9.;
#P newex 887 389 59 196617 ctlout 7 12;
#P newex 827 275 27 196617 t b f;
#P newex 827 253 49 196617 r master;
#P newex 822 361 35 196617 r port;
#P number 813 334 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 813 309 27 196617 * 1.;
#P user uslider 813 52 18 128 128 1 0 0;
#P window setfont "Sans Serif" 18.;
#P number 813 202 63 18 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 9.;
#P newex 822 389 59 196617 ctlout 7 11;
#P newex 761 276 27 196617 t b f;
#P newex 761 253 49 196617 r master;
#P newex 756 362 35 196617 r port;
#P number 747 335 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 747 310 27 196617 * 1.;
#P user uslider 747 52 18 128 128 1 0 0;
#P window setfont "Sans Serif" 18.;
#P number 747 202 63 18 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 9.;
#P newex 756 390 59 196617 ctlout 7 10;
#P newex 696 276 27 196617 t b f;
#P newex 696 253 49 196617 r master;
#P newex 691 362 35 196617 r port;
#P number 682 335 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 682 310 27 196617 * 1.;
#P user uslider 682 52 18 128 128 1 0 0;
#P window setfont "Sans Serif" 18.;
#P number 682 202 63 18 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 9.;
#P newex 691 390 53 196617 ctlout 7 9;
#P newex 630 277 27 196617 t b f;
#P newex 630 253 49 196617 r master;
#P newex 625 363 35 196617 r port;
#P number 616 336 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 616 311 27 196617 * 1.;
#P user uslider 616 52 18 128 128 1 0 0;
#P window setfont "Sans Serif" 18.;
#P number 616 202 63 18 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 9.;
#P newex 625 391 53 196617 ctlout 7 8;
#P newex 565 277 27 196617 t b f;
#P newex 565 253 49 196617 r master;
#P newex 560 363 35 196617 r port;
#P number 551 336 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 551 311 27 196617 * 1.;
#P user uslider 551 52 18 128 128 1 0 0;
#P window setfont "Sans Serif" 18.;
#P number 551 202 63 18 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 9.;
#P newex 560 391 53 196617 ctlout 7 7;
#P newex 499 278 27 196617 t b f;
#P newex 499 253 49 196617 r master;
#P newex 494 364 35 196617 r port;
#P number 485 337 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 485 312 27 196617 * 1.;
#P user uslider 485 52 18 128 128 1 0 0;
#P window setfont "Sans Serif" 18.;
#P number 485 202 63 18 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 9.;
#P newex 494 392 53 196617 ctlout 7 6;
#P newex 434 278 27 196617 t b f;
#P newex 434 253 49 196617 r master;
#P newex 429 364 35 196617 r port;
#P number 420 337 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 420 312 27 196617 * 1.;
#P user uslider 420 52 18 128 128 1 0 0;
#P window setfont "Sans Serif" 18.;
#P number 420 202 63 18 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 9.;
#P newex 429 392 53 196617 ctlout 7 5;
#P newex 368 279 27 196617 t b f;
#P newex 368 253 49 196617 r master;
#P newex 363 365 35 196617 r port;
#P number 354 338 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 354 313 27 196617 * 1.;
#P user uslider 354 52 18 128 128 1 0 0;
#P window setfont "Sans Serif" 18.;
#P number 354 202 63 18 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 9.;
#P newex 363 393 53 196617 ctlout 7 4;
#P newex 303 279 27 196617 t b f;
#P newex 303 253 49 196617 r master;
#P newex 298 365 35 196617 r port;
#P number 289 338 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 289 313 27 196617 * 1.;
#P user uslider 289 52 18 128 128 1 0 0;
#P window setfont "Sans Serif" 18.;
#P number 289 202 63 18 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 9.;
#P newex 298 393 53 196617 ctlout 7 3;
#P newex 237 280 27 196617 t b f;
#P newex 237 253 49 196617 r master;
#P newex 232 366 35 196617 r port;
#P number 223 339 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 223 314 27 196617 * 1.;
#P user uslider 223 52 18 128 128 1 0 0;
#P window setfont "Sans Serif" 18.;
#P number 223 202 63 18 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 9.;
#P newex 232 394 53 196617 ctlout 7 2;
#P newex 32 310 49 196617 s master;
#P newex 172 280 27 196617 t b f;
#P newex 50 520 35 196617 s port;
#P newex 172 253 49 196617 r master;
#P newex 167 366 35 196617 r port;
#P number 158 339 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 32 286 85 196617 scale 0 127 0. 1.;
#P user uslider 43 83 45 182 128 1 0 0;
#P newex 158 314 27 196617 * 1.;
#P user uslider 158 52 18 128 128 1 0 0;
#P window setfont "Sans Serif" 18.;
#P number 158 202 63 18 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 9.;
#P user umenu 50 494 203 196647 1 64 510 1;
#X add;
#P newex 50 443 45 196617 loadbang;
#P newex 50 469 45 196617 midiinfo;
#P newex 167 394 53 196617 ctlout 7 1;
#P comment 119 478 100 196617 choose your device;
#P window setfont "Sans Serif" 18.;
#P comment 34 50 70 196626 master;
#P fasten 9 0 10 0 48 284 37 284;
#P connect 10 0 16 0;
#P hidden connect 138 0 9 0;
#P connect 4 0 3 0;
#P connect 3 0 5 0;
#P fasten 5 1 14 0 248 514 55 514;
#P hidden connect 137 0 138 0;
#P connect 7 0 6 0;
#P connect 6 0 8 0;
#P fasten 15 0 8 0 177 301 163 301;
#P connect 8 0 11 0;
#P connect 12 0 2 0;
#P fasten 11 0 2 0 163 388 172 388;
#P connect 13 0 15 0;
#P fasten 15 1 8 1 194 303 180 303;
#P connect 19 0 18 0;
#P fasten 24 0 20 0 242 301 228 301;
#P connect 18 0 20 0;
#P connect 20 0 21 0;
#P connect 22 0 17 0;
#P fasten 21 0 17 0 228 388 237 388;
#P connect 23 0 24 0;
#P fasten 24 1 20 1 259 303 245 303;
#P connect 27 0 26 0;
#P fasten 32 0 28 0 308 300 294 300;
#P connect 26 0 28 0;
#P connect 28 0 29 0;
#P connect 30 0 25 0;
#P fasten 29 0 25 0 294 387 303 387;
#P connect 31 0 32 0;
#P fasten 32 1 28 1 325 302 311 302;
#P connect 35 0 34 0;
#P connect 34 0 36 0;
#P fasten 40 0 36 0 373 300 359 300;
#P connect 36 0 37 0;
#P fasten 37 0 33 0 359 387 368 387;
#P connect 38 0 33 0;
#P connect 39 0 40 0;
#P fasten 40 1 36 1 390 302 376 302;
#P connect 43 0 42 0;
#P connect 42 0 44 0;
#P fasten 48 0 44 0 439 299 425 299;
#P connect 44 0 45 0;
#P fasten 45 0 41 0 425 386 434 386;
#P connect 46 0 41 0;
#P connect 47 0 48 0;
#P fasten 48 1 44 1 456 301 442 301;
#P connect 51 0 50 0;
#P fasten 56 0 52 0 504 299 490 299;
#P connect 50 0 52 0;
#P connect 52 0 53 0;
#P connect 54 0 49 0;
#P fasten 53 0 49 0 490 386 499 386;
#P connect 55 0 56 0;
#P fasten 56 1 52 1 521 301 507 301;
#P connect 59 0 58 0;
#P fasten 64 0 60 0 570 298 556 298;
#P connect 58 0 60 0;
#P connect 60 0 61 0;
#P connect 62 0 57 0;
#P fasten 61 0 57 0 556 385 565 385;
#P connect 63 0 64 0;
#P fasten 64 1 60 1 587 300 573 300;
#P connect 67 0 66 0;
#P connect 66 0 68 0;
#P fasten 72 0 68 0 635 298 621 298;
#P connect 68 0 69 0;
#P fasten 69 0 65 0 621 385 630 385;
#P connect 70 0 65 0;
#P connect 71 0 72 0;
#P fasten 72 1 68 1 652 300 638 300;
#P connect 75 0 74 0;
#P connect 74 0 76 0;
#P fasten 80 0 76 0 701 297 687 297;
#P connect 76 0 77 0;
#P fasten 77 0 73 0 687 384 696 384;
#P connect 78 0 73 0;
#P connect 79 0 80 0;
#P fasten 80 1 76 1 718 299 704 299;
#P connect 83 0 82 0;
#P fasten 88 0 84 0 766 297 752 297;
#P connect 82 0 84 0;
#P connect 84 0 85 0;
#P connect 86 0 81 0;
#P fasten 85 0 81 0 752 384 761 384;
#P connect 87 0 88 0;
#P fasten 88 1 84 1 783 299 769 299;
#P connect 91 0 90 0;
#P fasten 96 0 92 0 832 296 818 296;
#P connect 90 0 92 0;
#P connect 92 0 93 0;
#P connect 94 0 89 0;
#P fasten 93 0 89 0 818 383 827 383;
#P connect 95 0 96 0;
#P fasten 96 1 92 1 849 298 835 298;
#P connect 99 0 98 0;
#P connect 98 0 100 0;
#P fasten 104 0 100 0 897 296 883 296;
#P connect 100 0 101 0;
#P fasten 101 0 97 0 883 383 892 383;
#P connect 102 0 97 0;
#P connect 103 0 104 0;
#P fasten 104 1 100 1 914 298 900 298;
#P connect 107 0 106 0;
#P connect 106 0 108 0;
#P fasten 112 0 108 0 963 295 949 295;
#P connect 108 0 109 0;
#P fasten 109 0 105 0 949 382 958 382;
#P connect 110 0 105 0;
#P connect 111 0 112 0;
#P fasten 112 1 108 1 980 297 966 297;
#P connect 115 0 114 0;
#P fasten 120 0 116 0 1028 295 1014 295;
#P connect 114 0 116 0;
#P connect 116 0 117 0;
#P connect 118 0 113 0;
#P fasten 117 0 113 0 1014 382 1023 382;
#P connect 119 0 120 0;
#P fasten 120 1 116 1 1045 297 1031 297;
#P connect 123 0 122 0;
#P fasten 128 0 124 0 1094 294 1080 294;
#P connect 122 0 124 0;
#P connect 124 0 125 0;
#P connect 126 0 121 0;
#P fasten 125 0 121 0 1080 381 1089 381;
#P connect 127 0 128 0;
#P fasten 128 1 124 1 1111 296 1097 296;
#P connect 131 0 130 0;
#P connect 130 0 132 0;
#P fasten 136 0 132 0 1159 294 1145 294;
#P connect 132 0 133 0;
#P fasten 133 0 129 0 1145 381 1154 381;
#P connect 134 0 129 0;
#P connect 135 0 136 0;
#P fasten 136 1 132 1 1176 296 1162 296;
#P pop;


January 18, 2006 | 1:25 am

Francisco,

Although I was hoping for a more elegant solution scaling all channel volumes should do the trick.

Thanks :)

Syndey B.


January 18, 2006 | 10:36 am

it would helpl if you could tell us what exactly you want to control,
synth is a bit vague…
for example, it could have routing or a midi controllable master fader,
group channels, …


September 13, 2007 | 9:57 pm

Guessing that this is for controlling the volume of the horrid QuickTime General MIDI synth here’s a patch that seems to work for me.
Hope it helps!

#P window setfont "Sans Serif" 9.;
#P number 293 274 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 293 214 15 0;
#P window linecount 1;
#P newex 293 238 45 196617 uzi 16;
#P number 252 180 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 293 304 45 196617 ctlout 7;
#N comlet volume in (0 – 127);
#P inlet 252 143 15 0;
#P connect 0 0 2 0;
#P fasten 2 0 4 0 257 205 298 205;
#P connect 4 0 3 0;
#P fasten 2 0 5 0 257 263 298 263;
#P connect 3 0 5 0;
#P connect 5 0 1 0;
#P connect 3 2 1 2;
#P window clipboard copycount 6;


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