Re: [PD] mod~ ???

2007-05-09 Thread Miller Puckette
Oops.. that's a bug.

To work around it for now, add 1 (or a higher integer), then wrap...

cheers
Miller
On Mon, May 07, 2007 at 09:40:53PM +0200, Steffen wrote:
 
 On 07/05/2007, at 20.51, Claude Heiland-Allen wrote:
  Note: 0 - [wrap~] - 1, which is weird (and undesirable in my eyes).
 
 Yeah. I still can't translate wrap~ gives the difference between the  
 input and the largest integer not exceeding it to that. The quote is  
 from the help file.
 
 
 
 
 ___
 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


Re: [PD] mod~ ???

2007-05-07 Thread IOhannes m zmoelnig
Derek Holzer wrote:

 end of the table)? [wrap~] doesn't do the trick, BTW.

i am sure it does.
try scaling the signal before sending it to [wrap~] and afterwards undo
the scaling.


[/~ 100]
|
[wrap~]
|
[*~ 100]

mfa.sdr
IOhannes

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


Re: [PD] mod~ ???

2007-05-07 Thread Derek Holzer
I tried this already, and it's not appropriate in this case. The idea is 
to change the start of the loop to any place in the sample. If the 
length of the loop is longer than what's left of the sample in the 
table, currently I get silence. If I use [wrap~] the way you describe 
it, the loop I select always starts at the beginning of the table, 
because [wrap~] returns the percentage of the table I have overshot.

I need a solution where, if the table is 100 places long, I can loop 
from 95 back around to 25 if need be. Which is what my theoretical 
[mod~] would do. But I simply can't wrap my head around how to 
construct it. Your [wrap~] solution seems to return a loop starting at 0 
which is 30 units long instead.

best,
d.

IOhannes m zmoelnig wrote:
 Derek Holzer wrote:
 end of the table)? [wrap~] doesn't do the trick, BTW.
 
 i am sure it does.
 try scaling the signal before sending it to [wrap~] and afterwards undo
 the scaling.
 
 
 [/~ 100]
 |
 [wrap~]
 |
 [*~ 100]
 
 mfa.sdr
 IOhannes
 

-- 
derek holzer ::: http://www.umatic.nl
---Oblique Strategy # 187:
Would anybody want it?

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


Re: [PD] mod~ ???

2007-05-07 Thread Derek Holzer
Test patch attached... see the [wraparound~] subpatch for the part which 
doesn't work yet!


d.

Derek Holzer wrote:
I tried this already, and it's not appropriate in this case. The idea is 
to change the start of the loop to any place in the sample. If the 
length of the loop is longer than what's left of the sample in the 
table, currently I get silence. If I use [wrap~] the way you describe 
it, the loop I select always starts at the beginning of the table, 
because [wrap~] returns the percentage of the table I have overshot.


I need a solution where, if the table is 100 places long, I can loop 
from 95 back around to 25 if need be. Which is what my theoretical 
[mod~] would do. But I simply can't wrap my head around how to 
construct it. Your [wrap~] solution seems to return a loop starting at 0 
which is 30 units long instead.


best,
d.

IOhannes m zmoelnig wrote:

Derek Holzer wrote:

end of the table)? [wrap~] doesn't do the trick, BTW.

i am sure it does.
try scaling the signal before sending it to [wrap~] and afterwards undo
the scaling.


[/~ 100]
|
[wrap~]
|
[*~ 100]

mfa.sdr
IOhannes





--
derek holzer ::: http://www.umatic.nl
---Oblique Strategy # 87:
Imagine the music as a moving chain or caterpillar
#N canvas 315 27 885 778 10;
#X text 240 13 0 - 127;
#X text 574 6 0 - 255;
#X text 581 45 127 = normal;
#X text 580 31 255 = lowest;
#X text 584 61 0 = highest;
#X obj 91 516 phasor~;
#X obj 91 553 *~;
#X obj 91 302 / 44.1;
#X obj 91 329 expr 1 / ($f1 * 1 / 1000);
#X obj 61 247 t f f;
#X obj 91 422 sig~;
#X obj 91 450 *~;
#X text 142 302 time in ms (use 48 if sample rate is 48KHz);
#X text 103 245 number of samples in glitch;
#X obj 268 116 hsl 128 15 0 127 0 0 empty empty empty -2 -6 0 8 -262144
-1 -1 0 1;
#X text 241 39 127 = whole sample;
#X text 244 60 0 = smallest fraction;
#X obj 251 146 / 127;
#X obj 61 219 *;
#X obj 91 583 +~;
#X obj 452 124 hsl 128 15 0 255 0 0 empty empty empty -2 -6 0 8 -262144
-1 -1 0 1;
#X floatatom 458 193 5 0 0 0 - - -;
#X obj 385 234 *;
#X obj 581 229 / 127;
#X obj 622 134 hsl 128 15 0 255 0 0 empty empty empty -2 -6 0 8 -262144
-1 -1 0 1;
#X floatatom 595 272 5 0 0 0 - - -;
#X obj 598 196 abs;
#X obj 599 172 - 255;
#X obj 250 175 t b f;
#X obj 400 188 t b f;
#X floatatom 324 163 5 0 0 0 - - -;
#X text 416 14 0 - 127;
#X obj 434 153 / 255;
#N canvas 0 22 406 310 wraparound~ 0;
#X obj 87 29 inlet~;
#X obj 87 149 outlet~;
#X obj 87 83 wrap~;
#X obj 87 55 /~;
#X obj 87 113 *~;
#X obj 144 28 inlet total num of samples in table;
#X connect 0 0 3 0;
#X connect 2 0 4 0;
#X connect 3 0 2 0;
#X connect 4 0 1 0;
#X connect 5 0 3 1;
#X connect 5 0 4 1;
#X restore 91 631 pd wraparound~;
#X obj 551 383 table test_zample;
#X obj 29 21 openpanel;
#X obj 30 -8 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X msg 29 49 read -resize \$1 test_zample;
#X obj 28 76 soundfiler;
#X obj 240 85 inlet loop length;
#X obj 393 86 inlet loop offset;
#X obj 552 85 inlet loop pitch;
#X text 419 33 127 = table start;
#X text 420 60 0 = table end;
#X obj 91 682 dac~;
#X text 121 585 offset loop from start of table;
#X text 126 555 multiply phasor~ by loop length;
#X text 277 329 convert ms to frequency in Hz;
#X text 209 630 --this needs help!! without this subpatch
\, loop offset works \, but can go beyond bounds of table. with this
subpatch \, loop offset does not work \, so table bounds cannot be
reached.;
#X connect 5 0 6 0;
#X connect 6 0 19 0;
#X connect 7 0 8 0;
#X connect 8 0 10 0;
#X connect 9 0 6 1;
#X connect 9 0 33 1;
#X connect 9 1 7 0;
#X connect 10 0 11 0;
#X connect 11 0 5 0;
#X connect 14 0 17 0;
#X connect 14 0 30 0;
#X connect 17 0 28 0;
#X connect 18 0 9 0;
#X connect 19 0 33 0;
#X connect 20 0 32 0;
#X connect 22 0 19 1;
#X connect 23 0 25 0;
#X connect 23 0 11 1;
#X connect 24 0 27 0;
#X connect 26 0 23 0;
#X connect 27 0 26 0;
#X connect 28 0 18 0;
#X connect 28 1 18 1;
#X connect 29 0 22 0;
#X connect 29 1 22 1;
#X connect 32 0 21 0;
#X connect 32 0 29 0;
#X connect 33 0 44 0;
#X connect 33 0 44 1;
#X connect 35 0 37 0;
#X connect 36 0 35 0;
#X connect 37 0 38 0;
#X connect 38 0 18 0;
#X connect 38 0 22 0;
#X connect 39 0 17 0;
#X connect 40 0 32 0;
#X connect 41 0 27 0;
___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] mod~ ??? [corrected test patch, still needs help]

