| Gabriel Maldonado wrote:
>
> 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.
Does anyone know exactly why using DirectX is faster than the usual
methods of audio output? I have another Windows-based program, Vaz,
which exhibits a similar speedup when using DirectX. I was wondering
if there was something amazing about DirectX, or if it was making
up for a deficiency elsewhere in Windows.
Bye!
Ben.
Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa10303;
23 Jul 98 19:02 BST
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa08788;
23 Jul 98 19:02 BST
Received: (qmail 19882 invoked from network); 23 Jul 1998 18:02:03 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
by mercury.bath.ac.uk with SMTP; 23 Jul 1998 18:02:03 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (SAA17212); Thu, 23 Jul 1998 18:56:47 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Thu, 23 Jul 1998 18:56:32 +0100
Received: from endeavor.flash.net [209.30.0.40] by hermes via ESMTP (SAA08029); Thu, 23 Jul 1998 18:56:31 +0100 (BST)
Received: from flash.net (fwasc35-214.flash.net [209.30.58.214])
by endeavor.flash.net (8.8.8/8.8.5) with ESMTP id MAA24311;
Thu, 23 Jul 1998 12:56:05 -0500 (CDT)
Message-ID: <35B77962.B05BFBEF@flash.net>
Date: Thu, 23 Jul 1998 12:56:51 -0500
From: pete moss
Organization: pete moss GmbH
X-Mailer: Mozilla 4.04 [en] (Win95; I)
MIME-Version: 1.0
To: ben@qsure.demon.co.uk
CC: Csound Discussion List
Subject: Re: MIDI input
References: <35B6F588.CF77FEC1@agora.stm.it> <35B72BDD.931F45D2@qsure.demon.co.uk>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
i would say that it is making up for other windows problems. basically,
directx allows access directly to the hardware instead of going through the
various software layers first. i think windows is rather thick
software-wise.
pete
Ben Jefferys wrote:
> Gabriel Maldonado wrote:
> >
> > 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.
>
> Does anyone know exactly why using DirectX is faster than the usual
> methods of audio output? I have another Windows-based program, Vaz,
> which exhibits a similar speedup when using DirectX. I was wondering
> if there was something amazing about DirectX, or if it was making
> up for a deficiency elsewhere in Windows.
>
> Bye!
> Ben.
Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa10310;
23 Jul 98 19:02 BST
Received: from pat.bath.ac.uk by stork.maths.Bath.AC.UK id aa08814;
23 Jul 98 19:02 BST
Received: (qmail 7401 invoked from network); 23 Jul 1998 18:02:31 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
by pat.bath.ac.uk with SMTP; 23 Jul 1998 18:02:31 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (SAA07342); Thu, 23 Jul 1998 18:56:59 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Thu, 23 Jul 1998 18:56:41 +0100
Received: from mars.aros.net [207.173.16.20] by hermes via ESMTP (SAA15786); Thu, 23 Jul 1998 18:56:39 +0100 (BST)
Received: from slcserver.avmtechnology.com ([207.173.20.71])
by mars.aros.net (8.8.7/8.8.4) with ESMTP
id LAA21590 for ; Thu, 23 Jul 1998 11:56:36 -0600 (MDT)
Received: by SLCSESRVER with Internet Mail Service (5.0.1458.49)
id ; Thu, 23 Jul 1998 11:58:33 -0600
Message-ID:
From: Engineering1
To: Csound List
Subject: RE: MIDI input
Date: Thu, 23 Jul 1998 11:58:31 -0600
X-Priority: 3
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.0.1458.49)
Content-Type: text/plain
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
Direct X is closer to hardware then standard window calls, thus the
speed up.
Chia
-----Original Message-----
From: Ben Jefferys [mailto:ben@qsure.demon.co.uk]
Sent: Thursday, July 23, 1998 6:26 AM
To: Gabriel Maldonado
Cc: Kevin Gallagher; Csound Discussion List
Subject: Re: MIDI input
Gabriel Maldonado wrote:
>
> 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.
Does anyone know exactly why using DirectX is faster than the usual
methods of audio output? I have another Windows-based program, Vaz,
which exhibits a similar speedup when using DirectX. I was wondering
if there was something amazing about DirectX, or if it was making
up for a deficiency elsewhere in Windows.
Bye!
Ben.
Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa11048;
23 Jul 98 23:08 BST
Received: from pat.bath.ac.uk by stork.maths.Bath.AC.UK id aa20225;
23 Jul 98 23:08 BST
Received: (qmail 16890 invoked from network); 23 Jul 1998 22:08:41 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
by pat.bath.ac.uk with SMTP; 23 Jul 1998 22:08:41 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (XAA26004); Thu, 23 Jul 1998 23:04:47 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Thu, 23 Jul 1998 23:04:38 +0100
Received: from jaguars-int.cableinet.net [193.38.113.9] by hermes via SMTP (XAA14402); Thu, 23 Jul 1998 23:04:37 +0100 (BST)
Received: (qmail 25740 invoked from network); 23 Jul 1998 22:04:32 -0000
Received: from unknown (HELO cableinet.co.uk) (194.117.146.216)
by jaguars with SMTP; 23 Jul 1998 22:04:32 -0000
Message-ID: <35B7B1D5.252B335A@cableinet.co.uk>
Date: Thu, 23 Jul 1998 22:57:41 +0100
From: Richard Dobson
Organization: Composers Desktop project
X-Mailer: Mozilla 4.04 [en] (Win95; I)
MIME-Version: 1.0
To: pete moss
CC: Csound Discussion List
Subject: Re: MIDI input
References: <35B6F588.CF77FEC1@agora.stm.it> <35B72BDD.931F45D2@qsure.demon.co.uk> <35B77962.B05BFBEF@flash.net>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
The point being that DirectX is a hardware-independent way of addressing the
hardware directly. It was never needed until PC's got fast enough to do complex
audio i/o in real-time. Microsoft has simply introduced a new solution to a new
requirement. DirectX depends on manufacturers including DirectX driver support
for their card. Otherwise, performance degrades to that of standard Mmedia -
Windows emulates DirectX on your behalf, using the normal WAVE driver.
People do seem to have short memories, regarding Windows. When Windows 3.1 came
out, with multimedia support, it was typically running on a 386-based machine,
with 4Mbytes of RAM, and a hard disk with a 45musec access time. I had such a
machine. I wrote my own code to send audio to a Motorola-based DSP development
card. The hard disk was not fast enough to do 44K stereo. DirectX would not have
made any difference to that! There are many things one can criticize Microsoft
about, but 'not doing then what there was no possible reason to do then' is not
one of them. :-)
It is also sometimes forgotten that that the PC was, and still is, primarily a
general-purpose computer (albeit highly expandable and customizable); such a
machine will probably ~always~ have limitations when being pushed to do
zero-latency audio. That is not Microsoft's fault either.
Richard Dobson
pete moss wrote:
>
> i would say that it is making up for other windows problems. basically,
> directx allows access directly to the hardware instead of going through the
> various software layers first. I think windows is rather thick
> software-wise.
>
Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa11177;
24 Jul 98 0:29 BST
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa24260;
24 Jul 98 0:29 BST
Received: (qmail 2626 invoked from network); 23 Jul 1998 23:29:18 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
by mercury.bath.ac.uk with SMTP; 23 Jul 1998 23:29:18 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (AAA25478); Fri, 24 Jul 1998 00:27:07 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Fri, 24 Jul 1998 00:26:59 +0100
Received: from GS160.SP.CS.CMU.EDU [128.2.203.172] by hermes via SMTP (AAA18602); Fri, 24 Jul 1998 00:26:58 +0100 (BST)
Message-Id: <199807232326.AAA18602@hermes>
Subject: Re: MIDI input
To: Csound mailing list
Date: Thu, 23 Jul 1998 19:26:18 -0400 (EDT)
From: Eli Brandt
In-Reply-To: <35B7B1D5.252B335A@cableinet.co.uk> from "Richard Dobson" at Jul 23, 98 10:57:41 pm
X-Portmanteau: pantryptaminergeticallysisterrainbowtie
Reply-To: eli+@cs.cmu.edu
X-Mailer: ELM [version 2.4 PL25-40]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
Richard Dobson wrote:
> It is also sometimes forgotten that that the PC was, and still is,
> primarily a general-purpose computer (albeit highly expandable and
> customizable); such a machine will probably ~always~ have limitations
> when being pushed to do zero-latency audio. That is not Microsoft's
> fault either.
I have to defend the PC here: the hardware is not the problem. Bare,
its interrupt latency is well down in the microsecond range. Even
DMA-based sound cards can reasonably work with blocks of a millisecond
or so, not to mention the modern cards.
And under DOS (including Windows 3.1) you can actually get that kind
of latency. Under 95 or NT4, using the normal APIs, you can't.
You can't reliably get your user-mode code executed often enough to
prevent buffer underflow. This is, if we're assigning blame, most
certainly Microsoft's fault.
DirectSound is much better than MMSYSTEM, enough so that the audio
output is no longer the limiting factor (unless you'd like to use NT);
we're up against these general real-time issues. I can hardly fault
Microsoft's strategic decision to punt on them: they're selling to
the 99% that don't care (and figuring few of the 1% will switch to
Irix or BeOS or whatever anyway -- et tu?).
So people end up writing device drivers. Bleh.
--
Eli Brandt | eli+@cs.cmu.edu | http://www.cs.cmu.edu/~eli/
Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa11205;
24 Jul 98 0:32 BST
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa24542;
24 Jul 98 0:32 BST
Received: (qmail 2758 invoked from network); 23 Jul 1998 23:32:07 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
by mercury.bath.ac.uk with SMTP; 23 Jul 1998 23:32:07 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (AAA11189); Fri, 24 Jul 1998 00:30:05 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Fri, 24 Jul 1998 00:29:50 +0100
Received: from endeavor.flash.net [209.30.0.40] by hermes via ESMTP (AAA06380); Fri, 24 Jul 1998 00:29:49 +0100 (BST)
Received: from flash.net (fwasc35-214.flash.net [209.30.58.214])
by endeavor.flash.net (8.8.8/8.8.5) with ESMTP id SAA06897;
Thu, 23 Jul 1998 18:29:44 -0500 (CDT)
Message-ID: <35B7C797.E8B291C9@flash.net>
Date: Thu, 23 Jul 1998 18:30:32 -0500
From: pete moss
Organization: pete moss GmbH
X-Mailer: Mozilla 4.04 [en] (Win95; I)
MIME-Version: 1.0
To: Richard Dobson , csound
Subject: Re: MIDI input [programming and latency]
References: <35B6F588.CF77FEC1@agora.stm.it> <35B72BDD.931F45D2@qsure.demon.co.uk> <35B77962.B05BFBEF@flash.net> <35B7B1D5.252B335A@cableinet.co.uk>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
i agree that the hardware needs to up to the task. but it also seems that writing
code for windows often involves several layers of implementation, especially with
oop.
object1->do_something() calls generic object function which calls other functions
or winapi which calls possibly more winapi which calls code directly dealing with
hardware. granted, i think much of this is needed to make programing better and
easier (we cant all write asm!) but it does thicken up the texture a bit,
introducing latency. it just seems like programming used to be much more direct by
calling one function that accessed hardware. it seems to me that directx is a way
to get around the biggest bear in win programming - the winapi.
pete
Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa11403;
24 Jul 98 1:43 BST
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa28402;
24 Jul 98 1:43 BST
Received: (qmail 4398 invoked from network); 24 Jul 1998 00:43:13 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
by mercury.bath.ac.uk with SMTP; 24 Jul 1998 00:43:13 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (BAA21481); Fri, 24 Jul 1998 01:40:25 +0100 (BST)
From: intent@club-internet.fr
Received: from exeter.ac.uk by maths.ex.ac.uk; Fri, 24 Jul 1998 01:40:16 +0100
Received: from root@ppp-105-161.villette.club-internet.fr [194.158.105.161] by hermes via ESMTP (BAA08277); Fri, 24 Jul 1998 01:40:14 +0100 (BST)
Received: from localhost (intent@localhost [127.0.0.1])
by localhost.localdomain (8.8.7/8.8.7) with SMTP id AAA00522
for ; Fri, 24 Jul 1998 00:23:10 +0200
Date: Fri, 24 Jul 1998 00:23:10 +0200 (CEST)
X-Sender: intent@localhost
To: csound
Subject: Re: MIDI timing irregularities
In-Reply-To:
Message-ID:
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
After a long search:
The solution is to reduce "-b" value. 1024 is the default one, 512 seems
ok.
A comment should be add in the readme file LINUX_MIDIOUT.TXT
F.ernst
Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa11676;
24 Jul 98 3:52 BST
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa05973;
24 Jul 98 3:52 BST
Received: (qmail 7583 invoked from network); 24 Jul 1998 02:52:29 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
by mercury.bath.ac.uk with SMTP; 24 Jul 1998 02:52:29 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (DAA22317); Fri, 24 Jul 1998 03:49:41 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Fri, 24 Jul 1998 03:49:28 +0100
Received: from out5.ibm.net [165.87.194.243] by hermes via ESMTP (DAA26216); Fri, 24 Jul 1998 03:49:27 +0100 (BST)
Received: from ibm.net (slip-32-100-209-74.dc.us.ibm.net [32.100.209.74]) by out5.ibm.net (8.8.5/8.6.9) with ESMTP id CAA11486 for ; Fri, 24 Jul 1998 02:49:21 GMT
Message-ID: <35B7F72C.256D2D5B@ibm.net>
Date: Thu, 23 Jul 1998 22:53:32 -0400
From: Job van Zuijlen
Reply-To: zuijlen@ibm.net
X-Mailer: Mozilla 4.05 [en] (Win95; U)
MIME-Version: 1.0
To: Csound List
Subject: Interactive filter design page
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
A nice WWW page I found that lets you design your own filters
is the following:
http://www.cs.york.ac.uk/~fisher/mkfilter/
Job van Zuijlen
Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa11810;
24 Jul 98 5:46 BST
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa11036;
24 Jul 98 5:46 BST
Received: (qmail 10519 invoked from network); 24 Jul 1998 04:46:20 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
by mercury.bath.ac.uk with SMTP; 24 Jul 1998 04:46:19 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (FAA00908); Fri, 24 Jul 1998 05:42:38 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Fri, 24 Jul 1998 05:42:26 +0100
Received: from kgallagh@tornado.ocis.temple.edu [155.247.166.103] by hermes via ESMTP (FAA05698); Fri, 24 Jul 1998 05:42:24 +0100 (BST)
Received: from localhost (kgallagh@localhost)
by tornado.ocis.temple.edu (8.8.8/8.8.8) with SMTP id AAA26673
for ; Fri, 24 Jul 1998 00:42:23 -0400 (EDT)
Date: Fri, 24 Jul 1998 00:42:23 -0400 (EDT)
From: Kevin Gallagher
To: Csound Discussion List
Subject: MIDI stuff
Message-ID:
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
Well, I downloaded DirectX 5 and Gabriel Maldonado's DirectSound 2.0, and
that did the trick. I still need to work on some tweaking (mostly a
matter of getting used to my new setup), but I have almost completely
eliminated that delay. The delay is now virtually imperceptible. Thanks
to everyone who responded!
Kevin Gallagher, kgallagh@astro.temple.edu
Web Address - http://astro.temple.edu/~kgallagh
Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa12064;
24 Jul 98 9:08 BST
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa20186;
24 Jul 98 9:08 BST
Received: (qmail 26500 invoked from network); 24 Jul 1998 08:07:58 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
by mercury.bath.ac.uk with SMTP; 24 Jul 1998 08:07:58 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (JAA14341); Fri, 24 Jul 1998 09:05:00 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Fri, 24 Jul 1998 09:04:37 +0100
Received: from agora.stm.it [195.62.32.1] by hermes via ESMTP (JAA24676); Fri, 24 Jul 1998 09:04:35 +0100 (BST)
Received: from default (ppp02-21.dial-access.stm.it [195.62.37.85]) by agora.stm.it (8.8.8/8.8.5) with ESMTP id KAA07602; Fri, 24 Jul 1998 10:04:20 +0200 (ITADST)
Message-ID: <35B83DF6.623A098E@agora.stm.it>
Date: Fri, 24 Jul 1998 09:55:34 +0200
From: Gabriel Maldonado
X-Mailer: Mozilla 4.0 [en] (Win95; I)
MIME-Version: 1.0
To: David Schuyeteneer
CC: Csound Mailing List
Subject: Re: Direct-CSound
X-Priority: 3 (Normal)
References: <19980723084122838.AAA293@turing.hogent.be>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
Sorry, I don't know why your computer cannot run DirectCsound in
real-time. I have DirectX 3 installed in my machine, and I debugged the
DirectCsound code with this version of DirectX. Perhaps is it possible
that DirectX 5 is incompatible with the previous versions (if it is,
thanks again, Bill Gate$!).
I ask to all csound Community if there is anybody who can run
DirectCsound in real-time with DirectX 5.
Thanks
P.S.
(however, David, post me the exact command line and the orc/sco pair you
use to run DirectCsound in real-time)
--
Gabriel Maldonado
http://www.agora.stm.it/G.Maldonado/home2.htm
David Schuyeteneer wrote:
> Hello,
>
> I cleaned up my win95 system (it was a mess) and reinstalled
> everything...
> problem is that now DirectCsound says : "cannot create DirectX object"
>
> when I try to perform it realtime....When I render to wav, he asks for
> a
> directx device itself and it works.....DirectX 5 is installed properly
> (all
> other software works perfect)
> It's just the realtime stuff that does not work. I use the same
> batch
> file that i used
> before reinstallment of my system and everything worked fine then....
>
> Soh whad kood bea da solucion ?? ;-)
>
> David
Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa12075;
24 Jul 98 9:08 BST
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa20194;
24 Jul 98 9:08 BST
Received: (qmail 26507 invoked from network); 24 Jul 1998 08:08:02 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
by mercury.bath.ac.uk with SMTP; 24 Jul 1998 08:08:02 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (JAA13769); Fri, 24 Jul 1998 09:04:46 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Fri, 24 Jul 1998 09:04:26 +0100
Received: from agora.stm.it [195.62.32.1] by hermes via ESMTP (JAA11841); Fri, 24 Jul 1998 09:04:25 +0100 (BST)
Received: from default (ppp02-21.dial-access.stm.it [195.62.37.85]) by agora.stm.it (8.8.8/8.8.5) with ESMTP id KAA07568; Fri, 24 Jul 1998 10:04:13 +0200 (ITADST)
Message-ID: <35B83B22.3ADEF011@agora.stm.it>
Date: Fri, 24 Jul 1998 09:43:30 +0200
From: Gabriel Maldonado
X-Mailer: Mozilla 4.0 [en] (Win95; I)
MIME-Version: 1.0
To: ben@qsure.demon.co.uk
CC: Csound Discussion List
Subject: Re: MIDI input
X-Priority: 3 (Normal)
References: <35B6F588.CF77FEC1@agora.stm.it> <35B72BDD.931F45D2@qsure.demon.co.uk>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
Ben Jefferys wrote:
DirectX allows the programmer to access directly to the hardware buffer
of the sound card, so is faster than the standard Win32 API
> Does anyone know exactly why using DirectX is faster than the usual
> methods of audio output? I have another Windows-based program, Vaz,
> which exhibits a similar speedup when using DirectX. I was wondering
> if there was something amazing about DirectX, or if it was making
> up for a deficiency elsewhere in Windows.
--
Gabriel Maldonado
http://www.agora.stm.it/G.Maldonado/home2.htm
Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa12181;
24 Jul 98 10:12 BST
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa23537;
24 Jul 98 10:12 BST
Received: (qmail 28205 invoked from network); 24 Jul 1998 09:12:35 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
by mercury.bath.ac.uk with SMTP; 24 Jul 1998 09:12:35 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (KAA14076); Fri, 24 Jul 1998 10:10:04 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Fri, 24 Jul 1998 10:09:55 +0100
Received: from anugpo.anu.edu.au [150.203.2.6] by hermes via ESMTP (KAA17464); Fri, 24 Jul 1998 10:09:52 +0100 (BST)
Received: from [150.203.14.13] (snagglepuss.anu.edu.au [150.203.14.13])
by anugpo.anu.edu.au (8.8.8/8.8.8) with SMTP id TAA09619
for ; Fri, 24 Jul 1998 19:09:48 +1000 (EST)
Date: Fri, 24 Jul 1998 19:09:48 +1000 (EST)
Message-Id: <199807240909.TAA09619@anugpo.anu.edu.au>
To: csound@maths.ex.ac.uk
From: Arne Hanna
Subject: clicks with envelopes;phasor and timout
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
Hi folks. The orc/sco combo below uses phasor and timout to produce
streams of notes at rates independent of p3. This method was suggested
to me some time ago by Jean Piche in response to my lamentations regarding
difficulties in generating repeating rhythmic patterns using standard
csound techniques. His original version used the pluck ugen which has its
own built-in
amplitude envelope, but I want to be able to use a standard oscili set-up.
Unfortunately this introduces some clicking and popping of envelopes. Using
oscil1 usually fixes these problems up, but, on the SGIs here, it just results
in core dump, and experiments with linseg etc meet the same fate.
If anyone has any ideas, I'm all ears.
The score was produced with Andre Bartetski's CMASK.
I've left in Mr Piche's experiments with Tulips.
Cheers
Arne
;This orchestra is an attempt at realising pitch and onset-time
;using Markov processes. The current problem has to do
;with clicking of envelopes A.D. Hanna
sr = 44100
kr = 882
ksmps = 50
nchnls = 2
ga1 init 0
instr 1
itablesize = 32 ;pitch tables 2 and 3 are indexed from 0 to 31
iratchoose = p9 ;determines which of two tempos are used
;A neat way to represent Markov chains.
;Choose between two subsets of the set "furniture"
if (iratchoose == 0) igoto furniture.to.sit.on
if (iratchoose == 1) igoto furniture.to.put.stuff.in
;----------------------------------------------------------------------
furniture.to.sit.on:
;being here depends on outcome of p9
kindex phasor p5*p6
plantatulip:
kenv linen 1,.001,1/p5,1/p5*.5
inotechoose = p8
;Choose between two pitch tables
;the second of which is a transposition
;of the first in the order of 1 semitone.
if (inotechoose == 1) igoto chair
if (inotechoose == 0) igoto sofa
;--------------------------------------------------
chair: ;being here depends on the outcome of p9 and p8
ipitch table i(kindex)*itablesize,2
igoto resume
;--------------------------------------------------
sofa: ;being here depends on the outcome of p9 and p8
ipitch table i(kindex)*itablesize,3
igoto resume
resume:
timout 0,1/p5,pluckatulip
reinit plantatulip
;----------------------------------------------------------------------
furniture.to.put.stuff.in:
;being here depends on outcome of p9
kindex phasor (p5*p6)*1.125 ;varies phase of lfo vs beat
;thus creating melodic patterns
plantadaisy:
kenv linen 1,.001,1/p5,1/p5*.5
inotechoose = p8
if (inotechoose == 1) igoto bookcase
if (inotechoose == 0) igoto wardrobe
;-----------------------------------------------
bookcase: ;being here depends on the outcome of p9 and p8
ipitch table i(kindex)*itablesize,2
igoto continue
;--------------------------------------------------
wardrobe: ;being here depends on the outcome of p9 and p8
ipitch table i(kindex)*itablesize,3
igoto continue
continue:
timout 0,1/p5,pluckatulip
reinit plantadaisy
pluckatulip:
a2 oscili ampdb(p4)*kenv,cpspch(ipitch+p7),1 ;p7 = octave transposition
ga1=a2+ga1
outs a2,a2
endin
instr 50
kfreq expseg 0.01,p3*.2,.4,p3*.2,1,p3*.2,1.5,p3*.2,.1,p3*.2,.05
k1 oscili .5,kfreq*p4,1 ;kfreq*p4=cps of pan
k2 = .5+k1
k3 = 1-k2
a1 reverb2 ga1,2.1,.5
outs k2*a1,a1*k3*(-1)
ga1=0
endin
;score
f1 0 8192 10 1
f2 0 64 -2 7.10 7.02 7.07 8.05 9.02 7.05 8.10 8.02 7.07 8.07 8.05 8.02 8.10
9.02 7.07 9.07 8.00 7.02 8.02 8.10 7.07 7.05 8.00 8.02 9.02 9.02 8.10 7.07
8.05 9.02 8.02 9.07
f3 0 64 -2 7.11 7.03 7.08 8.06 9.03 7.06 8.11 8.03 7.08 8.08 8.06 8.03 8.11
9.03 7.08 9.08 8.01 7.03 8.03 8.11 7.08 7.06 8.01 8.03 9.03 9.03 8.11 7.06
8.06 9.03 8.03 9.08
i50 0 28 10
; ------- begin of field 1 --- seconds: 0.00 - 28.00 --------
;ins time dur p4 p5 p6 p7 p8 p9
i1 0 0.25 65 3.29 0.46 -1 0 1
i1 0.25 0.375 65 3.36 0.78 1 1 0
i1 0.625 1 65 6.95 0.39 1 1 1
i1 1.625 1.25 65 3.32 0.53 -1 1 0
i1 2.75 0.25 65 4.2 0.86 1 0 1
i1 3.75 1.25 65 7.36 0.15 1 0 0
i1 4.125 1 65 6.2 0.99 -1 0 0
i1 4.375 0.375 65 1.12 0.69 1 0 0
i1 4.75 0.25 65 4.28 0.42 -1 0 1
i1 5.75 0.375 65 1.69 0.18 1 0 1
i1 6.875 1 65 8.19 0.91 1 1 0
i1 7.875 1.25 65 3.28 0.34 -1 0 1
i1 8.25 0.25 65 3.3 0.11 1 0 0
i1 8.5 1.25 65 1.97 1 1 1 0
i1 8.875 1 65 2.82 0.11 -1 0 0
i1 9.875 0.375 65 3.4 0.21 1 1 0
i1 11 0.25 65 3.01 0.97 1 1 1
i1 12 0.375 65 5.54 0.18 -1 1 0
i1 12.375 1 65 1.44 0.98 1 1 1
i1 12.625 1.25 65 4.33 0.86 1 1 1
i1 13 0.25 65 6.15 0.77 -1 1 1
i1 14 1.25 65 6.48 0.24 1 1 0
i1 15.125 1 65 3.91 0.62 -1 1 1
i1 16.125 0.375 65 1.12 0.33 1 0 1
i1 16.5 0.25 65 7.43 0.73 1 1 1
i1 16.75 0.375 65 2.59 0.9 -1 0 0
i1 17.125 1 65 5.57 0.13 1 0 1
i1 18.125 1.25 65 4.08 0.77 1 0 0
i1 19.25 0.25 65 8.57 0.37 -1 0 1
i1 20.25 1.25 65 2.42 0.3 1 1 0
i1 20.625 1 65 4.24 0.52 1 0 1
i1 20.875 0.375 65 5.75 0.67 -1 1 1
i1 21.25 0.25 65 1.24 0.64 1 0 0
i1 22.25 0.375 65 8.26 0.75 1 1 0
i1 23.375 1 65 7.23 0.24 -1 0 0
i1 24.375 1.25 65 3.9 0.62 1 1 1
i1 24.75 0.25 65 6.14 0.58 -1 1 0
i1 25 1.25 65 7.11 0.96 1 0 0
i1 25.375 1 65 6.33 0.14 1 1 0
i1 26.375 0.375 65 8.53 0.92 -1 0 0
i1 27.5 0.25 65 7.9 0.4 1 0 1
; ------- end of field 1 --- number of events: 41 -------
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
http://www.geocities.com/SiliconValley/Peaks/3346
"The year-round pest control work has successfully kept the number of
cockroaches & mice in the Passenger cabin of our Boeing 777's below the
National Standard."
From the in-flight magazine of China Southern Airlines, 1997.
Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa12289;
24 Jul 98 10:39 BST
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa24697;
24 Jul 98 10:39 BST
Received: (qmail 28912 invoked from network); 24 Jul 1998 09:39:17 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
by mercury.bath.ac.uk with SMTP; 24 Jul 1998 09:39:17 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (KAA22908); Fri, 24 Jul 1998 10:36:14 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Fri, 24 Jul 1998 10:36:01 +0100
Received: from jaguars-int.cableinet.net [193.38.113.9] by hermes via SMTP (KAA02958); Fri, 24 Jul 1998 10:36:01 +0100 (BST)
Received: (qmail 16116 invoked from network); 24 Jul 1998 09:35:55 -0000
Received: from unknown (HELO cableinet.co.uk) (194.117.146.192)
by jaguars with SMTP; 24 Jul 1998 09:35:55 -0000
Message-ID: <35B853E5.62BA1FFA@cableinet.co.uk>
Date: Fri, 24 Jul 1998 10:29:09 +0100
From: Richard Dobson
Organization: Composers Desktop project
X-Mailer: Mozilla 4.04 [en] (Win95; I)
MIME-Version: 1.0
To: Csound mailing list
Subject: Re: MIDI input
References: <199807232326.AAA18602@hermes>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
Yes, you can get that performance if you talk to the hardware directly - which
is what all the games programmers were doing, of course (for whom DirectX was
primarily developed). DOS is also vehemently single-tasking. I suppose even on
unix you could get some sort of performance boost by bypassing the kernel and
talking directly to the hard disks, audio hardware, etc - but it wouldn't really
be unix any more! CDP did this on the Atari XT - by talking directly to the hard
disk, and to the cartridge port, we were able to get full CD-guality stereo i/o
on an 8MHz cpu.
If there's a fault, its in us demanding a (pre-emptive) multi-tasking system
with single-tasking performance, and Microsoft and Intel betweeen them trying to
square the circle on our behalf. The NeXT machine ran a form of Unix, but
included a 56K dsp chip on whch most of the audio processing was intended to
run. The Apple is co-operatively multi-tasking, and therefore offers theoretical
advantages for audio; but it's expansion capacity is relatively limited, and the
internal audio circuitry is not ~that~ good, and the API's are not ~that~ good.
Hence Pro-tools. Hence the Kyma system, etc, etc, etc.
What is happening now is that, for time-critical tasks such as audio (and as has
already happened with graphics, to a great extent), audio processing is being
transferred from the host PC to single-tasking dsp-intensive soundcards (e.g the
Extended Csound card, the Yamaha mixer card, or the 15 sharcs in the forthcoming
Creamware SCOPE system). The latency on such devices will be down to the sample,
and the bandwidth very high, - but you will need to use the Creamware API's and
drivers which talk directly to the card to take advantage of it - or buy the
third-party software that uses them. The Microsoft API's are an expressly
base-level framework which all soundcard devleopers are invited to support, so
that a minimum level of performance is guaranteed across the whole PC diaspora.
Musicians are now asking almost absurd things of a general-purpose computer -
real-time processing and mixing of 32 channels of 48KZ 16bit audio, all while
updating increasingly luxuriant displays all designed to create the illusion
that somehow you are not using a 'computer' but a real hardware synth or mixer -
while sending your email, printing your letters, and playing DOOM. To me, it is
extraordinary it can be managed at all. And if it can't do it, we blame everyone
and everything except our own ambitions, which are always entirely reasonable,
of course!
Richard Dobson
Eli Brandt wrote:
>
> Richard Dobson wrote:
> > It is also sometimes forgotten that that the PC was, and still is,
> > primarily a general-purpose computer (albeit highly expandable and
> > customizable); such a machine will probably ~always~ have limitations
> > when being pushed to do zero-latency audio. That is not Microsoft's
> > fault either.
>
> I have to defend the PC here: the hardware is not the problem. Bare,
> its interrupt latency is well down in the microsecond range. Even
> DMA-based sound cards can reasonably work with blocks of a millisecond
> or so, not to mention the modern cards.
>
> And under DOS (including Windows 3.1) you can actually get that kind
> of latency. Under 95 or NT4, using the normal APIs, you can't.
Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa12347;
24 Jul 98 11:25 BST
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa27128;
24 Jul 98 11:25 BST
Received: (qmail 744 invoked from network); 24 Jul 1998 10:25:00 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
by mercury.bath.ac.uk with SMTP; 24 Jul 1998 10:25:00 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (LAA27190); Fri, 24 Jul 1998 11:22:25 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Fri, 24 Jul 1998 11:22:12 +0100
Received: from avid.avid.com [152.165.6.40] by hermes via ESMTP (LAA26648); Fri, 24 Jul 1998 11:22:11 +0100 (BST)
Received: from qsure.demon.co.uk (unknown2.charlotte.avid.com) by avid.avid.com with ESMTP
(1.37.109.20/16.2) id AA082975692; Fri, 24 Jul 1998 06:21:33 -0400
Message-Id: <35B8611E.4C562E5E@qsure.demon.co.uk>
Date: Fri, 24 Jul 1998 11:25:34 +0100
From: Ben Jefferys
Reply-To: ben@qsure.demon.co.uk
Organization: Avid Technology Europe Ltd.
X-Mailer: Mozilla 4.05 [en] (WinNT; I)
Mime-Version: 1.0
To: Richard Dobson
Cc: Csound Discussion List
Subject: Re: MIDI input
References: <35B6F588.CF77FEC1@agora.stm.it> <35B72BDD.931F45D2@qsure.demon.co.uk> <35B77962.B05BFBEF@flash.net> <35B7B1D5.252B335A@cableinet.co.uk>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
Richard Dobson wrote:
> The point being that DirectX is a hardware-independent way of addressing the
> hardware directly. It was never needed until PC's got fast enough to do complex
> audio i/o in real-time. Microsoft has simply introduced a new solution to a new
> requirement.
AFAIK Linux has never had any particular problems in this area! Although
I have yet to actually get my soundcard working on Linux :(
> It is also sometimes forgotten that that the PC was, and still is, primarily a
> general-purpose computer (albeit highly expandable and customizable); such a
> machine will probably ~always~ have limitations when being pushed to do
> zero-latency audio. That is not Microsoft's fault either.
However we are talking about CSound here which is merely outputting bits
to a D/A convertor. Vaz exhibited smaller delays when using the ASCII
keyboard or even it's own sequencer under DirectX, so it isn't merely a
MIDI
problem. Every OS I have ever programmed for has some standard method
of accessing sound output directly, which still works interchangeably
with different soundcards. So I contest that DirectX is simply allowing
people to do on Windows what they've been doing for years on other
platforms. But this doesn't matter at all really! My main concern was
that maybe by using another platform I'd be losing out on some
performance
hike that DirectX miraculously enables.
Of course your point about latency applies to any "realtime"
application,
there is always going to be some buffer somewhere which is written to
before it is read from.
Bye!
Ben.
Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa12377;
24 Jul 98 11:40 BST
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa27802;
24 Jul 98 11:40 BST
Received: (qmail 1359 invoked from network); 24 Jul 1998 10:40:47 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
by mercury.bath.ac.uk with SMTP; 24 Jul 1998 10:40:47 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (LAA02699); Fri, 24 Jul 1998 11:37:42 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Fri, 24 Jul 1998 11:37:29 +0100
Received: from avid.avid.com [152.165.6.40] by hermes via ESMTP (LAA09288); Fri, 24 Jul 1998 11:37:28 +0100 (BST)
Received: from qsure.demon.co.uk (unknown2.charlotte.avid.com) by avid.avid.com with ESMTP
(1.37.109.20/16.2) id AA089896614; Fri, 24 Jul 1998 06:36:54 -0400
Message-Id: <35B864B8.24E28006@qsure.demon.co.uk>
Date: Fri, 24 Jul 1998 11:40:56 +0100
From: Ben Jefferys
Reply-To: ben@qsure.demon.co.uk
Organization: Avid Technology Europe Ltd.
X-Mailer: Mozilla 4.05 [en] (WinNT; I)
Mime-Version: 1.0
To: Csound mailing list
Subject: Re: MIDI input
References: <199807232326.AAA18602@hermes> <35B853E5.62BA1FFA@cableinet.co.uk>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
Richard Dobson wrote:
> CDP did this on the Atari XT - by talking directly to the hard
> disk, and to the cartridge port, we were able to get full CD-guality stereo i/o
> on an 8MHz cpu.
!! Cool. What else was that CPU doing at the same time? ;)
> If there's a fault, its in us demanding a (pre-emptive) multi-tasking system
> with single-tasking performance, and Microsoft and Intel betweeen them trying to
> square the circle on our behalf.
With a sensible system of process priorites I don't see it as a *huge*
problem. These "next generation" (eugh) quality-of-service (double-eugh)
operating systems are, I guess, trying to solve this problem.
> Musicians are now asking almost absurd things of a general-purpose computer -
> real-time processing and mixing of 32 channels of 48KZ 16bit audio, all while
> updating increasingly luxuriant displays all designed to create the illusion
> that somehow you are not using a 'computer' but a real hardware synth or mixer -
> while sending your email, printing your letters, and playing DOOM. To me, it is
> extraordinary it can be managed at all. And if it can't do it, we blame everyone
> and everything except our own ambitions, which are always entirely reasonable,
> of course!
I think so! People's ambitions drive technology and innovation.
If people expect all this, then it Shall Be Done... even if you have to
fork out for a bit of extra hardware (almost always the case, the
hardware
usually being extra memory, HD, processor speed...)
Can anyone point me at a good web site regarding cheap PCI DSP cards?
Bye!
Ben.
Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa12394;
24 Jul 98 11:48 BST
Received: from pat.bath.ac.uk by stork.maths.Bath.AC.UK id aa28286;
24 Jul 98 11:48 BST
Received: (qmail 11713 invoked from network); 24 Jul 1998 10:48:51 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
by pat.bath.ac.uk with SMTP; 24 Jul 1998 10:48:51 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (LAA11560); Fri, 24 Jul 1998 11:46:14 +0100 (BST)
Received: from zeno.maths.exeter.ac.uk by maths.ex.ac.uk; Fri, 24 Jul 1998 11:45:57 +0100
From: james@maths.ex.ac.uk
Message-Id: <3622.199807241045@zeno.maths.exeter.ac.uk>
Subject: octdown and noctdft
To: csound@maths.ex.ac.uk
Date: Fri, 24 Jul 1998 11:45:57 +0100 (BST)
Reply-To: koonce@silvertone.princeton.edu
X-Mailer: ELM [version 2.4 PL25]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
Are octdown and noctdft no longer available? ?
I did a compile from the Montreal source (3.482) (SGI)
ftp.musique.umontreal.ca/pub/mirrors/dream/newest/Csound.tar.gz
and found them missing, both in the -z listing and in action.
They are missing from the 3.48 version as well.
Paul Koonce
Princeton University
--
James Andrews, maths CDO, ext.3977 |