Csound Csound-dev Csound-tekno Search About

Re: Audio file lengths

Date1999-07-10 01:10
Fromdoug cross
SubjectRe: Audio file lengths
> extend the soundin and diskin opcodes to return a second value. Ideally
> this should
> be optional - is such a thing feasible with the current Csound syntax?
> Alternatively, 'sndinfo' could become an opcode. --- R. Dobson

i support this idea. could be very useful

doug
--
http://www.sfu.ca/~dcross






Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa19688;
          13 Jul 99 20:43 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 1148RH-0006qM-00
	for jpff@maths.bath.ac.uk; Tue, 13 Jul 1999 20:42:03 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (UAA00291); Tue, 13 Jul 1999 20:30:51 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Tue, 13 Jul 1999 20:30:39 +0100
Received: from ella.mills.edu [144.91.3.20] by hermes via SMTP (UAA18273); Tue, 13 Jul 1999 20:30:38 +0100 (BST)
Received: (qmail 1787953 invoked by uid 1964); 13 Jul 1999 12:30:17 -0700
Date: Tue, 13 Jul 1999 12:30:17 -0700 (PDT)
From: "Matt J. Ingalls" 
To: csound@maths.ex.ac.uk
Subject: [spam]new ppc version
Message-ID: 
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk


GET ONE NOW!  WHILE SUPPLIES LAST!!!
DID I MENTION ITS FREE!!!!!!!!!!!!!!!!!!!!!!
MAKE MILLIONS OF SAMPLES AT HOME AND AT WORK!!!!!!!!!!!!!!!!!!!!!!!!

Hear what people are saying about the new Csound PPC version:

"You better get yourself a Peavey PC1600 MIDI fader box... at least... 
because you have done it!!! At long last, MIDI Csound on the Mac is 
happenning.  This is a major help for me, but it will also totally 
blow my students at Berklee away....All the skeptics were silenced and
awed as I tweeked the parameters of the vco opcode with MIDI faders."

-Dr. Richard Boulanger
Professor - Music Synthesis Department
Berklee College of Music

"Actually peformance is better all around - not just real time MIDI.
let me know if you have any questions - the README below i hope is clear
enough - the sources will be up on the same ftp shortly"

-matt

=======================================
july13.99
	Csound for Power Macintosh
=======================================
This Version: 
	fFitch code base	3.55
	Perf "engine"		3.55.1
	Csound "front end"  1.3
	
Available From:
	www.concentric.net/~Mingalls/software/csound
	ftp://mills.edu/ccm/csound.ppc/CsoundPPC3.55.1.sit.hqx
	ftp://ftp.maths.bath.ac.uk/pub/dream/newest/CsoundPPC3.55.1.sit.hqx 
=======================================
changes from 3.55/FrontEnd 1.3
=======================================
Perf:
- added a parameter for #of buffers per event poll 
	for RT rendering
- improved all around performance by tweaking 
	event monitoring in code (see below)
- fixed transport hang during silence in score
- changed version # to 3.55.1
- fixed diskin bug

Note: this version requires an additional file
  "csound.txt" to be inside your "perf" directory
  or one of the sound/analysis directories.

Front End:
- added a parameter for #of buffers per event poll 
	for RT rendering (in buffers window)
- included smaller options for buffer sizes
- changed the default buffer sizes in RT to 128
- small UI changes in buffers window

====================================
detail on new real-time improvements
====================================
Csound real-time sound output on the macintosh is still 
not done the "proper" way, but it turns out if we take 
over the system (through a few hacks in the code) we can get
pretty good performance.  

To do this, a new parameter has been included in the 
"Set Buffers" dialog (-P in the command line) that sets the 
number of audio output buffers to every System Event poll 
(these system events are mouse and keyboard input, screen updates, etc).  

A small number will make sytem events like clicking on the transport
appear "normally" with a loss in real-time performance (i.e. "breakups")
A large number will improve real-time performance with a severe loss in
responsiveness to sytem events.
A value of '0' will produce the best real-time performance with NO
system events handled while there is any instrument playing.

This "poll events" parameter ONLY APPLIES when there are
score events, MIDI events, or MIDI files currently active. Otherwise,
control should be given back to the system - returning the transport
and other interface items to normally responsivity.

Remember, you can optimize your real-time performance by:
 (for more info look in the mac manual)
	1) turning off all messages (RT MIDI In checkbox automatically
	    turns off all messages)
	2) or you can try using a listing file with the "listing file
	    disables output window" option enabled from the prefs dialog
box.
	3) tweak your buffer sizes
	4) i have been using the xtratim/release opcodes a lot for getting
