Browse Source

PD: removes amplitude scaling factor from libpd engine audio inputs (and outputs). output scaling should be done from within the pd patch.

tags/v1.3.0
clwe 4 years ago
parent
commit
4666581ff2
3 changed files with 26 additions and 12 deletions
  1. +20
    -8
      examples/rainbow.pd
  2. +5
    -3
      examples/vco.pd
  3. +1
    -1
      src/LibPDEngine.cpp

+ 20
- 8
examples/rainbow.pd View File

@@ -919,7 +919,7 @@
#X msg 350 426 L4 \$1 \$2 \$3;
#X msg 447 426 L5 \$1 \$2 \$3;
#X msg 542 426 L6 \$1 \$2 \$3;
#X obj 29 592 dac~ 1 2 3 4 5 6, f 69;
#X obj 29 619 dac~ 1 2 3 4 5 6, f 69;
#X obj 29 369 t l l;
#X obj 125 369 t l l;
#X obj 221 369 t l l;
@@ -978,7 +978,7 @@
#X obj 29 140 print toVCV;
#X obj 29 90 list prepend display;
#X obj 29 115 list trim;
#X obj 29 62 makefilename Hello%c\ world!;
#X obj 29 62 makefilename Hello%c world!;
#X text 264 22 A somewhat ugly workaround just to print a comma. In
Pd \, commas separate messages., f 32;
#X connect 0 0 1 0;
@@ -990,6 +990,12 @@ Pd \, commas separate messages., f 32;
#X text 608 326 This should be an abstraction \, but to keep the example
directory tidy it here is duplicated code., f 28;
#X msg 30 118 100 \, 0 2000;
#X obj 30 590 *~ 5;
#X obj 125 589 *~ 5;
#X obj 222 588 *~ 5;
#X obj 317 587 *~ 5;
#X obj 413 588 *~ 5;
#X obj 508 588 *~ 5;
#X connect 0 0 26 0;
#X connect 2 0 1 0;
#X connect 3 0 4 0;
@@ -1070,11 +1076,17 @@ directory tidy it here is duplicated code., f 28;
#X connect 68 0 75 0;
#X connect 69 0 76 0;
#X connect 70 0 77 0;
#X connect 71 0 25 0;
#X connect 71 0 81 0;
#X connect 72 0 71 0;
#X connect 73 0 25 1;
#X connect 74 0 25 2;
#X connect 75 0 25 3;
#X connect 76 0 25 4;
#X connect 77 0 25 5;
#X connect 73 0 82 0;
#X connect 74 0 83 0;
#X connect 75 0 84 0;
#X connect 76 0 85 0;
#X connect 77 0 86 0;
#X connect 80 0 7 0;
#X connect 81 0 25 0;
#X connect 82 0 25 1;
#X connect 83 0 25 2;
#X connect 84 0 25 3;
#X connect 85 0 25 4;
#X connect 86 0 25 5;

+ 5
- 3
examples/vco.pd View File

@@ -1,14 +1,14 @@
#N canvas 1290 443 439 466 12;
#X obj 69 7 r fromVCV;
#X obj 69 32 route K1;
#X obj 16 345 osc~;
#X obj 16 321 osc~;
#X obj 101 370 print toVCV;
#X msg 101 346 display Freq: \$1 Hz;
#X obj 115 112 adc~ 1;
#X obj 69 111 sig~;
#X obj 120 201 loadbang;
#X msg 120 226 1;
#X obj 120 251 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
#X obj 120 251 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
1;
#X obj 120 272 metro 50;
#X obj 101 297 snapshot~;
@@ -21,9 +21,10 @@
#X obj 16 137 sig~ 2;
#X obj 16 370 dac~ 1;
#X text 145 162 <--- FM with CV signal from IN1;
#X obj 15 346 *~ 5;
#X connect 0 0 1 0;
#X connect 1 0 14 0;
#X connect 2 0 19 0;
#X connect 2 0 21 0;
#X connect 4 0 3 0;
#X connect 5 0 13 1;
#X connect 6 0 13 0;
@@ -40,3 +41,4 @@
#X connect 16 0 11 0;
#X connect 17 0 16 0;
#X connect 18 0 17 0;
#X connect 21 0 19 0;

+ 1
- 1
src/LibPDEngine.cpp View File

@@ -153,7 +153,7 @@ struct LibPDEngine : ScriptEngine {
//return samples to prototype
for (int s = 0; s < _pd_block_size; s++) {
for (int r = 0; r < rows; r++) {
block->outputs[r][s] = _output[s*rows+r] * 5;
block->outputs[r][s] = _output[s*rows+r]; // scale up again to +-5V signal
// there is a correction multilpier, because libpd's output is too quiet(?)
}
}


Loading…
Cancel
Save