[PD] Audio drops when I refresh many text in scrolline by externalMIDIcontrol.

Roman Haefeli reduzierer at yahoo.de
Sat Oct 20 00:38:14 CEST 2007


hi kuba

there are some situations, where audio drop outs occur. if you know
thesee, you could at least try to avoid them.

- fileIO: all objects, that read stuff from disk, will block audio,
until they finished executing. so do load all files beforehand. when you
need load soundfiles during performance into tables, don't use
[soundfiler]. miller once suggested using [readsf~] in a subpatch with
upsamplsing, so it will load the sample faster than reading it in
realtime, but not block dsp during loadtime.

-recompiling dsp-graph. loading patches or creating objects dynamically
can cause audio dropouts. for performance situations open all used
patches beforehand and switch (with [switch~]) all parts off, that you
don't need. and do not use dynamic patching.

- many operations in one tick. don't use things like [100000(-[until].
since pd wants to process it in 0 logical time, it will probably will
cause a drop out. 

- sending too much data to [netsend]/[netclient]/[netserver]/[tcpsend]
etc. these objectclasses have a certain internal buffer (4kB, iirc). if
the buffer is full, these objects will block processing of pd, until the
buffer is emtptied again. try to send not big chunks of data in one go,
but use kind of a drip mechanism to artificially limit the bandwidth.


if you are on ubuntu, make sure, that your user is in the group 'audio'
and that you start pd with -rt. otherwise pd won't have higher priority,
which will result in dropouts, whenever you scroll in the webbrowser or
change the workspace etc. i don't have dropouts here, when switching
workspace or moving a slider in pd and i am using ubuntu dapper. i
think, if you encounter dropouts, while moving a slider in pd, this
could be a sign, that your pd is not setup in an optimal way.

if you avoid above points and if you setup your system accordingly, your
pd won't have any dropouts anymore.  

roman


