<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Okay,</div>

<div>finally I found some time to try some stuff out. First, I gave Olivers examples a try.</div>

<div>I made a patch with eight [ol_sfplay~] objects to simulate my sample player and tested this patch on my old Raspi 2</div>

<div>and also a Raspi 3. I also tested two different audio interfaces: a Scarlett 2i4 USB audio interface and a HDMI-to-CINCH-Converter running on the 2835 ALSA driver.</div>

<div>The best result was achieved by the Raspberry Pi 3 with the Scarlett audio interface. I used<br/>
- block length of 64 from Pd's preferences</div>

<div>- buffersize of 512 and 1024 for [ol_sfplay~]</div>

<div> </div>

<div>I have no pops and Pd does not freeze.</div>

<div> </div>

<div>When I use the same configurations with the hdmi-to-cinch-converter and alsa, I get audio pops.</div>

<div> </div>

<div>When I use the same configurations with the Raspi 2, I get audio pops, even using the Scarlett interface and the Raspi "freezes" somehow. </div>

<div>It continues to play the eight samples, but my ssh and vnc connections break.</div>

<div> </div>

<div>Both Raspis are running with the same SD-card, so I conclude that the faster processor of the Raspi 3 and also the use of different audio interfaces have an impact on the audio pops. In terms of the audio interface, I don't understand why.</div>

<div> </div>

<div>Next, I will have a look at Giulios suggestions:-)</div>

<div> </div>

<div>Cheers, Jakob</div>

<div> </div>

<div> </div>

<div> 
<div style="margin: 10.0px 5.0px 5.0px 10.0px;padding: 10.0px 0 10.0px 10.0px;border-left: 2.0px solid rgb(195,217,229);">
<div style="margin: 0 0 10.0px 0;"><b>Gesendet:</b> Freitag, 01. November 2019 um 19:07 Uhr<br/>
<b>Von:</b> "Antoine Rousseau" <antoine@metalu.net><br/>
<b>An:</b> "Christof Ressi" <christof.ressi@gmx.at><br/>
<b>Cc:</b> Pd-List <pd-list@lists.iem.at><br/>
<b>Betreff:</b> Re: [PD] Raspberry Pi: Loading Samples RAM problem</div>

<div>
<div>OK.. So I look forward to seeing it!
<div> </div>
</div>
 

<div class="gmail_quote">
<div class="gmail_attr">Le ven. 1 nov. 2019 à 17:45, Christof Ressi <<a href="mailto:christof.ressi@gmx.at" onclick="parent.window.location.href='mailto:christof.ressi@gmx.at'; return false;" target="_blank">christof.ressi@gmx.at</a>> a écrit :</div>

<blockquote class="gmail_quote" style="margin: 0.0px 0.0px 0.0px 0.8ex;border-left: 1.0px solid rgb(204,204,204);padding-left: 1.0ex;">
<div>
<div style="font-family: Verdana;font-size: 12.0px;">
<div>
<div>the threaded soundfiler implementation is cool, but it could be greatly simplified with the worker thread API.</div>

<div> </div>

<div>
<div>also, there wouldn't be a need to have a dedicated thread for each object (which doesn't scale very well), and message passing would be done with a lock-free command FIFO (no mutex locking!)</div>

<div> </div>

<div>Christof</div>

<div style="margin: 10.0px 5.0px 5.0px 10.0px;padding: 10.0px 0.0px 10.0px 10.0px;border-left: 2.0px solid rgb(195,217,229);">
<div style="margin: 0.0px 0.0px 10.0px;"><b>Gesendet:</b> Freitag, 01. November 2019 um 17:30 Uhr<br/>
<b>Von:</b> "Antoine Rousseau" <<a href="mailto:antoine@metalu.net" onclick="parent.window.location.href='mailto:antoine@metalu.net'; return false;" target="_blank">antoine@metalu.net</a>><br/>
<b>An:</b> "Christof Ressi" <<a href="mailto:christof.ressi@gmx.at" onclick="parent.window.location.href='mailto:christof.ressi@gmx.at'; return false;" target="_blank">christof.ressi@gmx.at</a>>, Pd-List <<a href="mailto:pd-list@lists.iem.at" onclick="parent.window.location.href='mailto:pd-list@lists.iem.at'; return false;" target="_blank">pd-list@lists.iem.at</a>><br/>
<b>Betreff:</b> Re: [PD] Raspberry Pi: Loading Samples RAM problem</div>

<div>
<div>
<div>There's already a WIP about a threaded soundfiler:</div>

<div><a href="https://github.com/pure-data/pure-data/pull/655" target="_blank">https://github.com/pure-data/pure-data/pull/655</a></div>

<div> </div>

<div>with a complement, dispensing to rebuild the whole DSP tree after loading a soundfile:</div>

<div><a href="https://github.com/pure-data/pure-data/pull/667" target="_blank">https://github.com/pure-data/pure-data/pull/667</a></div>

<div> </div>

<div>The latter has some impact on CPU load: it significantly lightens normal [tabread]/[tabwrite] usage (no more need to reacquire the array each time), but adds a bit of load for setting it to another table. It also adds a bit of load for DSP-table objects at each DPS-block beginning (to check the table pointer is still valid). I had started to gprof the change, but I didn't go through with it...</div>

<div> </div>

<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div><font face="arial, helvetica, sans-serif">Antoine Rousseau </font></div>

<div><font face="arial, helvetica, sans-serif">  <a href="http://metalu.net" target="_blank">http://www.metalu.net</a> __ <a href="http://www.metaluachahuter.com/compagnies/al1-ant1/" target="_blank">http://www.metaluachahuter.com/</a></font><br/>
 </div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
 

