<div dir="ltr">Okay, update with all the solutions everyone has chipped in. (THANKS AGAIN)<div><br></div><div>both Christof's and Jack's solution still create audio drops. Now I am testing <span style="font-size:12.8px">Jean-Yves's patch and seems to do the trick. </span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">again, thank you all. If anyone has another idea, I will be interested in looking at other solutions (just for the heck of it).</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">ps. Thanks Jack, I will try changing the [block] </span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">cheers</span></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 28, 2017 at 12:28 PM, Christof Ressi <span dir="ltr"><<a href="mailto:christof.ressi@gmx.at" target="_blank">christof.ressi@gmx.at</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">That's what I meant with:<span><br>
<br>
> [soundfiler] will vomit at you in the Pd console but you can simply ignore it by setting the log level to 0.<br>
<br></span>
I know why it happens but it doesn't really matter. Despite its flashy read appearance it's just a warning which can be safely ignored.<br>
<br>
The patch itself should work. Tweek the amount of samples per DSP block to find a setting which works for you without dropouts.<span><br>
<br>
<br>
<br>
On 28.02.2017 12:54, José Rafael Subía Valdez wrote:<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>
Hey Christof and Jean-Yves Gratius<br>
<br>
Thanks, I am opening them up just now. Christof, your patch gives me these errors when I try it out:<br>
<br>
soundfiler_read: truncated to 44100 elements -> this one is repeated by the amount of blocks it will take to completely load the sound file<br>
resize failed<br>
<br>
any idea why?? (before I start dismantling it?)<br>
<br>
Cheers Guys, much appreciated.<br>
<br>
<br></span><span>
On Tue, Feb 28, 2017 at 11:35 AM, Christof Ressi <<a href="mailto:christof.ressi@gmx.at" target="_blank">christof.ressi@gmx.at</a> <mailto:<a href="mailto:christof.ressi@gmx.at" target="_blank">christof.ressi@gmx.at</a>><wbr>> wrote:<br>
<br>
    José, I think I have a solution which might work for you. see my<br>
    attached patch. it's not a clean abstraction but rather<br>
    demonstrates the principle.<br>
<br>
    basically, I spread the loading of the soundfile over several DSP<br>
    blocks and you can adjust how many samples to load in one block.<br>
    44100 samples, for example, works fine for me (no dropouts), which<br>
    means I can load 1 second of audio in 1.5 ms or 10 minutes in 900 ms!<br>
<br>
    note that it needs soundfile_info from iemlib.<br>
<br>
    [soundfiler] will vomit at you in the Pd console but you can<br>
    simply ignore it by setting the log level to 0.<br>
<br>
    Anyway, I'm really thinking of turning it into an external because<br>
    there some inefficiencies I could get rid off. Most notably, I<br>
    have to use an intermediate buffer plus |read -resize -maxsize<br>
    ...( to prevent [soundfiler] from reading the file always till the<br>
    end because it doesn't have -nframes as an read option (which is<br>
    unfortunate).<br>
<br>
    Hope that helps!<br>
<br>
    Christof<br>
<br>
    Gesendet: Dienstag, 28. Februar 2017 um 07:42 Uhr<br>
    Von: "José Rafael Subía Valdez" <<a href="mailto:jsubiavaldez@gmail.com" target="_blank">jsubiavaldez@gmail.com</a><br></span>
    <mailto:<a href="mailto:jsubiavaldez@gmail.com" target="_blank">jsubiavaldez@gmail.com</a><wbr>>><br>
    An: Pd-List <<a href="mailto:pd-list@lists.iem.at" target="_blank">pd-list@lists.iem.at</a> <mailto:<a href="mailto:pd-list@lists.iem.at" target="_blank">pd-list@lists.iem.at</a>>><span><br>
    Betreff: Re: [PD] soundfiler alternative?<br>
<br></span><span>
    Thank you all..<br>
