portk

portk — Applies portamento to a step-valued control signal.

Description

Applies portamento to a step-valued control signal.

Syntax

kres portk ksig, khtim [, isig]

Initialization

isig (optional, default=0) -- initial (i.e. previous) value for internal feedback. The default value is 0.

Performance

kres -- the output signal at control-rate.

ksig -- the input signal at control-rate.

khtim -- half-time of the function in seconds.

portk is like port except the half-time can be varied at the control rate.

Examples

Here is an example of the portk opcode. It uses the file portk.csd.

Example 642. Example of the portk opcode.

See the sections Real-time Audio and Command Line Flags for more information on using command line flags.

<CsoundSynthesizer>
<CsOptions>
; Select audio/midi flags here according to platform
; Audio out   Audio in
-odac         ;  -iadc    ;;;RT audio I/O
; For Non-realtime ouput leave only the line below:
; -o portk.wav -W ;;; for file output any platform
</CsOptions>
<CsInstruments>

sr = 44100
ksmps = 128
nchnls = 1

;Example by Andres Cabrera 2007

FLpanel "Slider", 650, 140, 50, 50
    gkval1, gislider1 FLslider "Watch me", 0, 127, 0, 5, -1, 580, 30, 25, 20
    gkval2, gislider2 FLslider "Move me", 0, 127, 0, 5, -1, 580, 30, 25, 80
    gkhtim, gislider3 FLslider "khtim", 0.1, 1, 0, 6, -1, 30, 100, 610, 10
FLpanelEnd
FLrun

FLsetVal_i 0.1, gislider3 ;set initial time to 0.1

instr 1
kval portk gkval2, gkhtim  ; take the value of slider 2 and apply portamento
FLsetVal 1, kval, gislider1  ;set the value of slider 1 to kval
endin

</CsInstruments>
<CsScore>

; Play Instrument #1 for one minute.
i 1 0 60
e


</CsScore>
</CsoundSynthesizer>


See Also

areson, aresonk, atone, atonek, port, reson, resonk, tone, tonek

Credits

Author: Robin Whittle
Australia
May 1997