[PD] Virtual Mixer for Telematic Music

Iain Mott mott at reverberant.com
Sun Apr 8 13:15:08 CEST 2012


Hi Rishabh,

If you switch between two input signals without some kind of cross-fade
(fading one signal out while the other is faded in) you will most likely
experience an audible click.

To mix between two groups of 8 inputs you can use 8 polygate~ objects
with the arguments of each one set for example as "2 100". The 2 is the
number of input channels and the 100 is the cross-fade time in msec. You
can adjust the value to a much longer time if you wish. Best leave
polygate~ at its default "equal power" setting (see the help file) as
this offers a more even loudness (perceived amplitude) during the fade
(switch), assuming the 2 inputs are of roughly equal amplitude.

I've attached an example patch - and will paste contents below.

Don't forget you'll need to launch Pd with the command line argument
"-channels 16" in order to patch with jack.

Cheers and good luck

iain


#N canvas 332 91 1212 660 10;
#X obj 187 -14 adc~ 1 2 3 4 5 6 7 8;
#X obj 388 -15 adc~ 9 10 11 12 13 14 15 16;
#X obj 257 107 polygate~ 2 100;
#X obj 281 133 polygate~ 2 100;
#X obj 305 159 polygate~ 2 100;
#X obj 332 185 polygate~ 2 100;
#X obj 350 217 polygate~ 2 100;
#X obj 377 243 polygate~ 2 100;
#X obj 401 269 polygate~ 2 100;
#X obj 428 295 polygate~ 2 100;
#X obj 269 327 vsl 15 128 0 1 0 0 empty empty empty 0 -9 0 10 -262144
-1 -1 3800 1;
#X obj 199 481 r~ fader1;
#X obj 192 129 s~ fader1;
#X obj 202 161 s~ fader2;
#X obj 224 192 s~ fader3;
#X obj 235 216 s~ fader4;
#X obj 277 241 s~ fader5;
#X obj 297 270 s~ fader6;
#X obj 337 297 s~ fader7;
#X obj 399 328 s~ fader8;
#X msg -121 29 ftime-epower \$1;
#X msg 56 27 choice \$1;
#X floatatom -121 5 5 0 0 0 - - -;
#X text -167 -15 set cross-fade time (msec);
#X text 34 -23 choose location;
#N canvas 72 366 600 400 tone2 0;
#X obj 235 235 outlet~;
#X obj 276 197 *~ 0.2;
#X obj 228 157 osc~ 600;
#X connect 1 0 0 0;
#X connect 2 0 1 0;
#X restore 357 -56 pd tone2;
#N canvas 1 66 600 400 tone1 0;
#X obj 131 240 outlet~;
#X obj 124 162 osc~ 500;
#X obj 172 202 *~ 0.2;
#X connect 1 0 2 0;
#X connect 2 0 0 0;
#X restore 295 -57 pd tone1;
#X msg 37 2 1;
#X msg 75 3 2;
#X text 207 -36 location 1;
#X text 431 -36 location 2;
#X obj 547 596 dac~ 1 2;
#X obj 255 508 *~;
#X obj 269 487 line~;
#X msg 269 464 \$1 100;
#X obj 379 328 vsl 15 128 0 1 0 0 empty empty empty 0 -9 0 10 -262144
-1 -1 0 1;
#X obj 365 509 *~;
#X obj 379 488 line~;
#X msg 379 465 \$1 100;
#X obj 496 330 vsl 15 128 0 1 0 0 empty empty empty 0 -9 0 10 -262144
-1 -1 0 1;
#X obj 482 511 *~;
#X obj 496 490 line~;
#X msg 496 467 \$1 100;
#X obj 606 331 vsl 15 128 0 1 0 0 empty empty empty 0 -9 0 10 -262144
-1 -1 0 1;
#X obj 592 512 *~;
#X obj 606 491 line~;
#X msg 606 468 \$1 100;
#X obj 727 334 vsl 15 128 0 1 0 0 empty empty empty 0 -9 0 10 -262144
-1 -1 0 1;
#X obj 713 515 *~;
#X obj 727 494 line~;
#X msg 727 471 \$1 100;
#X obj 837 335 vsl 15 128 0 1 0 0 empty empty empty 0 -9 0 10 -262144
-1 -1 0 1;
#X obj 823 516 *~;
#X obj 837 495 line~;
#X msg 837 472 \$1 100;
#X obj 954 337 vsl 15 128 0 1 0 0 empty empty empty 0 -9 0 10 -262144
-1 -1 0 1;
#X obj 940 518 *~;
#X obj 954 497 line~;
#X msg 954 474 \$1 100;
#X obj 1064 338 vsl 15 128 0 1 0 0 empty empty empty 0 -9 0 10 -262144
-1 -1 0 1;
#X obj 1050 519 *~;
#X obj 1064 498 line~;
#X msg 1064 475 \$1 100;
#X obj 310 483 r~ fader2;
#X obj 426 484 r~ fader3;
#X obj 536 485 r~ fader4;
#X obj 657 488 r~ fader5;
#X obj 767 489 r~ fader6;
#X obj 885 491 r~ fader7;
#X obj 994 492 r~ fader8;
#X text 284 -76 you can use these to test;
#X connect 0 0 2 0;
#X connect 0 1 3 0;
#X connect 0 2 4 0;
#X connect 0 3 5 0;
#X connect 0 4 6 0;
#X connect 0 5 7 0;
#X connect 0 6 8 0;
#X connect 0 7 9 0;
#X connect 1 0 2 1;
#X connect 1 1 3 1;
#X connect 1 2 4 1;
#X connect 1 3 5 1;
#X connect 1 4 6 1;
#X connect 1 5 7 1;
#X connect 1 6 8 1;
#X connect 1 7 9 1;
#X connect 2 0 12 0;
#X connect 3 0 13 0;
#X connect 4 0 14 0;
#X connect 5 0 15 0;
#X connect 6 0 16 0;
#X connect 7 0 17 0;
#X connect 8 0 18 0;
#X connect 9 0 19 0;
#X connect 10 0 34 0;
#X connect 11 0 32 0;
#X connect 20 0 2 0;
#X connect 20 0 3 0;
#X connect 20 0 4 0;
#X connect 20 0 5 0;
#X connect 20 0 6 0;
#X connect 20 0 7 0;
#X connect 20 0 8 0;
#X connect 20 0 9 0;
#X connect 21 0 2 0;
#X connect 21 0 3 0;
#X connect 21 0 4 0;
#X connect 21 0 5 0;
#X connect 21 0 6 0;
#X connect 21 0 7 0;
#X connect 21 0 8 0;
#X connect 21 0 9 0;
#X connect 22 0 20 0;
#X connect 27 0 21 0;
#X connect 28 0 21 0;
#X connect 32 0 31 0;
#X connect 32 0 31 1;
#X connect 33 0 32 1;
#X connect 34 0 33 0;
#X connect 35 0 38 0;
#X connect 36 0 31 0;
#X connect 36 0 31 1;
#X connect 37 0 36 1;
#X connect 38 0 37 0;
#X connect 39 0 42 0;
#X connect 40 0 31 0;
#X connect 40 0 31 1;
#X connect 41 0 40 1;
#X connect 42 0 41 0;
#X connect 43 0 46 0;
#X connect 44 0 31 0;
#X connect 44 0 31 1;
#X connect 45 0 44 1;
#X connect 46 0 45 0;
#X connect 47 0 50 0;
#X connect 48 0 31 0;
#X connect 48 0 31 1;
#X connect 49 0 48 1;
#X connect 50 0 49 0;
#X connect 51 0 54 0;
#X connect 52 0 31 0;
#X connect 52 0 31 1;
#X connect 53 0 52 1;
#X connect 54 0 53 0;
#X connect 55 0 58 0;
#X connect 56 0 31 0;
#X connect 56 0 31 1;
#X connect 57 0 56 1;
#X connect 58 0 57 0;
#X connect 59 0 62 0;
#X connect 60 0 31 0;
#X connect 60 0 31 1;
#X connect 61 0 60 1;
#X connect 62 0 61 0;
#X connect 63 0 36 0;
#X connect 64 0 40 0;
#X connect 65 0 44 0;
#X connect 66 0 48 0;
#X connect 67 0 52 0;
#X connect 68 0 56 0;
#X connect 69 0 60 0;