2007-05-07 Thread Derek Holzer

Sorry, last patch was missing the tabread!

Use this one!

d.

Derek Holzer wrote:
Test patch attached... see the [wraparound~] subpatch for the part which 
doesn't work yet!


d.

Derek Holzer wrote:
I tried this already, and it's not appropriate in this case. The idea 
is to change the start of the loop to any place in the sample. If the 
length of the loop is longer than what's left of the sample in the 
table, currently I get silence. If I use [wrap~] the way you describe 
it, the loop I select always starts at the beginning of the table, 
because [wrap~] returns the percentage of the table I have overshot.


I need a solution where, if the table is 100 places long, I can loop 
from 95 back around to 25 if need be. Which is what my theoretical 
[mod~] would do. But I simply can't wrap my head around how to 
construct it. Your [wrap~] solution seems to return a loop starting at 
0 which is 30 units long instead.


best,
d.

IOhannes m zmoelnig wrote:

Derek Holzer wrote:

end of the table)? [wrap~] doesn't do the trick, BTW.

i am sure it does.
try scaling the signal before sending it to [wrap~] and afterwards undo
the scaling.


[/~ 100]
|
[wrap~]
|
[*~ 100]

mfa.sdr
IOhannes








#N canvas 315 27 885 778 10;
#X text 240 13 0 - 127;
#X text 574 6 0 - 255;
#X text 581 45 127 = normal;
#X text 580 31 255 = lowest;
#X text 584 61 0 = highest;
#X obj 91 516 phasor~;
#X obj 91 553 *~;
#X obj 91 302 / 44.1;
#X obj 91 329 expr 1 / ($f1 * 1 / 1000);
#X obj 61 247 t f f;
#X obj 91 422 sig~;
#X obj 91 450 *~;
#X text 142 302 time in ms (use 48 if sample rate is 48KHz);
#X text 103 245 number of samples in glitch;
#X obj 268 116 hsl 128 15 0 127 0 0 empty empty empty -2 -6 0 8 -262144
-1 -1 0 1;
#X text 241 39 127 = whole sample;
#X text 244 60 0 = smallest fraction;
#X obj 251 146 / 127;
#X obj 61 219 *;
#X obj 91 583 +~;
#X obj 452 124 hsl 128 15 0 255 0 0 empty empty empty -2 -6 0 8 -262144
-1 -1 0 1;
#X floatatom 458 193 5 0 0 0 - - -;
#X obj 385 234 *;
#X obj 581 229 / 127;
#X obj 622 134 hsl 128 15 0 255 0 0 empty empty empty -2 -6 0 8 -262144
-1 -1 0 1;
#X floatatom 595 272 5 0 0 0 - - -;
#X obj 598 196 abs;
#X obj 599 172 - 255;
#X obj 250 175 t b f;
#X obj 400 188 t b f;
#X floatatom 324 163 5 0 0 0 - - -;
#X text 416 14 0 - 127;
#X obj 434 153 / 255;
#N canvas 0 22 406 310 wraparound~ 0;
#X obj 87 29 inlet~;
#X obj 87 149 outlet~;
#X obj 87 83 wrap~;
#X obj 87 55 /~;
#X obj 87 113 *~;
#X obj 144 28 inlet total num of samples in table;
#X connect 0 0 3 0;
#X connect 2 0 4 0;
#X connect 3 0 2 0;
#X connect 4 0 1 0;
#X connect 5 0 3 1;
#X connect 5 0 4 1;
#X restore 91 631 pd wraparound~;
#X obj 551 383 table test_zample;
#X obj 29 21 openpanel;
#X obj 30 -8 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X msg 29 49 read -resize \$1 test_zample;
#X obj 28 76 soundfiler;
#X obj 240 85 inlet loop length;
#X obj 393 86 inlet loop offset;
#X obj 552 85 inlet loop pitch;
#X text 419 33 127 = table start;
#X text 420 60 0 = table end;
#X obj 91 682 dac~;
#X text 121 585 offset loop from start of table;
#X text 126 555 multiply phasor~ by loop length;
#X text 277 329 convert ms to frequency in Hz;
#X text 209 630 --this needs help!! without this subpatch
\, loop offset works \, but can go beyond bounds of table. with this
subpatch \, loop offset does not work \, so table bounds cannot be
reached.;
#X connect 5 0 6 0;
#X connect 6 0 19 0;
#X connect 7 0 8 0;
#X connect 8 0 10 0;
#X connect 9 0 6 1;
#X connect 9 0 33 1;
#X connect 9 1 7 0;
#X connect 10 0 11 0;
#X connect 11 0 5 0;
#X connect 14 0 17 0;
#X connect 14 0 30 0;
#X connect 17 0 28 0;
#X connect 18 0 9 0;
#X connect 19 0 33 0;
#X connect 20 0 32 0;
#X connect 22 0 19 1;
#X connect 23 0 25 0;
#X connect 23 0 11 1;
#X connect 24 0 27 0;
#X connect 26 0 23 0;
#X connect 27 0 26 0;
#X connect 28 0 18 0;
#X connect 28 1 18 1;
#X connect 29 0 22 0;
#X connect 29 1 22 1;
#X connect 32 0 21 0;
#X connect 32 0 29 0;
#X connect 33 0 44 0;
#X connect 33 0 44 1;
#X connect 35 0 37 0;
#X connect 36 0 35 0;
#X connect 37 0 38 0;
#X connect 38 0 18 0;
#X connect 38 0 22 0;
#X connect 39 0 17 0;
#X connect 40 0 32 0;
#X connect 41 0 27 0;


