Csound Csound-dev Csound-tekno Search About

Realtime MIDI Csound: New midi OUT opcodes

Date1997-04-04 11:29
FromGabriel Maldonado
SubjectRealtime MIDI Csound: New midi OUT opcodes
Dear Csounders,

I'm glad to announce I'm implementing MIDI OUT opcodes in csound. These
opcodes will allow Csound users to control external MIDI synthesizers.
These opcodes can take control of continuous midi parameters (such as
modulation wheel, breath control, pitch bend etc.) as well as init time
parameters (i.e. note on and note off) and support all 16 midi channels.
So the user can compose algorythmically (with a Csound based philosophy)
even with commercial MIDI devices and reuse his favourite MIDI synth
sound libraries. I'm imlementing these opcodes in new relase (2.0) of my
Win95 version, but the sources will be public domain. 

I run into some timing problem. My prototype version is now almost
complete and functional, and  allows MIDI OUT and normal DAC operations
in parallel. Unfortunately the realtime timing implemented in Csound is
completely managed by DAC sample flow. So DAC operations are well
temporized, but, because of the buffer oriented performance of Csound,
it is not possible to know apriori the DAC buffer status (i.e. if the
buffer is empty or full at a certain time). So MIDI OUT operations
present some time irregularities. These irregularities could be fully
eliminated if DAC operations will be eliminated too, i.e. recompiling a
MIDI OUT only version of Csound (without all audio rate UGs). Such
version will be hugely less processor consuming than the standard one.
So this version could be run in parallel with another instance of
standard Csound in multitasking (if the user needs both types of
operations at the same time). 


I'd like to know your opinion about this: 
do you think it is better to imeplement only one executable with both
DAC and MIDI OUT features (with some time irregularities in MIDI OUT
operations) or making an additional executable which can only manage
MIDI OUT realtime operation with precise timing? I can add these new
opcodes to both versions so, if a user doesn't need a very accurate midi
OUT timing, can use the standard version only, or, if more precise
timing is needed, he can use both versions in parallel.
I wait for your feedback.

good Csounding

-- 
Gabriel Maldonado

mailto:g.maldonado@agora.stm.it
http://www.agora.stm.it/G.Maldonado/home2.htm

Date1997-04-04 18:31
FromMike Berry
SubjectRe: Realtime MIDI Csound: New midi OUT opcodes
	I think that MIDI out from csound, while intriguing, does not seem
worth sacrificing any audio performance.  As most of us agree, csound's
strength is in the orchestra, not the score.  I find it hard to imagine a
situation where I would rather be making control data in csound than in a
sequencer, or a control language (MAX, etc...) .  A much more fruitful
approach would be to make csound capable of running side-by-side with a
control app, and able to exchange high density data (i.e. floats and 4
byte ints) with the control app. 

Mike Berry
mikeb@mills.edu
http://www.mills.edu/PEOPLE/gr.pages/mikeb.public.html/mikeb.homepage.html




Received: from stork2.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa26842;
          5 Apr 97 11:42 BST
Received: from goggins.bath.ac.uk by stork.maths.Bath.AC.UK id aa25029;
          5 Apr 97 11:41 BST
Received: from hermes.ex.ac.uk by goggins.bath.ac.uk with SMTP (PP);
          Sat, 5 Apr 1997 11:41:31 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (KAA17168);
          Sat, 5 Apr 1997 10:38:47 GMT
Received: from hermes.ex.ac.uk by maths.exeter.ac.uk;
          Sat, 5 Apr 97 11:38:42 +0100
Received: from agora.stm.it [194.20.43.1] by hermes via ESMTP (KAA17165);
          Sat, 5 Apr 1997 10:38:37 GMT
Received: from x (ppp03_13.stm.it [194.20.251.77]) 
          by agora.stm.it (8.7.5/8.6.6) with SMTP id MAA21216 
          for ;
          Sat, 5 Apr 1997 12:37:20 +0200 (ITADST)
Message-Id: <33463993.1C39@agora.stm.it>
Date: Sat, 05 Apr 1997 12:37:55 +0100
From: Gabriel Maldonado 
X-Mailer: Mozilla 3.01 (Win95; I)
Mime-Version: 1.0
To: Csound Mailing List 
Subject: Re: Realtime MIDI Csound: New midi OUT opcodes
References: 
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Dear Csounders,