<br>
    but I am developing patches that are handed to performers and<br>
    should work out of the box, I can't depend on the expensive<br>
    machines and RAM-DISK settings because I can not tell my<br>
    performers - you need to do all of this and invest in your<br>
    computer first before you play my music. Why? because this is<br>
    something I am doing for my PhD. Yes..saying "buy a fancy computer<br>
    with lots of RAM" is easier in Europe or the US than in other<br>
    places of the world and that is not my aim. I am trying to squeeze<br>
    the best solutions on any type of machine and to provide people<br>
    that are not necessary computer music users with the friendliest<br>
    setup I can think of.<br>
<br>
    the computer I am programming this is a iMac from 2007 with 4 gb<br>
    of RAM. I have many processes including FFT, but thanks to switch~<br>
    I am able to optimize the patch. I just have this problem that<br>
    causes audio drops when loading each sample. So not really wanna<br>
    discuss finances.<br>
<br>
    Thanks again<br>
<br>
<br>
    On Mon, Feb 27, 2017 at 11:35 PM, Christof Ressi<br>
    <<a href="mailto:christof.ressi@gmx.at" target="_blank">christof.ressi@gmx.at</a><br></span>
    <mailto:<a href="mailto:christof.ressi@gmx.at" target="_blank">christof.ressi@gmx.at</a>><wbr>[mailto:<a href="mailto:christof.ressi@gmx.at" target="_blank">christof.ressi@gmx.at</a><span><br>
    <mailto:<a href="mailto:christof.ressi@gmx.at" target="_blank">christof.ressi@gmx.at</a>><wbr>]> wrote:> i keep forgetting of<br>
    abominations like running a 32-bit Pd on a 64-bit OS.<br>
<br>
    Actually, the average Windows user will have more 32-bit apps than<br>
    64-bit apps running on their 64-bit OS ;-).<br>
    And most Pd users on 64-bit Windows will have a 32-bit Pd  because<br>
    Miller doesn't offer 64-bit binaries yet and building from source<br>
    is still impossible (at least with MinGW).<br>
<br>
    > decent OSs should be able to manage more than a total 4GB of RAM<br>
    even<br>
    > when the entire OS is 32bit (a single application will not be<br>
    able to<br>
    > address more than 2^32 bytes though; but it should get you closer to<br>
    > really having 4GB, rather than 2GB)<br>
<br>
    on 32-bit Windows you usually get 2 GB per process - or 3 GB with<br>
    some tricks*. on 64-bit Windows it's 2 GB for 32-bit processes<br>
    unless you compile with IMAGE_FILE_LARGE_ADDRESS_AWARE set, then<br>
    you get 4 GB.<br>
