Csound Csound-dev Csound-tekno Search About

An idea?

Date1998-01-28 12:44
FromMatti Koskinen
SubjectAn idea?
Hi

There has been lately discussion of quad output on csound-list and that
made me wonder... I've placed on my page
http://www.sci.fi/~mjkoskin/sdm.html some thoughts.

-matti

mjkoskin@sci.fi



Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa23419;
          28 Jan 98 16:01 GMT
Received: from pat.bath.ac.uk by stork.maths.Bath.AC.UK id aa00105;
          28 Jan 98 16:02 GMT
Received: (qmail 16488 invoked from network); 28 Jan 1998 16:02:05 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by pat.bath.ac.uk with SMTP; 28 Jan 1998 16:02:05 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (PAA23790); Wed, 28 Jan 1998 15:33:09 GMT
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Wed, 28 Jan 98 15:32:43 GMT
Received: from [193.121.99.70] by hermes via ESMTP (PAA14138); Wed, 28 Jan 1998 15:32:30 GMT
Received: from nobody ([193.74.7.158]) by hurricane.netgate.be
          (post.office MTA v2.0 0813 ID# 0-32575U60) with ESMTP id AAA290
          for ; Wed, 28 Jan 1998 16:35:45 +0100
From: David Schuyeteneer 
To: csound mailing list 
Subject: RTsound stereo "flange" error
Date: Wed, 28 Jan 1998 16:30:30 +0100
X-Msmail-Priority: Normal
X-Priority: 3
X-Mailer: Microsoft Internet Mail 4.70.1155
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Message-Id: <19980128153543776.AAA290@nobody>
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

This orc and sco should produce a stereo global reverb in realtime to a
stereo soundsource..
However, there is a very annoying "flanging" effect in the output.

I use Maldonado's RTsound 1.9 with Win95, SB16ASP card and Windows'
CDplayer as soundsource


David.




The orchestra :

---------" test.orc "-----------------------------cut this
line-----------------------------------------------------


sr = 32000      ;samplerate
kr = 200        ;control samplerate
ksmps = 160     ;sr / kr
nchnls = 2      ;1=mono, 2=stereo

galreverb init 0
garreverb init 0


instr 12

ilfxsend = p5
irfxsend = p6
alsignal, arsignal ins              ; stereo signal from audioinput

 

galreverb = galreverb + (alsignal*ilfxsend)
garreverb = garreverb + (arsignal*irfxsend)


albalance balance galreverb,alsignal/2
arbalance balance garreverb,arsignal/2


galreverb = albalance
garreverb = arbalance


endin


instr 99
alsignal reverb2 galreverb,p5,0
arsignal reverb2 garreverb,p5,0

outs alsignal,arsignal
gareverb = 0
endin

----------------------------------------------cut this
line-----------------------------------------------------------

The Score:


----------" test.sco "--------------------------cut this
line-----------------------------------------------------------

;  P1        P2         P3       P4     P5
;  tablenum  starttime  size     GEN    strenght
f   1         0          256      10     1         

;           F3:= SAMPLEDATA (GEN 01)
;  tablenum  start      size     GEN   inputfile     skip   format  extra
zero
;f  3         0          131072      1    "sample.aif"   0       0    0

;           F4:=  GRAIN AMPLITUDE ENVELOPE  (GEN 20)
;  tablenum  start      size     GEN   window  
;                                      (5= 4-term Blackmann-Harris)
;f  4         0          1024     20     5





;           start    duration   amp   revtime 
i  99        0           80       0      10        


;  instrnum  starttime  duration    amp   fxsend left   fxsend right
;  P1        P2         P3          P4    p5             p6
                                            
i  12        0          60          0     0.5            0.8


e


----------------------------------------------cut this
line-----------------------------------------------------------


The batchfile that calls RTsound to run in realtime properly on my pentium
166 :
using sr=32000  and  kr=200
------"process.bat"-----------------------------cut this
line-----------------------------------------------------------

rem -W => output is a WAV file
rem -d, -m0, -O => no display
rem -i without args => realtime wave input
rem -p => # of wave buffers
rem -b => wave buffer length in bytes
rem -q => wave device
rem -e => allows any samplerate


csound -d -m0 -O -p12 -b1024 -q -e -i %1.orc %1.sco


----------------------------------------------cut this
line-----------------------------------------------------------





Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa23482;
          28 Jan 98 16:21 GMT
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa01466;
          28 Jan 98 16:21 GMT
Received: (qmail 12112 invoked from network); 28 Jan 1998 16:21:35 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by mercury.bath.ac.uk with SMTP; 28 Jan 1998 16:21:35 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (PAA19994); Wed, 28 Jan 1998 15:57:32 GMT
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Wed, 28 Jan 98 15:57:03 GMT
Received: from portal.dx.net [199.190.65.2] by hermes via ESMTP (PAA08655); Wed, 28 Jan 1998 15:56:40 GMT
Received: from nmol.com ([206.162.11.2])
	by portal.dx.net (8.8.7/8.8.7) with SMTP id KAA04516
	for ; Wed, 28 Jan 1998 10:57:12 -0500 (EST)
X-Routed: Wed, 28 Jan 1998 08:58:40 -0500
X-Tcp-Identity: Mikeb
Received: from nmol.com [206.162.11.152] by nmol.com with smtp
	id AIDJDIEK ; Wed, 28 Jan 1998 08:57:56 -0500
Message-Id: <34CF5623.83FE741A@nmol.com>
Date: Wed, 28 Jan 1998 09:00:37 -0700
From: Mike Berry 
X-Mailer: Mozilla 4.04 (Macintosh; I; PPC)
Mime-Version: 1.0
To: David Schuyeteneer , csound@maths.ex.ac.uk
Subject: Re: RTsound stereo "flange" error
References: <19980128153543776.AAA290@nobody>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

I don't think you are zeroing your globals correctly when you are done.

gareverb = 0

should be:

galreverb = 0
garreverb = 0
-- 
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 aa23499;
          28 Jan 98 16:27 GMT
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa01893;
          28 Jan 98 16:27 GMT
Received: (qmail 12152 invoked from network); 28 Jan 1998 16:27:49 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by mercury.bath.ac.uk with SMTP; 28 Jan 1998 16:27:49 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (QAA09941); Wed, 28 Jan 1998 16:02:20 GMT
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Wed, 28 Jan 98 16:01:53 GMT
Received: from mail.airmail.net [206.66.12.40] by hermes via SMTP (QAA16072); Wed, 28 Jan 1998 16:01:37 GMT
Received: from Internet America.airmail.net from [207.136.56.8] by mail.airmail.net 
	(/\##/\ Smail3.1.30.16 #30.233) with smtp for 
	id ; Wed, 28 Jan 98 10:01:18 -0600 (CST)
Message-Id: <34CF55A5.6013@airmail.net>
Date: Wed, 28 Jan 1998 09:58:29 -0600
From: Boothe/Duncan 
Reply-To: dboothe@airmail.net
X-Mailer: Mozilla 3.01C-KIT  (Win95; U)
Mime-Version: 1.0
To: tolve 
Cc: Eli Brandt , csound@maths.ex.ac.uk
Subject: Re: How do you play four channels?
References: <199801231639.QAA03817@hermes> 
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

tolve wrote:
> 
> >The delays can be less than 1 millisecond up to several ms. With shorter
> >delays, the problem is with material common to both stereo pairs, i.e.
> >one sound centered or panned from one channel to the other.
> 
> mmm. one milli? in DP, may have to mess with tempo settings and time
> feature to trick the software into that kind of resolution without
> affecting playback speed, (480 ticks per quarter is limit as midi
> reportedly not good for any more than that, and DP which also handles midi,
> used that number as a benchmark).

If using the single card solution, you could empirically determine the
delay of the analog outs with respect to the digital outs. Then insert a
delay line, using delay opcode, with idlt being equal to the delay you
discovered. This could be done at the end  of the instrument, just
before sending the final asig to the output.

If anybody *really* wants to try this, feel free to contact me if you
want help with a procedure.

David Boothe




Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa23517;
          28 Jan 98 16:30 GMT
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa01998;
          28 Jan 98 16:30 GMT
Received: (qmail 12170 invoked from network); 28 Jan 1998 16:31:06 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by mercury.bath.ac.uk with SMTP; 28 Jan 1998 16:31:06 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (QAA18458); Wed, 28 Jan 1998 16:19:36 GMT
Received: from exub by maths.ex.ac.uk; Wed, 28 Jan 98 16:19:17 GMT
Received: from mail.airmail.net [206.66.12.40] by exub via SMTP (QAA07199); Wed, 28 Jan 1998 16:18:30 GMT
Received: from Internet America.airmail.net from [207.136.58.53] by mail.airmail.net 
	(/\##/\ Smail3.1.30.16 #30.233) with smtp for 
	id ; Wed, 28 Jan 98 10:16:47 -0600 (CST)
Message-Id: <34CF59F6.7DA8@airmail.net>
Date: Wed, 28 Jan 1998 10:16:54 -0600
From: Boothe/Duncan 
Reply-To: dboothe@airmail.net
X-Mailer: Mozilla 3.01C-KIT  (Win95; U)
Mime-Version: 1.0
To: csound@maths.ex.ac.uk
Subject: SGI
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 have faster compile times and good real-time MIDI
control of Csound. I am currently running Winsound 3.47 under Win95, as
a compiler only. Haven't tried it with MIDI. Doesn't seem to me to be
reasonable due to Win95 overhead. Would a Silicon Graphics 02 be a good
approach?

Any advice/info you could share would be appreciated. Thanks.

David Boothe




Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa24103;
          28 Jan 98 19:01 GMT
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa11598;
          28 Jan 98 19:01 GMT
Received: (qmail 13296 invoked from network); 28 Jan 1998 19:02:07 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by mercury.bath.ac.uk with SMTP; 28 Jan 1998 19:02:07 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (SAA26300); Wed, 28 Jan 1998 18:53:49 GMT
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Wed, 28 Jan 98 18:52:57 GMT
Received: from agora.stm.it [195.62.32.1] by hermes via ESMTP (SAA13922); Wed, 28 Jan 1998 18:52:46 GMT
Received: from default (ppp02-02.stm.it [195.62.37.66]) by agora.stm.it (8.8.8/8.8.5) with ESMTP id TAA07041 for ; Wed, 28 Jan 1998 19:52:29 +0100 (ITA)
Message-Id: <34CF7BF5.863AF511@agora.stm.it>
Date: Wed, 28 Jan 1998 19:41:57 +0100
From: Gabriel Maldonado 
X-Mailer: Mozilla 4.0 [en] (Win95; I)
Mime-Version: 1.0
To: Csound Mailing List 
Subject: Re: RTsound stereo "flange" error
X-Priority: 3 (Normal)
References: <19980128153543776.AAA290@nobody> <34CF5623.83FE741A@nmol.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Mike Berry wrote:

> I don't think you are zeroing your globals correctly when you are
> done.
>
> gareverb = 0
>
> should be:
>
> galreverb = 0
> garreverb = 0

Also maybe balance opcode introduces some distorsion.

Warning, when using soundblaster16 in full-duplex I note that the input
signal is automatically sampled at 8bit decreasing sound quality a lot.
So I installed two soundblaster in my computer, one for the input and
the other for the output.


--
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







Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa24109;
          28 Jan 98 19:02 GMT
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa11603;
          28 Jan 98 19:02 GMT
Received: (qmail 13305 invoked from network); 28 Jan 1998 19:02:16 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by mercury.bath.ac.uk with SMTP; 28 Jan 1998 19:02:16 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (SAA24275); Wed, 28 Jan 1998 18:53:50 GMT
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Wed, 28 Jan 98 18:53:02 GMT
Received: from agora.stm.it [195.62.32.1] by hermes via ESMTP (SAA26542); Wed, 28 Jan 1998 18:52:46 GMT
Received: from default (ppp02-02.stm.it [195.62.37.66]) by agora.stm.it (8.8.8/8.8.5) with ESMTP id TAA07088; Wed, 28 Jan 1998 19:52:42 +0100 (ITA)
Message-Id: <34CF7DF9.A657BB37@agora.stm.it>
Date: Wed, 28 Jan 1998 19:50:33 +0100
From: Gabriel Maldonado 
X-Mailer: Mozilla 4.0 [en] (Win95; I)
Mime-Version: 1.0
To: dboothe@airmail.net
Cc: csound@maths.ex.ac.uk
Subject: Re: SGI
X-Priority: 3 (Normal)
References: <34CF59F6.7DA8@airmail.net>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Boothe/Duncan wrote:

> I would like to have faster compile times and good real-time MIDI
> control of Csound. I am currently running Winsound 3.47 under Win95,
> as
> a compiler only. Haven't tried it with MIDI. Doesn't seem to me to be
> reasonable due to Win95 overhead. Would a Silicon Graphics 02 be a
> good
> approach?
>
> Any advice/info you could share would be appreciated. Thanks.
>
> David Boothe

With a reasonable simple orchestra and a fast Pentium you should have a
good MIDI realtime control with Winsound or RTsound, even if the output
is a bit delayed because of latency. With my Pentium 133 I can run up to
100 - 150 oscillators in parallel in real-time at a s-rate of 20 KHz and
a reasonable buffer space.

--
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






Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa24510;
          28 Jan 98 19:59 GMT
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa14704;
          28 Jan 98 19:59 GMT
Received: (qmail 13564 invoked from network); 28 Jan 1998 19:59:26 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by mercury.bath.ac.uk with SMTP; 28 Jan 1998 19:59:26 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (TAA21553); Wed, 28 Jan 1998 19:54:19 GMT
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Wed, 28 Jan 98 19:54:02 GMT
Received: from agora.stm.it [195.62.32.1] by hermes via ESMTP (TAA15002); Wed, 28 Jan 1998 19:53:51 GMT
Received: from [194.184.60.246] (ws1.axnet.it [194.184.60.246]) by agora.stm.it (8.8.8/8.8.5) with ESMTP id UAA21460 for ; Wed, 28 Jan 1998 20:53:52 +0100 (ITA)
X-Sender: m.giri@HELLA.stm.it
Message-Id: 
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Date: Wed, 28 Jan 1998 20:59:26 +0100
To: csound@maths.ex.ac.uk
From: Maurizio Giri 
Subject: How do you write eight channels?
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

I'm composing a piece for sax and 8 channels ADAT tape, and i would like to
do most of the work with Csound, but ... it seems to me that Csound can
write only up to four channels in a single file (or am i wrong?).
Wouldn't be nice if csound could write n channels of sound (in n mono files
named f.e. soundfilename.1, soundfilename.2 ... soundfilename.n) maybe with
an opcode like:

outn #ch asig

with #ch = the channel number to write onto disk?

the n files should be of the same length, i think.

just an idea...

Maurizio


_____________________________________________
o              Maurizio  Giri               o
o                 ConTempo                  o
o  Italian Contemporary (and Early) Music   o
o       http://www.axnet.it/contempo        o
o-------------------------------------------o
o ConTempo e-mail:  contempo@wmail.axnet.it o
o Personal e-mail:      m.giri@agora.stm.it o
o                                           o
o Snail: Via Ostilia, 55 - 00184 Roma Italy o
o Tel +39.6.70451885                        o
_____________________________________________

http://www.univr.it/germano/eme/compos/girima.htm







Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa25251;
          29 Jan 98 2:35 GMT
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa06370;
          29 Jan 98 2:35 GMT
Received: (qmail 15350 invoked from network); 29 Jan 1998 02:35:27 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by mercury.bath.ac.uk with SMTP; 29 Jan 1998 02:35:27 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (CAA02477); Thu, 29 Jan 1998 02:32:38 GMT
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Thu, 29 Jan 98 02:32:21 GMT
Received: from root@big.fishnet.net [205.216.133.3] by hermes via ESMTP (CAA27777); Thu, 29 Jan 1998 02:32:15 GMT
Received: from rcsreg.com (toby@port055.vta.fishnet.net [205.216.133.204])
	by big.fishnet.net (8.8.5/8.8.5) with ESMTP id SAA16799;
	Wed, 28 Jan 1998 18:21:21 -0800
Message-Id: <34CFEA2E.85C1D9FA@rcsreg.com>
Date: Wed, 28 Jan 1998 18:32:14 -0800
From: Toby 
Organization: Other than 12-tone
X-Mailer: Mozilla 4.04 [en] (X11; I; Linux 2.0.30 i586)
Mime-Version: 1.0
To: Maurizio Giri 
Cc: csound@maths.ex.ac.uk
Subject: Re: How do you write eight channels?
References: 
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Have a look at 'kdump' opcode.  Looks like it would do this with kr=sr.

Toby

	-There otta be a law-


Maurizio Giri wrote:
> 
> I'm composing a piece for sax and 8 channels ADAT tape, and i would like to
> do most of the work with Csound, but ... it seems to me that Csound can
> write only up to four channels in a single file (or am i wrong?).
> Wouldn't be nice if csound could write n channels of sound (in n mono files
> named f.e. soundfilename.1, soundfilename.2 ... soundfilename.n)



Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa25645;
          29 Jan 98 6:04 GMT
Received: from pat.bath.ac.uk by stork.maths.Bath.AC.UK id aa21506;
          29 Jan 98 6:04 GMT
Received: (qmail 1443 invoked from network); 29 Jan 1998 06:04:57 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by pat.bath.ac.uk with SMTP; 29 Jan 1998 06:04:57 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (GAA12079); Thu, 29 Jan 1998 06:02:24 GMT
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Thu, 29 Jan 98 06:02:07 GMT
Received: from root@freebee.tu-graz.ac.at [129.27.193.128] by hermes via SMTP (GAA14831); Thu, 29 Jan 1998 06:02:00 GMT
Received: from bmod01.kfunigraz.ac.at (isdn094.tu-graz.ac.at [129.27.240.94]) by freebee.tu-graz.ac.at (8.6.11/8.6.9) with SMTP id HAA16513 for ; Thu, 29 Jan 1998 07:02:04 +0100
Message-Id: <34D01B84.79EC@sbox.tu-graz.ac.at>
Date: Thu, 29 Jan 1998 07:02:44 +0100
From: seither 
X-Mailer: Mozilla 2.0 (Win95; I)
Mime-Version: 1.0
To: csound@maths.ex.ac.uk
Subject: -L stdin
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Hello!
I use RTsound1.9 and win95
and I want to issue score events to csound with the keyboard of my pc
in order to use csound as a real-time tone generator.
The command line is:

.orc\sinus.orc .sco\sinus.sco -odevaudio -b4410 -L stdin

Among other messages from the compiler i get the following warning:

WARNING: -L stdin: system has no fcntl function to get stdin
stdmode = 00000000 Linefd = 0

Then I try to type in an event:
i1	0	2

And apart from hearing nothing this message follows:

sensLine 7 CHARS
	rtevent: T 0.002 TT 0.002 M:19996.8
new alloc for instr 1:

Then all I can do is ^C. 	:-C

What am I doing wrong?		stefan

sinus.orc:
==========
;sinus.orc
sr=44100
kr=441
ksmps=100
nchnls=1

instr 1
	a1 oscili 20000,400 , 1
	out a1
endin
=====================================

and finally, my masterpiece of composition, 
sinus.orc:
===========
;sinus.sco
f1 0 8192 10 1000

i1	0	100
============