--
derek holzer ::: http://www.umatic.nl
---Oblique Strategy # 129:
Put in earplugs
#N canvas 334 83 885 778 10;
#X text 240 13 0 - 127;
#X text 574 6 0 - 255;
#X text 581 45 127 = normal;
#X text 580 31 255 = lowest;
#X text 584 61 0 = highest;
#X obj 91 516 phasor~;
#X obj 91 553 *~;
#X obj 91 302 / 44.1;
#X obj 91 329 expr 1 / ($f1 * 1 / 1000);
#X obj 61 247 t f f;
#X obj 91 422 sig~;
#X obj 91 450 *~;
#X text 142 302 time in ms (use 48 if sample rate is 48KHz);
#X obj 268 116 hsl 128 15 0 127 0 0 empty empty empty -2 -6 0 8 -262144
-1 -1 0 1;
#X text 241 39 127 = whole sample;
#X text 244 60 0 = smallest fraction;
#X obj 251 146 / 127;
#X obj 61 219 *;
#X obj 91 583 +~;
#X obj 452 124 hsl 128 15 0 255 0 0 empty empty empty -2 -6 

Re: [PD] mod~ ???

2007-05-07 Thread Roman Haefeli
hi derek

i attached a patch, that should do what you want. it is a modified
version of IOhannes approach, but it is still only a [wrap~] with
scaling functionality.

roman


On Mon, 2007-05-07 at 19:00 +0200, Derek Holzer wrote:
 I tried this already, and it's not appropriate in this case. The idea is 
 to change the start of the loop to any place in the sample. If the 
 length of the loop is longer than what's left of the sample in the 
 table, currently I get silence. If I use [wrap~] the way you describe 
 it, the loop I select always starts at the beginning of the table, 
 because [wrap~] returns the percentage of the table I have overshot.
 
 I need a solution where, if the table is 100 places long, I can loop 
 from 95 back around to 25 if need be. Which is what my theoretical 
 [mod~] would do. But I simply can't wrap my head around how to 
 construct it. Your [wrap~] solution seems to return a loop starting at 0 
 which is 30 units long instead.
 
 best,
 d.
 
 IOhannes m zmoelnig wrote:
  Derek Holzer wrote:
  end of the table)? [wrap~] doesn't do the trick, BTW.
  
  i am sure it does.
  try scaling the signal before sending it to [wrap~] and afterwards undo
  the scaling.
  
  
  [/~ 100]
  |
  [wrap~]
  |
  [*~ 100]
  
  mfa.sdr
  IOhannes
  
 
#N canvas 684 414 423 469 10;
#X obj 35 173 /~;
#X obj 36 223 *~;
#X obj 36 200 wrap~;
#X floatatom 115 79 5 0 0 0 - - -;
#X floatatom 235 77 5 0 0 0 - - -;
#X obj 36 139 -~;
#X obj 115 106 f;
#X obj 115 162 -;
#X obj 115 137 t b f;
#X obj 36 245 +~;
#X obj 35 39 sig~;
#X floatatom 35 16 5 0 0 0 - - -;
#X obj 44 329 loadbang;
#X obj 44 350 metro 100;
#X obj 37 376 snapshot~;
#X floatatom 37 400 5 0 0 0 - - -;
#X text 114 54 start point;
#X text 234 57 end point;
#X connect 0 0 2 0;
#X connect 1 0 9 0;
#X connect 2 0 1 0;
#X connect 3 0 6 0;
#X connect 4 0 7 0;
#X connect 5 0 0 0;
#X connect 6 0 8 0;
#X connect 6 0 5 1;
#X connect 6 0 9 1;
#X connect 7 0 0 1;
#X connect 7 0 1 1;
#X connect 8 0 7 0;
#X connect 8 1 7 1;
#X connect 9 0 14 0;
#X connect 10 0 5 0;
#X connect 11 0 10 0;
#X connect 12 0 13 0;
#X connect 13 0 14 0;
#X connect 14 0 15 0;
___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] mod~ ??? [almost there, but not quite!]

2007-05-07 Thread Derek Holzer

Hi Roman,

and thanks. I implemented it in my patch, but it doesn't seem to work 
right. The looping isn't seamless, in fact there's a hiccup at the 
point where the loop wraps around. In my previous version, I had another 
function to calculate the offset and start point, so what would work 
better for me is the the original concept, of an audio [mod~] which 
would only wrap around the end point of the table.


