Hi,

I don't know how exaxt it is but can filelen(Sfile)*sr give the result?

tarmo

Sent from Mailspring, the best free email app for work
On Apr 11 2020, at 5:16 pm, Stefan Thomas <kontrapunktstefan@gmail.com> wrote:
Dear community,
I would like to know if there is a possibility to get easily the number of samples in an audio file.
Of course there is the code I've found in "csound power" by Jim Aikin
giSample ftgen 0,0,0,1,"source_mono.wav",0,0,0 ; sampleLength: 69632.000
instr 1
    ilen tableng giSample
    print ilen
endin
but is there a way which works conveniently with a larger number different sound files?
Thanks for Your help!
Stefan
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Sent from Mailspring Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here