[PD] How to access audio files from disk randomly?

2009-12-06 Thread Roman Haefeli
Hi all

Yeah, it's never too late for basic questions. Basically i would like to
create file player patch, that let's you pick a soundfile (be it a wav)
of any number of channels and a bit depth currently supported by
[readsf~] and it should be able to play from any position between the
start and the end of the file. 

Usually i used a kludge by using [soundfiler] in order to get the number
of sample frames of the file and then i calculated the number of bytes
to be skipped in order to be able to let [readsf~] play the file from a
random position. However, this only works when the actual header size of
the file is constant (i.e. known and the same for every file; ok, when
the header sizes would be known, they wouldn't need to be the same for
all files, but you get the point) and when you know beforehand the bit
depth of the file(s), since [readsf~] reads it correctly, but doesn't
tell you about it.

Now, i would like to be able to play wav files correctly with arbitrary
(unkown) bit depths and arbitrary (unkown) number of channels. Also, i
am looking for a way to be able to load both, simple RIFF WAV and so
called 'Broadcast WAV' files (the ones with a 'bext' header signature). 

I also tried [wavinfo] from ext13. However, this seems to work only with
the former (simple) format, but not with broadcast wav-files. Funny
enough, [readsf~] seems to have everything needed built-in, since it
reads both formats correctly, it just does not expose those functions to
the pd patch (as this unfortunately is often the problem with many
object classes). 

Any idea or pointers to other externals welcome!

Roman



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


Re: [PD] How to access audio files from disk randomly?