Try for yourself and see with the attached patch.

d.

Roman Haefeli wrote:

hi derek

i attached a patch, that should do what you want. it is a modified
version of IOhannes approach, but it is still only a [wrap~] with
scaling functionality.



--
derek holzer ::: http://www.umatic.nl
---Oblique Strategy # 61:
Don't be frightened of cliches
#N canvas 39 22 889 782 10;
#X text 240 13 0 - 127;
#X text 574 6 0 - 255;
#X text 581 45 127 = normal;
#X text 580 31 255 = lowest;
#X text 584 61 0 = highest;
#X obj 91 516 phasor~;
#X obj 91 553 *~;
#X obj 91 302 / 44.1;
#X obj 91 329 expr 1 / ($f1 * 1 / 1000);
#X obj 61 247 t f f;
#X obj 91 422 sig~;
#X obj 91 450 *~;
#X text 142 302 time in ms (use 48 if sample rate is 48KHz);
#X obj 268 116 hsl 128 15 0 127 0 0 empty empty empty -2 -6 0 8 -262144
-1 -1 7400 1;
#X text 241 39 127 = whole sample;
#X text 244 60 0 = smallest fraction;
#X obj 251 146 / 127;
#X obj 61 219 *;
#X obj 452 124 hsl 128 15 0 255 0 0 empty empty empty -2 -6 0 8 -262144
-1 -1 12000 1;
#X floatatom 458 193 5 0 0 0 - - -;
#X obj 385 234 *;
#X obj 581 229 / 127;
#X obj 622 134 hsl 128 15 0 255 0 0 empty empty empty -2 -6 0 8 -262144
-1 -1 6400 1;
#X floatatom 595 272 5 0 0 0 - - -;
#X obj 598 196 abs;
#X obj 599 172 - 255;
#X obj 250 175 t b f;
#X obj 400 188 t b f;
#X floatatom 324 163 5 0 0 0 - - -;
#X obj 434 153 / 255;
#X obj 551 383 table test_zample;
#X obj 29 21 openpanel;
#X obj 30 -8 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X msg 29 49 read -resize \$1 test_zample;
#X obj 28 76 soundfiler;
#X obj 240 85 inlet loop length;
#X obj 393 86 inlet loop offset;
#X obj 552 85 inlet loop pitch;
#X text 420 60 0 = table end;
#X obj 91 712 dac~;
#X text 126 555 multiply phasor~ by loop length;
#X text 277 329 convert ms to frequency in Hz;
#X text 103 245 number of samples in loop;
#X text 416 16 0 - 255;
#X text 419 32 255 = table start;
#X obj 91 688 tabread4~ test_zample;
#N canvas 582 348 512 453 wraparound~ 0;
#X obj 22 42 inlet~;
#X obj 22 296 outlet~;
#X obj 22 182 /~;
#X obj 22 232 *~;
#X obj 22 209 wrap~;
#X obj 22 98 -~;
#X obj 101 65 f;
#X obj 101 121 -;
#X obj 101 96 t b f;
#X obj 22 254 +~;
#X obj 100 41 inlet start point;
#X obj 233 41 inlet end point;
#X text 86 266 thanks to Roman Haefeli for helping with this part;
#X connect 0 0 5 0;
#X connect 2 0 4 0;
#X connect 3 0 9 0;
#X connect 4 0 3 0;
#X connect 5 0 2 0;
#X connect 6 0 8 0;
#X connect 6 0 5 1;
#X connect 6 0 9 1;
#X connect 7 0 2 1;
#X connect 7 0 3 1;
#X connect 8 0 7 0;
#X connect 8 1 7 1;
#X connect 9 0 1 0;
#X connect 10 0 6 0;
#X connect 11 0 7 0;
#X restore 91 605 pd wraparound~;
#X obj 184 466 mod;
#X obj 184 442 +;
#X obj 184 408 t b f;
#X text 221 606 ---Roman's [wrap~] implementation \, but the wraparound
point hiccups and I can't figure out why!;
#X connect 5 0 6 0;
#X connect 6 0 46 0;
#X connect 7 0 8 0;
#X connect 8 0 10 0;
#X connect 9 0 6 1;
#X connect 9 1 7 0;
#X connect 10 0 11 0;
#X connect 11 0 5 0;
#X connect 13 0 16 0;
#X connect 13 0 28 0;
#X connect 16 0 26 0;
#X connect 17 0 9 0;
#X connect 17 0 48 0;
#X connect 18 0 29 0;
#X connect 20 0 46 1;
#X connect 20 0 49 0;
#X connect 21 0 23 0;
#X connect 21 0 11 1;
#X connect 22 0 25 0;
#X connect 24 0 21 0;
#X connect 25 0 24 0;
#X connect 26 0 17 0;
#X connect 26 1 17 1;
#X connect 27 0 20 0;
#X connect 27 1 20 1;
#X connect 29 0 19 0;
#X connect 29 0 27 0;
#X connect 31 0 33 0;
#X connect 32 0 31 0;
#X connect 33 0 34 0;
#X connect 34 0 17 0;
#X connect 34 0 20 0;
#X connect 34 0 47 1;
#X connect 35 0 16 0;
#X connect 36 0 29 0;
#X connect 37 0 25 0;
#X connect 45 0 39 0;
#X connect 46 0 45 0;
#X connect 47 0 46 2;
#X connect 48 0 47 0;
#X connect 49 0 48 0;
#X connect 49 1 48 1;
___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] mod~ ???

2007-05-07 Thread Frank Barknecht
Hallo,
Derek Holzer hat gesagt: // Derek Holzer wrote:

 Test patch attached... see the [wraparound~] subpatch for the part which 
 doesn't work yet!

I added a [tabread4~ test_zample] and now it works. ;) 

