| I wrote:
>
> > but when instance numbers are calculated at runtime, there might be
> > someting like i 2.0199999999 instead of i 2.02 ....
> > That may be a different instance - how would that be handled internally?
>
> Yes. So you'd have to be somewhat careful how the numbers are defined.
> Eg set the number by adding a fraction to the instr number rather than
> as the result of a division.
Umm, that was not a very good response.
Basically, I suppose I wanted to mean that one has to be consistent
in how the fractional number is defined.
So, as you're saying, if one instrument number is given as
kcounter = 1
kinum = 2 + (.01 * kcounter)
and another as
kcounter = 10
kinum = 2 + (1 / kcounter)
they may not be the same. I suppose the line
print p1
comes in handy for debugging here. Haven't used *that* before I think.
But if you're consistent, Csound won't mind whether you're working
with instrument 1.02 or instr 1.09999999 - as long as all instances
that should be connected are specified in the same way, you'll get
the desired effect. Or do rounding errors in float maths vary so
much that they are not even consistent in performance?
Well, in any case the first of the two methods to set instr numbers
above should probably be recommended.
Regards,
re
Received: from xenakis.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa01191;
3 Sep 99 14:29 BST
From: jpff@maths.bath.ac.uk
To: peter@orpheus.selene.cube.net
CC: csound@maths.ex.ac.uk
In-reply-to: <9909030602.AA28775@orpheus.selene.cube.net> (message from Peter
=?iso-8859-1?Q?Neub=E4cker?= on Fri, 3 Sep 99 08:02:35 +0200)
Subject: Re: triginstr - new opcode (re-resend)
BCC: jpff@maths.bath.ac.uk
References: <9909030602.AA28775@orpheus.selene.cube.net>
Date: Fri, 3 Sep 99 14:29:07 BST
Sender: jpff@maths.bath.ac.uk
Source-Info: From (or Sender) name not authenticated.
>From the comments in entry.c
y begins indef list of aargs (any count)
z begins indef list of kargs (any count)
Z begins alternating kakaka...list (any count)
so arbitrary lists of kargs is OK
==John
PS -- Thanks to Gabriel for y and z, Z is entirely my fault
Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa01206;
3 Sep 99 14:32 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by shaun.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
id 11MtST-0004eB-00
for jpff@maths.bath.ac.uk; Fri, 3 Sep 1999 14:32:49 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (OAA00538); Fri, 3 Sep 1999 14:29:30 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Fri, 3 Sep 1999 14:29:18 +0100
Received: from exim@wallace.maths.bath.ac.uk [138.38.100.104] by hermes via ESMTP (OAA12697); Fri, 3 Sep 1999 14:29:17 +0100 (BST)
Received: from [138.38.97.36] (helo=maths.Bath.AC.UK ident=mmdf)
by wallace.maths.bath.ac.uk with smtp (Exim 2.12 #1)
id 11MsHc-0005EH-00; Fri, 3 Sep 1999 13:17:32 +0100
From: jpff@maths.bath.ac.uk
To: peter@orpheus.selene.cube.net
CC: csound@maths.ex.ac.uk
In-reply-to: <9909030602.AA28775@orpheus.selene.cube.net> (message from Peter
=?iso-8859-1?Q?Neub=E4cker?= on Fri, 3 Sep 99 08:02:35 +0200)
Subject: Re: triginstr - new opcode (re-resend)
References: <9909030602.AA28775@orpheus.selene.cube.net>
Date: Fri, 3 Sep 99 14:29:07 BST
Source-Info: From (or Sender) name not authenticated.
Message-Id:
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
>From the comments in entry.c
y begins indef list of aargs (any count)
z begins indef list of kargs (any count)
Z begins alternating kakaka...list (any count)
so arbitrary lists of kargs is OK
==John
PS -- Thanks to Gabriel for y and z, Z is entirely my fault
Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa01214;
3 Sep 99 14:37 BST
Received: from [194.179.21.2] (helo=lix.intercom.es ident=root)
by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
id 11MsPb-0005ES-00
for jpff@maths.bath.ac.uk; Fri, 3 Sep 1999 13:25:47 +0100
Received: from intercom.es (iv3-206.intercom.es [195.76.131.206]) by lix.intercom.es (8.7.3/8.6.12) with ESMTP id PAA26260; Fri, 3 Sep 1999 15:46:02 +0100
Message-ID: <37CEC8BE.41D5603B@intercom.es>
Date: Thu, 02 Sep 1999 20:58:06 +0200
From: Josep M Comajuncosas
X-Mailer: Mozilla 4.5 [es] (Win95; I)
X-Accept-Language: es
MIME-Version: 1.0
To: jpff@maths.bath.ac.uk
CC: csound@maths.ex.ac.uk
Subject: re:Looking for drums:Gongs!
References:
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
>
> Sorry to be so completely un-Csoundy, but all you folks trying to make
> analogue-synth-like drum sounds should really be using the program Stomper,
> available for free (...)
Well yes but Stomper is sample-based. With Csound you can get an analog
drum with
subtle timbral variations from note to note for example, and memory from
the previous state (more analog maybe?).
Not to say that it will work together with all your Csound-based
processing stuff ...
But if you like Stomper you can get my port of Stomper to Csound at
http://members.tripod.com/csound/
(also for free...)
though I should add some more functionality, it works exactly the same
way... ;-)
***What Id like to have is high quality emulations of creashes and
gongs as Csound instruments.Stomper is not for that.
Anyone?
--
Josep M Comajuncosas
C/ Circumval.lacio 75 08790 Gelida - Penedes
Catalunya - SPAIN tel. 93 7792243
e-mail: gelida@intercom.es
ET Informatica de Sistemes
e-mail: jcomajuncosas@campus.uoc.es
http://members.tripod.com/csound/
Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa01231;
3 Sep 99 14:40 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
id 11MsSV-0005Eb-00
for jpff@maths.bath.ac.uk; Fri, 3 Sep 1999 13:28:47 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (OAA14717); Fri, 3 Sep 1999 14:37:40 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Fri, 3 Sep 1999 14:37:31 +0100
Received: from root@lix.intercom.es [194.179.21.2] by hermes via ESMTP (OAA02119); Fri, 3 Sep 1999 14:37:30 +0100 (BST)
Received: from intercom.es (iv3-206.intercom.es [195.76.131.206]) by lix.intercom.es (8.7.3/8.6.12) with ESMTP id PAA26260; Fri, 3 Sep 1999 15:46:02 +0100
Message-ID: <37CEC8BE.41D5603B@intercom.es>
Date: Thu, 02 Sep 1999 20:58:06 +0200
From: Josep M Comajuncosas
X-Mailer: Mozilla 4.5 [es] (Win95; I)
X-Accept-Language: es
MIME-Version: 1.0
To: jpff@maths.bath.ac.uk
CC: csound@maths.ex.ac.uk
Subject: re:Looking for drums:Gongs!
References:
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by exeter.ac.uk id OAA02119
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
>
> Sorry to be so completely un-Csoundy, but all you folks trying =
to make
> analogue-synth-like drum sounds should really be using the program Stom=
per,
> available for free (...)
Well yes but Stomper is sample-based. With Csound you can get an analog
drum with
subtle timbral variations from note to note for example, and memory from
the previous state (more analog maybe?).
Not to say that it will work together with all your Csound-based
processing stuff ...
But if you like Stomper you can get my port of Stomper to Csound at
http://members.tripod.com/csound/
(also for free...)
though I should add some more functionality, it works exactly the same
way... ;-)
***What I=B4d like to have is high quality emulations of creashes and
gongs as Csound instruments.Stomper is not for that.
Anyone?
--
Josep M Comajuncosas
C/ Circumval.lacio 75 08790 Gelida - Penedes
Catalunya - SPAIN tel. 93 7792243
e-mail: gelida@intercom.es
ET Informatica de Sistemes
e-mail: jcomajuncosas@campus.uoc.es
http://members.tripod.com/csound/
Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa01307;
3 Sep 99 15:12 BST
Received: from [195.92.193.22] (helo=mail9.svr.pol.co.uk)
by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
id 11Msxn-0005Gd-00
for jpff@maths.bath.ac.uk; Fri, 3 Sep 1999 14:01:07 +0100
Received: from modem-146.monkeyface-eel.dialup.pol.co.uk ([62.137.45.146] helo=internetpc)
by mail9.svr.pol.co.uk with smtp (Exim 2.12 #2)
id 11Mu4z-0007rg-00; Fri, 3 Sep 1999 15:12:37 +0100
Message-ID: <002001bef616$b3bbdf20$922d893e@internetpc>
From: richard bowers
To: Gabriel Maldonado , jpff@maths.bath.ac.uk
MMDF-Warning: Parse error in original version of preceding line at UK.AC.Bath.maths.omphalos
Cc: csound csound
References: <9909030602.AA28775@orpheus.selene.cube.net>
Subject: Re: triginstr - new opcode (re-resend)
Date: Fri, 3 Sep 1999 15:14:56 +0100
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 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
All this talk of triginstr!! Will it be implemented in the next release.
I've been having a hell of a time with the schedule/schedwhen pair. I'd like
to be able to trigger instruments (with or without additional parameters
beyond p3). What about Direct Csound also?
Richard Bowers
Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa01327;
3 Sep 99 15: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 11Mu86-0004fV-00
for jpff@maths.bath.ac.uk; Fri, 3 Sep 1999 15:15:50 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (PAA07037); Fri, 3 Sep 1999 15:13:00 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Fri, 3 Sep 1999 15:12:49 +0100
Received: from mail9.svr.pol.co.uk [195.92.193.22] by hermes via ESMTP (PAA07965); Fri, 3 Sep 1999 15:12:48 +0100 (BST)
Received: from modem-146.monkeyface-eel.dialup.pol.co.uk ([62.137.45.146] helo=internetpc)
by mail9.svr.pol.co.uk with smtp (Exim 2.12 #2)
id 11Mu4z-0007rg-00; Fri, 3 Sep 1999 15:12:37 +0100
Message-ID: <002001bef616$b3bbdf20$922d893e@internetpc>
From: richard bowers
To: Gabriel Maldonado , jpff@maths.bath.ac.uk
MMDF-Warning: Parse error in original version of preceding line at UK.AC.Bath.maths.omphalos
Cc: csound csound
References: <9909030602.AA28775@orpheus.selene.cube.net>
Subject: Re: triginstr - new opcode (re-resend)
Date: Fri, 3 Sep 1999 15:14:56 +0100
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 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
All this talk of triginstr!! Will it be implemented in the next release.
I've been having a hell of a time with the schedule/schedwhen pair. I'd like
to be able to trigger instruments (with or without additional parameters
beyond p3). What about Direct Csound also?
Richard Bowers
Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa01376;
3 Sep 99 15:39 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
id 11MtO0-0005IW-00
for jpff@maths.bath.ac.uk; Fri, 3 Sep 1999 14:28:13 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (PAA18485); Fri, 3 Sep 1999 15:35:35 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Fri, 3 Sep 1999 15:35:25 +0100
Received: from neptune.lyrick.com [38.227.100.46] by hermes via ESMTP (PAA05795); Fri, 3 Sep 1999 15:35:23 +0100 (BST)
Received: by neptune.lyrick.com with Internet Mail Service (5.5.2448.0)
id ; Fri, 3 Sep 1999 09:35:22 -0500
Message-ID: <283AABB8FD0DD21187C200A0C995F5DEECB0DC@neptune.lyrick.com>
From: David Boothe
To: 'rasmus ekman' ,
Csound list
Subject: RE: triginstr - new opcode (re-resend)
Date: Fri, 3 Sep 1999 09:35:18 -0500
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2448.0)
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01BEF619.8C82CBF0"
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01BEF619.8C82CBF0
Content-Type: text/plain;
charset="iso-8859-1"
Excuse my ignorance, but how is this different from schedwhen except for the
limiting arguments and the implied ability for multiple triggers from one
instrument? Could not schedule/schedwhen be updated to to include these
features?
-David.
Rasmus wrote:
Here is (doc of) an opcode which starts new instrument events from
the orchestra at k-rate. Events are started every time a triggering
signal is non-zero. Event generation may be limited in two ways:
by setting a minimum time interval between generated events, or
by specifying a maximum number of simultaneous instruments instances.
Events may also be deferred.
This opcode may be useful for things like generating strumming gestures,
or for some types of algorithmic composition.
[etc.]
------_=_NextPart_001_01BEF619.8C82CBF0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
RE: triginstr - new opcode (re-resend)
Excuse my ignorance, but how is this different from =
schedwhen except for the limiting arguments and the implied ability for =
multiple triggers from one instrument? Could not schedule/schedwhen be =
updated to to include these features?
-David.
Rasmus wrote:
Here is (doc of) an opcode which starts new =
instrument events from
the orchestra at k-rate. Events are started every =
time a triggering
signal is non-zero. Event generation may be limited =
in two ways:
by setting a minimum time interval between generated =
events, or
by specifying a maximum number of simultaneous =
instruments instances.
Events may also be deferred.
This opcode may be useful for things like generating =
strumming gestures,
or for some types of algorithmic composition.
[etc.]
------_=_NextPart_001_01BEF619.8C82CBF0--
Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa01478;
3 Sep 99 16: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 11MvFu-0004iS-00
for jpff@maths.bath.ac.uk; Fri, 3 Sep 1999 16:27:58 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (QAA16944); Fri, 3 Sep 1999 16:21:35 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Fri, 3 Sep 1999 16:21:24 +0100
Received: from zit-108.irt.de [194.172.230.108] by hermes via ESMTP (QAA17778); Fri, 3 Sep 1999 16:21:22 +0100 (BST)
Received: from pctb151 (pctb151.irt.de [192.168.3.151])
by nett.irt.de (8.9.1/8.9.1) with SMTP id RAA06775
for ; Fri, 3 Sep 1999 17:21:21 +0200 (METDST)
Date: Fri, 3 Sep 1999 17:21:21 +0200 (METDST)
Message-Id: <199909031521.RAA06775@nett.irt.de>
X-Sender: groh@mail
X-Mailer: Windows Eudora Version 1.4.4
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
To: csound@maths.ex.ac.uk
From: Jens Groh
Subject: re:Looking for drums:Gongs!
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by exeter.ac.uk id QAA17778
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
Josep M Comajuncosas wrote:
>
>***What I=B4d like to have is high quality emulations of creashes and
>gongs as Csound instruments.Stomper is not for that.
> Anyone?
Hello Josep, hello list!
I have made gong-like Csound instruments with some success by driving a
"four-dimensional echo" with a pulse. You will probably ask what the hell
could "four-dimensional echo" mean... well, that's my personal designatio=
n
for an arrangement of four cross-coupled delays (guess why I suggested th=
e
delayr/deltap opcode changes a while ago) which I describe at this place:
http://harmonik.de/femc/themen/csnd4d.html=20
But beware - it's in German! I let http://babelfish.altavista.com transla=
te
it to English and got a lot to laugh. (Is my English better? Who knows...
;-) Perhaps you will understand it nevertheless. Or you simply download t=
he
appropriate Csound file in order to modify it to your needs:
http://harmonik.de/femc/download/echo4d.csd=20
Happy virtual gong playing!
Jens
Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa01604;
3 Sep 99 17:19 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
id 11Muwf-0005O8-00
for jpff@maths.bath.ac.uk; Fri, 3 Sep 1999 16:08:05 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (RAA06211); Fri, 3 Sep 1999 17:12:59 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Fri, 3 Sep 1999 17:12:48 +0100
Received: from mail12.svr.pol.co.uk [195.92.193.215] by hermes via ESMTP (RAA18277); Fri, 3 Sep 1999 17:12:47 +0100 (BST)
Received: from modem-9.maroon-clown.dialup.pol.co.uk ([62.137.44.9] helo=internetpc)
by mail12.svr.pol.co.uk with smtp (Exim 2.12 #2)
id 11Mvx9-0001DT-00; Fri, 3 Sep 1999 17:12:39 +0100
Message-ID: <000b01bef627$78fa9c80$092c893e@internetpc>
From: richard bowers
To: David Boothe
Cc: csound csound
References: <283AABB8FD0DD21187C200A0C995F5DEECB0DC@neptune.lyrick.com>
Subject: Re: triginstr - new opcode (re-resend)
Date: Fri, 3 Sep 1999 17:14:58 +0100
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_0008_01BEF62F.D98943A0"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
This is a multi-part message in MIME format.
------=_NextPart_000_0008_01BEF62F.D98943A0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
RE: triginstr - new opcode (re-resend)I agree with David up to a point. =
I think schedule/when should be fixed because they're simpler to use but =
I've just read the documentation for triginstr and it looks tasty. =
k-rate variables make it tricky but much richer. I think updating scheds =
would make for ungainly opcodes. (Maybe there should be a third: =
schedkwhen, or something.)
It ties-in very neatly with an orch I'm working on right now which will =
store attack times from real input to a table (written on the fly =
somehow) for subsequent reading by, I now know, triginstr.
I'm really looking forward to this one.
Richard Bowers
PS. With the sched* opcodes I find that the triggered instruments are =
held indefinitely. Is that the case, anyone? (In realtime it results in =
the break-up of the signal due to overflow(?).)
Excuse my ignorance, but how is this different from schedwhen except =
for the limiting arguments and the implied ability for multiple triggers =
from one instrument? Could not schedule/schedwhen be updated to to =
include these features?=20
-David.=20
------=_NextPart_000_0008_01BEF62F.D98943A0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
RE: triginstr - new opcode (re-resend)
I agree with David up to a point. I think =
schedule/when should=20
be fixed because they're simpler to use but I've just read the =
documentation for=20
triginstr and it looks tasty. k-rate variables make it tricky but much =
richer. I=20
think updating scheds would make for ungainly opcodes. =
(Maybe there=20
should be a third: schedkwhen, or something.)
It ties-in very neatly with an orch I'm working on =
right now=20
which will store attack times from real input to a table (written =
on the=20
fly somehow) for subsequent reading by, I now know, =
triginstr.
I'm really looking forward to this one.
Richard Bowers
PS. With the sched* opcodes I find that the =
triggered=20
instruments are held indefinitely. Is that the case, anyone? (In =
realtime it=20
results in the break-up of the signal due to overflow(?).)
Excuse my ignorance, but how is this different from =
schedwhen=20
except for the limiting arguments and the implied ability for multiple =
triggers from one instrument? Could not schedule/schedwhen be updated =
to to=20
include these features?
-David.
------=_NextPart_000_0008_01BEF62F.D98943A0--
Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa02395;
4 Sep 99 1:41 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by shaun.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
id 11N3tt-0004w6-00
for jpff@maths.bath.ac.uk; Sat, 4 Sep 1999 01:41:49 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (BAA15281); Sat, 4 Sep 1999 01:39:12 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Sat, 4 Sep 1999 01:39:01 +0100
Received: from grynet.passagen.se [195.163.107.36] by hermes via ESMTP (BAA10884); Sat, 4 Sep 1999 01:39:01 +0100 (BST)
Received: from hem.passagen.se (z10-30.stockholm.sbbs2.net [212.112.10.30])
by grynet.passagen.se (8.8.6/8.8.6) with ESMTP id CAA20936
for ; Sat, 4 Sep 1999 02:38:58 +0200 (MDT)
Message-ID: <37D06B84.876B9EE4@hem.passagen.se>
Date: Sat, 04 Sep 1999 02:44:52 +0200
From: rasmus ekman
Organization: .
X-Mailer: Mozilla 4.61 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
CC: Csound list
Subject: Re: triginstr and scheds
References: <283AABB8FD0DD21187C200A0C995F5DEECB0DC@neptune.lyrick.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
> David Boothe wrote:
>
> how is this different from schedwhen
Ah, but this *is* schedwhen, except I changed the arguments and the
functionality a little, and the name and the internal implementation
completely.
I thought the new name is more informative than "sched"-something,
but this is of course the simplest part to change.
Richard Bowers concurred:
>
> I think schedule/when should be fixed because they're simpler to use
Of course I did look at them, but they were done in such a way that I
couldn't really use the code.
So the present sched* opcodes should anyway be rewritten from scratch,
and should probably best use the new "realtime event" that is described
in the code post. (May even be implemented as triginstr calls.)
(Realtime events are the internal Csound mechanism for adding events
in any manner except from a predefined score file; ie through live text
input, live MIDI, MIDI files, or - if included - orchestra events.)
> PS. With the sched* opcodes I find that the triggered instruments
> are held indefinitely.
That's one of the bugs I mentioned in my rant last week.
You can get around it only by having real score events (or midi
input etc) between sched triggering and intended turnoff time.
Regards,
re
Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa02615;
4 Sep 99 3:45 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
id 11N4hh-0005eL-00
for jpff@maths.bath.ac.uk; Sat, 4 Sep 1999 02:33:17 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (DAA15230); Sat, 4 Sep 1999 03:42:33 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Sat, 4 Sep 1999 03:42:23 +0100
Received: from rothko.bestweb.net [209.94.100.160] by hermes via ESMTP (DAA14040); Sat, 4 Sep 1999 03:42:22 +0100 (BST)
Received: from goodguy ([216.179.14.69])
by rothko.bestweb.net (8.9.1a/8.9.0) with SMTP id WAA28856
for ; Fri, 3 Sep 1999 22:42:19 -0400 (EDT)
Message-ID: <37D085A4.38D34C49@westnet.com>
Date: Sat, 04 Sep 1999 02:36:20 +0000
From: Larry Troxler
X-Mailer: Mozilla 3.01 (X11; I; Linux 2.0.36 i586)
MIME-Version: 1.0
To: csound@maths.ex.ac.uk
Subject: "foutir", RT MIDI vs. non-rt equivalent instruments.
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
I would like to hear from anyone that is using the "foutir" family of
opcodes (or some other method) to duplicate in non-real-time, the output
of a real-time MIDI Csound performance.
Basically, I want do do something like this:
RealTimeMIDIPerformance --> csound MIDI instrument --> audio out
\--> foutir --> gen'd scorefile
Then later,
gen'd scorefile --> equivalent non-MIDI instrument --> audio, wavfile.
So basically, I'm looking at the basic problem of the best way to
generate equivalent MIDI and score-oriented instruments.
Unfortunately, I suspect that this is still unexplored territory in
Csound.
My major problem at the moment, is that the MIDI conversion opcodes are
only available in a flavor that works with realtime MIDI input.
For example, there is a "cpsmidi" opcode which only converts from actual
MIDI input to CPS. There seems to be no equivalent opcode that takes a
regular I-time variable.
If anybody is actually using the likes of "foutir" to accomplish this,
I'd like to hear from them.
Arrggh, why is it that the one software-synthesis package with the
largest user base and greatest variety of contributions, has to be the
one that is the most low-tech and antiquated? Arrrgghhh!!!! This is not
good!!
Sigh, I guess a true artist must suffer to realize their goal. A blues
musician must go through some tough personal times. A csound musician
must deal with assembler syntax, ancient design, and complete lack of
interoperability. { {E|Bb|Eeb} - F - Eb... }
Larry Troxler
Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa02838;
4 Sep 99 7:09 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by shaun.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
id 11N90h-00055Z-00
for jpff@maths.bath.ac.uk; Sat, 4 Sep 1999 07:09:11 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (HAA04664); Sat, 4 Sep 1999 07:05:19 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Sat, 4 Sep 1999 07:05:08 +0100
Received: from root@ulster.net [208.148.73.65] by hermes via ESMTP (HAA01792); Sat, 4 Sep 1999 07:05:07 +0100 (BST)
Received: from ulster.net (port28.king.ulster.net [208.242.160.29])
by nerf.ulster.net (8.9.3/8.9.3/Debian/GNU) with ESMTP id CAA19664
for ; Sat, 4 Sep 1999 02:21:09 -0400
Message-ID: <37D0B846.DA3BB22F@ulster.net>
Date: Sat, 04 Sep 1999 02:12:22 -0400
From: Paul Winkler
X-Mailer: Mozilla 4.61 [en] (X11; U; Linux 2.0.36 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: CSOUND list
Subject: Pipes?
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
Hi everyone,
I've been playing around a bit with csound getting realtime score events
from stdin or from a named pipe (FIFO). This works very well (on linux,
at least) and is quite fun.
But these experiments have got me thinking: I'd like to be able to have
more than one pipe going at once. And I'd like to be able to access the
data written to these pipes within a csound orc at krate.
For instance, let's imagine a hypothetical opcode, "piperead", which
would work something like this:
kamp piperead "pipename"
This would, in effect, read data from the pipe once every ksmps sample
frames, and write the result to kamp.
There's a couple of reasons I would like this: first, it would allow
multiple pipes with different names to control different things in the
orc, which might be nice for keeping track of what's what. More
importantly, it could be used sort of like MIDI "continuous control"
messages, or like xyin, to get streams of realtime control data.
Now, I'm a total novice to unix systems programming; I don't know if a
pipe can even be used in such a fashion. (If data is arriving faster
than the krate, what happens to the extra data?)
And my C is pretty minimal (and rusty at that), so I have no idea how to
implement such a thing anyway.
Also, this would be a highly non-portable opcode... I gather Win32
systems have something like pipes, but Macs don't?
And then there's the issue of what data type is used for the streamed
data (ints? floats? ASCII representations???)
hmmm...
Thoughts anyone?
For those who haven't tried FIFOs with csound: the syntax is:
mkfifo FOO; csound -odevaudio -L ~/FOO blah.orc blah.sco
Now you can send the output of any event-generating program or script to
FOO and csound will play it. The .sco file needs to at least contain a
dummy event to keep csound active for a while, such as:
f0 10000
--
---------------- paul winkler ------------------
slinkP arts: music, sound, illustration, design, etc.
zarmzarm@hotmail.com --or-- slinkp AT ulster DOT net
http://www.ulster.net/~abigoo/
======================================================
Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa02939;
4 Sep 99 8:28 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
id 11N97f-0005pQ-00
for jpff@maths.bath.ac.uk; Sat, 4 Sep 1999 07:16:23 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (IAA12427); Sat, 4 Sep 1999 08:24:24 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Sat, 4 Sep 1999 08:24:13 +0100
Received: from agora.stm.it [195.62.32.1] by hermes via ESMTP (IAA04963); Sat, 4 Sep 1999 08:24:12 +0100 (BST)
Received: from agora.stm.it (rm1-715.tiscalinet.it [212.123.80.81]) by agora.stm.it (8.9.2/8.8.5) with ESMTP id JAA03141; Sat, 4 Sep 1999 09:24:07 +0200 (ITADST)
Message-ID: <37D0CB2F.6EB9D4F@agora.stm.it>
Date: Sat, 04 Sep 1999 09:33:03 +0200
From: Gabriel Maldonado
X-Mailer: Mozilla 4.5 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
To: Larry Troxler
CC: csound@maths.ex.ac.uk
Subject: Re: "foutir", RT MIDI vs. non-rt equivalent instruments.
References: <37D085A4.38D34C49@westnet.com>
Content-Type: multipart/mixed;
boundary="------------D26F091D3300718F9D976C66"
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
This is a multi-part message in MIME format.
--------------D26F091D3300718F9D976C66
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
I hope these sample orc/sco pairs will help you
Larry Troxler wrote:
>
> I would like to hear from anyone that is using the "foutir" family of
> opcodes (or some other method) to duplicate in non-real-time, the output
> of a real-time MIDI Csound performance.
>
> Basically, I want do do something like this:
>
> RealTimeMIDIPerformance --> csound MIDI instrument --> audio out
> \--> foutir --> gen'd scorefile
>
> Then later,
>
> gen'd scorefile --> equivalent non-MIDI instrument --> audio, wavfile.
>
> So basically, I'm looking at the basic problem of the best way to
> generate equivalent MIDI and score-oriented instruments.
>
> Unfortunately, I suspect that this is still unexplored territory in
> Csound.
>
> My major problem at the moment, is that the MIDI conversion opcodes are
> only available in a flavor that works with realtime MIDI input.
>
> For example, there is a "cpsmidi" opcode which only converts from actual
> MIDI input to CPS. There seems to be no equivalent opcode that takes a
> regular I-time variable.
>
> If anybody is actually using the likes of "foutir" to accomplish this,
> I'd like to hear from them.
>
> Arrggh, why is it that the one software-synthesis package with the
> largest user base and greatest variety of contributions, has to be the
> one that is the most low-tech and antiquated? Arrrgghhh!!!! This is not
> good!!
>
> Sigh, I guess a true artist must suffer to realize their goal. A blues
> musician must go through some tough personal times. A csound musician
> must deal with assembler syntax, ancient design, and complete lack of
> interoperability. { {E|Bb|Eeb} - F - Eb... }
>
> Larry Troxler
--
Gabriel Maldonado
http://web.tiscalinet.it/G-Maldonado/home2.htm
--------------D26F091D3300718F9D976C66
Content-Type: application/x-unknown-content-type-orcfile;
name="fininew.orc"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="fininew.orc"
CXNyID0gNDQxMDANCglrciA9IDQ0MQ0KCWtzbXBzID0gMTAwDQoJbmNobmxzID0gMQ0KDQpn
aTEJZnRnZW4JMSwwLDEwMjQsMTAsICAxDQpnaWhhbmRsZQlmaW9wZW4JImJ1dHRhaS50eHQi
LDEgIDsqKiB0aGUgZmlsZSBidXR0YTEudHh0IG11c3QgYmUgZ2VuZXJhdGVkIGJ5ICJmb3V0
aS5vcmMiDQoNCglpbnN0cgkxIDsqKiogdGhpcyBpbnN0ciBtdXN0IGJlIGFjdGl2YXRlZCBi
eSBNSURJDQppZHVtbXkJaW5pdAkwIDsqKiB0byBhdm9pZCAidXNlZCBiZWZvcmUgZGVmaW5l
ZCIgICAgZXJyb3JzDQppYWN0aW1lIAlpbml0CTANCmlkdXIgCWluaXQJMA0KaW5zdG5vIAlp
bml0CTANCmlhbXAJaW5pdAkwDQppZnJlcQlpbml0CTANCg0KCWZpbmkJZ2loYW5kbGUsMCwg
ICAgaWR1bW15LGluc3RubyxpYWN0aW1lLGlkdXIsIGlmcmVxLCBpYW1wDQoNCnByaW50CWlu
c3RubywgaWFjdGltZSwgaWR1ciwgaWZyZXEsaWFtcA0KDQphMQlvc2NpbGkJaWFtcCxpZnJl
cSwxDQoJb3V0CWExDQoJZW5kaW4NCg0KDQo=
--------------D26F091D3300718F9D976C66
Content-Type: application/x-unknown-content-type-orcfile;
name="foutinew.orc"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="foutinew.orc"
CXNyID0gNDQxMDANCglrciA9IDQ0MQ0KCWtzbXBzID0gMTAwDQoJbmNobmxzID0gMQ0KDQpn
aTEJZnRnZW4JMSwwLDEwMjQsMTAsICAxDQpnaWhhbmRsZQlmaW9wZW4JImJ1dHRhaS50eHQi
LDANCg0KCWluc3RyCTEgOyoqKiB0aGlzIGluc3RyIG11c3QgYmUgYWN0aXZhdGVkIGJ5IE1J
REkNCmlmcmVxCWNwc21pZGkJDQppYW1wCWFtcG1pZGkJMTAwMDANCglmb3V0aXIJZ2loYW5k
bGUsMCwyLGlmcmVxLGlhbXANCmExCW9zY2lsaQlpYW1wLGlmcmVxLDENCglvdXQJYTENCgll
bmRpbg0KDQoNCg==
--------------D26F091D3300718F9D976C66
Content-Type: application/x-unknown-content-type-scofile;
name="fininew.sco"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="fininew.sco"
ZjAgMzYwMA0KDQoNCg==
--------------D26F091D3300718F9D976C66
Content-Type: application/x-unknown-content-type-scofile;
name="foutinew.sco"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="foutinew.sco"
ZjAgMzYwMA0KDQoNCg==
--------------D26F091D3300718F9D976C66--
Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa02961;
4 Sep 99 8:43 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by shaun.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
id 11NAU8-00056A-00
for jpff@maths.bath.ac.uk; Sat, 4 Sep 1999 08:43:40 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (IAA17580); Sat, 4 Sep 1999 08:40:09 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Sat, 4 Sep 1999 08:39:59 +0100
Received: from agora.stm.it [195.62.32.1] by hermes via ESMTP (IAA00971); Sat, 4 Sep 1999 08:39:58 +0100 (BST)
Received: from agora.stm.it (rm1-715.tiscalinet.it [212.123.80.81]) by agora.stm.it (8.9.2/8.8.5) with ESMTP id JAA05870 for ; Sat, 4 Sep 1999 09:39:56 +0200 (ITADST)
Message-ID: <37D0CEE4.BC65F54D@agora.stm.it>
Date: Sat, 04 Sep 1999 09:48:52 +0200
From: Gabriel Maldonado
X-Mailer: Mozilla 4.5 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
To: Csound Mailing List
Subject: [Announce] VMCI Plus (2.0) available for download
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
Hi all,
VMCI Plus, the new version of Virtual Midi Control Interface is
available for download at the following url:
http://web.tiscalinet.it/G-Maldonado/vmciplus.html
The newer version of the program (VMCI Plus 2) supports snapshots and
allows to change more than one parameter at the same time by means of
the new Hyper-Vectorial Synthesis control. VMCI supports 7-bit data as
well as the higher resolution 14-bit data that can be handled by the
newer versions of Csound. It allows also remote MIDI control of sliders
and Hyper Vectorial Synthesis.
The archive include several examples as well as orc/sco pairs.
Happy VMCIing
--
Gabriel Maldonado
http://web.tiscalinet.it/G-Maldonado/home2.htm
Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa03003;
4 Sep 99 9:11 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
id 11N9nE-0005qS-00
for jpff@maths.bath.ac.uk; Sat, 4 Sep 1999 07:59:20 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (JAA15694); Sat, 4 Sep 1999 09:07:11 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Sat, 4 Sep 1999 09:07:04 +0100
Received: from root@news.cube.net [194.97.64.2] by hermes via SMTP (JAA07490); Sat, 4 Sep 1999 09:07:03 +0100 (BST)
Received: from orpheus.selene.cube.net([193.149.39.225]) (1092 bytes) by salyko.cube.net
via smtpd with P:smtp/R:bind_hosts/T:inet_zone_bind_smtp
(sender: )
id
for ; Sat, 4 Sep 1999 10:07:03 +0200 (MEST)
(Smail-3.2.0.106 1999-Mar-31 #1 built 1999-Sep-2)
Received: from hermes by orpheus.selene.cube.net (NX5.67f2/NX3.0M)
id AA29571; Sat, 4 Sep 99 10:06:30 +0200
Message-Id: <9909040806.AA29571@orpheus.selene.cube.net>
Received: by hermes.selene.cube.net (NX5.67g/NX3.0X)
id AA00465; Sat, 4 Sep 99 10:06:29 +0200
Content-Type: text/plain
Mime-Version: 1.0 (NeXT Mail 4.2mach v148)
Received: by NeXT.Mailer (1.148)
From: Peter Neubacker
Date: Sat, 4 Sep 99 10:06:29 +0200
To: csound@maths.ex.ac.uk
Subject: Re: Pipes?
Reply-To: peter@orpheus.selene.cube.net
References: <37D0B846.DA3BB22F@ulster.net>
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
I am using pipes / line events for updating
arbitrary parameters the following way:
Make the parameters you want to update
continuously global variables, e.g gk1,gk2...
and write a litte instrument for each of them:
instr 1
gk1 init p4
turnoff
endin
instr 2
gk2 init p4
turnoff
endin
Then send "i 1 0 1 val" over the pipe...
Peter
Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa03145;
4 Sep 99 11:18 BST
Received: from [195.62.32.1] (helo=agora.stm.it)
by shaun.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
id 11NCu4-00057W-00
for jpff@maths.bath.ac.uk; Sat, 4 Sep 1999 11:18:37 +0100
Received: from agora.stm.it (rm2-527.tiscalinet.it [212.123.84.19]) by agora.stm.it (8.9.2/8.8.5) with ESMTP id MAA01325; Sat, 4 Sep 1999 12:18:23 +0200 (ITADST)
Message-ID: <37D0E7AF.FCB3F89F@agora.stm.it>
Date: Sat, 04 Sep 1999 11:34:39 +0200
From: Gabriel Maldonado
X-Mailer: Mozilla 4.5 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
To: J P Fitch
CC: Csound Mailing List
Subject: Some suggestion about little enhancements to existing opcodes
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hallo john,
here are some hints to enhance some existing opcode.
---------------------
powoftwo and logbtwo can run at a-rate by simply adding the following
lines to entry.c:
{ "powoftwo_a",S(EVAL), 4, "a", "a", NULL, NULL
,powoftwo },
{ "logbtwo_a",S(EVAL), 4, "a", "a", NULL, NULL,
logbasetwo },
---------------------
poscil family can support negative frequencies by simply adding the
corresponding code:
void posc(POSC *p)
{
float *out = p->out, *ft = p->ftp->ftable;
float *curr_samp, fract;
double phs = p->phs;
double si = *p->freq * p->tablen / esr;
long n = ksmps;
float amp = *p->amp;
do {
curr_samp = ft + (long)phs;
fract = (float)(phs - (long)phs);
*out++ = amp * (*curr_samp +(*(curr_samp+1)-*curr_samp)*fract);
phs += si;
while (phs >= p->tablen)
phs -= p->tablen;
while (phs < 0 ) /********** HERE IS THE CODE TO ADD ******/
phs += p->tablen; /*****************************************/
} while (--n);
p->phs = phs;
}
... and so on for kposc(), lposc(), posc3() etc. I will send you the
complete file in anoter message.
Notice that poscil family allows to use function tables whose length is
not a power of two (with a very little modification in the
initialization code).
What do you think to extend GEN functions in order to allow to create
non-power-of-two tables? One can use a negative number to indicate the
table number that will skip power-of-two checking.
-------------------------
wguide1 and wguide2 cannot vary the frequency continusly without an
audible distortion when kr is different from sr. This happens because
the frequency input argument of these opcodes is k-type. I strongly
suggest to change it to a-rate. This will allow also hybrid FM with an
oscillator modulating the the frequency of wguide instruments. THe
modification is very very simple. I send the source file in a separate
message.
--------------------------
At present time the phase of phasor opcode is stored into a float
variable. What do you think to store it in a double variable? This will
improve frequency resolution of phasor a lot, practically without
slowing speed.
It is sufficient to change the structure of phasor as follows:
typedef struct {
OPDS h;
float *sr, *xcps, *iphs;
float curphs;
} PHSOR;
...into...
typedef struct {
OPDS h;
float *sr, *xcps, *iphs;
double curphs;
} PHSOR;
and, in the declaration section of kphsor()and phsor() functions
change...
float phs;
...into...
double phs;
Please tell me if you intend to make these little modifications.
Best
--
Gabriel Maldonado
http://web.tiscalinet.it/G-Maldonado/home2.htm
Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa03158;
4 Sep 99 11:22 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by shaun.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
id 11NCy5-00057a-00
for jpff@maths.bath.ac.uk; Sat, 4 Sep 1999 11:22:45 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (LAA11887); Sat, 4 Sep 1999 11:18:49 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Sat, 4 Sep 1999 11:18:38 +0100
Received: from agora.stm.it [195.62.32.1] by hermes via ESMTP (LAA08888); Sat, 4 Sep 1999 11:18:37 +0100 (BST)
Received: from agora.stm.it (rm2-527.tiscalinet.it [212.123.84.19]) by agora.stm.it (8.9.2/8.8.5) with ESMTP id MAA01325; Sat, 4 Sep 1999 12:18:23 +0200 (ITADST)
Message-ID: <37D0E7AF.FCB3F89F@agora.stm.it>
Date: Sat, 04 Sep 1999 11:34:39 +0200
From: Gabriel Maldonado
X-Mailer: Mozilla 4.5 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
To: J P Fitch
CC: Csound Mailing List
Subject: Some suggestion about little enhancements to existing opcodes
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
Hallo john,
here are some hints to enhance some existing opcode.
---------------------
powoftwo and logbtwo can run at a-rate by simply adding the following
lines to entry.c:
{ "powoftwo_a",S(EVAL), 4, "a", "a", NULL, NULL
,powoftwo },
{ "logbtwo_a",S(EVAL), 4, "a", "a", NULL, NULL,
logbasetwo },
---------------------
poscil family can support negative frequencies by simply adding the
corresponding code:
void posc(POSC *p)
{
float *out = p->out, *ft = p->ftp->ftable;
float *curr_samp, fract;
double phs = p->phs;
double si = *p->freq * p->tablen / esr;
long n = ksmps;
float amp = *p->amp;
do {
curr_samp = ft + (long)phs;
fract = (float)(phs - (long)phs);
*out++ = amp * (*curr_samp +(*(curr_samp+1)-*curr_samp)*fract);
phs += si;
while (phs >= p->tablen)
phs -= p->tablen;
while (phs < 0 ) /********** HERE IS THE CODE TO ADD ******/
phs += p->tablen; /*****************************************/
} while (--n);
p->phs = phs;
}
... and so on for kposc(), lposc(), posc3() etc. I will send you the
complete file in anoter message.
Notice that poscil family allows to use function tables whose length is
not a power of two (with a very little modification in the
initialization code).
What do you think to extend GEN functions in order to allow to create
non-power-of-two tables? One can use a negative number to indicate the
table number that will skip power-of-two checking.
-------------------------
wguide1 and wguide2 cannot vary the frequency continusly without an
audible distortion when kr is different from sr. This happens because
the frequency input argument of these opcodes is k-type. I strongly
suggest to change it to a-rate. This will allow also hybrid FM with an
oscillator modulating the the frequency of wguide instruments. THe
modification is very very simple. I send the source file in a separate
message.
--------------------------
At present time the phase of phasor opcode is stored into a float
variable. What do you think to store it in a double variable? This will
improve frequency resolution of phasor a lot, practically without
slowing speed.
It is sufficient to change the structure of phasor as follows:
typedef struct {
OPDS h;
float *sr, *xcps, *iphs;
float curphs;
} PHSOR;
...into...
typedef struct {
OPDS h;
float *sr, *xcps, *iphs;
double curphs;
} PHSOR;
and, in the declaration section of kphsor()and phsor() functions
change...
float phs;
...into...
double phs;
Please tell me if you intend to make these little modifications.
Best
--
Gabriel Maldonado
http://web.tiscalinet.it/G-Maldonado/home2.htm
|