Re: [PD] Appending two signals together to create a third

2011-09-04 Thread martin brinkmann
On 09/01/2011 11:51 AM, Rick T wrote:

 For more background I'm going to have the Frequency, Amplitude, and Phase
 controlled by Midi Controllers.  So there will be a total of 9 midi
 controllers used (3 for each signal).

i think independent control of the 3 frequencies makes this a little
tricky. appending the waveform exactly at cycle-boundaries will only
happen at certain frequency ratios. the best i could come up with so far
was a frequency ratio and another control for the splitpoint
(attached). for 1:1 or 2:1 etc. you get more or less exactly
appended waves. (and changing a frequency-ratio makes quite nice
sweep- or sync like sounds)

i have not tried yet, but maybe it is also possible to compute the
waveform with the desired nrs of b and c cycles with messages, scale
the resulting table to the size of one block, and reblock the patch to
fit the frequency of d. this would always guarantee exactly appended
waves, though not with precise control over the frequencies of b and c.

bis denn!
martin
#N canvas 317 118 998 883 10;
#X obj 190 -35 phasor~;
#X obj 46 177 wrap~;
#X obj 45 198 *~ 512;
#X obj 159 193 *~ 512;
#X obj 159 172 wrap~;
#X obj 103 598 dac~;
#X obj 127 435 +~;
#N canvas 0 0 450 300 (subpatch) 0;
#X array \$0display 512 float 0;
#X coords 0 1.5 511 -1.5 256 140 1 0 0;
#X restore 285 542 graph;
#X obj 287 504 tabwrite~ \$0display;
#X msg 347 467 bang;
#X obj 190 -63 nbx 5 14 0 1 0 1 empty empty freq_D 0 -8 0 10 -262144
-1 -1 145 256;
#X obj 64 372 *~;
#X obj 100 317 nbx 5 14 0 100 0 1 empty empty amp1 0 -8 0 10 -262144
-1 -1 100 256;
#X obj 96 339 / 100;
#X obj 222 377 *~;
#X obj 258 322 nbx 5 14 0 100 0 1 empty empty amp2 0 -8 0 10 -262144
-1 -1 100 256;
#X obj 254 344 / 100;
#X obj 22 82 nbx 5 14 0 100 0 1 empty empty phase1 0 -8 0 10 -262144
-1 -1 1 256;
#X obj 27 108 / 100;
#X obj 55 155 +~;
#X obj 179 106 nbx 5 14 0 100 0 1 empty empty phase2 0 -8 0 10 -262144
-1 -1 0 256;
#X obj 176 124 / 100;
#X obj 159 150 +~;
#X obj 107 538 *~ 0.5;
#X text 3 172 osc B;
#X text 199 172 osc C;
#X obj 522 313 table \$0waveB 515;
#X obj 522 335 table \$0waveC 515;
#X obj 158 217 tabread4~ \$0waveC;
#X obj 39 222 tabread4~ \$0waveB;
#X text 390 463 click to display wave;
#X obj 593 -46 until;
#X obj 593 -18 f;
#X obj 624 -16 + 1;
#X obj 633 153 sin;
#X obj 632 130 * 6.28319;
#X obj 588 41 t f f;
#X obj 595 -100 loadbang;
#X obj 517 142 mod 2;
#X obj 527 166 * 2;
#X obj 528 191 - 1;
#X obj 632 104 / 512;
#X obj 513 118 div 256;
#X obj 625 5 mod 515;
#X msg 595 -73 515;
#X obj 515 228 * -1;
#X obj 657 178 tabwrite \$0waveB;
#X obj 509 261 tabwrite \$0waveC;
#X obj 62 294 *~;
#X obj 200 313 *~;
#X obj 94 94 *~;
#X obj 130 93 *~;
#X obj 156 56 * 2;
#X obj 194 56 * 2;
#X obj 266 -62 nbx 3 14 1 99 0 1 empty empty empty 0 -8 0 10 -262144
-1 -1 2 256;
#X obj 314 -62 nbx 3 14 1 99 0 1 empty empty empty 0 -8 0 10 -262144
-1 -1 1 256;
#X text 302 -64 :;
#X text 564 -123 make sine and square waves;
#X text 262 -84 waveform frequency ratio;
#X obj 396 51 nbx 5 14 -100 100 0 1 empty empty splitpoint 0 -8 0 10
-262144 -1 -1 0 256;
#X obj 396 71 / 100;
#X obj 302 113 cos~;
#X obj 286 215 clip~ 0 1;
#X obj 363 205 clip~ -1 0;
#X obj 363 225 *~ -1;
#X obj 303 142 +~;
#X obj 301 62 +~ 0.75;
#X obj 301 88 clip~ 1 1.75;
#X obj 302 166 *~ 64;
#X text 341 126 soft xfade;
#X text 464 34 0-1:1;
#X connect 0 0 50 0;
#X connect 0 0 51 0;
#X connect 0 0 66 0;
#X connect 1 0 2 0;
#X connect 2 0 29 0;
#X connect 3 0 28 0;
#X connect 4 0 3 0;
#X connect 6 0 23 0;
#X connect 6 0 8 0;
#X connect 9 0 8 0;
#X connect 10 0 0 0;
#X connect 11 0 6 0;
#X connect 12 0 13 0;
#X connect 13 0 11 1;
#X connect 14 0 6 1;
#X connect 15 0 16 0;
#X connect 16 0 14 1;
#X connect 17 0 18 0;
#X connect 18 0 19 1;
#X connect 19 0 1 0;
#X connect 20 0 21 0;
#X connect 21 0 22 1;
#X connect 22 0 4 0;
#X connect 23 0 5 0;
#X connect 23 0 5 1;
#X connect 28 0 49 0;
#X connect 29 0 48 0;
#X connect 31 0 32 0;
#X connect 32 0 33 0;
#X connect 32 0 36 0;
#X connect 33 0 43 0;
#X connect 34 0 46 0;
#X connect 35 0 34 0;
#X connect 36 0 41 0;
#X connect 36 0 42 0;
#X connect 36 1 46 1;
#X connect 36 1 47 1;
#X connect 37 0 44 0;
#X connect 38 0 39 0;
#X connect 39 0 40 0;
#X connect 40 0 45 0;
#X connect 41 0 35 0;
#X connect 42 0 38 0;
#X connect 43 0 32 1;
#X connect 44 0 31 0;
#X connect 45 0 47 0;
#X connect 48 0 11 0;
#X connect 49 0 14 0;
#X connect 50 0 19 0;
#X connect 51 0 22 0;
#X connect 52 0 50 1;
#X connect 53 0 51 1;
#X connect 54 0 52 0;
#X connect 55 0 53 0;
#X connect 59 0 60 0;
#X connect 60 0 65 1;
#X connect 61 0 65 0;
#X connect 62 0 48 1;
#X connect 63 0 64 0;
#X connect 64 0 49 1;
#X connect 65 0 68 0;
#X connect 66 0 67 0;
#X connect 67 0 61 0;
#X connect 68 0 62 0;
#X connect 68 0 63 0;
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Appending two signals together to create a third