Now seriously: The forgotten tabread probably wasn't the error you
were looking for. But here the patch now works as advertised: Setting
loop offset to nearly the end of the sample will indeed wrap around to
the start of the sample and play from there just fine.

Ciao
-- 
 Frank Barknecht _ __footils.org_ __goto10.org__


variable_loop_point-new.pd
Description: application/puredata
___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] mod~ ???

2007-05-07 Thread Derek Holzer
Hi Frank,

thanks for helping. This is the solution I tried at first. However, with 
this every loop starts at the beginning of the table, no matter where I 
set the loop offset. I'm assuming you actually tested it before posting, 
so are there different versions of [wrap~] perhaps?

d.

Frank Barknecht wrote:
 Hallo,
 Derek Holzer hat gesagt: // Derek Holzer wrote:
 
 Test patch attached... see the [wraparound~] subpatch for the part which 
 doesn't work yet!
 
 I added a [tabread4~ test_zample] and now it works. ;) 
 
 Now seriously: The forgotten tabread probably wasn't the error you
 were looking for. But here the patch now works as advertised: Setting
 loop offset to nearly the end of the sample will indeed wrap around to
 the start of the sample and play from there just fine.
 
 Ciao
 
 
 
 
 ___
 PD-list@iem.at mailing list
 UNSUBSCRIBE and account-management - 
 http://lists.puredata.info/listinfo/pd-list

-- 
derek holzer ::: http://www.umatic.nl
---Oblique Strategy # 190:
You can only make one dot at a time

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


Re: [PD] mod~ ???

2007-05-07 Thread Frank Barknecht
Hallo,
Frank Barknecht hat gesagt: // Frank Barknecht wrote:

 Hallo,
 Derek Holzer hat gesagt: // Derek Holzer wrote:
 
  Test patch attached... see the [wraparound~] subpatch for the part which 
  doesn't work yet!
 
 I added a [tabread4~ test_zample] and now it works. ;) 
 
 Now seriously: The forgotten tabread probably wasn't the error you
 were looking for. But here the patch now works as advertised: Setting
 loop offset to nearly the end of the sample will indeed wrap around to
 the start of the sample and play from there just fine.

Ah, sorry: I now read, that you don't want to start at the beginning
of the sample but at the offset-point again. Then some more math is
needed, I'll give it a shot a bit later.

Ciao
-- 
 Frank Barknecht _ __footils.org_ __goto10.org__

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


Re: [PD] mod~ ???

2007-05-07 Thread Derek Holzer
Yes, correct. If I have a table that's 100 places long, and I set the 
offset to 95 and the length to 25, I would like to get a loop that 
starts at 95 and when it reaches 100, continue playing at 0 up to 25. 
The next loop would then begin again at 95 and wrap around through 0 to 
25, und so weiter.

best,
d.

Frank Barknecht wrote:

 Ah, sorry: I now read, that you don't want to start at the beginning
 of the sample but at the offset-point again. Then some more math is
 needed, I'll give it a shot a bit later.