a member of this list wrote:

> I personally think it's more productive to use Csound to create the
> digital audio files and use a commercial product such as cakewalk or
> Studio Vision to synchronize digital audio to MIDI. I would favor
> Csound version that produced a standard MIDI file rather than either
> f the realtime MIDI approaches.

Mike Berry wrote:
 
> I think that MIDI out from csound, while intriguing, does not seem
> worth sacrificing any audio performance.  As most of us agree, csound's
> strength is in the orchestra, not the score.  I find it hard to imagine a
> situation where I would rather be making control data in csound than in a
> sequencer, or a control language (MAX, etc...) .  A much more fruitful
> approach would be to make csound capable of running side-by-side with a
> control app, and able to exchange high density data (i.e. floats and 4
> byte ints) with the control app.

I don't know MAX but I think it is possible to do a lot of realtime
things with MIDI OUT opcodes in Csound. First of all to store chords and
melodies in different tables and modify them in realtime (while
listening) with standard krate opcodes. Also the timing and rithms can
be computed by csound engine generating a stream of midi event.
Highly complex control signals and envelopes can be generated and sent
to the MIDI sinth, so even if sinth has not a complete native control
power, it can be transformed in an amazing sinth.

I think it is extremely restrictive to stop at the traditional concept
of "note" when making computer music. I agree with Mike when he says
csound's strength is in the orchestra, not the score. In fact csound 
orchestra can generate itself a flow of events and notes starting from a
single score opcode. This flow can be gradually modified in realtime by
means of gestual input devices. It can bring toward new concepts of
making and composing music. Granular synthesis, in which macro and micro
structure levels can be scrambled, is an example of that. So Csound can
be a powerful control language too. A commercial sequencer is hugely far
from Csound elaboration capabilities.

I also agree with Mike when he says making csound capable of exchanging
high density data (such as floats) with a control application would be
very useful. 

bye and happy Csounding!

-- 
Gabriel Maldonado

mailto:g.maldonado@agora.stm.it
http://www.agora.stm.it/G.Maldonado/home2.htm



Received: from stork2.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa26866;
          5 Apr 97 12:17 BST
Received: from goggins.bath.ac.uk by stork.maths.Bath.AC.UK id aa25071;
          5 Apr 97 12:17 BST
Received: from hermes.ex.ac.uk by goggins.bath.ac.uk with SMTP (PP);
          Sat, 5 Apr 1997 12:17:28 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (LAA17821);
          Sat, 5 Apr 1997 11:15:05 GMT
Received: from hermes.ex.ac.uk by maths.exeter.ac.uk;
          Sat, 5 Apr 97 12:14:59 +0100
Received: from stieltjes.smc.univie.ac.at [131.130.31.68] by hermes 
          via ESMTP (LAA17818); Sat, 5 Apr 1997 11:14:49 GMT
Received: from polya.univie.ac.at (plato-slip-159.univie.ac.at [131.130.99.159]) 
          by stieltjes.smc.univie.ac.at (8.7.5/8.6.12) with SMTP id NAA21845 
          for ;
          Sat, 5 Apr 1997 13:17:26 +0200 (MET DST)
Date: Sat,  5 Apr 97 13:04:20 +0100
From: Erich Neuwirth 
Subject: beauty of laughter
To: csound@maths.ex.ac.uk
X-Mailer: Chameleon ATX 6.0.1, Standards Based IntraNet Solutions, NetManage 
          Inc.
X-Face: Ww0y#m#gfCw8pV9jF$;}^l_CqkSs+!2YJ[yJyyb-1aE?tp~5|GtEti,{1f~,Pt?)qcVs2-UjY#WCI6a3t)LZ=qpl>M8b{%j5NTX8l-nhJ&s+^a
X-Priority: 3 (Normal)
Message-Id: 
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

i tried to create the beauty of laughter from the
files in the archive.
melaugh1.aif
seems to be currupted.
just noise, no laughter.
is this a known problem,
and is there a place where i can get
a better version?


-- 
Erich Neuwirth 
Computer Supported Didactics Working Group, University of Vienna
PGP-key at http://www.smc.univie.ac.at/PGP-Keys/neuwirth.asc
Visit my Spreadsheet home page at http://sunsite.univie.ac.at/Spreadsite