Re: [linux-audio-dev] more re csound -L

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] more re csound -L
From: Paul Winkler (slinkp_AT_ulster.net)
Date: ti syys   07 1999 - 03:24:56 EDT


est_AT_hyperreal.org wrote:
>
> Paul Winkler discourseth:
> >
> > Need to do some feasibility testing to see if this _can_ work
> > realtime. How accurate/reliable is application-generated timing sent
> > to csound -L <devicename>?
> >
> [...]
> >
> > Previous experiments with csound events from stdin are not especially
> > encouraging: more than about 10 simultaneous events were audibly not
> > simultaneous.
>
> I'm getting good results. Interested parties should see
> www.hyperreal.org/~est/csound/csoundL.tar.gz.

Thanks a lot! This definitely answers some of my questions.

I tried changing that last loop to run nothing but lots() 4 times, then
run that loop 16 times. On my system, having 30 events in lots() doesn't
work so well... it starts out sounding good, but within 5 seconds timing
has gone haywire and notes are breaking down into a blur of successive
notes...

I noticed your README says that
"Note well: the 30 events are written in a single call to os.write()"

I wanted to see how much that matters. The answer seems to be, "not all
that much" (not the answer I expected).
First I modified your function lots() into this:

def lotsn(n):
    amp = 30000 / n
    note = "i1 0 5 " + str(amp) + "\n"
    notes = note * n
    os.write(1, notes)

With this method, I can only get about n = 12 before timing starts to go
bad. Though it doesn't sound like individual "notes" (calls to lots())
are blurred; rather, they are misplaced in time. (Blurring happens
quickly with much higher values of n.)

I fiddled a bit more to see how much it hurts to have lots of os.write()
calls in a row...

def lotsmore(n):
    amp = 30000 / n
    note = "i1 0 5 " + str(amp) + "\n"
    for i in range (0, n ):
        os.write(1, note)

You would think that for a given n, lotsn() would fare better than
lotsmore() since it only ever calls os.write() once.
But I'm not finding much difference...

Thoughts?

-- 

---------------- paul winkler ------------------ slinkP arts: music, sound, illustration, design, etc.

zarmzarm_AT_hotmail.com --or-- slinkp AT ulster DOT net http://www.ulster.net/~abigoo/ ======================================================


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : pe maalis 10 2000 - 07:27:11 EST