Hi, I don't know how exaxt it is but can filelen(Sfile)*sr give the result? tarmo Sent from Mailspring (https://link.getmailspring.com/link/21AA4F01-FBE7-4F25-A3FC-3D33590EA30F@getmailspring.com/0?redirect=https%3A%2F%2Fgetmailspring.com%2F&recipient=Q1NPVU5EQGxpc3RzZXJ2LmhlYW5ldC5pZQ%3D%3D), the best free email app for work On Apr 11 2020, at 5:16 pm, Stefan Thomas 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://link.getmailspring.com/link/21AA4F01-FBE7-4F25-A3FC-3D33590EA30F@getmailspring.com/1?redirect=mailto%3ACsound%40listserv.heanet.ie&recipient=Q1NPVU5EQGxpc3RzZXJ2LmhlYW5ldC5pZQ%3D%3D) https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND (https://link.getmailspring.com/link/21AA4F01-FBE7-4F25-A3FC-3D33590EA30F@getmailspring.com/2?redirect=https%3A%2F%2Flistserv.heanet.ie%2Fcgi-bin%2Fwa%3FA0%3DCSOUND&recipient=Q1NPVU5EQGxpc3RzZXJ2LmhlYW5ldC5pZQ%3D%3D) Send bugs reports to https://github.com/csound/csound/issues (https://link.getmailspring.com/link/21AA4F01-FBE7-4F25-A3FC-3D33590EA30F@getmailspring.com/3?redirect=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fissues&recipient=Q1NPVU5EQGxpc3RzZXJ2LmhlYW5ldC5pZQ%3D%3D) Discussions of bugs and features can be posted here > 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