Csound Csound-dev Csound-tekno Search About

Re: real time midi optimization

Date2007-09-02 10:32
FromVictor Lazzarini
SubjectRe: real time midi optimization
yes, ksmps=1 will be the slowest. The point is really
using a low-latency driver (ASIO on Windows) and
small buffers, with a small ksmps (but not 1).
Also p3 is not used if NOTEON/OFF are used and
realtime MIDI events are captured (although this is
not the only way of handling midi messages, it is
the most straightforward).

Victor

>
> I'm not sure what you're suggesting?
>
> If ksmps = 1 it wouldn't matter what the buffer size
> would.  The   overhead of using ksmps = 1 is certainly not
> ideal for realtime   performance.  I would set ksmps to at
> least 10 or 20 .. if not much   larger (100 ...  400)
>
> Also - what do you mean by ... idur = p3, slight adjust?
>
> greg
>
> On Sep 1, 2007, at 3:53 PM, Partev Barr Sarkissian wrote:
>
> > Lately, I've been reading Csound lit about how, in
> > circumstances like this, setting the k-rate to be the
> > same as the sample (or audio) rate is being used as a
> solution. >
> > Where:   sr = 44100
> >          kr = 44100
> >          ksmps = 1
> >
> > Make sure of the ability of your buffers to deal with
> > that rate for both audio and MIDI simultaneously.
> > Also, find a happy medium for idur = p3, a slight adjust
> > may be nedded. I've been seeing more of this sort of
> solution lately. >
> > Also, 'filter' or mask the MIDI data. Turn-off any MIDI
> > functions in your receiver device that you're not using.
> > This will cut down on data neede to be processed and the
> > processing required. Keep MIDI cables short to minimum
> > length and don't daisy chain devices, use a star hook-up
> configuration. >
> > -- Partev
> >
> >
> >
> >
> >
> >
> >
> > --- mpm@alumni.caltech.edu wrote:
> >
> > From: Michael Mossey 
> > To:  csound@lists.bath.ac.uk
> > Subject: [Csnd] real time midi optimization
> > Date: Sat, 01 Sep 2007 11:53:23 -0700
> >
> > Hello, I'm trying to use real-time midi. I have it
> > working, but I have to set the buffer sizes to -b512
> > -B2048 which is a bit more latency   than
> > I would like. My orc is
> >
> > ---------------------------
> > sr=44100
> > kr=4410
> > ksmps=10
> > nchnls=2
> >
> > ;i1  time  dur  amp
> > instr 1
> > idur = p3
> > icps cpsmidi
> > print icps
> > aout   oscili 1, icps, 1
> >    outs aout * 1000, aout * 1000
> >
> > endin
> > --------------------------------
> >
> > and my sco is
> >
> > f1 0 4096 10 1
> > i1 0 120 1 1
> >
> > ---------------
> >
> > My system is a Core 2 Duo 1.8 GHz, sound card is M-audio
> > Audiophile 24/96. 1GB ram. Running Windows XP. Using
> Csound version 5. >
> > How can I improve latency?
> >
> > -Mike
> > --
> > Send bugs reports to this list.
> > To unsubscribe, send email to
> csound-unsubscribe@lists.bath.ac.uk >
> >
> >
> >
> >
> __________________________________________________________
> > ___ Netscape.  Just the Net You Need.
> > --
> > Send bugs reports to this list.
> > To unsubscribe, send email to
> csound-unsubscribe@lists.bath.ac.uk >
>
> --
> Send bugs reports to this list.
> To unsubscribe, send email to
> csound-unsubscribe@lists.bath.ac.uk