| It should be noted that doing this (waveshaping) does cause distortion in the
signal. If you run a full-range sine wave through this table, you do not get
a sine wave out the other end. The distortion may be pleasant (more pleasant
than clipping!!!) and may be the desired result, but it is there. So this is
not the same as scaling your score to avoid clipping.
Matt wrote:
> At the request of a couple of csound subscribers I've attempted to give an
> example of how I implement the volume limiting I described in my earlier
> mail. I originally intended to use a function for the curve, but in the
> end I used a table into which I placed a few values from this curve and
> I'm afraid I've completely lost the original function. It's not complex..
> it was the result of about 5 minutes fiddling with gnuplot :) The curve in
> my example isn't really very curved at all, but you can imagine that if
> you added a few extra points you could achieve a much better
> approximation. The important thing is that it works, quite well :)
--
Mike Berry
mikeb@nmol.com
http://www.nmol.com/users/mikeb
Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa03732;
31 Jan 98 19:06 GMT
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa08421;
31 Jan 98 19:06 GMT
Received: (qmail 2834 invoked from network); 31 Jan 1998 19:06:30 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
by mercury.bath.ac.uk with SMTP; 31 Jan 1998 19:06:30 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (TAA01566); Sat, 31 Jan 1998 19:02:10 GMT
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Sat, 31 Jan 98 19:01:51 GMT
Received: from amsterdam.interport.net [199.184.165.9] by hermes via ESMTP (TAA23609); Sat, 31 Jan 1998 19:01:45 GMT
Received: from 207.38.236.134 (jose.port.net [207.38.236.134])
by amsterdam.interport.net (8.8.5/8.8.5) with SMTP id OAA00214
for ; Sat, 31 Jan 1998 14:01:41 -0500 (EST)
Message-Id: <34D3E6DA.20AB@interport.net>
Date: Sun, 01 Feb 1998 03:07:06 +0000
From: jose halac
Reply-To: jose@interport.net
X-Mailer: Mozilla 3.01-C-MACOS8 (Macintosh; I; PPC)
Mime-Version: 1.0
To: csound@maths.ex.ac.uk
Subject: maldonado's csound
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
Could anyone tell me where to get Gabriel Maldonado's version of CSound?
thanks!
jose halac
Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa04059;
31 Jan 98 22:49 GMT
Received: from pat.bath.ac.uk by stork.maths.Bath.AC.UK id aa22991;
31 Jan 98 22:49 GMT
Received: (qmail 26190 invoked from network); 31 Jan 1998 22:49:56 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
by pat.bath.ac.uk with SMTP; 31 Jan 1998 22:49:56 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (WAA24660); Sat, 31 Jan 1998 22:32:25 GMT
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Sat, 31 Jan 98 22:31:56 GMT
Received: from mtigwc04.worldnet.att.net [204.127.131.33] by hermes via ESMTP (WAA20147); Sat, 31 Jan 1998 22:31:46 GMT
Received: from default ([12.65.0.57]) by mtigwc04.worldnet.att.net
(post.office MTA v2.0 0613 ) with SMTP id AAA3985
for ; Sat, 31 Jan 1998 22:31:06 +0000
From: Steven LeBeau
To: csound@maths.ex.ac.uk
MMDF-Warning: Parse error in original version of preceding line at UK.AC.Bath.maths.stork
Subject: Re: overall score volume problem
Date: Wed, 21 Jan 1998 14:29:25 -0000
Message-Id: <01bd2678$f927ad60$3900410c@default>
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.71.1712.3
X-Mimeole: Produced By Microsoft MimeOLE V4.71.1712.3
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
Okay, I've been trying to learn the basics of CSound for a while now,
and thus far haven't been able to understand the GEN opcodes (what they do,
exactly). ANY help/advice/whatever would be very much appreciated! As far as
my background goes, I've messed around with programming a DX27, know how to
program in Pascal, and haven't taken Pre-calculus yet (I'm still in high
school, actually)...
Anyways, I got through the tutorial (most of it. That is, I've gone as
far as I can on my own) and looked through the manual, and I still don't
understand a couple (!) of things:
1. GEN, tables, and knowing when to implement which ones and
where
2. Are variables like kamp and kvib named arbitrarily in the
manual, that is, can you change
the names of these variables and get the same results
(kvib to kvibratto, for example)
3. Has anyone made a tutorial/manual for people like me who
are smart, but not MIT students?!?!
The whole deal with GEN opcodes and tables, as well as implementing anything
not talked about in the tutorial is really starting to get frustrating.
Thanks for taking the time to read this message ;)
Steven LeBeau
Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa04231;
1 Feb 98 1:09 GMT
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa02692;
1 Feb 98 1:09 GMT
Received: (qmail 4406 invoked from network); 1 Feb 1998 01:09:12 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
by mercury.bath.ac.uk with SMTP; 1 Feb 1998 01:09:12 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (AAA25548); Sun, 1 Feb 1998 00:49:28 GMT
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Sun, 1 Feb 98 00:49:11 GMT
Received: from portal.dx.net [199.190.65.2] by hermes via ESMTP (AAA10252); Sun, 1 Feb 1998 00:48:45 GMT
Received: from nmol.com ([206.162.11.2])
by portal.dx.net (8.8.7/8.8.7) with SMTP id TAA23847
for ; Sat, 31 Jan 1998 19:49:28 -0500 (EST)
X-Routed: Sat, 31 Jan 1998 17:51:10 -0500
X-Tcp-Identity: Mikeb
Received: from nmol.com [206.162.11.168] by nmol.com with smtp
id BBDCBBCC ; Sat, 31 Jan 1998 17:50:18 -0500
Message-Id: <34D364E9.56511200@nmol.com>
Date: Sat, 31 Jan 1998 17:52:43 +0000
From: Mike Berry
X-Mailer: Mozilla 4.04 (Macintosh; I; PPC)
Mime-Version: 1.0
To: Steven LeBeau , csound@maths.ex.ac.uk
Subject: Re: overall score volume problem
References: <01bd2678$f927ad60$3900410c@default>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
Steven LeBeau wrote:
>
>
> 1. GEN, tables, and knowing when to implement which ones and
> where
A Gen function generates a function table, which can then be used in an
instrument. A common use of ftables (and one you did in the tutorial) is to
hold a wavetable - a single cycle of a desired waveform. For instance, if you
have the line in your orchestra:
asignal oscili 10000, 200, 1
you are oscillating a function table. What asignal sounds like depends upon
what is in function table 1 (that's the 1 at the end of the command). A basic
function table (defined in the score) for a waveform is:
f1 0 4097 10 1
This is decoded as:
Generate function table 1 (f1) at time 0 sec (for now, always use this). The
table has 4097 points (also a good value to use for a while). The table is
generated using gen10. gen10 makes sine waves. The last 1 means that the
table has one cycle of a sine wave - the strength of the fundamental is 1 and
there are no harmonics.
When used in conjunction with the orchestra statement above, asignal will
sound like a sine wave at 200 Hz.
If the score instead had:
f1 0 4097 10 1 0 .3 0 .2 0 .1
there would be more harmonics. This is just a list of relative harmonic strengths:
fundamental: 1
1st harmonic: 0
2nd harmonic: .3
3rd harmonic: 0
4th harmonic: .2
5th harmonic: 0
6th harmonic: .1
This would make asignal sound more like a square wave.
This covers basically what gen10 does. But it is important to realize that
ftables are not only waveforms. An ftable is simply an array of numbers,
which you can use for any purpose. The array gets filled once (by the command
in the score) and then can be accessed by the various opcodes that use ftables
(like oscil, table, buzz, pluck, etc...). An ftable might contain the data
for an envelope or a velocity curve or anything you want. All of the
different gen functions are just different ways of mathmatically filling a
table. Don't worry about the ones you don't understand (e.g. until you know
what a Bessel function is and does, you don't need gen12).
> 2. Are variables like kamp and kvib named arbitrarily in the
> manual, that is, can you change
> the names of these variables and get the same results
> (kvib to kvibratto, for example)
Yes.
> 3. Has anyone made a tutorial/manual for people like me who
> are smart, but not MIT students?!?!
>
CSound is basic building blocks. It is like what is underneath all digital
synthesizers. In order to use it without frustration, you need to learn how
synthesizers make sound. My best suggestion for this task is "The Computer
Music Tutorial" by Curtis Roads (MIT Press). It will set you back $50 but it
is very comprehensive. If you ever take a course in computer music, it will
probably be one of the texts.
--
Mike Berry
mikeb@nmol.com
http://www.nmol.com/users/mikeb
Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa04977;
1 Feb 98 11:41 GMT
Received: from pat.bath.ac.uk by stork.maths.Bath.AC.UK id aa21171;
1 Feb 98 11:41 GMT
Received: (qmail 9100 invoked from network); 1 Feb 1998 11:41:53 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
by pat.bath.ac.uk with SMTP; 1 Feb 1998 11:41:53 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (LAA20030); Sun, 1 Feb 1998 11:36:24 GMT
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Sun, 1 Feb 98 11:36:02 GMT
Received: from agora.stm.it [195.62.32.1] by hermes via ESMTP (LAA22715); Sun, 1 Feb 1998 11:35:55 GMT
Received: from default (ppp04-05.stm.it [195.62.37.197]) by agora.stm.it (8.8.8/8.8.5) with ESMTP id MAA20981; Sun, 1 Feb 1998 12:35:42 +0100 (ITA)
Message-Id: <34D43DA0.D47B542D@agora.stm.it>
Date: Sun, 01 Feb 1998 10:17:20 +0100
From: Gabriel Maldonado
X-Mailer: Mozilla 4.0 [en] (Win95; I)
Mime-Version: 1.0
To: l.dunn@usa.net
Cc: csound@maths.ex.ac.uk
Subject: Re: real-time sound input
X-Priority: 3 (Normal)
References: <348BC951.746308E2@luxor.latrobe.edu.au>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
Lorien Dunn wrote:
> Has anyone got this to work? I'm using Gabriel Maldonado's version of
> csound with a Turtle Beach MultiSound Pinnacle. I've tried -iadc,
> -idevaudio, and -i"TBS Pro Series Wave In 1" (the name of my wave
> input
> device).
>
> Csound does not complain about -iadc and -idevaudio, but I
> don't get any sound coming in. The real-time Wave output works just
> fine.
>
Try giving '-i' flag without any following string, the rtsound console
will show you a list of all AUDIO-IN devices available in your system,
then you must type the relative number and press return.
Please tell me if your Pinnacle works well.
good luck!
--
Gabriel Maldonado
mailto:g.maldonado@agora.stm.it
http://www.agora.stm.it/G.Maldonado/home2.htm
http://www.geocities.com/SiliconValley/Way/7041/home2.htm
|