Greetings All
I'm trying to count how may times an audio file is looped then cause it to stop after say 6 loops.
to where the playing wav file is located 2) create a bang into "cup" object from the "select" object, this will count the number of loops. 3) Use another "select" object to stop when it reaches 6
The problem I'm having is trying to compare the sample size to where the playing wav file is currently located. I can get the sample size using the "wavinfo" object but how do I get the current location of the playing wav file. (I tried using the "metro 50" object with the "snapshot~" object) but the numbers don't seem be matching up
Is there another way I should be doing this
Thanks
On Fri, Oct 5, 2012 at 4:25 PM, Rick T ratulloch@gmail.com wrote:
Greetings All
I'm trying to count how may times an audio file is looped then cause it to stop after say 6 loops.
- I plan on using the "select" object to compare the sample size (22050) to
where the playing wav file is located 2) create a bang into "cup" object from the "select" object, this will count the number of loops. 3) Use another "select" object to stop when it reaches 6
The problem I'm having is trying to compare the sample size to where the playing wav file is currently located. I can get the sample size using the "wavinfo" object but how do I get the current location of the playing wav file. (I tried using the "metro 50" object with the "snapshot~" object) but the numbers don't seem be matching up
Is there another way I should be doing this
Thanks
Hi Rick
I think you should use [vline~] to feed [tabread4~]. As long as you get the number of samples up front with wavinfo, like you mentioned, you can just schedule those 6 loops to play with vline~ (no need to count and stop the loop), and you always know what sample is playing, because it's the value of the vline~ output.
You may also want another vline~ to fade-in and fade-out.
Chuck
Yes I am using tabread4~
I looked up vline~ in the help but it seems to be missing some info on the second and third inlets. Is there some more information about this object. I'm using PD .42.5 extended on ubuntu 10.04 64bit
I tried doing this but I get an error "error: can't connect signal outlet to control inlet" phasor~ | *~ | vline~ (error: can't connect signal outlet to control inlet) | tabread4~
Thanks
On Fri, Oct 5, 2012 at 11:42 AM, Charles Henry czhenry@gmail.com wrote:
On Fri, Oct 5, 2012 at 4:25 PM, Rick T ratulloch@gmail.com wrote:
Greetings All
I'm trying to count how may times an audio file is looped then cause it
to
stop after say 6 loops.
- I plan on using the "select" object to compare the sample size
(22050) to
where the playing wav file is located 2) create a bang into "cup" object from the "select" object, this will
count
the number of loops. 3) Use another "select" object to stop when it reaches 6
The problem I'm having is trying to compare the sample size to where the playing wav file is currently located. I can get the sample size using the "wavinfo" object but how do I get the current location of the playing wav file. (I tried using the "metro 50" object with the "snapshot~" object) but the numbers don't seem be matching up
Is there another way I should be doing this
Thanks
Hi Rick
I think you should use [vline~] to feed [tabread4~]. As long as you get the number of samples up front with wavinfo, like you mentioned, you can just schedule those 6 loops to play with vline~ (no need to count and stop the loop), and you always know what sample is playing, because it's the value of the vline~ output.
You may also want another vline~ to fade-in and fade-out.
Chuck
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
On Fri, Oct 5, 2012 at 5:24 PM, Rick T ratulloch@gmail.com wrote:
Yes I am using tabread4~
I looked up vline~ in the help but it seems to be missing some info on the second and third inlets. Is there some more information about this object. I'm using PD .42.5 extended on ubuntu 10.04 64bit
To be honest, I'm not very good at using vline~ myself (the offset value always confuses me). I'm still at work for a little while longer, so no pd here.
Basically, what it will look like is you feed [vline~] a series of messages that stands for each reset to 0 and ramp. Comma-separated messages inside a single message will be treated like separate messages.
So, it may make a pretty long message, but the idea I was getting at here is like the difference between coding a while() loop and a for() loop. You can avoid the tricky logic and figure out all the timing up front, then just let it run.
Chuck
I tried doing this but I get an error "error: can't connect signal outlet to control inlet" phasor~ | *~ | vline~ (error: can't connect signal outlet to control inlet) | tabread4~
Thanks
On Fri, Oct 5, 2012 at 11:42 AM, Charles Henry czhenry@gmail.com wrote:
On Fri, Oct 5, 2012 at 4:25 PM, Rick T ratulloch@gmail.com wrote:
Greetings All
I'm trying to count how may times an audio file is looped then cause it to stop after say 6 loops.
- I plan on using the "select" object to compare the sample size
(22050) to where the playing wav file is located 2) create a bang into "cup" object from the "select" object, this will count the number of loops. 3) Use another "select" object to stop when it reaches 6
The problem I'm having is trying to compare the sample size to where the playing wav file is currently located. I can get the sample size using the "wavinfo" object but how do I get the current location of the playing wav file. (I tried using the "metro 50" object with the "snapshot~" object) but the numbers don't seem be matching up
Is there another way I should be doing this
Thanks
Hi Rick
I think you should use [vline~] to feed [tabread4~]. As long as you get the number of samples up front with wavinfo, like you mentioned, you can just schedule those 6 loops to play with vline~ (no need to count and stop the loop), and you always know what sample is playing, because it's the value of the vline~ output.
You may also want another vline~ to fade-in and fade-out.
Chuck
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
You only need vline or phasor, not both. The handling is a bit different though. Vline works via messages and creates arbitrary ramps. E.g. From 0 to 44100 in 1000 ms. Phasor just ramps from 0 to 1 in a time you supply as a frequency. You then multiply it's output and feed the tabread On Oct 6, 2012 12:26 AM, "Rick T" ratulloch@gmail.com wrote:
Yes I am using tabread4~
I looked up vline~ in the help but it seems to be missing some info on the second and third inlets. Is there some more information about this object. I'm using PD .42.5 extended on ubuntu 10.04 64bit
I tried doing this but I get an error "error: can't connect signal outlet to control inlet" phasor~ | *~ | vline~ (error: can't connect signal outlet to control inlet) | tabread4~
Thanks
On Fri, Oct 5, 2012 at 11:42 AM, Charles Henry czhenry@gmail.com wrote:
On Fri, Oct 5, 2012 at 4:25 PM, Rick T ratulloch@gmail.com wrote:
Greetings All
I'm trying to count how may times an audio file is looped then cause it
to
stop after say 6 loops.
- I plan on using the "select" object to compare the sample size
(22050) to
where the playing wav file is located 2) create a bang into "cup" object from the "select" object, this will
count
the number of loops. 3) Use another "select" object to stop when it reaches 6
The problem I'm having is trying to compare the sample size to where the playing wav file is currently located. I can get the sample size using the "wavinfo" object but how do I get
the
current location of the playing wav file. (I tried using the "metro 50" object with the "snapshot~" object) but
the
numbers don't seem be matching up
Is there another way I should be doing this
Thanks
Hi Rick
I think you should use [vline~] to feed [tabread4~]. As long as you get the number of samples up front with wavinfo, like you mentioned, you can just schedule those 6 loops to play with vline~ (no need to count and stop the loop), and you always know what sample is playing, because it's the value of the vline~ output.
You may also want another vline~ to fade-in and fade-out.
Chuck
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
So are you say these wont help me with my original question? of trying to count how may times an audio file is looped then cause it to stop after say 6 loops.
On Fri, Oct 5, 2012 at 1:01 PM, Simon Iten itensimon@gmail.com wrote:
You only need vline or phasor, not both. The handling is a bit different though. Vline works via messages and creates arbitrary ramps. E.g. From 0 to 44100 in 1000 ms. Phasor just ramps from 0 to 1 in a time you supply as a frequency. You then multiply it's output and feed the tabread On Oct 6, 2012 12:26 AM, "Rick T" ratulloch@gmail.com wrote:
Yes I am using tabread4~
I looked up vline~ in the help but it seems to be missing some info on the second and third inlets. Is there some more information about this object. I'm using PD .42.5 extended on ubuntu 10.04 64bit
I tried doing this but I get an error "error: can't connect signal outlet to control inlet" phasor~ | *~ | vline~ (error: can't connect signal outlet to control inlet) | tabread4~
Thanks
On Fri, Oct 5, 2012 at 11:42 AM, Charles Henry czhenry@gmail.com wrote:
On Fri, Oct 5, 2012 at 4:25 PM, Rick T ratulloch@gmail.com wrote:
Greetings All
I'm trying to count how may times an audio file is looped then cause
it to
stop after say 6 loops.
- I plan on using the "select" object to compare the sample size
(22050) to
where the playing wav file is located 2) create a bang into "cup" object from the "select" object, this will
count
the number of loops. 3) Use another "select" object to stop when it reaches 6
The problem I'm having is trying to compare the sample size to where
the
playing wav file is currently located. I can get the sample size using the "wavinfo" object but how do I get
the
current location of the playing wav file. (I tried using the "metro 50" object with the "snapshot~" object) but
the
numbers don't seem be matching up
Is there another way I should be doing this
Thanks
Hi Rick
I think you should use [vline~] to feed [tabread4~]. As long as you get the number of samples up front with wavinfo, like you mentioned, you can just schedule those 6 loops to play with vline~ (no need to count and stop the loop), and you always know what sample is playing, because it's the value of the vline~ output.
You may also want another vline~ to fade-in and fade-out.
Chuck
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
On 10/05/2012 11:25 PM, Rick T wrote:
Is there another way I should be doing this
count the bangs that [tabplay~] will output via it's 2nd inlet.
alternatively, trust Pd's timing. if you tell [line~] to create a ramp from here to there in 1077ms, then it will take exactly 1077ms, and you don't need to measure the value of the ramp inbetween. (esp if you downsample the signal and thus loose considerable time precision).
[1423( | [t f f] | +-------+ | | [0, 1 $1( | | | [line~] [delay] | | ... (will bang when line has reached '1')
but suggest to use [tabplay]s 2nd outlet.
fgmadsr IOannes
On 06/10/12 06:24, IOhannes m zmölnig wrote:
On 10/05/2012 11:25 PM, Rick T wrote:
Is there another way I should be doing this
trust Pd's timing.
that's the foundation.
count the bangs that [tabplay~] will output via it's 2nd inlet.
For long files, yes.
(Is [tabplay] clock-aware? it perhaps could be?)
For microloops, I'd prefer [wrap~]:
[6( | [0, $1 123( plays $1 times in 123ms total | [vline~] | [wrap~] desired length in samples | / [*~ ] | desired offset into array in samples | / [+~ ] | [tabread4~ array]
On 10/06/2012 10:37 AM, Claude Heiland-Allen wrote:
count the bangs that [tabplay~] will output via it's 2nd inlet.
For long files, yes.
probably for "intermediate-sized" files. with "long" files (those that do not easily fit into RAM; or when have a number of "longish" files, the total of which doesn't fit into RAM), you are probably better off using [readsf~]'s last outlet, which gives you a done bang as well, and count that.
For microloops, I'd prefer [wrap~]:
[...]
which is nice as well, and tackles the real problem ("i want to loop a sample N times") rather than a possible implementation ("how can i count the number of loops (so i know when to stop)".
(Is [tabplay] clock-aware? it perhaps could be?)
not afaik. however, in many cases you don't need (sub)sample-accurate timing and evaluation at block-boundaries is sufficient.
gmd IOhannes
Thanks I've changed it to use Vline~
On Sat, Oct 6, 2012 at 12:54 AM, IOhannes m zmölnig zmoelnig@iem.at wrote:
On 10/06/2012 10:37 AM, Claude Heiland-Allen wrote:
count the bangs that [tabplay~] will output via it's 2nd inlet.
For long files, yes.
probably for "intermediate-sized" files. with "long" files (those that do not easily fit into RAM; or when have a number of "longish" files, the total of which doesn't fit into RAM), you are probably better off using [readsf~]'s last outlet, which gives you a done bang as well, and count that.
For microloops, I'd prefer [wrap~]:
[...]
which is nice as well, and tackles the real problem ("i want to loop a sample N times") rather than a possible implementation ("how can i count the number of loops (so i know when to stop)".
(Is [tabplay] clock-aware? it perhaps could be?)
not afaik. however, in many cases you don't need (sub)sample-accurate timing and evaluation at block-boundaries is sufficient.
gmd IOhannes
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list