2011-09-04 Thread martin brinkmann
On 09/04/2011 01:46 PM, martin brinkmann wrote:

 and reblock the patch to
 fit the frequency of d. this would always guarantee exactly appended
 waves, though not with precise control over the frequencies of b and c.

...and of course somehow write the result to normal (power of 2)
sized blocks for audio output,

 bis denn!
   martin

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Appending two signals together to create a third

2011-09-03 Thread Frank Barknecht
On Wed, Aug 31, 2011 at 11:51:34PM -1000, Rick T wrote:
 I have two signals Signal B and Signal C that I would like to append, which
 would create a joined signal called Signal D.  I can create Signal B and
 Signal C but the questions I have is:
 
 I created a image that may help explain it better
 http://dl.dropbox.com/u/6576402/questions/flowchart_joined2.jpg
 
 1) How do I append one signal onto the end of another. (see image labelled
 2)
 2) How can I vary Signal D's Frequency, Amplitude, and Phase? (See image
 labelled 3)

Attached are two example approaches to this problem. Both involve a
phasor signal that is split into two phasors which are out of phase by
half a period using [-~ 0.5] and [wrap~]. You can use these two phasors
to alternately play two tables with tabread~, if your source signals 
are in tables, see combine-tables.pd

If your source signals are not in tables, combine-signals.pd shows a
crude switching between two signals using square waves out of phase with
each other. You make these square waves from a phasor wrapped out of
phase with itself just like above. (Of course you can also just use one
square wave which you multiply by -1 and shift up by [+~ 1] after creation.)

Ciao
-- 
Frank


combine-signals.pd
Description: application/puredata


combine-tables.pd
Description: application/puredata
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Appending two signals together to create a third

2011-09-03 Thread hardoff goes bananas
casio CZ synth, yeah?  i made one of them in pd a few years ago.  sounded
pretty good.





On Sat, Sep 3, 2011 at 6:16 PM, Frank Barknecht f...@footils.org wrote:

 On Wed, Aug 31, 2011 at 11:51:34PM -1000, Rick T wrote:
  I have two signals Signal B and Signal C that I would like to append,
 which
  would create a joined signal called Signal D.  I can create Signal B and
  Signal C but the questions I have is:
 
  I created a image that may help explain it better
  http://dl.dropbox.com/u/6576402/questions/flowchart_joined2.jpg
 
  1) How do I append one signal onto the end of another. (see image
 labelled
  2)
  2) How can I vary Signal D's Frequency, Amplitude, and Phase? (See image
  labelled 3)

 Attached are two example approaches to this problem. Both involve a
 phasor signal that is split into two phasors which are out of phase by
 half a period using [-~ 0.5] and [wrap~]. You can use these two phasors
 to alternately play two tables with tabread~, if your source signals
 are in tables, see combine-tables.pd

 If your source signals are not in tables, combine-signals.pd shows a
 crude switching between two signals using square waves out of phase with
 each other. You make these square waves from a phasor wrapped out of
 phase with itself just like above. (Of course you can also just use one
 square wave which you multiply by -1 and shift up by [+~ 1] after
 creation.)

 Ciao
 --
 Frank

 ___
 Pd-list@iem.at mailing list
 UNSUBSCRIBE and account-management -
 http://lists.puredata.info/listinfo/pd-list