<br>
    here are the boring details:<br>
    <a href="https://msdn.microsoft.com/en-us/library/aa366778(VS.85).aspx?ranMID=24542&ranEAID=TnL5HPStwNw&ranSiteID=TnL5HPStwNw-Z6NjEgcaJn8pbbYAema89g&tduid=(94e0b4bf83daa242de97c8bfb531e5d9)(256380)(2459594)(TnL5HPStwNw-Z6NjEgcaJn8pbbYAema89g)()[https://msdn.microsoft.com/en-us/library/aa366778(VS.85).aspx?ranMID=24542&ranEAID=TnL5HPStwNw&ranSiteID=TnL5HPStwNw-Z6NjEgcaJn8pbbYAema89g&tduid=(94e0b4bf83daa242de97c8bfb531e5d9)(256380)(2459594)(TnL5HPStwNw-Z6NjEgcaJn8pbbYAema89g)()]" rel="noreferrer" target="_blank">https://msdn.microsoft.com/en-<wbr>us/library/aa366778(VS.85).asp<wbr>x?ranMID=24542&ranEAID=TnL5HPS<wbr>twNw&ranSiteID=TnL5HPStwNw-Z6N<wbr>jEgcaJn8pbbYAema89g&tduid=(94e<wbr>0b4bf83daa242de97c8bfb531e5d9)<wbr>(256380)(2459594)(TnL5HPStwNw-<wbr>Z6NjEgcaJn8pbbYAema89g)()[http<wbr>s://msdn.microsoft.com/en-us/l<wbr>ibrary/aa366778(VS.85).aspx?ra<wbr>nMID=24542&ranEAID=TnL5HPStwNw<wbr>&ranSiteID=TnL5HPStwNw-Z6NjEgc<wbr>aJn8pbbYAema89g&tduid=(94e0b4b<wbr>f83daa242de97c8bfb531e5d9)(256<wbr>380)(2459594)(TnL5HPStwNw-Z6Nj<wbr>EgcaJn8pbbYAema89g)()]</a><br></span>
    <<a href="https://msdn.microsoft.com/en-us/library/aa366778%28VS.85%29.aspx?ranMID=24542&ranEAID=TnL5HPStwNw&ranSiteID=TnL5HPStwNw-Z6NjEgcaJn8pbbYAema89g&tduid=%2894e0b4bf83daa242de97c8bfb531e5d9%29%28256380%29%282459594%29%28TnL5HPStwNw-Z6NjEgcaJn8pbbYAema89g%29%28%29[https://msdn.microsoft.com/en-us/library/aa366778%28VS.85%29.aspx?ranMID=24542&ranEAID=TnL5HPStwNw&ranSiteID=TnL5HPStwNw-Z6NjEgcaJn8pbbYAema89g&tduid=%2894e0b4bf83daa242de97c8bfb531e5d9%29%28256380%29%282459594%29%28TnL5HPStwNw-Z6NjEgcaJn8pbbYAema89g%29%28%29]" rel="noreferrer" target="_blank">https://msdn.microsoft.com/en<wbr>-us/library/aa366778%28VS.85%2<wbr>9.aspx?ranMID=24542&ranEAID=Tn<wbr>L5HPStwNw&ranSiteID=TnL5HPStwN<wbr>w-Z6NjEgcaJn8pbbYAema89g&tduid<wbr>=%2894e0b4bf83daa242de97c8bfb5<wbr>31e5d9%29%28256380%29%28245959<wbr>4%29%28TnL5HPStwNw-Z6NjEgcaJn8<wbr>pbbYAema89g%29%28%29[https://<wbr>msdn.microsoft.com/en-us/<wbr>library/aa366778%28VS.85%29.<wbr>aspx?ranMID=24542&ranEAID=TnL5<wbr>HPStwNw&ranSiteID=TnL5HPStwNw-<wbr>Z6NjEgcaJn8pbbYAema89g&tduid=%<wbr>2894e0b4bf83daa242de97c8bfb531<wbr>e5d9%29%28256380%29%282459594%<wbr>29%28TnL5HPStwNw-Z6NjEgcaJn8pb<wbr>bYAema89g%29%28%29]</a>><span><br>
<br>
<br>
    I actually I didn't know about IMAGE_FILE_LARGE_ADDRESS_AWARE<br>
    until now. Miller could actually use it in his 32-bit Windows<br>
    builds, which currently only allow 2 GB**. It won't do any harm on<br>
    32-bit systems and doubles the available memory on 64-bit systems.<br>
<br>
    > fun fact: on linux, you can use 64bit Pd for >10 years with<br>
    virtually<br>
    > all external libraries working.<br>
<br>
    :-o. time to finally get my dual boot. I weren't so lazy...<br>
<br>
<br>
    Christof<br>
<br>
<br>
    * IMAGE_FILE_LARGE_ADDRESS_AWARE set + 4GT enabled (risky)<br>
    ** I tested this with latest vanilla 32-bit binaries on Windows 7<br>
    64-bit (with 16 GB of RAM installed). I get a warning when I try<br>
    to exceed 2 GB.<br>
