| Greetings:
I've received some mail recently which indicates some problems
compiling the official Csound 3.57 for Linux. Here's what I discovered
which may be of some small assistance.
1. Rename Makefile to Makefile.orig
2. Rename Makefile.linux (*not* makefile.linux) to Makefile
3. Fix midirecv.c in this manner:
Eliminate lines 19 through 29
Eliminate line 31
Eliminate line 48
(This will get rid of the bsd/sgtty.h stuff)
4. Add the following lines after the line 50 in midirecv.c:
#include termios.h
struct termios tty;
5. Add sndinfUG.c, pvlook.c and fout.c to the line beginning with CSRCG
in the Makefile.
6. Add sndinfUG.o, pvlook.o, and fout.o to the line beginning with
COBJG in the Makefile.
7. Run 'make -f Makefile depend'
8. Run 'make -f Makefile'
Steps 3 and 4 can be cut out if you have access to the unofficial
version (see below).
The good news is that it compiles cleanly after these fixes, but I'm not
sure it's compiling all the utilities.
I took a cursory look at midirecv.c. It's been a while since I last
looked at it, and doing a diff with the unofficial version's
midirecv-linux.c reminded me of Dante's advice: "Lasciate ogni
speranza..."
So I copied midirecv-linux.c to the official tree, made a few more
changes to the Makefile (midirecv changed to midirecv-linux) and to
midirecv-linux.c (removed the conditions for HAVE_TERMIOS and HAVE_BSD
and left only the termios stuff mentioned above), recompiled, and
behold, MIDI input works with the official 3.57.
However, I don't actually know where the problem lies in midirecv.c,
since the #ifdefs are rather numerous and somewhat confusing. If I had a
little more time I could narrow it down, but perhaps some other reader
can continue this exercise (Larry T, are you there ?). Perhaps it's time
to consider platform-specific files for the MIDI i/o ?
Realtime audio out works well. Gabriel Maldonado's MIDI out opcodes
should work, but I've only tested moscil (it worked fine).
I hope this is of some help. Please understand that I do not maintain
this version and that this is as far as I'm likely to go with it.
== Dave Phillips
http://www.bright.net/~dlphilp/index.html
http://sunsite.univie.ac.at/Linux-soundapp/linux_soundapps.html
Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa17775;
9 Aug 99 20:31 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by shaun.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
id 11Dv8R-0000DS-00
for jpff@maths.bath.ac.uk; Mon, 9 Aug 1999 20:31:03 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (UAA16276); Mon, 9 Aug 1999 20:26:44 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Mon, 9 Aug 1999 20:26:34 +0100
Received: from root@icemserv.folkwang.uni-essen.de [132.252.170.129] by hermes via ESMTP (UAA05091); Mon, 9 Aug 1999 20:26:28 +0100 (BST)
Received: from localhost (neuhaus@localhost) by icemserv.folkwang.uni-essen.de (8.8.8/8.7.3) with SMTP id TAA04322; Mon, 9 Aug 1999 19:50:24 +0200 (CEST)
Date: Mon, 9 Aug 1999 19:50:24 +0200 (CEST)
From: Thomas Neuhaus
To: Larry Troxler
cc: jasonf@ivy.the-i.net, csound@maths.ex.ac.uk
Subject: Re: more compile errors
In-Reply-To: <37AA325A.74BB03@westnet.com>
Message-ID:
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
On Fri, 6 Aug 1999, Larry Troxler wrote:
in newer linux distributions, namely SuSE 6.x sgtty.h is in
/usr/inlcude so you can forget the bsd as well as you can forget the -lbsd
for the linker call
fun
Thomas
P.S.: for non-C speakers:
change
#include
to
#include
in midirecv.h
and remove or comment out "-lbsd" in Makefile or makefile.linux
> jasonf@ivy.the-i.net wrote:
> >
> > Now I'm only having one slight problem. I get this:
> > ch.o getstring.o ugsc.o -lm -lbsd
> > /usr/i586-pc-linux-gnu/bin/ld: cannot open -lbsd: No such file or
> > directory
> > collect2: ld returned 1 exit status
> > make: *** [csound] Error 1
> >
> > I thought that maybe some of my ldlib paths weren't set, but that doesn't
> > seem to be the case. Any idea what I'm doing wrong here? Ya know, someday
> > I really ought to sit down and learn C!
> >
> > Thanks for the help,
> > Jason
>
....
> >>
> make -f Makefile.linux csound
> cc -O2 -DWINDOWS -DRTAUDIO -DSFIRCAM -DSYS5 -DLINUX -DPIPES -DMACROS -c
> midirecv.c
> midirecv.c:31: bsd/sgtty.h: No such file or directory
> make: *** [midirecv.o] Error 1
> <<
>
--
Thomas Neuhaus(neuhaus@folkwang.uni-essen.de) Phone (49)-201-4903-333
ICEM Institut fuer Computermusik und elektronische Medien
Folkwang-Hochschule Essen, Klemensborn 39, D-49239 Essen
-------------------------------------------------------------------------------
UNIX _is_ user-friendly. It just knows who its friends are.
Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa17784;
9 Aug 99 20:37 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
id 11DuDi-0004u8-00
for jpff@maths.bath.ac.uk; Mon, 9 Aug 1999 19:32:26 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (UAA06821); Mon, 9 Aug 1999 20:33:07 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Mon, 9 Aug 1999 20:32:57 +0100
Received: from lt@westnet.com [206.24.6.2] by hermes via ESMTP (UAA10338); Mon, 9 Aug 1999 20:32:56 +0100 (BST)
Received: from localhost (lt@localhost)
by westnet.com (8.9.1/8.9.1) with ESMTP id PAA14601;
Mon, 9 Aug 1999 15:32:50 -0400 (EDT)
Date: Mon, 9 Aug 1999 15:32:49 -0400 (EDT)
From: Larry Troxler
To: Dave Phillips
cc: Csound Mail ,
Adam Zygmunt , Jason ?
Subject: Re: compiling Linux Csound (official)
In-Reply-To: <37AF29E5.4B83A4C7@bright.net>
Message-ID:
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
On Mon, 9 Aug 1999, Dave Phillips wrote:
>
> However, I don't actually know where the problem lies in midirecv.c,
> since the #ifdefs are rather numerous and somewhat confusing. If I had a
> little more time I could narrow it down, but perhaps some other reader
> can continue this exercise (Larry T, are you there ?). Perhaps it's time
> to consider platform-specific files for the MIDI i/o ?
>
Actually, although midirecv.c definitely isn't correct, as it turns out, I
have a MIDI driver problem now after a recent upgrade. So once I fix that,
I'll go back and have a look.
Actually, I do have the unnoficial version working, and the main reason
I'm using the official one is because it seems to have more of the recent
opcodes. Hmm, it probably would have been easier just to add the opcodes
to the unnoficial one.
Larry Troxler
Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa17857;
9 Aug 99 21:19 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by shaun.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
id 11Dvt9-0000E1-00
for jpff@maths.bath.ac.uk; Mon, 9 Aug 1999 21:19:19 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (VAA05459); Mon, 9 Aug 1999 21:12:24 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Mon, 9 Aug 1999 21:12:14 +0100
Received: from sparticus.bright.net [205.212.123.5] by hermes via ESMTP (VAA17135); Mon, 9 Aug 1999 21:12:11 +0100 (BST)
Received: from bright.net (find-cas4-cs-20.dial.bright.net [209.143.49.150])
by sparticus.bright.net (8.9.3/8.9.3 ComNet Build) with ESMTP id QAA20901;
Mon, 9 Aug 1999 16:12:06 -0400 (EDT)
Message-ID: <37AF3A82.679350@bright.net>
Date: Mon, 09 Aug 1999 16:30:58 -0400
From: Dave Phillips
X-Mailer: Mozilla 4.51 [en] (X11; I; Linux 2.0.36 i586)
X-Accept-Language: en
MIME-Version: 1.0
CC: Larry Troxler , Csound Mail ,
Adam Zygmunt , Jason ?
Subject: Re: compiling Linux Csound (official)
References:
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
Adam Zygmunt wrote:
> I hate to be a pest, and I'm being impatient, but WHERE CAN I GET THE
> UNOFFICIAL VERSION???!? It can't be found ANYWHERE! Lots of pages tease
> about it, though, but all the pages I've found either don't have a link
> (just text), have a broken link, or no file. This is getting frustrating!
Apologies to all who have been searching. Nicola is away for now, and
indeed the AIMI server seems to be down. I've uploaded version 3.54.0.0c
to the following site:
ftp://mustec.bgsu.edu/pub/linux
I'll download and test the latest CVS (if I can connect to AIMI). If all
is well I'll upload a newer Csound tomorrow.
== Dave Phillips
http://www.bright.net/~dlphilp/index.html
http://sunsite.univie.ac.at/Linux-soundapp/linux_soundapps.html
Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa17975;
9 Aug 99 23:22 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
id 11Dwnj-0004w1-00
for jpff@maths.bath.ac.uk; Mon, 9 Aug 1999 22:17:47 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (XAA03082); Mon, 9 Aug 1999 23:19:54 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Mon, 9 Aug 1999 23:19:43 +0100
Received: from tigger.scc.uni-weimar.de [141.54.1.3] by hermes via ESMTP (XAA10298); Mon, 9 Aug 1999 23:19:42 +0100 (BST)
Received: from chewa (pmclient44.scc.uni-weimar.de [141.54.7.53])
by tigger.scc.uni-weimar.de (8.9.2/8.9.2) with SMTP id AAA06573
for ; Tue, 10 Aug 1999 00:19:41 +0200 (MET DST)
From: Torsten Anders
To: Csound list
Subject: vdelay expects ms?
Date: Mon, 9 Aug 1999 22:49:47 +0200
X-Mailer: KMail [version 1.0.17]
Content-Type: text/plain
MIME-Version: 1.0
Message-Id: <99081000221902.00218@chewa>
Content-Transfer-Encoding: 8bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
Hi,
despite the manual the vdelay opcode seems to expect msec not samples. Is this
a bug in the manual or in the code? vdelay3 behaves the same.
Torsten
quote from doc:
ar vdelay asig, adel, imaxdel[, iskip]
adel - Current value of delay in samples.
Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa17983;
9 Aug 99 23:27 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by shaun.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
id 11Dxt8-0000EZ-00
for jpff@maths.bath.ac.uk; Mon, 9 Aug 1999 23:27:26 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (XAA09567); Mon, 9 Aug 1999 23:24:50 +0100 (BST)
From: jasonf@ivy.the-i.net
Received: from exeter.ac.uk by maths.ex.ac.uk; Mon, 9 Aug 1999 23:24:40 +0100
Received: from [206.136.176.10] by hermes via ESMTP (XAA10553); Mon, 9 Aug 1999 23:24:38 +0100 (BST)
Received: from localhost (jasonf@localhost)
by ivy.the-i.net (8.8.7/8.8.7) with ESMTP id RAA03210
for ; Mon, 9 Aug 1999 17:40:49 -0500
Date: Mon, 9 Aug 1999 17:40:48 -0500 (CDT)
To: csound@maths.ex.ac.uk
Subject: compiling Linux Csound (UNofficial)
In-Reply-To: <37AF3A82.679350@bright.net>
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 decided to give the unofficial Csound a try, hoping to have better
luck. Finally, autoconfig! Supposedly all I should have to do is
./configure, make depend, make, and then make install...right?
The first error I had was that make depend couldn't find the rtlinux.c
file...mainly because there isn't one! I copied the file from the official
version and got rid of the error. After fixing a couple of the source
files by changing the stdout to NULL (was getting those errors again), I
tried once again to compile. None of the files themselves gave me any
errors, but gcc kept dying, giving me:
gcc: Internal compiler error: program cc1 got fatal signal 6
I just kept typing in make until I got most everything compiled. But then
it died saying:
gcc -pipe -L. -L/usr/local/lib -L/usr/X11R6/lib -s -o csound
csound-main.o -lcsound -lX11 -lm
./libcsound.so: undefined reference to `tpdlen'
./libcsound.so: undefined reference to `InvertPoles'
./libcsound.so: undefined reference to `L1600'
./libcsound.so: undefined reference to `xdsrset'
./libcsound.so: undefined reference to `spdspset'
./libcsound.so: undefined reference to `specscal'
./libcsound.so: undefined reference to `knvlpxr'
./libcsound.so: undefined reference to `flen'
./libcsound.so: undefined reference to `gen23'
./libcsound.so: undefined reference to `nargs'
./libcsound.so: undefined reference to `specdisp'
....and so on
Now what's the deal? Boy, compiling Csound sure is fun!
Thanks for al the help so far,
Jason
Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa18070;
10 Aug 99 0:17 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
id 11Dxez-0004y8-00
for jpff@maths.bath.ac.uk; Mon, 9 Aug 1999 23:12:49 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (AAA08887); Tue, 10 Aug 1999 00:14:54 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Tue, 10 Aug 1999 00:14:44 +0100
Received: from howl.werewolf.net [12.23.152.10] by hermes via ESMTP (AAA07355); Tue, 10 Aug 1999 00:14:42 +0100 (BST)
Received: from default (dial314.werewolf.net [12.23.154.14])
by howl.werewolf.net (8.9.0/8.9.0) with SMTP id SAA20318
for ; Mon, 9 Aug 1999 18:09:47 -0500 (CDT)
Message-ID: <002c01bee2be$1c869c00$0e9a170c@default>
From: Hans Mikelson
To: Csound list
Subject: Re: vdelay expects ms?
Date: Mon, 9 Aug 1999 18:22:54 -0500
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
Hi,
>despite the manual the vdelay opcode seems to expect msec not samples. Is
this
>a bug in the manual or in the code? vdelay3 behaves the same.
Hopefully a bug in the manual (can manuals have bugs?) or all of the orc's
that use this opcode will start crashing.
Bye,
Hans Mikelson
Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa18117;
10 Aug 99 0:23 BST
Received: from [128.11.68.32] (helo=smtp.mail.yahoo.com)
by wallace.maths.bath.ac.uk with smtp (Exim 2.12 #1)
id 11Dxku-0004yP-00
for jpff@maths.bath.ac.uk; Mon, 9 Aug 1999 23:18:56 +0100
Received: from unknown (HELO dboothe) (38.227.100.103)
by smtp.mail.yahoo.com with SMTP; 9 Aug 1999 16:25:44 -0700
Message-ID: <001e01bee2be$3fb9aff0$6598e226@dboothe.lyrick.com>
From: David Boothe
To: Csound list ,
Torsten Anders
Cc: J P Fitch
Subject: Re: vdelay expects ms?
Date: Mon, 9 Aug 1999 18:23:54 -0500
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
It's milliseconds in the tests I ran. I will assume the code is correct and
the manual wrong. It certainly makes more sense as msec and is also
consistent with other opcodes.
-David.
-----Original Message-----
From: Torsten Anders
To: Csound list
Date: Monday, August 09, 1999 5:30 PM
Subject: vdelay expects ms?
>Hi,
>
>despite the manual the vdelay opcode seems to expect msec not samples. Is
this
>a bug in the manual or in the code? vdelay3 behaves the same.
>
>Torsten
>
>
>quote from doc:
>ar vdelay asig, adel, imaxdel[, iskip]
>adel - Current value of delay in samples.
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa18127;
10 Aug 99 0:29 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by shaun.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
id 11DyrF-0000GJ-00
for jpff@maths.bath.ac.uk; Tue, 10 Aug 1999 00:29:33 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (AAA10205); Tue, 10 Aug 1999 00:24:07 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Tue, 10 Aug 1999 00:23:57 +0100
Received: from smtp.mail.yahoo.com [128.11.68.32] by hermes via SMTP (AAA02307); Tue, 10 Aug 1999 00:23:55 +0100 (BST)
Received: from unknown (HELO dboothe) (38.227.100.103)
by smtp.mail.yahoo.com with SMTP; 9 Aug 1999 16:25:44 -0700
Message-ID: <001e01bee2be$3fb9aff0$6598e226@dboothe.lyrick.com>
From: David Boothe
To: Csound list ,
Torsten Anders
Cc: J P Fitch
Subject: Re: vdelay expects ms?
Date: Mon, 9 Aug 1999 18:23:54 -0500
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
It's milliseconds in the tests I ran. I will assume the code is correct and
the manual wrong. It certainly makes more sense as msec and is also
consistent with other opcodes.
-David.
-----Original Message-----
From: Torsten Anders
To: Csound list
Date: Monday, August 09, 1999 5:30 PM
Subject: vdelay expects ms?
>Hi,
>
>despite the manual the vdelay opcode seems to expect msec not samples. Is
this
>a bug in the manual or in the code? vdelay3 behaves the same.
>
>Torsten
>
>
>quote from doc:
>ar vdelay asig, adel, imaxdel[, iskip]
>adel - Current value of delay in samples.
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa18219;
10 Aug 99 1:27 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
id 11DykB-0004zu-00
for jpff@maths.bath.ac.uk; Tue, 10 Aug 1999 00:22:15 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (BAA13220); Tue, 10 Aug 1999 01:24:41 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Tue, 10 Aug 1999 01:24:31 +0100
Received: from smtp6.mindspring.com [207.69.200.74] by hermes via ESMTP (BAA12931); Tue, 10 Aug 1999 01:24:30 +0100 (BST)
Received: from Realizer (user-2ive460.dialup.mindspring.com [165.247.16.192])
by smtp6.mindspring.com (8.8.5/8.8.5) with SMTP id UAA01821;
Mon, 9 Aug 1999 20:24:20 -0400 (EDT)
Message-ID: <003601bee2c7$052f2e60$79d496c0@Realizer.ngt.sungard.com>
From: Michael Gogins
To: Larry Troxler , Dave Phillips
Cc: Csound Mail ,
Adam Zygmunt , Jason ?
Subject: Re: compiling Linux Csound (official)
Date: Mon, 9 Aug 1999 20:25:11 -0400
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.1
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
I second the motion for platform-specific MIDI files. It could be done as
follows. This is a bit sketchy, but obviously something like this would (a)
work, and (b) be very much simpler than the existing code.
An abstract class (A C class, not a C++ class) for input and output drivers
with self-contained Csound input or output port function. The job of the
abstract driver is to encapsulate the business of reading a platform input
port and writing to a Csound input port, or reading a Csound output port and
writing to a platform output port.
typedef struct AbstractDriver
{
AbstractDriver *(*open)(void (*csoundPort)(void *csoundData));
int (*close)(struct AbstractDriver *this);
int(*sizeAvailable)(struct AbstractDriver *this)();
int (*read)(struct AbstractDriver *this);
int (*write)(struct AbstractDriver *this);
int(*control)(struct AbstractDriver *this, int command, void *data);
};
Then each platform would have a derived class (again a C class, not a C++
class), for example on Linux the MIDI input driver could be something like:
typedef struct LinuxMidiInputDriver
{
AbstractDriver baseDriver;
unsigned char buffer[4];
void (*midiInsert)(MIDIEVENT *event));
} ;
AbstractDriver *LinuxMidiInputOpen(void *buffer, int bufferSize, void
(*csoundPort)(MIDIEVENT *event))
{
LinuxMidiInputDriver *linuxDriver = (LinuxMidiInputDriver
*)malloc(sizeof(LinxMidiInputDriver), );
linuxDriver.baseDriver->buffer = buffer;
midiInsert = csoundPort;
(AbstractDriver *)linuxDriver;
Then in Csound itself would be tables of drivers,each terminated by a null
pointer:
AbstractDriver *inputDrivers[INPUT_DRIVER_COUNT + 1];
AbstractDriver *outputDrivers[OUTPUT_DRIVER_COUNT + 1];
AbstractDriver *audioInputDriver;
AbstractDriver *audioOutputDriver;
And on each platform there would be a driver.c file that fills in the
tables:
On Linux (note that the Csound midiInsert function gets plugged into the
driver):
inputDrivers[MIDI_INPUT_DRIVER] = LinuxMidiInputOpen(midiInsert);
inputDrivers[LINE_INPUT_DRIVER] = LinuxLineInDriverOpen(midiInsert);
On Windows:
inputDrivers[MIDI_INPUT_DRIVER] = WindowsMidiInputOpen(midiInsert);
inputDrivers[LINE_INPUT_DRIVER] = WindowsLineInDriverOpen(midiInsert);
Then kperf would look like this:
long kperf(long controlSampleCount)
{
extern struct AbstractDriver inputDrivers[];
extern struct AbstractDriver *outputDrivers[];
extern struct AbstractDriver *audioInputDrivers[];
extern struct AbstractDriver *audioOutputDriver[]s;
for(controlSampleIndex = 0; controlSampleIndex < controlSampleCount;
controlSampleIndex++)
{
// Read any pending control inputs.
int inputsRead = 0;
for(AbstractDriver *inputDriver = inputDrivers; inputDriver;
inputDrivers++)
{
if((*controlInput->available)(controlInput)
{
inputsRead = (*controlInput->read)(controlInput);
}
}
if(inputsRead)
{
return controlSampleIndex;
}
// Initialize the primary audio buffers.
controlSampleCounter++;
memset(inputBuffer, 0, inputBufferSize);
memset(outputBuffer, 0, outputBufferSize);
// Read any pending audio inputs.
for(AbstractDriver *audioInput = audioInputDrivers; audioInput;
audioInput++)
{
(*audioInput->read)(audioInput);
}
// For each active instrument...
for(ip = &actanchor; ip = ip->nxtact; )
{
// ...run each of its opcodes.
for(pds = (OPDS *)ip; pds = pds->nxtp; )
{
(*pds->opadr)(pds);
}
}
// Write any audio outputs.
for(AbstractDriver *audioOutput = audioOutputDrivers; audioOutput;
audioOutput++)
{
audioOutput = (*audioOutput->write)(audioOutput);
}
// Write any control outputs.
for(AbstractDriver *outputDriver = outputDrivers; outputDriver;
outputDriver++)
{
if(outputDriver->available(outputDriver))
{
(*outputDriver->write)(outputDriver);
}
}
}
return controlSampleIndex;
}
-----Original Message-----
From: Larry Troxler
To: Dave Phillips
Cc: Csound Mail ; Adam Zygmunt
; Jason ?
Date: Monday, August 09, 1999 3:33 PM
Subject: Re: compiling Linux Csound (official)
>On Mon, 9 Aug 1999, Dave Phillips wrote:
>>
>> However, I don't actually know where the problem lies in midirecv.c,
>> since the #ifdefs are rather numerous and somewhat confusing. If I had a
>> little more time I could narrow it down, but perhaps some other reader
>> can continue this exercise (Larry T, are you there ?). Perhaps it's time
>> to consider platform-specific files for the MIDI i/o ?
>>
>Actually, although midirecv.c definitely isn't correct, as it turns out, I
>have a MIDI driver problem now after a recent upgrade. So once I fix that,
>I'll go back and have a look.
>
>Actually, I do have the unnoficial version working, and the main reason
>I'm using the official one is because it seems to have more of the recent
>opcodes. Hmm, it probably would have been easier just to add the opcodes
>to the unnoficial one.
>
>Larry Troxler
>
Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa18292;
10 Aug 99 2:03 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by shaun.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
id 11E0K6-0000Hq-00
for jpff@maths.bath.ac.uk; Tue, 10 Aug 1999 02:03:26 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (CAA13644); Tue, 10 Aug 1999 02:00:25 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Tue, 10 Aug 1999 02:00:14 +0100
Received: from rothko.bestweb.net [209.94.100.160] by hermes via ESMTP (CAA13223); Tue, 10 Aug 1999 02:00:13 +0100 (BST)
Received: from goodguy ([216.179.14.66])
by rothko.bestweb.net (8.9.1a/8.9.0) with SMTP id VAA03790;
Mon, 9 Aug 1999 21:00:06 -0400 (EDT)
Message-ID: <37AF7960.2A60B838@westnet.com>
Date: Tue, 10 Aug 1999 00:59:12 +0000
From: Larry Troxler
X-Mailer: Mozilla 3.01 (X11; I; Linux 2.0.36 i586)
MIME-Version: 1.0
To: Torsten Anders
CC: Csound list
Subject: Re: vdelay expects ms?
References: <99081000221902.00218@chewa>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
Torsten Anders wrote:
>
> Hi,
>
> despite the manual the vdelay opcode seems to expect msec not samples. Is this
> a bug in the manual or in the code? vdelay3 behaves the same.
>
> Torsten
>
> quote from doc:
> ar vdelay asig, adel, imaxdel[, iskip]
> adel - Current value of delay in samples.
Wow, I reported this doc problem literally *years* ago. I guess nobody
listens to me ...
Larry
Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa18317;
10 Aug 99 2:14 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
id 11DzU8-00050H-00
for jpff@maths.bath.ac.uk; Tue, 10 Aug 1999 01:09:44 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (CAA09110); Tue, 10 Aug 1999 02:12:32 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Tue, 10 Aug 1999 02:12:21 +0100
Received: from rothko.bestweb.net [209.94.100.160] by hermes via ESMTP (CAA12532); Tue, 10 Aug 1999 02:12:20 +0100 (BST)
Received: from goodguy ([216.179.14.66])
by rothko.bestweb.net (8.9.1a/8.9.0) with SMTP id VAA04607;
Mon, 9 Aug 1999 21:12:08 -0400 (EDT)
Message-ID: <37AF7C2D.24185A0B@westnet.com>
Date: Tue, 10 Aug 1999 01:11:09 +0000
From: Larry Troxler
X-Mailer: Mozilla 3.01 (X11; I; Linux 2.0.36 i586)
MIME-Version: 1.0
To: Michael Gogins
CC: Dave Phillips , Csound Mail ,
Adam Zygmunt , Jason ?
Subject: Re: compiling Linux Csound (official)
References: <003601bee2c7$052f2e60$79d496c0@Realizer.ngt.sungard.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
Michael Gogins wrote:
>
> I second the motion for platform-specific MIDI files.
I agree, that in that it is better to sepearate out the platform
specifics into a few (few as possible!) source files, then provide
platform specific versions of those filess.
MG again:
>It could be done as
> follows.
Arggh! What are you suggesting? I suppose you are volunteering to
implement this change, test it, and submit it to John Fitch?
There is no need to change the design at all. Usually, when you have
platform specific source files, they simply provide a common set of
global functions. This could in fact, as a first draft, be done almost
mechanically by generating the platform-specific files from
pre-pre-processed (!) versions of the original multi-platform filee. I
totally don't understand the reason for your proposal, unless it is to
clean up the code and redesign it, in which case, IMO, that goal is
orthogonal to the problem at hand.
Larry
Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa18620;
10 Aug 99 5:15 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by shaun.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
id 11E3K2-0000KO-00
for jpff@maths.bath.ac.uk; Tue, 10 Aug 1999 05:15:34 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (FAA10029); Tue, 10 Aug 1999 05:12:44 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Tue, 10 Aug 1999 05:12:33 +0100
Received: from sparticus.bright.net [205.212.123.5] by hermes via ESMTP (FAA18303); Tue, 10 Aug 1999 05:12:32 +0100 (BST)
Received: from bright.net (find-cas1-cs-7.dial.bright.net [209.143.26.110])
by sparticus.bright.net (8.9.3/8.9.3 ComNet Build) with ESMTP id AAA04022;
Tue, 10 Aug 1999 00:12:28 -0400 (EDT)
Message-ID: <37AFAB13.2E4B5BCD@bright.net>
Date: Tue, 10 Aug 1999 00:31:15 -0400
From: Dave Phillips
X-Mailer: Mozilla 4.51 [en] (X11; I; Linux 2.0.36 i586)
X-Accept-Language: en
MIME-Version: 1.0
CC: Larry Troxler , Csound Mail ,
Adam Zygmunt , Jason ?
Subject: *very* unofficial Linux Csound 3.56
References: <003601bee2c7$052f2e60$79d496c0@Realizer.ngt.sungard.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
Greetings:
I have placed a Linux Csound 3.56.0.0a package on the MusTec server at
BGSU here in the USA. You can find it at:
ftp://mustec.bgsu.edu/pub/linux
It is source-code only, you'll have to compile it. You'll probably get a
lot of warnings to view and ignore.
Bear in mind that this is an interim solution until Nicola Bernardini
gets back and we can figure what's going on at AIMI. There are bugs, I'm
sure; however, it should provide the following niceties (among others):
realtime audio out
realtime MIDI i/o
full-duplex support for OSS and ALSA
and everything else offered by jpff's excellent version 3.56. If you use
it, please let me know what I've forgotten to do. It's late, I'm tired,
I'm going to bed now...
== Dave Phillips
http://www.bright.net/~dlphilp/index.html
http://sunsite.univie.ac.at/Linux-soundapp/linux_soundapps.html
Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa18634;
10 Aug 99 5:25 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
id 11E2SR-00053E-00
for jpff@maths.bath.ac.uk; Tue, 10 Aug 1999 04:20:11 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (FAA03174); Tue, 10 Aug 1999 05:22:44 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Tue, 10 Aug 1999 05:22:34 +0100
Received: from relay04.netaddress.usa.net [204.68.24.184] by hermes via SMTP (FAA01402); Tue, 10 Aug 1999 05:22:33 +0100 (BST)
Received: (qmail 2313 invoked from network); 10 Aug 1999 04:22:33 -0000
Received: from nw174.netaddress.usa.net (HELO .netaddress.usa.net) (204.68.24.74)
by outbound.netaddress.usa.net with SMTP; 10 Aug 1999 04:22:33 -0000
Received: (qmail 22374 invoked by uid 60001); 10 Aug 1999 04:22:32 -0000
Message-ID: <19990810042232.22373.qmail@.netaddress.usa.net>
Received: from 204.68.24.74 by nw174 via web-mailer(M3.3.0.24) on Tue Aug 10 04:22:32 GMT 1999
Date: 9 Aug 99 22:22:32 MDT
From: craig routt
To: csound@maths.ex.ac.uk
Subject: off topic
X-Mailer: USANET web-mailer (M3.3.0.24)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
hi
this is to doctor richard bolanger ,
you gave me a list of places with html info and banners
a few days ago, and i have been using it since, but
i just deleted it from my system somehow.
would you please send again?
thank you
craig
Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa19136;
10 Aug 99 12:07 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
id 11E8jw-0005O8-00
for jpff@maths.bath.ac.uk; Tue, 10 Aug 1999 11:02:40 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (MAA12698); Tue, 10 Aug 1999 12:01:56 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Tue, 10 Aug 1999 12:01:45 +0100
Received: from smtp3.mindspring.com [207.69.200.33] by hermes via ESMTP (MAA04717); Tue, 10 Aug 1999 12:01:44 +0100 (BST)
Received: from Realizer (user-2ive5k3.dialup.mindspring.com [165.247.22.131])
by smtp3.mindspring.com (8.8.5/8.8.5) with SMTP id HAA13789;
Tue, 10 Aug 1999 07:01:39 -0400 (EDT)
Message-ID: <003301bee320$109f8160$79d496c0@Realizer.ngt.sungard.com>
From: Michael Gogins
To: Larry Troxler
Cc: Dave Phillips , Csound Mail ,
Adam Zygmunt , Jason ?
Subject: Re: compiling Linux Csound (official)
Date: Tue, 10 Aug 1999 07:00:53 -0400
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.1
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
I'm entirely sympathetic to your criticism that I'm trying to redesign the
code, but (very painful and extensive) experience warns me that trying to
make the code more truly platform-independent without redesigning it is not
likely to work very well. It just becomes more and more of a hodge-podge
until trying to fix one thing invariably breaks another thing... these
nested #ifdefs are entirely out of control... believe me, I also know how
much work and pain is involved in redesigning something as complex as
Csound. A good part of my professional life, my day job as a programmer, has
been involved with maintaining old code, porting it from one platform to
another, and adapting it. I've been down both branches of the choice here to
the tune of thousands of hours and hundreds of thousands of lines of code.
Some of this work has been on Unix, and some on Windows (but none on the
Mac). So, I have some real experience here.
As I've said before, if this redesign is not done and done well, then Csound
will be replaced as a de facto serious software synthesis standard by
something else, such as an efficient implementation of SAOL, or a
cross-platform SuperCollider, or something like Reaktor, or something not
yet imagined. If it is done and done well, then the weight of all the great,
working instrument definitions, scores, and orchestras will keep Csound
alive and a contender for years if not decades to come.
In other words, the real value in Csound is what has been written in the
Csound languages, not the C code that implements those languages.
I've followed Quasimodo, but I'm Windows based while it is Linux based, and
I haven't yet and may never take the time to see if I could adapt it as a
newer cross-platform implementation of the Csound languages.
-----Original Message-----
From: Larry Troxler
To: Michael Gogins
Cc: Dave Phillips ; Csound Mail ;
Adam Zygmunt ; Jason ?
Date: Monday, August 09, 1999 9:12 PM
Subject: Re: compiling Linux Csound (official)
>Michael Gogins wrote:
>>
>> I second the motion for platform-specific MIDI files.
>
>I agree, that in that it is better to sepearate out the platform
>specifics into a few (few as possible!) source files, then provide
>platform specific versions of those filess.
>
>
>MG again:
>>It could be done as
>> follows.
>
>
>Arggh! What are you suggesting? I suppose you are volunteering to
>implement this change, test it, and submit it to John Fitch?
>
>There is no need to change the design at all. Usually, when you have
>platform specific source files, they simply provide a common set of
>global functions. This could in fact, as a first draft, be done almost
>mechanically by generating the platform-specific files from
>pre-pre-processed (!) versions of the original multi-platform filee. I
>totally don't understand the reason for your proposal, unless it is to
>clean up the code and redesign it, in which case, IMO, that goal is
>orthogonal to the problem at hand.
>
>Larry
>
|