<HTML><BODY>Hi&nbsp;IOhannes !&nbsp;<br><br>Thanks for very particular answer and looking through the patch !<br><br>The only puprose with wich i do this complex resizing is that i need &nbsp;to play large audio files. The "-resize" tag somehow doesn't allow the samples longer then one-two minutes.. That was my initial issue, when starting this thread.&nbsp;<br><br>The useful answer i found was:&nbsp;<a href="http://puredata.hurleur.com/sujet-4301-pausing-resuming-playback-multiple-large-audio-files" data-mce-href="http://puredata.hurleur.com/sujet-4301-pausing-resuming-playback-multiple-large-audio-files">http://puredata.hurleur.com/sujet-4301-pausing-resuming-playback-multiple-large-audio-files</a><br><br>"<span style="margin: 0px; padding: 0px; border: 0px; font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 11.199999809265137px; line-height: 12px; vertical-align: baseline; color: rgb(51, 51, 51); background-color: rgb(245, 245, 245);" data-mce-style="margin: 0px; padding: 0px; border: 0px; font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 11.199999809265137px; line-height: 12px; vertical-align: baseline; color: #333333; background-color: #f5f5f5;">For those who don't know, you can resize a table with a message like so:</span><br style="color: rgb(51, 51, 51); font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 11.199999809265137px; line-height: 12px; background-color: rgb(245, 245, 245);" data-mce-style="color: #333333; font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 11.199999809265137px; line-height: 12px; background-color: #f5f5f5;"><br style="color: rgb(51, 51, 51); font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 11.199999809265137px; line-height: 12px; background-color: rgb(245, 245, 245);" data-mce-style="color: #333333; font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 11.199999809265137px; line-height: 12px; background-color: #f5f5f5;"><span style="margin: 0px; padding: 0px; border: 0px; font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 11.199999809265137px; line-height: 12px; vertical-align: baseline; color: rgb(51, 51, 51); background-color: rgb(245, 245, 245);" data-mce-style="margin: 0px; padding: 0px; border: 0px; font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 11.199999809265137px; line-height: 12px; vertical-align: baseline; color: #333333; background-color: #f5f5f5;">[; table_name resize 158760000;(</span><br style="color: rgb(51, 51, 51); font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 11.199999809265137px; line-height: 12px; background-color: rgb(245, 245, 245);" data-mce-style="color: #333333; font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 11.199999809265137px; line-height: 12px; background-color: #f5f5f5;"><br style="color: rgb(51, 51, 51); font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 11.199999809265137px; line-height: 12px; background-color: rgb(245, 245, 245);" data-mce-style="color: #333333; font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 11.199999809265137px; line-height: 12px; background-color: #f5f5f5;"><span style="margin: 0px; padding: 0px; border: 0px; font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 11.199999809265137px; line-height: 12px; vertical-align: baseline; color: rgb(51, 51, 51); background-color: rgb(245, 245, 245);" data-mce-style="margin: 0px; padding: 0px; border: 0px; font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 11.199999809265137px; line-height: 12px; vertical-align: baseline; color: #333333; background-color: #f5f5f5;">I like to set a max-size with a message like this, load a file into the table with [soundfiler], and then send the "total samples" output of [soundfiler] to another resize message to be sure there isn't any empty space after the loaded file."<br><br><br></span>Later i found the example patch made by the guy (in attach). And it works well. You can reload files of different lenght into it. But it is only for mono.<br><br>My attempt was to make the same thing for stereo, which is just doubling everything. My system has 6 GB of OM and 4 is available (Win7), but i'm agree that it is not elegant solution to resize tables like that.. anyway in my code they are resized one after another.. so in my logic that should have been working. &nbsp;But it doesn't. &nbsp;Did you try to play long stereo files in PD and reload them ? What can be the way ?<br><br>thanks !<br><br><br>Пятница, 19 июля 2013, 9:54 +02:00 от IOhannes m zmoelnig &lt;zmoelnig@iem.at&gt;:<br>
<blockquote style="border-left:1px solid #0857A6; margin:10px; padding:0 0 0 10px;" class="mailru-blockquote">
        <div id="">
        



    






        

        
        
        
        
        

        



<div class="js-helper js-readmsg-msg">
        <style type="text/css"></style>
        <div id="style_13742206100000000940" class="mr_read__body">
                <base target="_self" href="https://e.mail.ru/">
                
                        <div id="style_13742206100000000940_BODY">-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA1<br>
<br>
On 2013-07-19 03:49, Фывапр Олджэвич wrote:<br>
&gt; Dear List !<br>
&gt; <br>
&gt; I made this patch to play long stereo audio file. You can load<br>
&gt; audiofile and play, but before - reset the sizes of tables.<br>
&gt; <br>
&gt; BUT, it plays only one stereo file in my Vanilla. So when i played<br>
&gt; one file and try to load another: i push the RESET-bang .. and PD<br>
&gt; crushes totally..<br>
<br>
well, i don't think it's Pd that's crashing - but rather the operating<br>
system that kills it.<br>
<br>
why?<br>
at the beginning you create 2 tables and resize them to 1 (what is<br>
this for?) and then to 158760000 samples.<br>
given that Pd uses 4 bytes to save each sample (8 bytes on 64bit),<br>
this means that one table takes approximately 635MB (32bit) resp<br>
1.27GB (64bit).<br>
so this gives you (for both tables) 1.27GB (32bit) resp 2.5GB (64bit)<br>
memory consumption.<br>
now when loading the table, you resize it, which potentially means<br>
allocating a new table which is bigger than the previous one, copying<br>
the data from the old table to the new one and then freeing the old<br>
table. so at some point you have doubled the amount of memory needed<br>
by your patch.<br>
<br>
how much RAM do you have?<br>
is your system/OS capable of addressing more than 4GB of memory? (e.g.<br>
PAE)<br>
is your system/OS capable of addressing more than 4GB of memory within<br>
a single application? (64bit)<br>
<br>
<br>
apart from that you patch is slightly buggy anyhow.<br>
imaging the following scenario:<br>
- - init tables with 1h of samples<br>
- - load a soundfile that is 3 seconds long<br>
&nbsp;&nbsp;(the sample gets loaded and the table gets resized to 3 seconds)<br>
- - load a soundfile that is 10 minutes long:<br>
&nbsp;&nbsp;the sample gets loaded into the 3 seconds table and is truncated.<br>
&nbsp;&nbsp;after that, the table is resized to 10 minutes - giving you 3<br>
seconds of your soundfile and 9:57 of silence.<br>
<br>
did you know that [soundfiler] has a "-resize" switch that<br>
automatically resizes the table to your needs?<br>
btw, you might even want to resize your table to something small (1)<br>
before loading the sample.<br>
<br>
adgmsr<br>
IOhannes<br>
-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1.4.12 (GNU/Linux)<br>
Comment: Using GnuPG with Icedove - <a href="http://www.enigmail.net/" target="_blank">http://www.enigmail.net/</a><br>
<br>
iEYEARECAAYFAlHo8LEACgkQkX2Xpv6ydvTCJQCeJ5LygzizivKw41LEzg0MSuBi<br>
ozEAn0QvwPIZhI9e5BROlq6Xj/RP0Id/<br>
=Fn0N<br>
-----END PGP SIGNATURE-----<br>
<br>
_______________________________________________<br>
<a href="sentmsg?compose&amp;To=Pd%2dlist@iem.at">Pd-list@iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -&gt; <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
</div>
                        
                
                <base target="_self" href="https://e.mail.ru/">
        </div>

        
</div>


</div>
</blockquote>
<br>
<br>-- <br>Максим Иванов<br></BODY></HTML>