<br>
<br>
<br>
    > Gesendet: Montag, 27. Februar 2017 um 22:58 Uhr<br>
    > Von: "IOhannes m zmölnig" <<a href="mailto:zmoelnig@iem.at" target="_blank">zmoelnig@iem.at</a><br></span>
    <mailto:<a href="mailto:zmoelnig@iem.at" target="_blank">zmoelnig@iem.at</a>>[mailt<wbr>o:<a href="mailto:zmoelnig@iem.at" target="_blank">zmoelnig@iem.at</a><br>
    <mailto:<a href="mailto:zmoelnig@iem.at" target="_blank">zmoelnig@iem.at</a>>]><br>
    > An: <a href="mailto:pd-list@lists.iem.at" target="_blank">pd-list@lists.iem.at</a><br>
    <mailto:<a href="mailto:pd-list@lists.iem.at" target="_blank">pd-list@lists.iem.at</a>>[<wbr>mailto:<a href="mailto:pd-list@lists.iem.at" target="_blank">pd-list@lists.iem.at</a><div><div class="m_8071466329689859304h5"><br>
    <mailto:<a href="mailto:pd-list@lists.iem.at" target="_blank">pd-list@lists.iem.at</a>>]<br>
    > Betreff: Re: [PD] soundfiler alternative?<br>
    ><br>
