Csound Csound-dev Csound-tekno Search About

Re: MIDI input

Date1998-07-23 09:34
FromGabriel Maldonado
SubjectRe: MIDI input
Kevin,
I have got a guitar controller too, a gk-2 with a gr-50, and there is a
noticiable dalay even with MIDI sinthesizers. The new version of
CsoundRT, called DirectCsound, uses directSound APIs to reduce the
delay. The only problem is that you must have an audio card compatible
with directSound (and obviously you must have  Microsoft DirectX 3.0 or
higer installed on your computer) . There are some problems with audio
cards. With my SB16 and my (very old and slow) pentium 133, however I
can get a very, very low delay (about 1/50 of second in stereo, less in
mono).
You must find the optimum value to assign to the flag -+X (in
DirectCsound -+X has another function than in older versions).



Kevin Gallagher wrote:

> Dear Csounders,
> I have been experimenting with Realtime MIDI input and Csound.  I had
> posted to the group a couple months ago to get advice on the
> limitations
> of Csound and whatever gear I was planning to buy.  Well, I have all
> my
> gear.  A Roland GR30 guitar synth (with GK2A pickup) running into my
> computer (IBM Aptiva Pentium II 300Mhz) via a MIDI to serial adaptor.
>
> My problem is that I get about a 0.2 second lag time between my attack
> and
> the output of the signal.  Just enough to be annoying.  I've tried a
> few
> things.  I tried using Gabriel Maldonado's VMCI to see if my external
> controller was the problem.  It's not...the delay is still there with
> VMCI. I've tried a few scripts. Here is the simplest one I could think
> of:
>
> orchestra===========
>
> sr = 22050
> kr = 441
> ksmps = 50
> nchnls = 1
>
> instr 1
> ipch pchmidi
> a1 pluck 5000, cpspch(ipch), cpspch(ipch), 0, 1
> out a1
> endin
>
> score=============
>
> f0 600
> e
>
> I also have a much more complex script (which I'll share if anybody's
> interested), and both give roughly the same 0.2 second delay so I'm
> not
> sure how much more I could streamline my scripting.
>
> I'm also pretty sure that my computer has enough horsepower, although
> I
> could be wrong.
>
> I don't know how to change my buffer sizes in the interface I use
> (WCShell
> and RTSound 1.8.)
>
> Can anybody with experience in this area offer insight into why I
> can't
> get rid of my lag time?  Any help would be appreciated,  Thanks!
>
>                         Kevin Gallagher, kgallagh@astro.temple.edu
>                         Web Address -
> http://astro.temple.edu/~kgallagh



--
Gabriel Maldonado

http://www.agora.stm.it/G.Maldonado/home2.htm