___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] Appending two signals together to create a third

2011-09-01 Thread Rick T
Greetings All

I have two signals Signal B and Signal C that I would like to append, which
would create a joined signal called Signal D.  I can create Signal B and
Signal C but the questions I have is:

I created a image that may help explain it better
http://dl.dropbox.com/u/6576402/questions/flowchart_joined2.jpg

1) How do I append one signal onto the end of another. (see image labelled
2)
2) How can I vary Signal D's Frequency, Amplitude, and Phase? (See image
labelled 3)

I was thinking of putting a Signal B and Signal C into 1 second buffer that
creates Signal D but does anyone know how to do this and if this would even
work?
Is PureData the program for this or is there another one that might be
better suited for my task


For more background I'm going to have the Frequency, Amplitude, and Phase
controlled by Midi Controllers.  So there will be a total of 9 midi
controllers used (3 for each signal).

Aloha
Rick

-- 
--
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Appending two signals together to create a third

2011-09-01 Thread tim vets
Hi Rick,
Here's an improvised solution using [expr~] to read from two tables
alternatingly.
gr,
Tim

2011/9/1 Rick T ratull...@gmail.com

 Greetings All

 I have two signals Signal B and Signal C that I would like to append, which
 would create a joined signal called Signal D.  I can create Signal B and
 Signal C but the questions I have is:

 I created a image that may help explain it better
 http://dl.dropbox.com/u/6576402/questions/flowchart_joined2.jpg

 1) How do I append one signal onto the end of another. (see image labelled
 2)
 2) How can I vary Signal D's Frequency, Amplitude, and Phase? (See image
 labelled 3)

 I was thinking of putting a Signal B and Signal C into 1 second buffer that
 creates Signal D but does anyone know how to do this and if this would even
 work?
 Is PureData the program for this or is there another one that might be
 better suited for my task


 For more background I'm going to have the Frequency, Amplitude, and Phase
 controlled by Midi Controllers.  So there will be a total of 9 midi
 controllers used (3 for each signal).

 Aloha
 Rick

 --
 --


 ___
 Pd-list@iem.at mailing list
 UNSUBSCRIBE and account-management -
 http://lists.puredata.info/listinfo/pd-list


#N canvas 0 0 427 557 10;
#X obj 139 116 phasor~ 30;
#X obj 84 343 *~;
#X obj 185 343 *~;
#X obj 85 445 dac~;
#X obj 85 422 *~ 0.3;
#X obj 140 150 *~ 1024;
#X obj 199 218 expr~ if($v1512 \, 1 \, 0);
#X obj 100 190 expr~ if($v1512 \, 0 \, 1);
#X obj 82 247 expr~ if($v1512 \, 0 \, $v1);
#X obj 184 270 expr~ if($v1512 \, $v1-512 \, 0);
#X obj 35 21 table B 512;
#X obj 117 21 table C 512;
#X obj 85 52 table D 1024;
#X obj 185 419 tabwrite~ D;
#X obj 259 402 metro;
#X msg 286 358 1024;
#X obj 286 381 / 44.1;
#X obj 83 298 tabread~ B;
#X obj 185 298 tabread~ C;
#X text 207 21  draw in these;
#X text 176 52  watch this;
#X obj 259 297 loadbang;
#X obj 142 98 hsl 128 15 20 1000 0 0 empty empty empty -2 -8 0 10 -262144
-1 -1 500 1;
#X obj 259 318 t b b b;
#X msg 298 338 \; pd dsp 1;
#X text 280 97 change freq.;
#X connect 0 0 5 0;
#X connect 1 0 4 0;
#X connect 1 0 13 0;
#X connect 2 0 4 0;
#X connect 2 0 13 0;
#X connect 4 0 3 0;
#X connect 4 0 3 1;
#X connect 5 0 6 0;
#X connect 5 0 7 0;
#X connect 5 0 8 0;
#X connect 5 0 9 0;
#X connect 6 0 2 1;
#X connect 7 0 1 1;
#X connect 8 0 17 0;
#X connect 9 0 18 0;
#X connect 14 0 13 0;
#X connect 15 0 16 0;
#X connect 16 0 14 1;
#X connect 17 0 1 0;
#X connect 18 0 2 0;
#X connect 21 0 23 0;
#X connect 22 0 0 0;
#X connect 23 0 14 0;
#X connect 23 1 15 0;
#X connect 23 2 24 0;
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list