On Fri, 2007-10-19 at 19:36 +0200, Kuba Szczypek wrote:
> Thank you Phil
> 
> Yes I have ram disk ready for use.
> What about play some music, adding effects and write it to hard drive
> in 8 tracks simultaneously? Since ram disk has limited capacity it must 
> be written to hard drive. Then probably it will cause drop audio.
> 
> But my main problem now is related to understanding why I can do 
> something by fader on screen without drops, and when I use fader on 
> hardware MIDI then it give me hangs and drops.
> 
> Also I`m waiting for input from anyone who know PD and MAX and can give 
> a comparing, with focus on possibilities to create complete
> audio (or video) tool, not only for learn and fun, but also for using.
> 
> I`m would like to have base in pd or other program who can give me this 
> possibilities.
> 
> Of course I can be wrong, and you may suggest me (for example) to use
> external sequencer, external multitrack etc.
> 
> I seen on cycling`74 web page that they now recommending Ableton Live 
> for sequencing. Question is why: because marketing or because MAX is too 
> bad.
> 
> The same question I have related to pd.
> Please forgive me if I have not elegant form, but I have bad english and 
> I`m frustrated too long (by drops audio).
> 
> Best regards,
> Kuba
> 
> 
> Dnia 19-10-2007 o godz. 16:33 Phil Stone napisał(a):
> > Kuba,
> > 
> > I was working on a similar problem last weekend (see
> > http://lists.puredata.info/pipermail/pd-list/2007-10/055005.html for the
> > thread).  If your problem is related to file i/o, and I think it might
> > be, then any i/o that takes longer than one dsp block to complete will
> > cause audio dropouts.
> > 
> > The good news is that you don't have to manually load everything into
> > memory to avoid this; I had good success using a ram disk.  This is
> > better than pre-loading everything because your code doesn't have to
> > change -- it still thinks it's loading from a hard drive.  On OS X, at
> > least, there are utilities that make setting up ram disks very easy
> > (even allowing automatic read/write from disk for automatic
> > persistence).  Even without utilities, it's not hard to do on *nix (I
> > don't know about Windows).
> > 
> > In many cases (all my cases), the ram disk speeds up the i/o enough to
> > get things done in one DSP block -- thus, no dropouts.
> > 
> > I hope this can help you.
> > 
> > 
> > Phil Stone
> > pkstonemusic.com
> > 
> > Kuba Szczypek wrote:
> > > Thank you Derek,
> > >
> > > Two instances I alerady tried, but sending by osc that many messages
> > > give me the same result (so it isn`t problem with scrollist).
> > > Of course I can put all modules/objects/patch related to
> > > keeping_song_names_in_memory and putting_this_names_to_scrollist
> > > on second instance, but this is serious complicating life.
> > >
> > > Question: Of course we all love PD, but is this system only for
> > > learning? If I need to build good, stabillity, without any drops in
> > > audio (also when I read or write to disk) patch for have fun from
> > > playing/creating music - is puredata good choice or it`s better jump to
> > > another environment (like max)?
> > >
> > > I`m open to change since most important for me is finally finish project
> > > with great result, and not waiting for update.
> > >
> > > -rt flag I have all time, and running under root give no difference.
> > > If I good understand jack adding latency?
> > >
> > >
> > >
> > > thank you
> > > Kuba
> > >
> > >
> > >
> > >
> > >
> > > Dnia 19-10-2007 o godz. 13:48 Derek Holzer napisał(a):
> > >   
> > >> Hi Kuba,
> > >>
> > >> same problem as ever.... PD's GUI implementation is a bit crippled. My
> > >> suggestion would be to run two instances of PD, one for the DSP running
> > >> --nogui and one for the GUI running --noaudio. Communicate between via
> > >> netsend or OSC. Check the archives for more tips on this.
> > >>
> > >> As a workaround, you could also try a single instance of PD, running -rt
> > >> as root. This cleared up some but not all of my GUI-related glitches on
> > >> Linux.
> > >>
> > >> My experiences were that ALSA+JACK worked best, but others (like Frank
> > >> Barknecht) have reported that OSS (by this I assume OSS emulated by
> > >> ALSA) worked better, or at least as good. I think. Again, search the
> > >> archives, because that topic comes up very often on this list.
> > >>
> > >> best,
> > >> d.
> > >>
> > >> Kuba Szczypek wrote:
> > >>     
> > >>> Dear friends,
> > >>>
> > >>> I have serious problem with  my patch. It is hard to write it in proper
> > >>> English for me, but I have no choice - I must try,since I`m looking for
> > >>> help.
> > >>>
> > >>>
> > >>> I would like to show (by scrollist) my list of titles 128 song names.
> > >>> But since I have small space for this on screen, I use only 8 lines in
> > >>> scrollist and "page up" page down" mechanism.
> > >>> I prepared patch who:
> > >>> - first send 128 lines into memory of scrollist
> > >>> - next I mark/unmark proper line.
> > >>>
> > >>> But since I have only 8 line show  on display , and list have 128
> > >>> positions I often must change pages.
> > >>>
> > >>> The problem is that changing pages cause drop. If I change very fast (by
> > >>> fader) from 0 to 127 (song nuber) many times and from 127 to 0 (again
> > >>> again) then I can see that screen is completely frozen and audio drop is
> > >>> very long (like about 3, 4 second).
> > >>> More moving I did = bigger drop and longer frozen screen.
> > >>>
> > >>> When I do the same, but with fader on the screen, no problem there.
> > >>> Problem is only when I use external MIDI fader.
> > >>> (of course normally when I use any MIDI message it work great,
> > >>> problem is only with this setup: scrollist)
> > >>>
> > >>> I tried change thread priority (pd and pd-gui) with many different
> > >>> combinations, but it not solved problem.
> > >>>
> > >>> I use Ubuntu Studio with gnome, oss audio system. Pentium IV 2,4  512
> > >>> ram Geforce mx 400 with TV out enabled.
> > >>>
> > >>> I would like to ask also is oss better than alsa+jack or not?
> > >>> (I mean performance power).
> > >>>
> > >>> Thank you
> > >>>
> > >>> ----------------------------------------------------
> > >>> Paul Oakenfold - najdroższy DJ świata
> > >>> już 7 grudnia wystąpi w Hali Stulecia we Wrocławiu.
> > >>> Zobacz więcej:
> > >>> http://klik.wp.pl/?adr=http%3A%2F%2Fcorto.www.wp.pl%2Fas%2Fgaleria.html&sid=61
> > >>>
> > >>>
> > >>>
> > >>> _______________________________________________
> > >>> PD-list at iem.at mailing list
> > >>> UNSUBSCRIBE and account-management ->
> > >>>       
> > >> http://lists.puredata.info/listinfo/pd-list
> > >>     
> > >> --
> > >> derek holzer ::: http://www.umatic.nl :::
> > >> http://blog.myspace.com/macumbista
> > >> ---Oblique Strategy # 175:
> > >> "What are the sections sections of? Imagine a caterpillar moving"
> > >>     
> > >
> > > ----------------------------------------------------
> > > Czaruje smakiem, zapachem i kolorem.
> > > Książka Magdy Gessler już w księgarniach! Zobacz:
> > > http://klik.wp.pl/?adr=http%3A%2F%2Fcorto.www.wp.pl%2Fas%2Fprzepis.html&sid=65
> > >
> > >
> > >
> > > _______________________________________________
> > > PD-list at iem.at mailing list
> > > UNSUBSCRIBE and account-management ->
> > http://lists.puredata.info/listinfo/pd-list
> > >
> > >
> 
> ----------------------------------------------------
> Elektroniczne gazety w Twoim PC!
> Wypróbuj za darmo – kup prasę z domu i oszczędź pieniądze!
> http://klik.wp.pl/?adr=http%3A%2F%2Fe-wydania.wp.pl&sid=67
> 
> 
> 
> _______________________________________________
> PD-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list


		
___________________________________________________________ 
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de





More information about the Pd-list mailing list