<div class="gmail_quote">
<div class="gmail_attr">Le ven. 1 nov. 2019 à 14:31, Christof Ressi <<a href="mailto:christof.ressi@gmx.at" onclick="parent.window.location.href='mailto:christof.ressi@gmx.at'; return false;" target="_blank">christof.ressi@gmx.at</a>> a écrit :</div>

<blockquote class="gmail_quote" style="margin: 0.0px 0.0px 0.0px 0.8ex;border-left: 1.0px solid rgb(204,204,204);padding-left: 1.0ex;">another trick is to use [readsf~] in an upsampled subpatch.<br/>
<br/>
BTW, I have ideas for adding a worker thread to Pd (similar to Supercollider), which would help solving a lot of Pd's realtime-safety issues. I want to do that in the next couple of weeks when I have more time.<br/>
<br/>
Chrisotf<br/>
<br/>
> Gesendet: Freitag, 01. November 2019 um 14:21 Uhr<br/>
> Von: "oliver" <<a href="mailto:oliver@klingt.org" onclick="parent.window.location.href='mailto:oliver@klingt.org'; return false;" target="_blank">oliver@klingt.org</a>><br/>
> An: Pd-List <<a href="mailto:pd-list@lists.iem.at" onclick="parent.window.location.href='mailto:pd-list@lists.iem.at'; return false;" target="_blank">pd-list@lists.iem.at</a>><br/>
> Betreff: Re: [PD] Raspberry Pi: Loading Samples RAM problem<br/>
><br/>
> Hi,<br/>
><br/>
> try to use "soundfiler" to read only chunks of your files. so it's<br/>
> actually more a "harddisk"-streaming method.<br/>
><br/>
> have some example patches here:<br/>
><br/>
> mind, that this will be obviously limited by the read-speed of your SD-card.<br/>
><br/>
><br/>
> best<br/>
><br/>
> oliver<br/>
><br/>
><br/>
><br/>
><br/>
> Jakob Laue wrote:<br/>
> > Dear list,<br/>
> > i have a little problem with my raspberry pi..<br/>
> > I have built an eight-track sample player patch that runs on a raspberry pi.<br/>
> > When the patch loads, it initially loads all the samples it finds in<br/>
> > /home/pi/SamplePacks/SamplePack1, SamplePack2 etc..<br/>
> > into RAM using the standard approach:<br/>
> > - create two tables for each sample<br/>
> > - read data into tables with [read -resize table1 table2(<br/>
> > Afterwards I use [soundfiler] and calculate the frequency for [phasor]<br/>
> > and so on and so forth.<br/>
> > The patch works when I load a total amount of 500 gb into RAM.<br/>
> > Today I tested to load 9 GB of samples and the result (obviously) is the<br/>
> > pi crashing.<br/>
> > I have tested on a raspberry pi 2 and a raspberry pi 3. Both pis only<br/>
> > have 1 GB of RAM so it's obvious that problems arise trying to load 9 GB<br/>
> > of samples.<br/>
> > Do you have any hints or ideas how I could solve this problem? Loading<br/>
> > from disk while performing is not an option (I think) because of audio pops.<br/>
> > Do you know any ways to extend the RAM of the pi?<br/>
> > Maybe you know of some other small boards like beagle or so that have<br/>
> > more RAM than a pi.<br/>
> > Thank you very much! Jakob<br/>
> ><br/>
> ><br/>
> > _______________________________________________<br/>
> > <a href="mailto:Pd-list@lists.iem.at" onclick="parent.window.location.href='mailto:Pd-list@lists.iem.at'; return false;" target="_blank">Pd-list@lists.iem.at</a> mailing list<br/>
> > UNSUBSCRIBE and account-management -> <a href="https://lists.puredata.info/listinfo/pd-list" target="_blank">https://lists.puredata.info/listinfo/pd-list</a><br/>
> ><br/>
><br/>
><br/>
> --<br/>
> \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\<br/>
> /////////////// <a href="http://pendler.klingt.org" target="_blank">http://pendler.klingt.org</a> //////////////<br/>
> \\\\\\\\\\\\\\\ <a href="http://oliver.klingt.org" target="_blank">http://oliver.klingt.org</a>  \\\\\\\\\\\\\\<br/>
> ////////////////////////////////////////////////////////<br/>
> _______________________________________________<br/>
> <a href="mailto:Pd-list@lists.iem.at" onclick="parent.window.location.href='mailto:Pd-list@lists.iem.at'; return false;" target="_blank">Pd-list@lists.iem.at</a> mailing list<br/>
> UNSUBSCRIBE and account-management -> <a href="https://lists.puredata.info/listinfo/pd-list" target="_blank">https://lists.puredata.info/listinfo/pd-list</a><br/>
><br/>
<br/>
<br/>
<br/>
_______________________________________________<br/>
<a href="mailto:Pd-list@lists.iem.at" onclick="parent.window.location.href='mailto:Pd-list@lists.iem.at'; return false;" target="_blank">Pd-list@lists.iem.at</a> mailing list<br/>
UNSUBSCRIBE and account-management -> <a href="https://lists.puredata.info/listinfo/pd-list" target="_blank">https://lists.puredata.info/listinfo/pd-list</a></blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
_______________________________________________<br/>
<a href="mailto:Pd-list@lists.iem.at" onclick="parent.window.location.href='mailto:Pd-list@lists.iem.at'; return false;" target="_blank">Pd-list@lists.iem.at</a> mailing list<br/>
UNSUBSCRIBE and account-management -> <a href="https://lists.puredata.info/listinfo/pd-list" target="_blank">https://lists.puredata.info/listinfo/pd-list</a></blockquote>
</div>
_______________________________________________ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> <a href="https://lists.puredata.info/listinfo/pd-list" target="_blank">https://lists.puredata.info/listinfo/pd-list</a></div>
</div>
</div></div></body></html>