On Sat, 2012-04-07 at 16:43 -0400, Rishabh Natarajan wrote:
> Hi Iain,
> 
> 
> I just read a little while back that you can indeed use multiple adcs~
> in one patch, but no where is it explained for my particular case. I
> don't want multiple adcs~ to route some channels here and some other
> channels some where else. I need to be able to switch between 2
> interfaces within the same patch, so that I can use the same set of
> sliders to mix sound, separately, either coming in from the internet
> via Jacktrip or locally via my local interface.
> 
> 
> What I would then do is, the output of the adc~ receiving audio
> channels from Jacktrip over the internet will be routed to the dac~ to
> the local sound, while the adc~ receiving audio channels from my local
> setup, should be routed to some dac~ that will send the audio over
> Jacktrip to the remote location.
> 
> 
> I'm not quite sure what you mean by crossfade. I just want to switch
> the sliders in my patch to either control sound coming via jacktrip or
> to control sound coming via my local interface, i.e. sound coming in
> from the internet or sound coming in from local musicians.It has
> nothing to do with timing between signals, just a switch between the
> incoming sets of audio. The idea is to use the same set of 8 sliders
> to manage 8 channels either coming in from Jacktrip or coming in from
> the local interface. I think the term 'fader' is misleading; when I
> say fader I mean the sliders that one finds on a mixer. I hope that
> makes my problem a little more clear :)
> 
> 
> Regards,
> Rishabh
> 
> On Sat, Apr 7, 2012 at 4:24 PM, Iain Mott <mott at reverberant.com>
> wrote:
>         Hi
>         
>         In answer to question 1, and if I'm understanding correctly,
>         yes you can
>         have more than one adc~ in the patch or specify the input
>         channels in a
>         particular adc~. eg an object with "adc~ 1 2 3 4 5 6 7" will
>         receive 7
>         input channels numbered 1-7. These can receive their signals
>         via jack
>         routing.
>         
>         In regard to switching between inputs, you might consider
>         polygate~ from
>         motex in pd-extended. This allows you to cross-fade between up
>         to 10
>         inputs. You can set a cross-fade time in milliseconds and
>         choose between
>         linear or equal-power fading. If you need to switch between
>         more than 10
>         inputs, just use more polygate~ objects - and you'll need two
>         at least
>         anyway for a stereo mix.
>         
>         cheers,
>         
>         Iain
>         
>         
>         On Sat, 2012-04-07 at 13:57 -0400, Rishabh Natarajan wrote:
>         > Hi,
>         >
>         >
>         > I'm trying to build a virtual mixer in pd for telematic
>         music.
>         > Telematic music is a genre of music where the musicians
>         collaborate
>         > live but are situated in different locations (cities), over
>         the
>         > internet.
>         >
>         >
>         > My mixer should be able to take in remote channels coming in
>         through
>         > Jack and route to the local sound system and also, through
>         some
>         > interface be able to take in local inputs and send out via
>         Jack to the
>         > remote system.
>         >
>         >
>         > The questions I have are:
>         > 1. can I have 2 adc~ objects in one patch? So that I can
>         switch the
>         > same set of faders to control either signals going to and
>         coming from
>         > Jack or going to and coming from my local interface? if so,
>         how do I
>         > achieve this?
>         > 2. If I need to be able to route sound over the internet via
>         Jack and
>         > to and from my local system via an interface, how do I make
>         pd use
>         > both Jack and the local interface (for example the coremidi
>         on a mac)
>         > at the same time? This sort of ties in with the first
>         question.
>         >
>         >
>         > My time to do all of this is really short and I am very new
>         to pd. Any
>         > help with this would really, really be appreciated!
>         >
>         >
>         > Thanks,
>         > Rishabh
>         
>         > _______________________________________________
>         > Pd-list at iem.at mailing list
>         > UNSUBSCRIBE and account-management ->
>         http://lists.puredata.info/listinfo/pd-list
>         
>         
> 
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: telematic.pd
Type: text/x-puredata
Size: 4576 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20120408/ab1b7674/attachment.bin>


More information about the Pd-list mailing list