2009-12-07 Thread James Dunn
What about readanysf~? You can send it [seek $1( and you can also get 
the file length in seconds out with [route length]


Quoth Roman Haefeli, on 06/12/09 23:57:

Hi all

Yeah, it's never too late for basic questions. Basically i would like to
create file player patch, that let's you pick a soundfile (be it a wav)
of any number of channels and a bit depth currently supported by
[readsf~] and it should be able to play from any position between the
start and the end of the file. 


Usually i used a kludge by using [soundfiler] in order to get the number
of sample frames of the file and then i calculated the number of bytes
to be skipped in order to be able to let [readsf~] play the file from a
random position. However, this only works when the actual header size of
the file is constant (i.e. known and the same for every file; ok, when
the header sizes would be known, they wouldn't need to be the same for
all files, but you get the point) and when you know beforehand the bit
depth of the file(s), since [readsf~] reads it correctly, but doesn't
tell you about it.

Now, i would like to be able to play wav files correctly with arbitrary
(unkown) bit depths and arbitrary (unkown) number of channels. Also, i
am looking for a way to be able to load both, simple RIFF WAV and so
called 'Broadcast WAV' files (the ones with a 'bext' header signature). 


I also tried [wavinfo] from ext13. However, this seems to work only with
the former (simple) format, but not with broadcast wav-files. Funny
enough, [readsf~] seems to have everything needed built-in, since it
reads both formats correctly, it just does not expose those functions to
the pd patch (as this unfortunately is often the problem with many
object classes). 


Any idea or pointers to other externals welcome!

Roman



___
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] How to access audio files from disk randomly?

2009-12-07 Thread Roman Haefeli
Hi James

Thanks for that hint. I actually _wanted_ to check [readanysf~], but
failed to compile it. But yeah, it would cover some of the given
requirments. Unfortunately, it does not seem to return the number of
channels of an audio file. Since i cannot test myself now: Is it able at
all to play multi-channel-files with a higher number of channels than 2?

I don't see any errors, when running ./configure. However, 'make' fails
pretty early:

ro...@yoyo2:~/pd-svn/externals/august/readanysf~$ make
make  all-recursive
make[1]: Entering directory
`/home/roman/pd-svn/externals/august/readanysf~'
Making all in src
make[2]: Entering directory
`/home/roman/pd-svn/externals/august/readanysf~/src'
g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include/
-I/usr/local/lib/pd/flext/ -I../include/  -DUNIX -Wno-deprecated -Wall
-Wimplicit -Wunused -Wmissing-prototypes -O1  -DFLEXT_SYS=2
-DFLEXT_THREADS -DFLEXT_SHARED -DFLEXT_USE_CMEM
-I/usr/local/include/flext  -DREAD_VORBIS   -DREAD_MAD  -DREAD_FLAC -MT
Input.o -MD -MP -MF .deps/Input.Tpo -c -o Input.o Input.cpp
cc1plus: warning: command line option "-Wmissing-prototypes" is valid
for Ada/C/ObjC but not for C++
Input.cpp:2:22: error: iostream.h: No such file or directory
make[2]: *** [Input.o] Error 1
make[2]: Leaving directory
`/home/roman/pd-svn/externals/august/readanysf~/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/home/roman/pd-svn/externals/august/readanysf~'
make: *** [all] Error 2


There are several packages delivering a file 'iostream.h', but none of
them puts it directly to /usr/include. I also did install all the
pre-requisites of readanysf~: libmad, libsamplerate, libflac, libogg,
working flext.

Help would be much appreciated.

Roman


On Mon, 2009-12-07 at 16:43 +, James Dunn wrote:
> What about readanysf~? You can send it [seek $1( and you can also get 
> the file length in seconds out with [route length]
> 
> Quoth Roman Haefeli, on 06/12/09 23:57:
> > Hi all
> >
> > Yeah, it's never too late for basic questions. Basically i would like to
> > create file player patch, that let's you pick a soundfile (be it a wav)
> > of any number of channels and a bit depth currently supported by
> > [readsf~] and it should be able to play from any position between the
> > start and the end of the file. 
> >
> > Usually i used a kludge by using [soundfiler] in order to get the number
> > of sample frames of the file and then i calculated the number of bytes
> > to be skipped in order to be able to let [readsf~] play the file from a
> > random position. However, this only works when the actual header size of
> > the file is constant (i.e. known and the same for every file; ok, when
> > the header sizes would be known, they wouldn't need to be the same for
> > all files, but you get the point) and when you know beforehand the bit
> > depth of the file(s), since [readsf~] reads it correctly, but doesn't
> > tell you about it.
> >
> > Now, i would like to be able to play wav files correctly with arbitrary
> > (unkown) bit depths and arbitrary (unkown) number of channels. Also, i
> > am looking for a way to be able to load both, simple RIFF WAV and so
> > called 'Broadcast WAV' files (the ones with a 'bext' header signature). 
> >
> > I also tried [wavinfo] from ext13. However, this seems to work only with
> > the former (simple) format, but not with broadcast wav-files. Funny
> > enough, [readsf~] seems to have everything needed built-in, since it
> > reads both formats correctly, it just does not expose those functions to
> > the pd patch (as this unfortunately is often the problem with many
> > object classes). 
> >
> > Any idea or pointers to other externals welcome!
> >
> > Roman
> >
> >
> >
> > ___
> > 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



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


Re: [PD] How to access audio files from disk randomly?

2009-12-08 Thread James Dunn

Hi Roman,

I just installed readanysf~ again on my new install of Ubuntu 9.10 and 
had no problems. Obviously you need gavl and gmerlin-avdecode. I also 
had to install libgmerlin0.
It doesn't return the number of channels but you can specify a number 
(default is 2) and it will upmix or downmix all channels accordingly.

I don't know about the iostream.h error.

James

Quoth Roman Haefeli, on 07/12/09 21:55:

Hi James

Thanks for that hint. I actually _wanted_ to check [readanysf~], but
failed to compile it. But yeah, it would cover some of the given
requirments. Unfortunately, it does not seem to return the number of
channels of an audio file. Since i cannot test myself now: Is it able at
all to play multi-channel-files with a higher number of channels than 2?

I don't see any errors, when running ./configure. However, 'make' fails
pretty early:

ro...@yoyo2:~/pd-svn/externals/august/readanysf~$ make
make  all-recursive
make[1]: Entering directory
`/home/roman/pd-svn/externals/august/readanysf~'
Making all in src
make[2]: Entering directory
`/home/roman/pd-svn/externals/august/readanysf~/src'
g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include/
-I/usr/local/lib/pd/flext/ -I../include/  -DUNIX -Wno-deprecated -Wall
-Wimplicit -Wunused -Wmissing-prototypes -O1  -DFLEXT_SYS=2
-DFLEXT_THREADS -DFLEXT_SHARED -DFLEXT_USE_CMEM
-I/usr/local/include/flext  -DREAD_VORBIS   -DREAD_MAD  -DREAD_FLAC -MT
Input.o -MD -MP -MF .deps/Input.Tpo -c -o Input.o Input.cpp
cc1plus: warning: command line option "-Wmissing-prototypes" is valid
for Ada/C/ObjC but not for C++
Input.cpp:2:22: error: iostream.h: No such file or directory
make[2]: *** [Input.o] Error 1
make[2]: Leaving directory
`/home/roman/pd-svn/externals/august/readanysf~/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/home/roman/pd-svn/externals/august/readanysf~'
make: *** [all] Error 2


There are several packages delivering a file 'iostream.h', but none of
them puts it directly to /usr/include. I also did install all the
pre-requisites of readanysf~: libmad, libsamplerate, libflac, libogg,
working flext.

Help would be much appreciated.

Roman


On Mon, 2009-12-07 at 16:43 +, James Dunn wrote:
  
What about readanysf~? You can send it [seek $1( and you can also get 
the file length in seconds out with [route length]


Quoth Roman Haefeli, on 06/12/09 23:57:


Hi all

Yeah, it's never too late for basic questions. Basically i would like to
create file player patch, that let's you pick a soundfile (be it a wav)
of any number of channels and a bit depth currently supported by
[readsf~] and it should be able to play from any position between the
start and the end of the file. 


Usually i used a kludge by using [soundfiler] in order to get the number
of sample frames of the file and then i calculated the number of bytes
to be skipped in order to be able to let [readsf~] play the file from a
random position. However, this only works when the actual header size of
the file is constant (i.e. known and the same for every file; ok, when
the header sizes would be known, they wouldn't need to be the same for
all files, but you get the point) and when you know beforehand the bit
depth of the file(s), since [readsf~] reads it correctly, but doesn't
tell you about it.

Now, i would like to be able to play wav files correctly with arbitrary
(unkown) bit depths and arbitrary (unkown) number of channels. Also, i
am looking for a way to be able to load both, simple RIFF WAV and so
called 'Broadcast WAV' files (the ones with a 'bext' header signature). 


I also tried [wavinfo] from ext13. However, this seems to work only with
the former (simple) format, but not with broadcast wav-files. Funny
enough, [readsf~] seems to have everything needed built-in, since it
reads both formats correctly, it just does not expose those functions to
the pd patch (as this unfortunately is often the problem with many
object classes). 


Any idea or pointers to other externals welcome!

Roman



___
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





  


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


Re: [PD] How to access audio files from disk randomly?

2009-12-08 Thread Roman Haefeli
On Tue, 2009-12-08 at 11:47 +, James Dunn wrote:
> Hi Roman,
> 
> I just installed readanysf~ again on my new install of Ubuntu 9.10 and
> had no problems. Obviously you need gavl and gmerlin-avdecode. I also
> had to install libgmerlin0. 
> It doesn't return the number of channels but you can specify a number
> (default is 2) and it will upmix or downmix all channels accordingly.
> I don't know about the iostream.h error.


Thank you a lot. Your help shed quite some light on many issues I
encountered with getting readanysf~ running.
I was wrongly assuming, that I find the newest version in Pd svn.
However, in the svn version, there is no mention of the version
whatsoever. The mention of flext and the lack of mention of gmerlin made
it finally clear, that this likely is a very old version. On [1] I could
find a more recent version, which is most likely the one you were
referring to. Compiling gmerlin_avdecoder was also very difficult, at
least on ubuntu 9.10 (haven't tried on another OS). I tried four
different versions (including a current cvs checkout) and when doing
'make' all failed with different errors. From googling around a bit, it
seems, that the version of gcc shipped with ubuntu 9.10 (4.4.1) is
pretty picky. I just commented out the offending lines in the source
code (yeah, this is crude, but i didn't know what else to do) and
finally it compiled. After all, [readanysf~] compiled and loads. You
must be lucky or smart and i must be dumb or i made something terribly
wrong. 

@August (or any dev who took over the maintenance of readanysf~):
Would it be possible to check in the new sources of readanysf~? I mean,
if there is no reason for not having them there. Thanks!

Roman

[1]: http://aug.ment.org/readanysf/download.php


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


Re: [PD] How to access audio files from disk randomly?

2009-12-08 Thread august
> On Tue, 2009-12-08 at 11:47 +, James Dunn wrote:
> > Hi Roman,
> > 
> > I just installed readanysf~ again on my new install of Ubuntu 9.10 and
> > had no problems. Obviously you need gavl and gmerlin-avdecode. I also
> > had to install libgmerlin0. 
> > It doesn't return the number of channels but you can specify a number
> > (default is 2) and it will upmix or downmix all channels accordingly.
> > I don't know about the iostream.h error.
> 
> 
> Thank you a lot. Your help shed quite some light on many issues I
> encountered with getting readanysf~ running.
> I was wrongly assuming, that I find the newest version in Pd svn.
> However, in the svn version, there is no mention of the version
> whatsoever. The mention of flext and the lack of mention of gmerlin made
> it finally clear, that this likely is a very old version. On [1] I could
> find a more recent version, which is most likely the one you were
> referring to. Compiling gmerlin_avdecoder was also very difficult, at
> least on ubuntu 9.10 (haven't tried on another OS). I tried four
> different versions (including a current cvs checkout) and when doing
> 'make' all failed with different errors. From googling around a bit, it
> seems, that the version of gcc shipped with ubuntu 9.10 (4.4.1) is
> pretty picky. I just commented out the offending lines in the source
> code (yeah, this is crude, but i didn't know what else to do) and
> finally it compiled. After all, [readanysf~] compiled and loads. You
> must be lucky or smart and i must be dumb or i made something terribly
> wrong. 
> 
> @August (or any dev who took over the maintenance of readanysf~):
> Would it be possible to check in the new sources of readanysf~? I mean,
> if there is no reason for not having them there. Thanks!
> 
> Roman
> 
> [1]: http://aug.ment.org/readanysf/download.php

Roman,

Sorry for the hassle.  I don't really have access to the PD svn.  
However,
I'm sure I could be given access.Who can do that?  

-august.


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


Re: [PD] How to access audio files from disk randomly?

2009-12-09 Thread Roman Haefeli
Am 09.12.09 08:55 schrieb "august" unter :

>> On Tue, 2009-12-08 at 11:47 +, James Dunn wrote:
>>> Hi Roman,
>>> 
>>> I just installed readanysf~ again on my new install of Ubuntu 9.10 and
>>> had no problems. Obviously you need gavl and gmerlin-avdecode. I also
>>> had to install libgmerlin0.
>>> It doesn't return the number of channels but you can specify a number
>>> (default is 2) and it will upmix or downmix all channels accordingly.
>>> I don't know about the iostream.h error.
>> 
>> 
>> Thank you a lot. Your help shed quite some light on many issues I
>> encountered with getting readanysf~ running.
>> I was wrongly assuming, that I find the newest version in Pd svn.
>> However, in the svn version, there is no mention of the version
>> whatsoever. The mention of flext and the lack of mention of gmerlin made
>> it finally clear, that this likely is a very old version. On [1] I could
>> find a more recent version, which is most likely the one you were
>> referring to. Compiling gmerlin_avdecoder was also very difficult, at
>> least on ubuntu 9.10 (haven't tried on another OS). I tried four
>> different versions (including a current cvs checkout) and when doing
>> 'make' all failed with different errors. From googling around a bit, it
>> seems, that the version of gcc shipped with ubuntu 9.10 (4.4.1) is
>> pretty picky. I just commented out the offending lines in the source
>> code (yeah, this is crude, but i didn't know what else to do) and
>> finally it compiled. After all, [readanysf~] compiled and loads. You
>> must be lucky or smart and i must be dumb or i made something terribly
>> wrong. 
>> 
>> @August (or any dev who took over the maintenance of readanysf~):
>> Would it be possible to check in the new sources of readanysf~? I mean,
>> if there is no reason for not having them there. Thanks!
>> 
>> Roman
>> 
>> [1]: http://aug.ment.org/readanysf/download.php
> 
> Roman,
> 
> Sorry for the hassle.  I don't really have access to the PD svn.  However,
> I'm sure I could be given access.Who can do that?
> 

Sorry, if this sounded like a rant. [readanysf~] is really handy. Thanks for
writing it. 

Usually, if people want to have write access to svn, they ask on pd-dev list
and after the usual 'period of objection' one of the devs can grant you
access.

Roman







___ 
Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: 
http://mail.yahoo.de

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


Re: [PD] How to access audio files from disk randomly?

2009-12-09 Thread Roman Haefeli
Am 08.12.09 12:47 schrieb "James Dunn" unter :

> Hi Roman,
> 
> I just installed readanysf~ again on my new install of Ubuntu 9.10 and
> had no problems. Obviously you need gavl and gmerlin-avdecode. I also
> had to install libgmerlin0.

Sorry for becoming slightly off-topic, but could you compile
gmerlin-avdecode out-of-the-box on ubuntu 9.10? May i ask which version you
decided?

I get:
i_avdec.c:424: error: unknown field Œhas_still¹ specified in initializer

I just commented out this line in plugins/i_avdec.c and then got similar
errors on other similiar lines, which I also commented out. Finally it
compiled, but i don't know what I have done. I hope not something very bad.

Roman




___ 
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de

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


Re: [PD] How to access audio files from disk randomly?

2009-12-09 Thread James Dunn

Quoth Roman Haefeli, on 09/12/09 08:58:

Am 08.12.09 12:47 schrieb "James Dunn" unter :

  

Hi Roman,

I just installed readanysf~ again on my new install of Ubuntu 9.10 and
had no problems. Obviously you need gavl and gmerlin-avdecode. I also
had to install libgmerlin0.



Sorry for becoming slightly off-topic, but could you compile
gmerlin-avdecode out-of-the-box on ubuntu 9.10? May i ask which version you
decided?

I get:
i_avdec.c:424: error: unknown field OEhas_still¹ specified in initializer

I just commented out this line in plugins/i_avdec.c and then got similar
errors on other similiar lines, which I also commented out. Finally it
compiled, but i don't know what I have done. I hope not something very bad.

Roman

  

Just checking through my bash history...

First I installed gavl 1.1.1 - 
http://sourceforge.net/projects/gmerlin/files/gavl/1.1.1/gavl-1.1.1.tar.gz/download
then texinfo (sudo apt-get install texinfo) as prompted by the 
./configure stage of gmerlin 0.4.1
then gmerlin 0.4.1 - 
http://sourceforge.net/projects/gmerlin/files/gmerlin/0.4.1/gmerlin-0.4.1.tar.gz/download
then gmerlin-avdecoder 1.0.1 - 
http://sourceforge.net/projects/gmerlin/files/gmerlin-avdecoder/1.0.1/gmerlin-avdecoder-1.0.1.tar.gz/download
finally I compiled readanysf~ 0.36 
http://aug.ment.org/software/readanysf~0.36.tar.gz 
 and copied the 
,pd_linux file to /usr/lib/pd/extra


I had an error message in the pd console: libgmerlin_avdec.so.1 not 
found or something, so I installed libgmerlin0 via synaptic and then it 
worked.


Hope this helps!
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list