----- "IOhannes m zmoelnig" zmoelnig@iem.at a écrit :
On 2010-05-26 13:15, patko wrote:
error: soundfiler_read: truncated to 2000 elements
2000 is the maxsize argument
so what's the problem?
I might add several other algorithms to avoid this, like using a temporary table, but just truncating directly from soundfiler looks very simple, gain of patching time, maybe I shouldn't pay so much attention to error messages...?
I thought that using -skip and -nframes would just extract the part I want, without complaining. But even with reading the sources, I could not really get how to use this option, or if it works.
In other words, is there a way to do it (extract a sample from a soundfile) without getting error messages?
the error merely tells you that the provided maxsize was less than the soundfile length so the sample had to be truncated.
this is probably an error in most of the times, but not in your case.
fgamsdr IOhannes
On 2010-05-26 15:19, patko wrote:
----- "IOhannes m zmoelnig" zmoelnig@iem.at a écrit :
On 2010-05-26 13:15, patko wrote:
error: soundfiler_read: truncated to 2000 elements
2000 is the maxsize argument
so what's the problem?
In other words, is there a way to do it (extract a sample from a soundfile) without getting error messages?
so your only problem is that Pd prints an error message? even though you know that it is not an error? well....
anyhow, you don't need to specify the maxsize; if your table is small enough (aka: too small) Pd will silently drop the other samples.
i do: [table bar 44100]
[read -skip 88200 foo.wav bar( | [soundfiler]
and it will store an excerpt of foo.wav between 00:02 and 00:03
fgmasdr IOhannes
On Wed, 26 May 2010, patko wrote:
In other words, is there a way to do it (extract a sample from a soundfile) without getting error messages?
I don't know, perhaps :
[#in grid foo.wav, headerless 64, type int16, seek_byte 23456, endian little]
provided you know the byte-position of it. This will read 64 integers of 16 bits each, at every bang. You can then use [#to_list] and [list prepend $1] and send to an array, where $1 is the position in the array.
all the options after "grid foo.wav" can be sent as messages with the same syntax. "grid foo.wav" can also be sent as message, with syntax "open grid foo.wav", but all other options have to be used _after_ the "open".
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801
On Wed, 26 May 2010, Mathieu Bouchard wrote:
[#in grid foo.wav, headerless 64, type int16, seek_byte 23456, endian little]
typo... that's been ", cast int16" for a while, no "type" method anymore.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801