• Nenhum resultado encontrado

The Public Csound Reference Manual Version 4.10 Instrument Control: Sensing and Control Page 11-5

11.3 t e m p e s t

ktemp tempesttempesttempesttempest kin, iprd, imindur, imemdur, ihp, ithresh, ihtim, ixfdbak, istartempo, ifn[, idisprd, itweek]

D

ESCRIPTION

Estimate the tempo of beat patterns in a control signal.

I

NITIALIZATION

iprd – period between analyses (in seconds). Typically about .02 seconds.

imindur – minimum duration (in seconds) to serve as a unit of tempo. Typically about .2 seconds.

imemdur – duration (in seconds) of the kin short-term memory buffer which will be scanned for periodic patterns. Typically about 3 seconds.

ihp – half-power point (in Hz) of a low-pass filter used to smooth input kin prior to other processing. This will tend to suppress activity that moves much faster. Typically 2 Hz.

ithresh- loudness threshold by which the low-passed kin is center-clipped before being placed in the short-term buffer as tempo-relevant data. Typically at the noise floor of the incoming data.

ihtim – half-time (in seconds) of an internal forward-masking filter that masks new kin data in the presence of recent, louder data. Typically about .005 seconds.

ixfdbak – proportion of this unit’s anticipated value to be mixed with the incoming kin prior to all processing. Typically about .3.

istartempo – initial tempo (in beats per minute). Typically 60.

ifn – table number of a stored function (drawn left-to-right) by which the short-term memory data is attenuated over time.

idisprd (optional) – if non-zero, display the short-term past and future buffers every idisprd seconds (normally a multiple of iprd). The default value is 0 (no display).

itweek (optional) – fine-tune adjust this unit so that it is stable when analyzing events controlled by its own output. The default value is 1 (no change).

The Public Csound Reference Manual Version 4.10 Instrument Control: Sensing and Control Page 11-6

E

XAMPLE

ksum specsumspecsumspecsum wsignal, 1 ; sum the amps of a spectrumspecsum ktemp tempesttempesttempest ksum, .02, .1, 3, 2, 800, .005, 0, 60, 4, .1, .995 tempest ; and look for beats

The Public Csound Reference Manual Version 4.10 Instrument Control: Sensing and Control Page 11-7

11.4 f o l l o w

ar followfollowfollowfollow asig, idt

D

ESCRIPTION

Envelope follower unit generator.

I

NITIALIZATION

idt – This is the period, in seconds, that the average amplitude of asig is reported. If the frequency of asig is low then idt must be large (more than half the period of asig )

P

ERFORMANCE

asig – This is the signal from which to extract the envelope.

E

XAMPLE

k1 linelinelineline 0, p3, 30000 ; Make k1 a simple envelope a1 osciloscilosciloscil k1, 1000, 1 ; Make a simple signal using k1 ak1 followfollowfollowfollow a1, .02 ; ak1 is now like k1

a2 osciloscilosciloscil ak1, 1000, 1 ; Make a simple signal using ak1 outoutoutout a2 ; Both a1 and a2 are the same

To avoid zipper noise, by discontinuities produced from complex envelope tracking, a lowpass filter could be used, to smooth the estimated envelope.

A

UTHOR

Paris Smaragdis MIT, Cambridge 1995

The Public Csound Reference Manual Version 4.10 Instrument Control: Sensing and Control Page 11-8

11.5 t r i g g er

kout triggertriggertriggertrigger ksig, kthreshold, kmode

D

ESCRIPTION

Informs when a krate signal crosses a threshold.

P

ERFORMANCE

ksig – input signal

kthreshold – trigger threshold kmode – can be 0 , 1 or 2

Normally trigger outputs zeroes: only each time ksig crosses kthreshold trigger outputs a 1.

There are three modes of using ktrig:

kmode = 0 – (down-up) ktrig outputs a 1 when current value of ksig is higher than kthreshold, while old value of ksig was equal to or lower than kthreshold.

kmode = 1 – (up-down) ktrig outputs a 1 when current value of ksig is lower than kthreshold while old value of ksig was equal or higher than kthreshold.

kmode = 2 – (both) ktrig outputs a 1 in both the two previous cases.

A

UTHOR

Gabriel Maldonado Italy

New in Csound version 3.49

The Public Csound Reference Manual Version 4.10 Instrument Control: Sensing and Control Page 11-9

11.6 p e a k

kr peakpeakpeakpeak ksig kr peakpeakpeakpeak asig

D

ESCRIPTION

These opcodes maintain the output k-rate variable as the peak absolute level so far received.

P

ERFORMANCE

kr – Output equal to the highest absolute value received so far. This is effectively an input to the opcode as well, since it reads kr in order to decide whether to write something higher into it.

ksig – k-rate input signal.

asig – a-rate input signal.

D

EPRECATED

N

AME

Prior to Csound version 3.63, the k-rate version of peak was called peakk. peak is now used with either k- or a-rate input.

A

UTHOR

Robin Whittle Australia May 1997

The Public Csound Reference Manual Version 4.10 Instrument Control: Sensing and Control Page 11-10

11.7 x y i n , t e m p o

kx, ky xyinxyinxyinxyin iprd, ixmin, ixmax, iymin, iymax[, ixinit, iyinit]

tempo tempo tempo

tempo ktempo, istartempo

D

ESCRIPTION

Sense the cursor position in an output window. Apply tempo control to an uninterpreted score. When xyin is called the position of the mouse within the output window is used to reply to the request. This simple mechanism does mean that only one xyin can be used accurately at once. The position of the mouse is reported in the output window.

I

NITIALIZATION

iprd- period of cursor sensing (in seconds). Typically .1 seconds.

xmin, xmax, ymin, ymax – edge values for the x-y coordinates of a cursor in the input window.

ixinit, iyinit (optional) – initial x-y coordinates reported; the default values are 0,0. If these values are not within the given min-max range, they will be coerced into that range.

istartempo – initial tempo (in beats per minute). Typically 60.

P

ERFORMANCE

xyin samples the cursor x-y position in an input window every iprd seconds. Output values are repeated (not interpolated) at the k-rate, and remain fixed until a new change is registered in the window. There may be any number of input windows. This unit is useful for real-time control, but continuous motion should be avoided if iprd is unusually small.

tempo allows the performance speed of Csound scored events to be controlled from within an orchestra. It operates only in the presence of the Csound -t flag. When that flag is set, scored events will be performed from their uninterpreted p2 and p3 (beat) parameters, initially at the given command-line tempo. When a tempo statement is activated in any instrument (ktempo 0.), the operating tempo will be adjusted to ktempo beats per minute.

There may be any number of tempo statements in an orchestra, but coincident activation is best avoided.

No documento The Public Csound Reference Manual (páginas 65-70)