-- 
derek holzer ::: http://www.umatic.nl
---Oblique Strategy # 172:
Use `unqualified' people

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


Re: [PD] mod~ ???

2007-05-07 Thread Derek Holzer
Sorry! Should read:

Yes, correct. If I have a table that's 100 places long, and I set the 
offset to 95 and the length to 30, I would like to get a loop that 
starts at 95 and when it reaches 100, continue playing at 0 up to 25. 
The next loop would then begin again at 95 and wrap around through 0 to 
25, und so weiter.

apologies,
d.

Derek Holzer wrote:
 Yes, correct. If I have a table that's 100 places long, and I set the 
 offset to 95 and the length to 25, I would like to get a loop that 
 starts at 95 and when it reaches 100, continue playing at 0 up to 25. 
 The next loop would then begin again at 95 and wrap around through 0 to 
 25, und so weiter.
 
 best,
 d.
 
 Frank Barknecht wrote:
 
 Ah, sorry: I now read, that you don't want to start at the beginning
 of the sample but at the offset-point again. Then some more math is
 needed, I'll give it a shot a bit later.
 

-- 
derek holzer ::: http://www.umatic.nl
---Oblique Strategy # 175:
What are the sections sections of? Imagine a caterpillar moving

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


Re: [PD] mod~ ??? [almost there, but not quite!]

2007-05-07 Thread IOhannes m zmoelnig
Derek Holzer wrote:
 Hi Roman,
 
 and thanks. I implemented it in my patch, but it doesn't seem to work
 right. The looping isn't seamless, in fact there's a hiccup at the
 point where the loop wraps around. In my previous version, I had another
 function to calculate the offset and start point, so what would work
 better for me is the the original concept, of an audio [mod~] which
 would only wrap around the end point of the table.
 


like this?

mfg.asdr
IOhannes
#N canvas 509 102 698 619 10;
#X obj 338 88 table sample;
#X obj 47 95 soundfiler;
#X floatatom 47 112 0 0 0 0 - - -;
#X text 158 116 lenght in samples;
#X obj 46 387 dac~;
#X obj 46 357 tabread4~ sample;
#X msg 14 91 bang;
#N canvas 578 50 639 478 tabreader 0;
#X obj 142 451 outlet~;
#X obj 93 40 inlet looplength[samples];
#X obj 142 295 *~ 44100;
#X obj 141 130 t f b;
#X obj 166 148 samplerate~;
#X obj 141 163 /;
#X obj 141 98 t f f;
#X msg 141 183 1 \$1;
#X obj 141 259 phasor~ 1;
#X obj 141 200 /;
#X obj 143 369 /~ 44100;
#X obj 143 406 *~ 44100;
#X obj 143 387 wrap~;
#X obj 186 352 t f f;
#X obj 142 278 *~ 1;
#X obj 237 189 t b f;
#X obj 143 312 +~ 0;
#X obj 93 59 route filelength length offset speed bang;
#X msg 285 82 0;
#X obj 141 236 * 1;
#X connect 1 0 17 0;
#X connect 2 0 16 0;
#X connect 3 0 5 0;
#X connect 3 1 4 0;
#X connect 4 0 5 1;
#X connect 5 0 7 0;
#X connect 6 0 3 0;
#X connect 6 1 2 1;
#X connect 7 0 9 0;
#X connect 8 0 14 0;
#X connect 9 0 19 0;
#X connect 10 0 12 0;
#X connect 11 0 0 0;
#X connect 12 0 11 0;
#X connect 13 0 10 1;
#X connect 13 1 11 1;
#X connect 14 0 2 0;
#X connect 15 0 19 0;
#X connect 15 1 19 1;
#X connect 16 0 10 0;
#X connect 17 0 13 0;
#X connect 17 1 6 0;
#X connect 17 2 16 1;
#X connect 17 3 15 0;
#X connect 17 4 18 0;
#X connect 18 0 8 1;
#X connect 19 0 8 0;
#X restore 47 339 pd tabreader;
#X msg 152 327 speed \$1;
#X floatatom 156 303 5 0 0 0 - - -;
#X msg 258 236 offset \$1;
#X floatatom 343 263 5 0 0 0 - - -;
#X msg 263 191 length 62079;
#X msg 66 253 bang;
#X floatatom 343 295 0 0 0 0 - - -;
#X msg 47 78 read -resize \$1 sample;
#X msg 54 29 bang;
#X symbolatom 96 27 10 0 0 0 - - -;
#X msg 256 210 length 220500;
#X msg 393 277 bang;
#X obj 46 60 symbol zexy.wav;
#X obj 182 36 openpanel;
#X obj 181 9 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X text 100 254 restart loop;
#X obj 343 278 * 44100;
#X text 348 212 loop length;
#X text 328 239 loop offset;
#X msg 47 145 filelength \$1 \, offset 0 \, length \$1;
#X connect 1 0 2 0;
#X connect 2 0 27 0;
#X connect 5 0 4 0;
#X connect 5 0 4 1;
#X connect 6 0 2 0;
#X connect 7 0 5 0;
#X connect 8 0 7 0;
#X connect 9 0 8 0;
#X connect 10 0 7 0;
#X connect 11 0 24 0;
#X connect 12 0 7 0;
#X connect 13 0 7 0;
#X connect 14 0 10 0;
#X connect 15 0 1 0;
#X connect 16 0 20 0;
#X connect 17 0 20 0;
#X connect 18 0 7 0;
#X connect 19 0 14 0;
#X connect 20 0 15 0;
#X connect 21 0 20 0;
#X connect 22 0 21 0;
#X connect 24 0 14 0;
#X connect 27 0 7 0;
___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] mod~ ??? [almost there, but not quite!]

2007-05-07 Thread IOhannes m zmoelnig
IOhannes m zmoelnig wrote:
 Derek Holzer wrote:
 Hi Roman,

 and thanks. I implemented it in my patch, but it doesn't seem to work
 right. The looping isn't seamless, in fact there's a hiccup at the
 point where the loop wraps around. In my previous version, I had another
 function to calculate the offset and start point, so what would work
 better for me is the the original concept, of an audio [mod~] which
 would only wrap around the end point of the table.

 
 
 like this?
 

or to put it in your own words: try and find the difference...


mfga.sdr
IOhannes
#N canvas 334 83 885 778 10;
#X text 240 13 0 - 127;
#X text 574 6 0 - 255;
#X text 581 45 127 = normal;
#X text 580 31 255 = lowest;
#X text 584 61 0 = highest;
#X obj 91 516 phasor~;
#X obj 91 553 *~;
#X obj 91 302 / 44.1;
#X obj 91 329 expr 1 / ($f1 * 1 / 1000);
#X obj 61 247 t f f;
#X obj 91 422 sig~;
#X obj 91 450 *~;
#X text 142 302 time in ms (use 48 if sample rate is 48KHz);
#X obj 268 116 hsl 128 15 0 127 0 0 empty empty empty -2 -6 0 8 -262144
-1 -1 0 1;
#X text 241 39 127 = whole sample;
#X text 244 60 0 = smallest fraction;
#X obj 251 146 / 127;
#X obj 61 219 *;
#X obj 91 583 +~;
#X obj 452 124 hsl 128 15 0 255 0 0 empty empty empty -2 -6 0 8 -262144
-1 -1 0 1;
#X floatatom 458 193 5 0 0 0 - - -;
#X obj 385 234 *;
#X obj 581 229 / 127;
#X obj 622 134 hsl 128 15 0 255 0 0 empty empty empty -2 -6 0 8 -262144
-1 -1 0 1;
#X floatatom 595 272 5 0 0 0 - - -;
#X obj 598 196 abs;
#X obj 599 172 - 255;
#X obj 250 175 t b f;
#X obj 400 188 t b f;
#X floatatom 324 163 5 0 0 0 - - -;
#X obj 434 153 / 255;
#N canvas 0 22 406 310 wraparound~ 0;
#X obj 87 29 inlet~;
#X obj 87 149 outlet~;
#X obj 87 83 wrap~;
#X obj 87 55 /~;
#X obj 87 113 *~;
#X obj 144 28 inlet total num of samples in table;
#X connect 0 0 3 0;
#X connect 2 0 4 0;
#X connect 3 0 2 0;
#X connect 4 0 1 0;
#X connect 5 0 3 1;
#X connect 5 0 4 1;
#X restore 91 631 pd wraparound~;
#X obj 551 383 table test_zample;
#X obj 29 21 openpanel;
#X obj 30 -8 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X msg 29 49 read -resize \$1 test_zample;
#X obj 28 76 soundfiler;
#X obj 240 85 inlet loop length;
#X obj 393 86 inlet loop offset;
#X obj 552 85 inlet loop pitch;
#X text 420 60 0 = table end;
#X obj 91 712 dac~;
#X text 121 585 offset loop from start of table;
#X text 126 555 multiply phasor~ by loop length;
#X text 277 329 convert ms to frequency in Hz;
#X text 209 630 --this needs help!! without this subpatch
\, loop offset works \, but can go beyond bounds of table. with this
subpatch \, loop offset does not work \, so table bounds cannot be
reached.;
#X text 103 245 number of samples in loop;
#X text 416 16 0 - 255;
#X text 419 32 255 = table start;
#X obj 91 688 tabread4~ test_zample;
#X connect 5 0 6 0;
#X connect 6 0 18 0;
#X connect 7 0 8 0;
#X connect 8 0 10 0;
#X connect 9 0 6 1;
#X connect 9 1 7 0;
#X connect 10 0 11 0;
#X connect 11 0 5 0;
#X connect 13 0 16 0;
#X connect 13 0 29 0;
#X connect 16 0 27 0;
#X connect 17 0 9 0;
#X connect 18 0 31 0;
#X connect 19 0 30 0;
#X connect 21 0 18 1;
#X connect 22 0 24 0;
#X connect 22 0 11 1;
#X connect 23 0 26 0;
#X connect 25 0 22 0;
#X connect 26 0 25 0;
#X connect 27 0 17 0;
#X connect 27 1 17 1;
#X connect 28 0 21 0;
#X connect 28 1 21 1;
#X connect 30 0 20 0;
#X connect 30 0 28 0;
#X connect 31 0 49 0;
#X connect 33 0 35 0;
#X connect 34 0 33 0;
#X connect 35 0 36 0;
#X connect 36 0 17 0;
#X connect 36 0 21 0;
#X connect 36 0 31 1;
#X connect 37 0 16 0;
#X connect 38 0 30 0;
#X connect 39 0 26 0;
#X connect 49 0 41 0;
___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] mod~ ???

2007-05-07 Thread Luigi Rensinghoff
Hi there,

I am not so terribly into that right now..

Just an idea.

What if you just shift the table and write it to a second one...

silly probably...

just an idea

Am 07.05.2007 um 20:25 schrieb Derek Holzer:

 Sorry! Should read:

 Yes, correct. If I have a table that's 100 places long, and I set the
 offset to 95 and the length to 30, I would like to get a loop that
 starts at 95 and when it reaches 100, continue playing at 0 up to 25.
 The next loop would then begin again at 95 and wrap around through  
 0 to
 25, und so weiter.

 apologies,
 d.

 Derek Holzer wrote:
 Yes, correct. If I have a table that's 100 places long, and I set the
 offset to 95 and the length to 25, I would like to get a loop that
 starts at 95 and when it reaches 100, continue playing at 0 up to 25.
 The next loop would then begin again at 95 and wrap around through  
 0 to
 25, und so weiter.

 best,
 d.

 Frank Barknecht wrote:

 Ah, sorry: I now read, that you don't want to start at the beginning
 of the sample but at the offset-point again. Then some more math is
 needed, I'll give it a shot a bit later.


 -- 
 derek holzer ::: http://www.umatic.nl
 ---Oblique Strategy # 175:
 What are the sections sections of? Imagine a caterpillar moving

 ___
 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


Re: [PD] mod~ ???

2007-05-07 Thread Claude Heiland-Allen

Derek Holzer wrote:
Yes, correct. If I have a table that's 100 places long, and I set the 
offset to 95 and the length to 30, I would like to get a loop that 
starts at 95 and when it reaches 100, continue playing at 0 up to 25. 
The next loop would then begin again at 95 and wrap around through 0 to 
25, und so weiter.


Like this?

Note: 0 - [wrap~] - 1, which is weird (and undesirable in my eyes).


Claude
--
http://claudiusmaximus.goto10.org
#N canvas 0 0 387 615 10;
#X obj 45 170 phasor~;
#X obj 45 283 wrap~;
#X obj 46 203 *~ 30;
#X obj 45 230 +~ 95;
#X obj 45 257 /~ 100;
#X obj 45 312 *~ 100;
#X floatatom 163 235 5 0 0 1 table-length - -;
#X floatatom 164 201 5 0 0 1 offset - -;
#X floatatom 165 174 5 0 0 1 loop-length - -;
#X obj 45 396 tabread4~ \$0-table 100;
#X floatatom 167 145 5 0 0 1 frequency - -;
#X obj 45 425 tabsend~ \$0-scope;
#N canvas 0 0 450 300 (subpatch) 0;
#X array \$0-scope 64 float 0;
#X coords 0 1 63 -1 64 64 1;
#X restore 99 467 graph;
#N canvas 0 0 450 300 (subpatch) 0;
#X array \$0-table 100 float 0;
#X coords 0 1 99 -1 100 64 1;
#X restore 99 327 graph;
#X obj 46 66 samplerate~;
#X msg 103 89 0;
#X obj 47 42 t b b;
#X obj 46 22 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 45 90 / 64;
#X msg 166 123 set \$1;
#X connect 0 0 2 0;
#X connect 1 0 5 0;
#X connect 2 0 3 0;
#X connect 3 0 4 0;
#X connect 4 0 1 0;
#X connect 5 0 9 0;
#X connect 6 0 4 1;
#X connect 6 0 5 1;
#X connect 7 0 3 1;
#X connect 8 0 2 1;
#X connect 9 0 11 0;
#X connect 10 0 0 0;
#X connect 14 0 18 0;
#X connect 15 0 0 1;
#X connect 16 0 14 0;
#X connect 16 1 15 0;
#X connect 17 0 16 0;
#X connect 18 0 0 0;
#X connect 18 0 19 0;
#X connect 19 0 10 0;
___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] mod~ ??? (FIXED)

2007-05-07 Thread Thomas Ouellet Fredericks
I fixed it so it works. Solution is attached. If you are interested in
samplers, loading multiple samples, having smooth loop points, sending
to multiple targets, etc, you should also check out the sample
section of the pdmtl abstractions:

http://wiki.dataflow.ws/PdMtlAbstractions/Contents#head-sample

Tom

CORRECTED variable_loop_point-new.pd

#N canvas 315 27 897 843 10;
#X text 240 13 0 - 127;
#X text 574 6 0 - 255;
#X text 581 45 127 = normal;
#X text 580 31 255 = lowest;
#X text 584 61 0 = highest;
#X obj 92 535 phasor~;
#X obj 92 348 expr 1 / ($f1 * 1 / 1000);
#X obj 92 441 sig~;
#X text 115 241 number of samples in glitch;
#X obj 268 116 hsl 128 15 0 127 0 0 empty empty empty -2 -6 0 8 -262144
-1 -1 1800 1;
#X text 241 39 127 = whole sample;
#X text 244 60 0 = smallest fraction;
#X obj 251 146 / 127;
#X obj 78 225 *;
#X obj 452 124 hsl 128 15 0 255 0 0 empty empty empty -2 -6 0 8 -262144
-1 -1 8500 1;
#X floatatom 458 193 5 0 0 0 - - -;
#X obj 581 229 / 127;
#X obj 622 134 hsl 128 15 0 255 0 0 empty empty empty -2 -6 0 8 -262144
-1 -1 5700 1;
#X floatatom 595 272 5 0 0 0 - - -;
#X obj 598 196 abs;
#X obj 599 172 - 255;
#X obj 250 175 t b f;
#X floatatom 324 163 5 0 0 0 - - -;
#X text 416 14 0 - 127;
#X obj 434 153 / 255;
#X obj 551 383 table test_zample;
#X obj 29 21 openpanel;
#X obj 30 -8 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X msg 29 49 read -resize \$1 test_zample;
#X obj 28 76 soundfiler;
#X obj 240 85 inlet loop length;
#X obj 393 86 inlet loop offset;
#X obj 552 85 inlet loop pitch;
#X text 419 33 127 = table start;
#X text 420 60 0 = table end;
#X text 159 607 offset loop from start of table;
#X text 164 577 multiply phasor~ by loop length;
#X text 278 348 convert ms to frequency in Hz;
#N canvas 0 22 835 552 wraparound~ 0;
#X obj 87 29 inlet~;
#X obj 87 260 outlet~;
#X obj 85 162 wrap~;
#X obj 373 258 outlet~;
#X obj 86 126 +~ 0;
#X obj 689 49 inlet offset;
#X obj 87 224 *~ 1;
#X obj 417 31 inlet total num of samples in FILE;
#X obj 166 30 inlet loop_size;
#X obj 86 90 *~ 1;
#X connect 0 0 9 0;
#X connect 2 0 3 0;
#X connect 2 0 6 0;
#X connect 4 0 2 0;
#X connect 5 0 4 1;
#X connect 6 0 1 0;
#X connect 7 0 6 1;
#X connect 8 0 9 1;
#X connect 9 0 4 0;
#X restore 92 669 pd wraparound~;
#X msg 77 -5 symbol ~/loops;
#X obj 93 705 tabread4~ test_zample;
#X obj 36 264 t f f b;
#X obj 129 287 samplerate~;
#X obj 92 321 /;
#X text 213 289 YOU WILL AUTOMATICALLY GET THE PROPER SAMPLERATE WITH
THIS OBJECT.;
#X obj 303 716 snapshot~;
#X obj 307 660 loadbang;
#X obj 312 686 metro 50;
#X obj 307 738 hsl 128 15 0 1 0 0 empty empty empty -2 -6 0 8 -262144
-1 -1 10277 1;
#X floatatom 75 128 5 0 0 0 - - -;
#X obj 270 660 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 93 470 *~ 1;
#X obj 252 473 snapshot~;
#X obj 256 417 loadbang;
#X obj 261 443 metro 50;
#X obj 327 497 hsl 128 15 0 1 0 0 empty empty empty -2 -6 0 8 -262144
-1 -1 12391 1;
#X obj 329 413 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 80 761 dac~;
#X obj 138 313 / 1000;
#X text 443 737 - This is the part of the file being read.;
#X connect 5 0 52 0;
#X connect 5 0 38 0;
#X connect 6 0 7 0;
#X connect 7 0 51 0;
#X connect 9 0 12 0;
#X connect 9 0 22 0;
#X connect 12 0 21 0;
#X connect 13 0 41 0;
#X connect 14 0 24 0;
#X connect 15 0 38 3;
#X connect 16 0 18 0;
#X connect 16 0 51 1;
#X connect 17 0 20 0;
#X connect 19 0 16 0;
#X connect 20 0 19 0;
#X connect 21 0 13 0;
#X connect 21 1 13 1;
#X connect 21 1 38 1;
#X connect 24 0 15 0;
#X connect 26 0 28 0;
#X connect 27 0 26 0;
#X connect 28 0 29 0;
#X connect 29 0 13 0;
#X connect 29 0 49 0;
#X connect 29 0 38 2;
#X connect 30 0 12 0;
#X connect 31 0 24 0;
#X connect 32 0 20 0;
#X connect 38 0 40 0;
#X connect 38 1 45 0;
#X connect 39 0 26 0;
#X connect 40 0 57 0;
#X connect 40 0 57 1;
#X connect 41 1 43 0;
#X connect 41 2 42 0;
#X connect 42 0 58 0;
#X connect 43 0 6 0;
#X connect 45 0 48 0;
#X connect 46 0 47 0;
#X connect 47 0 45 0;
#X connect 50 0 47 0;
#X connect 51 0 5 0;
#X connect 52 0 55 0;
#X connect 53 0 54 0;
#X connect 54 0 52 0;
#X connect 56 0 54 0;
#X connect 58 0 43 1;

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


Re: [PD] mod~ ???

2007-05-07 Thread Steffen

On 07/05/2007, at 20.51, Claude Heiland-Allen wrote:
 Note: 0 - [wrap~] - 1, which is weird (and undesirable in my eyes).

Yeah. I still can't translate wrap~ gives the difference between the  
input and the largest integer not exceeding it to that. The quote is  
from the help file.




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