Csound Csound-dev Csound-tekno Search About

MIDI: assigning instr'ments to ranges of notes

Date1997-08-09 14:02
FromLaszlo Vecsey
SubjectMIDI: assigning instr'ments to ranges of notes
I'm trying to assign an instr to midi note ranges, say 65-75, and another
instrument on 76, and so on. This way I can fool around with a bunch of
different sounds simultaneously without changing channels on the midi
keyboard. 

I've done this so far with if statements and kgoto's (as shown by the
toot13 example) by checking the notnum midi value, but I've found that
even with this method it dies after a while.. is there a limit to the
number of if statements?

I'm hoping there is a simpler solution, perhaps something I can specify in
the .sco file, to just point certain channels and ranges to specific
instruments.

Or if it isn't possible yet, perhaps a csound expert could suggest some
likely syntax that would be used and appropriate places to start hacking
on the source.. I'm using 3.46. 

- lv




Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa08219;
          11 Aug 97 17:10 BST
Received: from pat.bath.ac.uk by stork.maths.Bath.AC.UK id aa01796;
          11 Aug 97 17:09 BST
Received: (qmail 196 invoked from network); 11 Aug 1997 16:09:55 -0000
Received: from hermes.ex.ac.uk (144.173.6.14)
  by pat.bath.ac.uk with SMTP; 11 Aug 1997 16:09:55 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (QAA19825); Mon, 11 Aug 1997 16:44:47 +0100
Received: from hermes.ex.ac.uk by maths.exeter.ac.uk; Mon, 11 Aug 97 16:44:36 +0100
Received: from sparticus.bright.net [205.212.123.14] by hermes via ESMTP (QAA19806); Mon, 11 Aug 1997 16:43:58 +0100
Received: from brutus (root@find3-cs-15.dial.bright.net [205.212.145.178]) by sparticus.bright.net (8.8.7/8.8.7/FNG) with SMTP id LAA03537; Mon, 11 Aug 1997 11:43:44 -0400 (EDT)
Message-Id: <33EF34CD.3E223F75@bright.net>
Date: Mon, 11 Aug 1997 11:50:37 -0400
From: Dave Phillips 
X-Mailer: Mozilla 3.0 (X11; I; Linux 2.0.29 i486)
Mime-Version: 1.0
To: csound@maths.ex.ac.uk
Subject: C question
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

I figure someone in this group can help me with this question. I want to
port an application from Turbo C to compile under the GCC in Linux, but
I'm stuck by the include file called conio.h. Is there a direct
replacement in the GCC for that header ?

TIA...

== Dave Phillips

   http://www.bright.net/~dlphilp/index.html



Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa08429;
          11 Aug 97 18:32 BST
Received: from pat.bath.ac.uk by stork.maths.Bath.AC.UK id aa03119;
          11 Aug 97 18:31 BST
Received: (qmail 4070 invoked from network); 11 Aug 1997 17:31:35 -0000
Received: from hermes.ex.ac.uk (144.173.6.14)
  by pat.bath.ac.uk with SMTP; 11 Aug 1997 17:31:35 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (SAA00127); Mon, 11 Aug 1997 18:09:35 +0100
Received: from hermes.ex.ac.uk by maths.exeter.ac.uk; Mon, 11 Aug 97 18:09:26 +0100
Received: from [142.204.119.14] by hermes via SMTP (SAA00112); Mon, 11 Aug 1997 18:09:21 +0100
Received: by phobos.senecac.on.ca (AIX 3.2/UCB 5.64/4.03)
          id AA43922; Mon, 11 Aug 1997 13:10:40 -0400
Date: Mon, 11 Aug 1997 13:10:39 -0400 (EDT)
From: Steven robert Campbell 
To: Dave Phillips 
Cc: csound@maths.ex.ac.uk
Subject: Re: C question
In-Reply-To: <33EF34CD.3E223F75@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


I believe the equivalent in UNIX is direct IO functions in UNIX are located
in "curses.h".  You'll have to do some slight modifications to the 
functions, but you should be able to easily make compatibale conio 
functions from the curses library.

Steve.



On Mon, 11 Aug 1997, Dave Phillips wrote:

> I figure someone in this group can help me with this question. I want to
> port an application from Turbo C to compile under the GCC in Linux, but
> I'm stuck by the include file called conio.h. Is there a direct
> replacement in the GCC for that header ?
> 
> TIA...
> 
> == Dave Phillips
> 
>    http://www.bright.net/~dlphilp/index.html
> 
> 



Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa08707;
          11 Aug 97 20:23 BST
Received: from pat.bath.ac.uk by stork.maths.Bath.AC.UK id aa04311;
          11 Aug 97 20:22 BST