rid
	    of clicks at the end of RT MIDI events
	    
=======================================
Please email bugs to csound-dev@mills.edu
so we can fix them.







Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa19832;
          13 Jul 99 21:52 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by shaun.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 1149Wy-0004nI-00
	for jpff@maths.bath.ac.uk; Tue, 13 Jul 1999 21:52:00 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (VAA09936); Tue, 13 Jul 1999 21:49:33 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Tue, 13 Jul 1999 21:49:21 +0100
Received: from mail5.lax.netzero.net [209.0.233.48] by hermes via SMTP (VAA08937); Tue, 13 Jul 1999 21:49:20 +0100 (BST)
Received: (qmail 26286 invoked by uid 0); 13 Jul 1999 20:49:17 -0000
Received: from pppa42-resalemontgomery1-2r1103.saturn.bbn.com (HELO netzero.net) (4.16.206.101)
  by mail5.lax.netzero.net with SMTP; 13 Jul 1999 20:49:17 -0000
Message-ID: <378BA5C2.D79A0429@netzero.net>
Date: Tue, 13 Jul 1999 15:46:59 -0500
From: Sherlock 
X-Mailer: Mozilla 4.61 [en] (Win98; I)
X-Accept-Language: en
MIME-Version: 1.0
To: David Boothe 
CC: "csound@maths.ex.ac.uk" 
Subject: Re: wgbrass
References: <19990713040415.25832.rocketmail@web601.yahoomail.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:

> Thanks for finding a bug in the HTML manual! (It is in the Acrobat
> manual).
>
> The correct syntax is:
>
> ar wgbrass kamp, kfreq, ktens, iatt, kvibf, kvamp, ifn[, iminfreq]
>
> -David.
>
> --- Sherlock  wrote:
> > Where does ktens go?
> > It is not shown in the explaination.
> > I think it is mention later, but not in the tittle.
> > See example:
> > sr = 44100
> > kr = 4410
> > ksmps = 10
> > nchnls = 2
> >
> > ; sample wgbrass by Robert McNulty Junior (C)1999
> >
> > instr 1
> > iamp ampmidi 10000
> > icps  cpsmidi
> >
> >
> > awgbrass wgbrass iamp, icps, .01, .05, 6.137, 1
> >
> > outs awgbrass, awgbrass
> > endin
> > ;Function 1 uses the GEN10 subroutine to compute a
> > sine wave
> > f 1  0 4096 10   1
> > ; inst  start   duration amp       sound
> > f0 360
> > I designed to work with midi.
> > Here is the explanation from the book. The HTML
> > version of 3.55
> >
> > > wgbrass
> > >
> > >   ar      wgbrass    kamp, kfreq, iatt, kvibf,
> > kvamp, ifn[, iminfreq]
> > >
> > >
> > >
> > >
> > > Description
> > >
> > > Audio output is a tone related to a brass
> > instrument, using a physical model developed from
> > Perry Cook, but re-coded for
> > > Csound. [NOTE: This is rather poor, and at present
> > uncontrolled. Needs revision, and possibly more
> > parameters].
> > >
> > > Initialization
> > >
> > > iatt - time taken to reach full pressure
> > >
> > > ifn - table of shape of vibrato, usually a sine
> > table, created by a function
> > >
> > > iminfreq - lowest frequency at which the
> > instrument will play. If it is omitted it is taken
> > to be the same as the initial kfreq. If
> > > iminfreq is negative, initialization will be
> > skipped.
> > >
> > > Performance
> > >
> > >
> > > A note is played on a brass-like instrument, with
> > the arguments as below.
> > >
> > > kamp - Amplitude of note.
> > >
> > > kfreq - Frequency of note played.
> > >
> > > ktens - lip tension of the player. Suggested value
> > is about 0.4
> > >
> > ^^^^^^^^^^^^^^^^
> > where?
> >
> > > kvibf - frequency of vibrato in Hertz. Suggested
> > range is 0 to 12
> > >
> > > kvamp - amplitude of the vibrato
> > >
> > > Example
> > >
> > >     a1     wgbrass     31129.60, 440, 0.1, 6.137,
> > 0.05, 1
> > >            out         a1
> > >
> > > Author
> > >
> > > John ffitch (after Perry Cook)
> > > University of Bath, Codemist Ltd.
> > > Bath, UK
> > > New in Csound version 3.47
> > >
> > >
> > >
> > >
> > >
> >
> > ________________________________________________________
> > NetZero - We believe in a FREE Internet.  Shouldn't
> > you?
> > Get your FREE Internet Access and Email at
> > http://www.netzero.net/download/index.html
> >
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com

