Dear all,
is there a way of getting the actual sample number when playing a short sample (0.1-.1.0 s) from an array, in order to trigger a successive event?
Gerda
Ok I think I told you, in a wrong what I would like to achieve.
I want to play a soundfile from lets say array index 1:1000 but send a bang, when index 750 is played.(I would like to fade out the sample using a predefined fade having length 250).
Padawan12 was so kind to send me an exemple patch, using audio rate comparision.
[phasor~ 0.1] | | [*~1000] | | [>~750] But I still dont get how to do this with normal audiofile where amplitude is not sawtooth like.
Gerda
This Georg Holzmann wrote:
Hallo!
is there a way of getting the actual sample number when playing a short sample (0.1-.1.0 s) from an array, in order to trigger a successive event?
well, that depends on how you play that sample ... ;)
LG Georg
Hallo!
[phasor~ 0.1] | | [*~1000] | | [>~750] But I still dont get how to do this with normal audiofile where amplitude is not sawtooth like.
I guess the phasor is meant hear as index for e.g. tabread4 ...
So you could of course also do it with line:
[line~] (from 1 to 1000) | [>~ 750]
LG Georg
Hallo, Gerda Strobl hat gesagt: // Gerda Strobl wrote:
Padawan12 was so kind to send me an exemple patch, using audio rate comparision.
[phasor~ 0.1] | | [*~1000] | | [>~750] But I still dont get how to do this with normal audiofile where amplitude is not sawtooth like.
As Georg mentioned it depends on how you play the file. If you load it into a table with soundfiler and play it with [tabread4~] from there, you already have the index where to stop from the signal feeding the [tabread4~].
If you're playing with [readsf~] it's a bit harder. But you know when you start the file because you did bang [readsf~] at that time. So what I would do is to also bang a [vline~] at that point and let it go for a long time at the speed of your sample rate. See attached patch for the principle in action.
Frank Barknecht _ ______footils.org_ __goto10.org__
Hallo Frank,
wow, that is a cool example patch! Thank you so much for taking the time do such things!!!!!!!!!!
lg Gerda
Frank Barknecht wrote:
As Georg mentioned it depends on how you play the file. If you load it into a table with soundfiler and play it with [tabread4~] from there, you already have the index where to stop from the signal feeding the [tabread4~].
If you're playing with [readsf~] it's a bit harder. But you know when you start the file because you did bang [readsf~] at that time. So what I would do is to also bang a [vline~] at that point and let it go for a long time at the speed of your sample rate. See attached patch for the principle in action.
Ciao
On Fri, 2006-08-18 at 21:12 +0200, Frank Barknecht wrote:
If you're playing with [readsf~] it's a bit harder. But you know when you start the file because you did bang [readsf~] at that time. So what I would do is to also bang a [vline~] at that point and let it go for a long time at the speed of your sample rate. See attached patch for the principle in action.
why doing it with expensive [vline~]? wouldn't be a [timer] as precise as [vline~]?
without having seen your patch, i'd propose something like:
[timer] | [* 44.1] <- or your SR/1000 | [int]
isn't the [timer]-version even more precise, when the [readsf~]is triggered by a [metro] or a [delay]? i mean, [vline~] has some kind of time-stamp handling, which [readsf~] hasn't afaik. so the result of [vline~]-measurement might be wrong by max. 64 samples, wouldn't it? tell me, if i am producing rubbish-theories.......
roman
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
Hallo, Roman Haefeli hat gesagt: // Roman Haefeli wrote:
why doing it with expensive [vline~]? wouldn't be a [timer] as precise as [vline~]?
without having seen your patch, i'd propose something like:
[timer] | [* 44.1] <- or your SR/1000 | [int]
isn't the [timer]-version even more precise, when the [readsf~]is triggered by a [metro] or a [delay]? i mean, [vline~] has some kind of time-stamp handling, which [readsf~] hasn't afaik. so the result of [vline~]-measurement might be wrong by max. 64 samples, wouldn't it? tell me, if i am producing rubbish-theories.......
I don't have any good reasons to defend my more complicated solution against your simpler suggestion of using [timer]. ;)
But [timer] would be as precise or wrong as [vline~] as both are getting their time from the Pd clock with possibly in-block starting points, while readsf~ will start quantized to the block size, if I'm right.
Frank Barknecht _ ______footils.org_ __goto10.org__
On Sat, 2006-08-19 at 20:27 +0200, Frank Barknecht wrote:
But [timer] would be as precise or wrong as [vline~] as both are getting their time from the Pd clock with possibly in-block starting points, while readsf~ will start quantized to the block size, if I'm right.
hm... in such a case it would be usefull to have kind of a converter, that converts in-block-messages to on-block-messages. do you know a way how to do it? or would that require a new object?
roman
___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
Hallo, Roman Haefeli hat gesagt: // Roman Haefeli wrote:
On Sat, 2006-08-19 at 20:27 +0200, Frank Barknecht wrote:
But [timer] would be as precise or wrong as [vline~] as both are getting their time from the Pd clock with possibly in-block starting points, while readsf~ will start quantized to the block size, if I'm right.
hm... in such a case it would be usefull to have kind of a converter, that converts in-block-messages to on-block-messages. do you know a way how to do it? or would that require a new object?
I guess you could use [bang~] routed through a closed [spigot] and open that spigot with the message sent to the [readsf~], then close it again after you let the bang from [bang~] pass with a crossed [t b b].
Frank Barknecht _ ______footils.org_ __goto10.org__
Hallo!
I guess you could use [bang~] routed through a closed [spigot] and open that spigot with the message sent to the [readsf~], then close it again after you let the bang from [bang~] pass with a crossed [t b b].
You could also use the iem_t3_lib if you want to be really precise ...
LG Georg