Received: (qmail 7672 invoked from network); 11 Aug 1997 19:22:52 -0000
Received: from hermes.ex.ac.uk (144.173.6.14)
  by pat.bath.ac.uk with SMTP; 11 Aug 1997 19:22:52 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (UAA03625); Mon, 11 Aug 1997 20:04:58 +0100
Received: from hermes.ex.ac.uk by maths.exeter.ac.uk; Mon, 11 Aug 97 20:04:49 +0100
Received: from mercury.acs.unt.edu [129.120.1.1] by hermes via ESMTP (UAA04065); Mon, 11 Aug 1997 20:04:39 +0100
Received: from jove.acs.unt.edu (3045@jove.acs.unt.edu [129.120.1.41])
	by mercury.acs.unt.edu (8.8.5/8.8.5) with ESMTP id OAA24920;
	Mon, 11 Aug 1997 14:04:53 -0500 (CDT)
Received: from localhost (mat0001@localhost)
	by jove.acs.unt.edu (8.8.5/8.8.5) with SMTP id OAA23068;
	Mon, 11 Aug 1997 14:04:37 -0500 (CDT)
Date: Mon, 11 Aug 1997 14:04:37 -0500 (CDT)
From: Micheal Allen Thompson 
To: Dave Phillips 
Cc: csound@maths.ex.ac.uk
Subject: Re: C question
In-Reply-To: <33EF34CD.3E223F75@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

Isnt conio.h for console output? under dos? what happens if you comment
out the header?

Michael

On Mon, 11 Aug 1997, Dave Phillips wrote:

> I figure someone in this group can help me with this question. I want to
> port an application from Turbo C to compile under the GCC in Linux, but
> I'm stuck by the include file called conio.h. Is there a direct
> replacement in the GCC for that header ?
> 
> TIA...
> 
> == Dave Phillips
> 
>    http://www.bright.net/~dlphilp/index.html
> 




Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa09857;
          12 Aug 97 7:52 BST
Received: from pat.bath.ac.uk by stork.maths.Bath.AC.UK id aa13993;
          12 Aug 97 7:52 BST
Received: (qmail 21995 invoked from network); 12 Aug 1997 06:52:07 -0000
Received: from hermes.ex.ac.uk (144.173.6.14)
  by pat.bath.ac.uk with SMTP; 12 Aug 1997 06:52:07 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (HAA21605); Tue, 12 Aug 1997 07:43:46 +0100
Received: from hermes.ex.ac.uk by maths.exeter.ac.uk; Tue, 12 Aug 97 07:43:33 +0100
Received: from sparticus.bright.net [205.212.123.14] by hermes via ESMTP (HAA23253); Tue, 12 Aug 1997 07:43:26 +0100
Received: from brutus (root@find1-cs-7.dial.bright.net [205.212.145.136]) by sparticus.bright.net (8.8.7/8.8.7/FNG) with SMTP id CAA22122; Tue, 12 Aug 1997 02:43:16 -0400 (EDT)
Message-Id: <33F00787.5B66AAC7@bright.net>
Date: Tue, 12 Aug 1997 02:49:43 -0400
From: Dave Phillips 
X-Mailer: Mozilla 3.0 (X11; I; Linux 2.0.29 i486)
Mime-Version: 1.0
To: csound@maths.ex.ac.uk
Subject: Re: C question
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Thanks to all who responded to my query ! I did some digging and found
that conio.h was there for only one function, called exactly once. I
deleted the function (a clear-screen call) and the #include, and the
program compiled fine. Btw, the binary is built from the code for
tapeloop.exe on the Tuning By Ratios site at

	http://www.terraworld.net/users/r/robert/htmlpap6.htm#E9E7

It's a Csound score generator, easy to build for Linux, and it produces
some interesting tape-loop effects.

== Dave Phillips

   http://www.bright.net/~dlphilp/index.html



Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa09983;
          12 Aug 97 10:04 BST
Received: from pat.bath.ac.uk by stork.maths.Bath.AC.UK id aa15902;
          12 Aug 97 10:03 BST
Received: (qmail 26451 invoked from network); 12 Aug 1997 09:03:24 -0000
Received: from hermes.ex.ac.uk (144.173.6.14)
  by pat.bath.ac.uk with SMTP; 12 Aug 1997 09:03:24 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (JAA07341); Tue, 12 Aug 1997 09:53:14 +0100
Received: from zeno by maths.exeter.ac.uk; Tue, 12 Aug 97 09:53:05 +0100
From: james@maths.ex.ac.uk
Message-Id: <16167.199708120853@zeno.maths.exeter.ac.uk>
Subject: admin stuff
To: csound@maths.ex.ac.uk
Date: Tue, 12 Aug 1997 09:53:04 +0100 (BST)
X-Mailer: ELM [version 2.4 PL25]
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Length: 171       
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

The www cache of the last few months messages is working again
see www.maths.ex.ac.uk/~james/csound_list/

Most of July is missing

-- 
James Andrews, maths CDO, ext.3977