<br>
    > On 02/27/2017 10:45 PM, Christof Ressi wrote:<br>
    > >> well, [table] stores the samples as floating point (taking 4<br>
    bytes per<br>
    > >> sample; and 8 byte on 64bit systems),<br>
    > > It depends on your Pd (32-bit or 64-bit), not on the system.<br>
    ><br>
    > well yes, true.<br>
    > i keep forgetting of abominations like running a 32-bit Pd on a<br>
    64-bit OS.<br>
    ><br>
    > ><br>
    > >> however, there is a simple solution at hand: get youself<br>
    plenty of RAM<br>
    > >> and pre-load everything into tables.<br>
    > >> 32GB cost about 250,-€ and will allow you to load approx. 24h<br>
    of raw<br>
    > >> audio, which is probably enough.<br>
    > > Unfortunately, this is only true for 64-bit processes. A<br>
    single 32-bit process can't handle more than 2^32 bytes (~4 GB).<br>
    In reality, it's even less, usually 2 GB, which is a bit more than<br>
    1,5 hours of stereo audio @44100 Hz. Pd will give you a warning<br>
    when you try to exceed this limit ("pd: resizebytes() failed - out<br>
    of memory").<br>
    ><br>
    > how much RAM does that machine have?<br>
    > decent OSs should be able to manage more than a total 4GB of RAM<br>
    even<br>
    > when the entire OS is 32bit (a single application will not be<br>
    able to<br>
    > address more than 2^32 bytes though; but it should get you closer to<br>
    > really having 4GB, rather than 2GB)<br>
    ><br>
    > but yes, in order to make use of 32GB of memory you need a<br>
    native 64bit<br>
    > application (running on a 64bit OS).<br>
    ><br>
    > fun fact: on linux, you can use 64bit Pd for >10 years with<br>
    virtually<br>
    > all external libraries working.<br>
    ><br>
    > gmsr<br>
    > IOhannes<br>
    ><br>
    ><br>
    ><br>
<br>
    > ______________________________<wbr>_________________<br>
    > <a href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a><br></div></div>
    <mailto:<a href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a>>[<wbr>mailto:<a href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a><span><br>
    <mailto:<a href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a>>] mailing list<br>
    > UNSUBSCRIBE and account-management -><br>
    <a href="https://lists.puredata.info/listinfo/pd-list%5Bhttps://lists.puredata.info/listinfo/pd-list%5D" rel="noreferrer" target="_blank">https://lists.puredata.info/li<wbr>stinfo/pd-list[https://lists.p<wbr>uredata.info/listinfo/pd-list]</a><br></span>
    <<a href="https://lists.puredata.info/listinfo/pd-list%5Bhttps://lists.puredata.info/listinfo/pd-list%5D" rel="noreferrer" target="_blank">https://lists.puredata.info/l<wbr>istinfo/pd-list%5Bhttps://list<wbr>s.puredata.info/listinfo/pd-li<wbr>st%5D</a>><br>
    ><br>
<br>
    ______________________________<wbr>_________________<br>
    <a href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a><br>
    <mailto:<a href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a>>[<wbr>mailto:<a href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a><span><br>
    <mailto:<a href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a>>] mailing list<br>
    UNSUBSCRIBE and account-management -><br>
    <a href="https://lists.puredata.info/listinfo/pd-list%5Bhttps://lists.puredata.info/listinfo/pd-list%5D" rel="noreferrer" target="_blank">https://lists.puredata.info/li<wbr>stinfo/pd-list[https://lists.p<wbr>uredata.info/listinfo/pd-list]</a><br></span>
    <<a href="https://lists.puredata.info/listinfo/pd-list%5Bhttps://lists.puredata.info/listinfo/pd-list%5D" rel="noreferrer" target="_blank">https://lists.puredata.info/l<wbr>istinfo/pd-list%5Bhttps://list<wbr>s.puredata.info/listinfo/pd-li<wbr>st%5D</a>><span><br>
<br>
     --<br>
<br>
    José Rafael Subía Valdez<br></span>
    <a href="http://www.jrsv.net" rel="noreferrer" target="_blank">www.jrsv.net</a> <<a href="http://www.jrsv.net" rel="noreferrer" target="_blank">http://www.jrsv.net</a>>[<a href="http://www.jrsv.net" rel="noreferrer" target="_blank">http://w<wbr>ww.jrsv.net</a><br>
    <<a href="http://www.jrsv.net" rel="noreferrer" target="_blank">http://www.jrsv.net</a>>]<span><br>
<br>
<br>
     _____________________________<wbr>__________________<br>
    <a href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a> <mailto:<a href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a>> mailing list<br>
    UNSUBSCRIBE and account-management -><br>
    <a href="https://lists.puredata.info/listinfo/pd-list%5Bhttps://lists.puredata.info/listinfo/pd-list%5D" rel="noreferrer" target="_blank">https://lists.puredata.info/li<wbr>stinfo/pd-list[https://lists.p<wbr>uredata.info/listinfo/pd-list]</a><br></span>
    <<a href="https://lists.puredata.info/listinfo/pd-list%5Bhttps://lists.puredata.info/listinfo/pd-list%5D" rel="noreferrer" target="_blank">https://lists.puredata.info/l<wbr>istinfo/pd-list%5Bhttps://list<wbr>s.puredata.info/listinfo/pd-li<wbr>st%5D</a>><span><br>
<br>
<br>
<br>
<br>
-- <br>
José Rafael Subía Valdez<br>
<a href="http://www.jrsv.net" rel="noreferrer" target="_blank">www.jrsv.net</a> <<a href="http://www.jrsv.net" rel="noreferrer" target="_blank">http://www.jrsv.net</a>><br>
<br>
<br>
<br>
<br>
<br>
<br>
______________________________<wbr>_________________<br>
<a href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -> <a href="https://lists.puredata.info/listinfo/pd-list" rel="noreferrer" target="_blank">https://lists.puredata.info/li<wbr>stinfo/pd-list</a><br>
</span></blockquote>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="m_8071466329689859304gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">José Rafael Subía Valdez<br><div><a href="http://www.jrsv.net" target="_blank">www.jrsv.net</a><br><div><br></div><div><br><div><br><font face="'lucida grande', tahoma, verdana, arial, sans-serif" size="4"><span style="font-size:14px;line-height:17px"><br></span></font></div></div></div></div></div>
</div></div>