Also, my computer (Windows 98 runnining on a Compaq 6704 with 24 MB RAM
and 2.5 hard drive) crashes with this and wgpluck. wgclar is fine.
wgpluck's crash is at the end. What I mean is that is says
"This program caused an illegal operation and will be shut down."

________________________________________________________
NetZero - We believe in a FREE Internet.  Shouldn't you?
Get your FREE Internet Access and Email at
http://www.netzero.net/download/index.html


Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa20242;
          14 Jul 99 0:59 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 114CRA-0006wu-00
	for jpff@maths.bath.ac.uk; Wed, 14 Jul 1999 00:58:12 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (AAA08799); Wed, 14 Jul 1999 00:54:10 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Wed, 14 Jul 1999 00:53:59 +0100
Received: from root@big.fishnet.net [204.89.144.3] by hermes via ESMTP (AAA11459); Wed, 14 Jul 1999 00:53:57 +0100 (BST)
Received: from rcsreg.com (x226.core.fishnet.net [204.89.144.226])
	by big.fishnet.net (8.9.2/8.8.5) with ESMTP id PAA06743
	for ; Tue, 13 Jul 1999 15:57:33 -0700 (PDT)
Message-ID: <378BD41C.16FAFAFD@rcsreg.com>
Date: Tue, 13 Jul 1999 17:04:44 -0700
From: Tobiah 
X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.2.7 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Csound List 
Subject: Cscore for Perl
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

A tiny perl module with the cscore functions can
be found at:

	http://tobiah.rcsreg.com/pub/

There is also an excellent example of algorithmic
score generation included.  Get your exciting 
3320 bytes of joy now in a compressed tar file.

Toby


Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa20455;
          14 Jul 99 3:08 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by shaun.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 114ETP-0004sl-00
	for jpff@maths.bath.ac.uk; Wed, 14 Jul 1999 03:08:39 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (DAA00885); Wed, 14 Jul 1999 03:06:32 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Wed, 14 Jul 1999 03:06:20 +0100
Received: from mail1.c-bridge.com [199.92.202.99] by hermes via ESMTP (DAA03151); Wed, 14 Jul 1999 03:06:19 +0100 (BST)
Received: from mail2.c-bridge.com (mail2.c-bridge.com [199.93.167.10])
	by mail1.c-bridge.com (8.8.7/8.8.7) with ESMTP id WAA19678
	for ; Tue, 13 Jul 1999 22:05:48 -0400
Received: by mail2.c-bridge.com with Internet Mail Service (5.5.2232.9)
	id ; Tue, 13 Jul 1999 22:08:31 -0400
Message-ID: <923DE5722529D31186D500A0C999D989069AF3@mail2.c-bridge.com>
From: Grant Covell 
To: "Csound (E-mail)" 
Subject: timout exasperation
Date: Tue, 13 Jul 1999 22:08:30 -0400
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2232.9)
Content-Type: text/plain;
	charset="iso-8859-1"
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Hello--

I'm trying to use multiple timout calls within the same orchestra, and am
frustrated by the somewhat inconsistent results and cryptic documentation.

The sco/orc pair below is very simplified from what I am hoping to do: given
a simple one line call in the score, trigger the playback of a given sound
twice at random times within the p3. I've taken out the creation of the
random start points and the reading of the existing file, just to focus on
getting timout to work.

The documentation specifies that timout (timout istart, idur, label) will
occur at istart, last for idur and accomplish the event(s) at the label.
What I have below is the most logical use of timout (without reinit, and
rireturn) I've figured out so far (timout with the reinit and rireturn work
best when the dur in timout is repeatable and not random--if someone has a
solution for a non-periodic use of timout, I'd love to see it!). I see how
timout can be reinitialized at endin, but still think that istart restting
to 0 is somewhat odd. Also, the call to the last event appears to continue
beyond 13 secs. extending itself to the full p3.

Thanks for the help and advice!

Grant.
gcovell@c-bridge.com


===
;;score:

f10 0 8192 10 1
i1 0 14 1
e
;; end of score


;;orchestra:

sr 		= 44100
kr 		= 441
ksmps 	= 100
nchnls 	= 2


instr 1
	
timout	0, 3, end		;; ends at 3
timout	3, 2, do		;; start at 3, end at 5, reset to 0
timout	0, 5, end		;; start at 5 end at 10
timout	5, 2, do		;; start at 10 end at 12, reset to 0
timout	0, 1, end		;; start at 12 and at 13
		
do:	
asig 	oscil 5000, 400, 10
outs  	asig, asig
		
end:
endin	
;; end of orchestra