Use Non-Frames Version Previous Page Next Page
Signal Generators: Scanned Synthesis

scans

   ar     scans      kamp, kfreq, ifn, id[, iorder]

Description

Generate audio output using scanned synthesis.

Initialization

ifn – ftable containing the scanning trajectory. This is a series of numbers that contains addresses of masses. The order of these addresses is used as the scan path. It should not contain values greater than the number of masses, or negative numbers. See the introduction to the scanned synthesis section.

id – ID number of the scanu opcode's waveform to use

iorder (optional) – order of interpolation used internally. It can take any value in the range 1 to 4, and defaults to 4, which is quartic interpolation. The setting of 2 is quadratic and 1 is linear. The higher numbers are slower, but not necessarily better.

Performance

kamp – output amplitude. Note that the resulting amplitude is also dependent on instantaneous value in the wavetable. This number is effectively the scaling factor of the wavetable.

kfreq – frequency of the scan rate

Example

Here is a simple example of scanned synthesis. The user must supply the matrix file "string-128". This file, as well as several other matrices, is available in a zipped file from the Scanned Synthesis page at cSounds.com

   ;orchestra ------------------------------------------
       sr      =   44100
       kr      =   4410
       ksmps   =   10
       nchnls  =   1

       instr   1
   a0  =       0
   ;   scanu   init, irate, ifnvel, ifnmass, ifnstif, ifncentr, ifndamp, kmass, kstif, kcentr, kdamp, ileft, iright, kpos, kstrngth, ain, idisp, id
       scanu   1,     .01,    6,       2,       3,     4,        5,       2,     .1,    .1,     -.01,  .1,    .5,     0,    0,        a0,  1,     2
   ;ar scans   kamp,      kfreq,      ifntraj, id
   a1  scans   ampdb(p4), cpspch(p5), 7,       2
       out     a1
       endin

   ;score ----------------------------------------------

   ; Initial condition
   f1 0 128 7 0 64 1 64 0
   
   ; Masses
   f2 0 128 -7 1 128 1
   
   ; Spring matrices
   f3 0 16384 -23 "string-128"
   
   ; Centering force
   f4  0 128 -7 0 128 2
   
   ; Damping
   f5 0 128 -7 1 128 1
   
   ; Initial velocity
   f6 0 128 -7 0 128 0
   
   ; Trajectories
   f7 0 128 -5 .001 128 128

   ; Note list
   i1 0  10  86 6.00
   i1 11 14  86 7.00
   i1 15 20  86 5.00
   e	

Author

Paris Smaragdis
MIT Media Lab
Boston, Massachussetts USA
New in Csound version 4.05


Use Non-Frames Version Previous Page Next Page
Signal Generators: Scanned Synthesis