<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
I'm not sure about the number of channels, however there is a slightly round-about way to get the number of samples from a file.&nbsp;<div><br></div><div>Write to an array using [soundfiler] with the -resize flag. Then use [arraysize] to find the size of the array. Et voila, the number of samples in your file.&nbsp;</div><div><br></div><div>Hope that helps<br><br>&gt; From: reduzierer@yahoo.de<br>&gt; To: pd-list@iem.at<br>&gt; Date: Thu, 28 Jan 2010 23:30:53 +0100<br>&gt; Subject: [PD] acquiring information about wav files<br>&gt; <br>&gt; Hi all<br>&gt; <br>&gt; I am looking for a way to get information about WAV files in Pd,<br>&gt; specifically the number of channels and the number of frames. I know<br>&gt; [wavinfo], but it does not seem to work on windows ("error: could not<br>&gt; read WAV-header" with any file I could find) and on linux it seems to<br>&gt; read only a subset of WAV formats. It does not read from widely used<br>&gt; broadcast format WAV files. The target platform is windows AND linux<br>&gt; anyway in this case, so I need a portable solution.<br>&gt; <br>&gt; The most troubling fact is, that some Pd-vanilla classes ([soundfiler],<br>&gt; [readsf~]) actually do retrieve the information I need, they read both,<br>&gt; the number of frames and the number of channels correctly, with all pcm<br>&gt; encoded wav files I tried, but - what a pity - they don't expose this<br>&gt; information to the patch level. <br>&gt; <br>&gt; Hopefully I am overseeing the obvious here. Hints are very welcome.<br>&gt; <br>&gt; Roman<br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; _______________________________________________<br>&gt; Pd-list@iem.at mailing list<br>&gt; UNSUBSCRIBE and account-management -&gt; http://lists.puredata.info/listinfo/pd-list<br></div>                                               <br /><hr />Got a cool Hotmail story? <a href='http://clk.atdmt.com/UKM/go/195013117/direct/01/' target='_new'>Tell us now</a></body>
</html>