FLOSS Manuals

 English |  Español |  Français |  Italiano |  Português |  Русский |  Shqip

CSOUND Español

SCANNED SYNTHESIS

Scanned Synthesis is a relatively new synthesis technique invented by Max Mathews, Rob Shaw and Bill Verplank at Interval Research in 2000. This algorithm uses a combination of a table-lookup oscillator and Sir Issac Newton's mechanical model (equation) of a mass and spring system to dynamically change the values stored in an f-table. The sonic result is a timbral spectrum that changes with time.

Scanned Synthesis es una técnica de síntesis relativamente nueva inventada por Max Mathews, Rob Shaw y Bill Verplank en Interval Research en 2000. Este algoritmo utiliza una combinación de un oscilador de búsqueda de mesa y el modelo mecánico Sir Isaac Newton de un sistema de masa y resorte Para cambiar dinámicamente los valores almacenados en una tabla f. El resultado sonoro es un espectro timbral que cambia con el tiempo.

Csound has a couple opcodes dedicated to scanned synthesis, and these opcodes can be used not only to make sounds, but also to generate dynamic f-tables for use with other Csound opcodes.

Csound tiene un par de opcodes dedicados a la síntesis escaneada, y estos opcodes se pueden utilizar no sólo para hacer sonidos, sino también para generar tablas f dinámicas para su uso con otros opcodes Csound.

A QUICK SCANNED SYNTH

The quickest way to start using scanned synthesis is Matt Ingalls' opcode scantable.

La forma más rápida de comenzar a usar la síntesis escaneada es Matt Scanbrows opcode scantable.

a1 scantable iamp, kfrq, ipos, imass, istiff, idamp, ivel

The arguments iamp and kfrq should be familiar, amplitude and frequency respectively. The other arguments are f-table numbers containing data known in the scanned synthesis world as profiles.

Los argumentos iamp y kfrq deben ser familiares, amplitud y frecuencia respectivamente. Los otros argumentos son números de f-table que contienen datos conocidos en el mundo de síntesis escaneado como perfiles.

PROFILES

Profiles refer to variables in the mass and spring equation. Newton's model describes a string as a finite series of marbles connected to each other with springs.

Los perfiles se refieren a variables en la ecuación de masa y resorte. Newtons describe una cadena como una serie finita de mármoles conectados entre sí con muelles.

In this example we will use 128 marbles in our system. To the Csound user, profiles are a series of f-tables that set up the scantable opcode. To the opcode, these f-tables influence the dynamic behavior of the table read by a table-lookup oscillator.

En este ejemplo usaremos 128 mármoles en nuestro sistema. Para el usuario de Csound, los perfiles son una serie de tablas f que configuran el código de operación de escáner. En el opcode, estas tablas f influyen en el comportamiento dinámico de la tabla leída por un oscilador de búsqueda de tabla.

gipos ftgen 1, 0, 128, 10, 1 ;Initial Shape: Sine wave range -1 to 1

gimass ftgen 2, 0, 128, -7, 1, 1 ;Masses: Constant value 1 
gistiff ftgen 3, 0, 128, -7, 50, 64, 100, 64, 0 ;Stiffness: Unipolar triangle range to 100
gidamp ftgen 4, 0, 128, -7, 1, 128, 1 ;Damping: Constant value 1
givel ftgen 5, 0, 128, -7, 0, 128, 0 ;Initial Velocity: Constant value 0

These tables need to be the same size as each other or Csound will return an error.

Estas tablas deben tener el mismo tamaño que las demás o Csound devolverá un error.

Run the following .csd. Notice that the sound starts off sounding like our intial shape (a sine wave) but evolves as if there are filters, distortions or LFO's.

Ejecute el archivo .csd siguiente. Observe que el sonido comienza sonando como nuestra forma inicial (una onda senoidal) pero evoluciona como si hubiera filtros, distorsiones o LFOs.

EXAMPLE 04H01_scantable.csd

<CsoundSynthesizer>
<CsOptions>
-o dac
</CsOptions>
<CsInstruments>
nchnls = 2
sr=44100
ksmps = 32
0dbfs = 1

gipos ftgen 1, 0, 128, 10, 1 ;Initial Shape, sine wave range -1 to 1
gimass ftgen 2, 0, 128, -7, 1, 128, 1 ;Masses(adj.), constant value 1
gistiff ftgen 3, 0, 128, -7, 50, 64, 100, 64, 0 ;Stiffness; unipolar triangle range 0 to 100
gidamp ftgen 4, 0, 128, -7, 1, 128, 1 ;Damping; constant value 1
givel ftgen 5, 0, 128, -7, 0, 128, 0 ;Initial Velocity; constant value 0

instr 1
iamp = .7
kfrq = 440
a1 scantable iamp, kfrq, gipos, gimass, gistiff, gidamp, givel
a1 dcblock2 a1
outs a1, a1
endin

</CsInstruments>
<CsScore>
i 1 0 10
e
</CsScore>
</CsoundSynthesizer>
;Example by Christopher Saunders

But as you see no effects or control signals in the .csd, just a synth!

Pero como usted no ve efectos o señales de control en el .csd, sólo un sintetizador!

This is the power of scanned synthesis. It produces a dynamic spectrum with "just" an oscillator. Imagine now applying a scanned synthesis oscillator to all your favorite synth techniques - Subtractive, Waveshaping, FM, Granular and more.

Este es el poder de la síntesis escaneada. Produce un espectro dinámico con sólo un oscilador. Imagine ahora la aplicación de un oscilador de síntesis escaneado a todas sus técnicas de sintetizador favorito - Subtractivo, Waveshaping, FM, Granular y mucho más.

Recall from the subtractive synthesis technique, that the "shape" of the waveform of your oscillator has a huge effect on the way the oscillator sounds. In scanned synthesis, the shape is in motion and these f-tables control how the shape moves.

Recuerde la técnica de sustracción sustractiva, que la forma de la forma de onda de su oscilador tiene un efecto enorme en la forma en que suena el oscilador. En la síntesis escaneada, la forma está en movimiento y estas tablas f controlan cómo se mueve la forma.

DYNAMIC TABLES The scantable opcode makes it easy to use dynamic f-tables in other csound opcodes. The example below sounds exactly like the above .csd, but it demonstrates how the f-table set into motion by scantable can be used by other csound opcodes.

MESAS DINÁMICAS El opcode scantable facilita el uso de f-tables dinámicas en otros opcodes csound. El ejemplo siguiente suena exactamente como el anterior .csd, pero demuestra cómo el conjunto f-table en movimiento por scantable puede ser utilizado por otros opcodes csound.

EXAMPLE 04H02_Dynamic_tables.csd

<CsoundSynthesizer>
<CsOptions>
-o dac
</CsOptions>
<CsInstruments>
nchnls = 2
sr=44100
ksmps = 32
0dbfs = 1

gipos      ftgen      1, 0, 128, 10, 1 ;Initial Shape, sine wave range -1 to 1;
gimass     ftgen      2, 0, 128, -7, 1, 128, 1 ;Masses(adj.), constant value 1
gistiff    ftgen      3, 0, 128, -7, 50, 64, 100, 64, 0 ;Stiffness; unipolar triangle range 0 to 100
gidamp     ftgen      4, 0, 128, -7, 1, 128, 1 ;Damping; constant value 1
givel      ftgen      5, 0, 128, -7, 0, 128, 0 ;Initial Velocity; constant value 0

instr 1
iamp       =          .7
kfrq       =          440
a0         scantable  iamp, kfrq, gipos, gimass, gistiff, gidamp, givel ;
a1         oscil3     iamp, kfrq, gipos
a1         dcblock2   a1
           outs       a1, a1
endin
</CsInstruments>
<CsScore>
i 1 0 10
e
</CsScore>
</CsoundSynthesizer>
;Example by Christopher Saunders

Above we use a table-lookup oscillator to periodically read a dynamic table. Below is an example of using the values of an f-table generated by scantable, to modify the amplitudes of an fsig, a signal type in csound which represents a spectral signal.

Encima utilizamos un oscilador de búsqueda de tabla para leer periódicamente una tabla dinámica. A continuación se muestra un ejemplo de utilización de los valores de una tabla f generada por scantable, para modificar las amplitudes de un fsig, un tipo de señal en csound que representa una señal espectral.

EXAMPLE 04H03_Scantable_pvsmaska.csd

<CsoundSynthesizer>
<CsOptions>
-o dac
</CsOptions>
<CsInstruments>
nchnls = 2
sr=44100
ksmps = 32
0dbfs = 1

gipos      ftgen      1, 0, 128, 10, 1                  ;Initial Shape, sine wave range -1 to 1;
gimass     ftgen      2, 0, 128, -7, 1, 128, 1          ;Masses(adj.), constant value 1
gistiff    ftgen      3, 0, 128, -7, 50, 64, 100, 64, 0 ;Stiffness; unipolar triangle range 0 to 100
gidamp     ftgen      4, 0, 128, -7, 1, 128, 1          ;Damping; constant value 1
givel      ftgen      5, 0, 128, -7, 0, 128, 0          ;Initial Velocity; constant value 0
gisin      ftgen      6, 0,8192, 10, 1                  ;Sine wave for buzz opcode

instr 1
iamp       =          .7
kfrq       =          110
a1         buzz       iamp, kfrq, 32, gisin
           outs       a1, a1
endin
instr 2
iamp       =          .7
kfrq       =          110
a0         scantable  1, 10, gipos, gimass, gistiff, gidamp, givel ;
ifftsize   =          128
ioverlap   =          ifftsize / 4
iwinsize   =          ifftsize
iwinshape  =          1; von-Hann window
a1         buzz       iamp, kfrq, 32, gisin
fftin      pvsanal    a1, ifftsize, ioverlap, iwinsize, iwinshape; fft-analysis of file
fmask      pvsmaska   fftin, 1, 1
a2         pvsynth    fmask; resynthesize
           outs       a2, a2
endin
</CsInstruments>
<CsScore>
i 1 0 3
i 2 5 10
e
</CsScore>
</CsoundSynthesizer>
;Example by Christopher Saunders</code>

In this .csd, the score plays instrument 1, a normal buzz sound, and then the score plays instrument 2 -- the same buzz sound re-synthesized with amplitudes of each of the 128 frequency bands, controlled by a dynamic f-table.

En este .csd, la puntuación toca el instrumento 1, un sonido de zumbido normal, y luego la puntuación toca el instrumento 2 - el mismo sonido buzz re-sintetizado con amplitudes de cada una de las 128 bandas de frecuencia, controlada por una tabla f dinámica.

A MORE FLEXIBLE SCANNED SYNTH Scantable can do a lot for us, it can synthesize an interesting, time-varying timbre using a table lookup oscillator, or animate an f-table for use in other Csound opcodes. However, there are other scanned synthesis opcodes that can take our expressive use of the algorithm even further.

UNA SINCRONIZACIÓN MÁS FLEXIBLE Scantable puede hacer mucho por nosotros, puede sintetizar un timbre interesante, variando en el tiempo usando un oscilador de búsqueda de tabla, o animar una tabla f para su uso en otros opcodes Csound. Sin embargo, hay otros opcodes de síntesis escaneados que pueden tomar nuestro uso expresivo del algoritmo aún más.

The opcodes scans and scanu by Paris Smaragdis give the Csound user one of the most robust and flexible scanned synthesis environments. These opcodes work in tandem to first set up the dynamic wavetable, and then to "scan" the dynamic table in ways a table-lookup oscillator cannot.

Las exploraciones de opcodes y scanu de Paris Smaragdis le dan al usuario de Csound uno de los entornos de síntesis escaneados más robustos y flexibles. Estos opcodes trabajan en tándem para configurar primero la tabla de ondas dinámica y luego para escanear la tabla dinámica de manera que un oscilador de búsqueda de tabla no pueda.

The opcode scanu takes 18 arguments and sets a table into motion.

El opcode scanu toma 18 argumentos y pone una tabla en movimiento.

scanu ipos, irate, ifnvel, ifnmass, ifnstif, ifncentr, ifndamp, kmass, kstif, kcentr, kdamp, ileft, iright, kpos, kstrngth, ain, idisp, id

For a detailed description of what each argument does, see the Csound Reference Manual; I will discuss the various types of arguments in the opcode.

Para una descripción detallada de lo que hace cada argumento, vea el Manual de Referencia de Csound; Voy a discutir los diferentes tipos de argumentos en el código de operación.

The first set of arguments - ipos, irate, ifnvel, ifnmass, ifnstiff, ifncenter, and ifndamp - are f-tables describing the profiles, similar to the profile arguments for scantable. Scanu takes 6 f-tables instead of scantable's 5. Like scantable, these need to be f-tables of the same size, or Csound will return an error.

El primer conjunto de argumentos - ipos, ira, ifnvel, ifnmass, ifnstiff, ifncenter y ifndamp - son tablas f que describen los perfiles, similar a los argumentos de perfil para scantable. Scanu toma 6 f-tablas en lugar de scantables 5. Al igual que scantable, estos deben ser f-tablas del mismo tamaño, o Csound devolverá un error.

An exception to this size requirement is the ifnstiff table. This table is the size of the other profiles squared. If the other f-tables are size 128, then ifnstiff should be of size 16384 (or 128 * 128). To discuss what this table does, I must first introduce the concept of a scanned matrix.

Una excepción a este requisito de tamaño es la tabla ifnstiff. Esta tabla es del tamaño de los otros perfiles al cuadrado. Si las otras tablas f son tamaño 128, entonces ifnstiff debe ser de tamaño 16384 (o 128 * 128). Para discutir lo que hace esta tabla, primero debo introducir el concepto de una matriz escaneada.

THE SCANNED MATRIX

The scanned matrix is a convention designed to describe the shape of the connections of masses(n.) in the mass(n.) and spring model.

La matriz escaneada es una convención diseñada para describir la forma de las conexiones de masas (n) en la masa (n.) Y en el modelo de resorte.

Going back to our discussion on Newton's mechanical model, the mass(n.) and spring model describes the behavior of a string as a finite number of masses connected by springs. As you can imagine, the masses are connected sequentially, one to another, like beads on a string. Mass(n.)

Volviendo a nuestra discusión sobre el modelo mecánico de Newtons, el modelo de masa (n.) Y de resorte describe el comportamiento de una cuerda como un número finito de masas conectadas por resortes. Como se puede imaginar, las masas están conectadas secuencialmente, una a otra, como cuentas en una cuerda. Masa (n.)

#1 is connected to #2, #2 connected to #3 and so on.

However, the pioneers of scanned synthesis had the idea to connect the masses in a non-linear way. It's hard to imagine, because as musicians, we have experience with piano or violin strings (one dimensional strings), but not with multi-dimensional strings. Fortunately, the computer has no problem working with this idea, and the flexibility of Newton's equation allows us to use the CPU to model mass(n.)

Sin embargo, los pioneros de la síntesis escaneada tuvieron la idea de conectar las masas de una manera no lineal. Es difícil de imaginar, porque como músicos, tenemos experiencia con cuerdas de piano o violín (cuerdas de una dimensión), pero no con cuerdas multidimensionales. Afortunadamente, la computadora no tiene ningún problema trabajando con esta idea, y la flexibilidad de la ecuación de Newtons nos permite usar la CPU para modelar la masa (n.)  

#1 being connected with springs not only to #2 but also to #3 and any other mass(n.) in the model.

The most direct and useful implementation of this concept is to connect mass #1 to mass #2 and mass #128 -- forming a string without endpoints, a circular string, like tying our string with beads to make a necklace. The pioneers of scanned synthesis discovered that this circular string model is more useful than a conventional one-dimensional string model with endpoints. In fact, scantable uses a circular string.

Los pioneros de la síntesis explorada descubrieron que este modelo de cuerda circular es más útil que un modelo de cuerda unidimensional convencional con extremos. De hecho, scantable utiliza una cadena circular.

The matrix is described in a simple ASCII file, imported into Csound via a GEN23 generated f-table.

La matriz se describe en un simple archivo ASCII, importado en Csound a través de una GEN23 generó f-table.

f3 0 16384 -23 "string-128"

This text file must be located in the same directory as your .csd or csound will give you this error

Este archivo de texto debe estar ubicado en el mismo directorio que su .csd o csound le dará este error

ftable 3: error opening ASCII file

You can construct your own matrix using Stephen Yi's Scanned Matrix editor included in the Blue frontend for Csound, and as a standalone Java application Scanned Synthesis Matrix Editor. To swap out matrices, simply type the name of a different matrix file into the double quotes, i.e.:

Puede construir su propia matriz usando el editor Stephen Yis Scanned Matrix incluido en el frontend Blue para Csound, y como una aplicación Java independiente Scanned Synthesis Matrix Editor. Para intercambiar matrices, simplemente escriba el nombre de un archivo de matriz diferente en las comillas dobles, por ejemplo:

f3 0 16384 -23 "circularstring_2-128"

Different matrices have unique effects on the behavior of the system. Some matrices can make the synth extremely loud, others extremely quiet. Experiment with using different matrices.

Las diferentes matrices tienen efectos únicos en el comportamiento del sistema. Algunas matrices pueden hacer que el sintetizador sea extremadamente fuerte, otros extremadamente silenciosos. Experimentar con el uso de diferentes matrices.

Now would be a good time to point out that Csound has other scanned synthesis opcodes preceded with an "x", xscans, xscanu, that use a different matrix format than the one used by scans, scanu, and Stephen Yi's Scanned Matrix Editor. The Csound Reference Manual has more information on this.

Ahora sería un buen momento para señalar que Csound tiene otros opcodes escaneados de síntesis precedidos con x, xscans, xscanu, que utilizan un formato de matriz diferente al utilizado por scans, scanu y Stephen Yis Scanned Matrix Editor. El Manual de Referencia de Csound contiene más información al respecto.

THE HAMMER

If the initial shape, an f-table specified by the ipos argument determines the shape of the initial contents in our dynamic table. If you use autocomplete in CsoundQT, the scanu opcode line highlights the first p-field of scanu as the "init" opcode. In my examples I use "ipos" to avoid p1 of scanu being syntax-highlighted. But what if we want to "reset" or "pluck" the table, perhaps with a shape of a square wave instead of a sine wave, while the instrument is playing?

Si la forma inicial, una tabla f especificada por el argumento ipos determina la forma del contenido inicial en nuestra tabla dinámica. Si utiliza autocompletar en CsoundQT, la línea de código de operación scanu resalta el primer campo p de scanu como el código de operación init. En mis ejemplos, uso ipos para evitar que p1 de scanu sea sintaxis resaltado. Pero ¿qué pasa si queremos restablecer o arrancar la mesa, quizás con una forma de onda cuadrada en lugar de una onda senoidal, mientras el instrumento está tocando?

With scantable, there is an easy way to to this, send a score event changing the contents of the dynamic f-table. You can do this with the Csound score by adjusting the start time of the f-events in the score.

Con scantable, hay una manera fácil de hacerlo, enviar un evento de puntuación que cambia el contenido de la dinámica f-table. Puede hacer esto con la puntuación Csound ajustando la hora de inicio de los f-eventos en la partitura.

EXAMPLE 04H04_Hammer.csd

<CsoundSynthesizer>
<CsOptions>
-o dac
</CsOptions>
<CsInstruments>
sr=44100
kr=4410
ksmps=10
nchnls=2
0dbfs=1

instr 1
ipos       ftgen      1, 0, 128, 10, 1 ; Initial Shape, sine wave range -1 to 1;
imass      ftgen      2, 0, 128, -7, 1, 128, 1 ;Masses(adj.), constant value 1
istiff     ftgen      3, 0, 128, -7, 50, 64, 100, 64, 0 ;Stiffness; unipolar triangle range 0 to 100
idamp      ftgen      4, 0, 128, -7, 1, 128, 1; ;Damping; constant value 1
ivel       ftgen      5, 0, 128, -7, 0, 128, 0 ;Initial Velocity; constant value 0
iamp       =          0.5
a1         scantable  iamp, 60, ipos, imass, istiff, idamp, ivel
           outs       a1, a1
endin
</CsInstruments>
<CsScore>
i 1 0 14
f 1 1 128 10 1 1 1 1 1 1 1 1 1 1 1
f 1 2 128 10 1 1 0 0 0 0 0 0 0 1 1
f 1 3 128 10 1 1 1 1 1
f 1 4 128 10 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
f 1 5 128 10 1 1
f 1 6 128 13 1 1 0 0 0 -.1 0 .3 0 -.5 0 .7 0 -.9 0 1 0 -1 0
f 1 7 128 21 6 5.745
</CsScore>
</CsoundSynthesizer>
;Example by Christopher Saunders</code>

You'll get the warning

WARNING: replacing previous ftable 1 

This is not a bad thing, it means this method of hammering the string is working. In fact you could use this method to explore and hammer every possible GEN routine in Csound. GEN10 (sines), GEN 21 (noise) and GEN 27 (breakpoint functions) could keep you occupied for a while.

Esto no es una mala cosa, significa que este método de martilleo de la cadena está funcionando. De hecho usted podría utilizar este método para explorar y martillar cada rutina GEN posible en Csound. GEN10 (sines), GEN 21 (ruido) y GEN 27 (funciones de punto de interrupción) podrían mantenerlo ocupado por un tiempo.

Unipolar waves have a different sound but a loss in volume can occur. There is a way to do this with scanu, but I do not use this feature and just use these values instead.

Las ondas unipolares tienen un sonido diferente, pero puede producirse una pérdida de volumen. Hay una manera de hacer esto con scanu, pero no uso esta característica y sólo uso estos valores en su lugar.

ileft = 0. iright = 1. kpos = 0. kstrngth = 0.

MORE ON PROFILES

One of the biggest challenges in understanding scanned synthesis is the concept of profiles.

Uno de los mayores desafíos para entender la síntesis escaneada es el concepto de perfiles.

Setting up the opcode scanu requires 3 profiles - Centering, Mass and Damping. The pioneers of scanned synthesis discovered early on that the resultant timbre is far more interesting if marble #1 had a different centering force than mass #64.

The farther our model gets away from a physical real-world string that we know and pluck on our guitars and pianos, the more interesting the sounds for synthesis. Therefore, instead of one mass, and damping, and centering value for all 128 of the marbles each marble can have its own conditions. How the centering, mass, and damping profiles make the system behave is up to the user to discover through experimentation (more on how to experiment safely later in this chapter).

Cuanto más lejos nuestro modelo se aleja de una cadena física real que conocemos y arrancamos en nuestras guitarras y pianos, más interesantes sonidos para la síntesis. Por lo tanto, en lugar de una masa, amortiguación y valor de centraje para todos los mármoles, cada mármol puede tener sus propias condiciones. La forma en que los perfiles de centrado, masa y amortiguación hacen que el sistema se comporte es responsabilidad del usuario descubrir a través de la experimentación (más sobre cómo experimentar con seguridad más adelante en este capítulo).

CONTROL RATE PROFILE SCALARS

Profiles are a detailed way to control the behavior of the string, but what if we want to influence the mass or centering or damping of every marble after a note has been activated and while its playing?

Los perfiles son una forma detallada de controlar el comportamiento de la cadena, pero ¿qué pasa si queremos influir en la masa o centrado o amortiguación de cada mármol después de una nota se ha activado y mientras está jugando?

Scanu gives us 4 k-rate arguments kmass, kstif, kcentr, kdamp, to scale these forces. One could scale mass to volume, or have an envelope controlling centering.

Scanu nos da 4 argumentos de k-rate, kmass, kstif, kcentr, kdamp, para escalar estas fuerzas. Se podría escalar masa a volumen, o tener un sobre controlando el centrado.

Caution! These parameters can make the scanned system unstable in ways that could make extremely loud sounds come out of your computer. It is best to experiment with small changes in range and keep your headphones off. A good place to start experimenting is with different values for kcentr while keeping kmass, kstiff, and kdamp constant. You could also scale mass and stiffness to MIDI velocity.

¡Precaución! Estos parámetros pueden hacer que el sistema escaneado sea inestable de manera que pueda hacer que salgan sonidos extremadamente altos de su computadora. Lo mejor es experimentar con pequeños cambios en el alcance y mantener apagados los auriculares. Un buen lugar para comenzar a experimentar es con valores diferentes para kcentr mientras mantiene kmass, kstiff y kdamp constantes. También podría aumentar la masa y la rigidez a la velocidad MIDI.

AUDIO INJECTION

Instead of using the hammer method to move the marbles around, we could use audio to add motion to the mass and spring model. Scanu lets us do this with a simple audio rate argument. When the Reference manual says "amplitude should not be too great" it means it.

En lugar de usar el método de martillo para mover los mármoles alrededor, podríamos usar el audio para añadir movimiento a la masa y el modelo de primavera. Scanu nos permite hacer esto con un simple argumento de velocidad de audio. Cuando el manual de referencia dice que la amplitud no debe ser demasiado grande significa.

A good place to start is by scaling down the audio in the opcode line.

Un buen lugar para comenzar es reduciendo el audio en la línea de código de operación.

ain/2000

It is always a good idea to take into account the 0dbfs statement in the header. Simply put if 0dbfs =1 and you send scans an audio signal with a value of 1, you and your immediate neighbors are in for a very loud ugly sound.

Siempre es una buena idea tener en cuenta la instrucción 0dbfs en el encabezado. Simplemente poner si 0dbfs = 1 y enviar una señal de audio con un valor de 1, usted y sus vecinos inmediatos están en un sonido muy fuerte feo.

amplitude should not be too great!

To bypass audio injection all together, simply assign 0 to an a-rate variable.

Para evitar la inyección de audio en conjunto, simplemente asigne 0 a una variable a-rate.

ain = 0

and use this variable as the argument.

Y utilizar esta variable como el argumento.

CONNECTING TO SCANS

The p-field id is an arbitrary integer label that tells the scans opcode which scanu to read. By making the value of id negative, the arbitrary numerical label becomes the number of an f-table that can be used by any other opcode in Csound, like we did with scantable earlier in this chapter.

El id de campo-p es una etiqueta de número entero arbitrario que indica al código de exploración que scanu leer. Haciendo que el valor de id negativo, la etiqueta numérica arbitraria se convierte en el número de una tabla-f que puede ser utilizado por cualquier otro código de operación en Csound, como lo hicimos con scantable anteriormente en este capítulo.

We could then use oscil to perform a table lookup algorithm to make sound out of scanu (as long as id is negative), but scanu has a companion opcode, scans which has 1 more argument than oscil. This argument is the number of an f-table containing the scan trajectory.

Podríamos utilizar oscil para realizar un algoritmo de búsqueda de tabla para hacer el sonido fuera de scanu (siempre y cuando id es negativo), pero scanu tiene un opcode compañero, escanea que tiene 1 argumento más que oscil. Este argumento es el número de una tabla-f que contiene la trayectoria de exploración.

 

SCAN TRAJECTORIES

One thing we have take for granted so far with oscil is that the wave table is read front to back. If you regard oscil as a phasor and table pair, the first index of the table is always read first and the last index is always read last as in the example below:

Una cosa que hemos dado por sentado hasta ahora con oscil es que la tabla de olas se lee de frente a atrás. Si consideras a oscil como un par de fasores y de tablas, el primer índice de la tabla siempre se lee primero y el último índice se lee siempre como en el siguiente ejemplo:

 

EXAMPLE 04H05_Scan_trajectories.csd

<CsoundSynthesizer>
<CsOptions>
-o dac
</CsOptions>
<CsInstruments>

sr=44100
kr=4410
ksmps=10
nchnls=2
0dbfs=1

instr 1
andx phasor 440
a1 table andx*8192, 1
outs a1*.2, a1*.2
endin
</CsInstruments>
<CsScore>

f1 0 8192 10 1
i 1 0 4
</CsScore>
</CsoundSynthesizer>
;Example by Christopher Saunders

 

But what if we wanted to read the table indices back to front, or even "out of order"? Well we could do something like this:

Pero ¿qué pasaría si quisiéramos leer los índices de la tabla de vuelta al frente, o incluso fuera de servicio? Bueno, podríamos hacer algo como esto:

EXAMPLE 04H06_Scan_trajectories2.csd

<CsoundSynthesizer>
<CsOptions>
-o dac
</CsOptions>
<CsInstruments>
sr=44100
kr=4410
ksmps=10
nchnls=2 ; STEREO
0dbfs=1
instr 1
andx phasor 440
andx table andx*8192, 1  ; read the table out of order!
a1   table andx*8192, 1
outs a1*.2, a1*.2
endin
</CsInstruments>
<CsScore>

f1 0 8192 10 1
f2 0 8192 -5 .001 8192 1;
i 1 0 4
</CsScore>
</CsoundSynthesizer>
;Example by Christopher Saunders

 

We are still dealing with 2-dimensional arrays, or f-tables as we know them. But if we remember back to our conversation about the scanned matrix, matrices are multi-dimensional, it would be a shame to only read them in "2D".

Todavía estamos tratando con arreglos bidimensionales, o f-tablas como las conocemos. Pero si recordamos de nuevo nuestra conversación sobre la matriz escaneada, las matrices son multidimensionales, sería una lástima leerlas solamente en 2D.

The opcode scans gives us the flexibility of specifying a scan trajectory, analogous to telling the phasor/table combination to read values non-consecutively. We could read these values, not left to right, but in a spiral order, by specifying a table to be the ifntraj argument of scans.

El escaneo de opcode nos da la flexibilidad de especificar una trayectoria de exploración, análoga a decir a la combinación de fasores / tablas para leer valores no consecutivos. Podríamos leer estos valores, no de izquierda a derecha, sino en un orden espiral, especificando una tabla como el argumento ifntraj de las exploraciones.

a3 scans iamp, kpch, ifntraj ,id , interp

An f-table for the spiral method can generated by reading the ASCII file "spiral-8,16,128,2,1over2" by GEN23

Una f-tabla para el método en espiral puede generado por la lectura de la espiral de archivos ASCII-8,16,128,2,1over2 por GEN23

f2 0 128 -23 "spiral-8,16,128,2,1over2"

 

The following .csd requires that the files "circularstring-128" and "spiral-8,16, 128,2,1over2" be located in the same directory as the .csd.

El siguiente .csd requiere que los archivos circularstring-128 y spiral-8,16, 128,2,1over2 se encuentren en el mismo directorio que el .csd.

EXAMPLE 04H07_Scan_matrices.csd

<CsoundSynthesizer>
<CsOptions>
-o dac
</CsOptions>
<CsInstruments>
nchnls = 2
sr = 44100
ksmps = 10
0dbfs = 1
instr 1
ipos ftgen 1, 0, 128, 10, 1
irate = .005
ifnvel ftgen 6, 0, 128, -7, 0, 128, 0
ifnmass ftgen 2, 0, 128, -7, 1, 128, 1
ifnstif ftgen 3, 0, 16384,-23,"circularstring-128"
ifncentr ftgen 4, 0, 128, -7, 0, 128, 2
ifndamp ftgen 5, 0, 128, -7, 1, 128, 1
imass = 2
istif = 1.1
icentr = .1
idamp = -0.01
ileft = 0.
iright = .5
ipos = 0.
istrngth = 0.
ain = 0
idisp = 0
id = 8
scanu 1, irate, ifnvel, ifnmass, ifnstif, ifncentr, ifndamp, imass, istif, icentr, idamp, ileft, iright, ipos, istrngth, ain, idisp, id
scanu 1,.007,6,2,3,4,5, 2, 1.10 ,.10 ,0 ,.1 ,.5, 0, 0,ain,1,2;
iamp = .2
ifreq = 200
a1 scans iamp, ifreq, 7, id
a1 dcblock a1
outs a1, a1
endin
</CsInstruments>
<CsScore>
f7 0 128 -7 0 128 128
i 1 0 5
f7 5 128 -23 "spiral-8,16,128,2,1over2"
i 1 5 5
f7 10 128 -7 127 64 1 63 127
i 1 10 5
</CsScore>
</CsoundSynthesizer>
;Example by Christopher Saunders

 

Notice that the scan trajectory has an FM-like effect on the sound.

Observe que la trayectoria de exploración tiene un efecto similar al FM en el sonido.

TABLE SIZE AND INTERPOLATION

Tables used for scan trajectory must be the same size (have the same number of indices) as the mass, centering and damping tables and must also have the same range as the size of these tables. For example, in our .csd we've been using 128 point tables for initial position, mass centering, damping (our stiffness tables have 128 squared). So our trajectory tables must be of size 128, and contain values from 0 to 127.

Las tablas utilizadas para la trayectoria de barrido deben tener el mismo tamaño (tienen el mismo número de índices) que las tablas de masa, centrado y amortiguación, y deben tener el mismo rango que el tamaño de estas tablas. Por ejemplo, en nuestro .csd hemos estado utilizando 128 tablas de puntos para la posición inicial, centrado de masas, amortiguación (nuestras tablas de rigidez tienen 128 cuadrados). Así que nuestras tablas de trayectoria deben ser de tamaño 128 y contener valores de 0 a 127.

One can use larger or smaller tables, but their sizes must agree in this way or Csound will give you an error. Larger tables, of course significantly increase CPU usage and slow down real-time performance.

Uno puede usar tablas más grandes o más pequeñas, pero sus tamaños deben estar de acuerdo de esta manera o Csound le dará un error. Las tablas más grandes, por supuesto, aumentan significativamente el uso de la CPU y ralentizan el rendimiento en tiempo real.

If all the sizes are multiples of a number (128), we can use Csound's Macro language extension to define the table size as a macro, and then change the definition twice (once for the orc and once for the score) instead of 10 times.

Si todos los tamaños son múltiplos de un número (128), podemos usar la extensión de lenguaje Macro Csounds para definir el tamaño de la tabla como una macro y luego cambiar la definición dos veces (una vez para el orco y una vez para la partitura) en lugar de 10 veces .

EXAMPLE 04H08_Scan_tablesize.csd

<CsoundSynthesizer>
<CsOptions>
-o dac
</CsOptions>
<CsInstruments>
nchnls = 2
sr = 44100
ksmps = 10
0dbfs = 1
#define SIZE #128#
instr 1
ipos ftgen 1, 0, $SIZE., 10, 1
irate = .005
ifnvel ftgen 6, 0, $SIZE., -7, 0, $SIZE., 0
ifnmass ftgen 2, 0, $SIZE., -7, 1, $SIZE., 1
ifnstif ftgen 3, 0, $SIZE.*$SIZE.,-23, "circularstring-$SIZE."
ifncentr ftgen 4, 0, $SIZE., -7, 0, $SIZE., 2
ifndamp ftgen 5, 0, $SIZE., -7, 1, $SIZE., 1
imass = 2
istif = 1.1
icentr = .1
idamp = -0.01
ileft = 0.
iright = .5
ipos = 0.
istrngth = 0.
ain = 0
idisp = 0
id = 8
	
scanu 1, irate, ifnvel, ifnmass, ifnstif, ifncentr, ifndamp, imass, istif, icentr, idamp, ileft, iright, ipos, istrngth, ain, idisp, id
scanu 1,.007,6,2,3,4,5, 2, 1.10 ,.10 ,0 ,.1 ,.5, 0, 0,ain,1,2;
iamp = .2
ifreq = 200
a1 scans iamp, ifreq, 7, id, 4
a1 dcblock a1
outs a1, a1
endin
</CsInstruments>
<CsScore>
#define SIZE #128#
f7 0 $SIZE. -7 0 $SIZE. $SIZE.
i 1 0 5
f7 5 $SIZE. -7 0 63 [$SIZE.-1] 63 0
i 1 5 5
f7 10 $SIZE. -7 [$SIZE.-1] 64 1 63 [$SIZE.-1]
i 1 10 5
</CsScore>
</CsoundSynthesizer>
;Example by Christopher Saunders

 

Macros even work in our string literal in our GEN 23 f-table! But if you define size as 64 and there isn't a file in your directory named "circularstring-64" Csound will not run your score and give you an error. Here is a link to download power-of-two size ASCII files that create circular matrices for use in this way, and of course, you can design your own stiffness matrix files with Steven Yi's scanned matrix editor.

¡Las macros incluso funcionan en nuestro literal de cadenas en nuestra tabla GEN 23! Pero si define el tamaño como 64 y no hay un archivo en su directorio llamado circularstring-64 Csound no ejecutará su puntuación y le dará un error. Aquí hay un enlace para descargar archivos ASCII de tamaño de dos de tamaño que crean matrices circulares para usar de esta manera y, por supuesto, puede diseñar sus propios archivos de matriz de rigidez con el editor de matriz escaneado Steven Yis.

When using smaller size tables it may be necessary to use interpolation to avoid the artifacts of a small table. scans gives us this option as a fifth optional argument, iorder, detailed in the reference manual and worth experimenting with.

Cuando se utilizan tablas de menor tamaño, puede ser necesario utilizar la interpolación para evitar los artefactos de una tabla pequeña. Scans nos da esta opción como un quinto argumento opcional, iorder, detallado en el manual de referencia y vale la pena experimentar con.

Using the opcodes scanu and scans require that we fill in 22 arguments and create at least 7 f-tables, including at least one external ASCII file (because no one wants to fill in 16,384 arguments to an f-statement). This a very challenging pair of opcodes. The beauty of scanned synthesis is that there is no scanned synthesis "sound".

El uso de los opcodes scanu y scans requiere que llenemos 22 argumentos y creemos al menos 7 f-tables, incluyendo al menos un archivo ASCII externo (porque nadie quiere llenar 16.384 argumentos a una sentencia f). Este es un par de opcodes muy desafiante. La belleza de la síntesis escaneada es que no hay sonido de síntesis escaneado.

USING BALANCE TO TAME AMPLITUDES

UTILIZANDO EL EQUILIBRIO PARA TOMAR AMPLITUDES

However, like this frontier can be a lawless, dangerous place. When experimenting with scanned synthesis parameters, one can illicit extraordinarily loud sounds out of Csound, often by something as simple as a misplaced decimal point.

Sin embargo, como esta frontera puede ser un lugar sin ley, peligroso. Al experimentar con los parámetros de síntesis escaneados, uno puede ilícito sonidos extraordinariamente fuertes de Csound, a menudo por algo tan simple como un punto decimal equivocado.

Warning: the following .csd is hot, it produces massively loud amplitude values. Be very cautious about rendering this .csd, I highly recommend rendering to a file instead of real-time.

Advertencia: el siguiente .csd está caliente, produce valores de amplitud masivos. Sea muy cauteloso acerca de la prestación de este. Csd, recomiendo altamente la prestación de un archivo en lugar de tiempo real.

 

EXAMPLE 04H09_Scan_extreme_amplitude.csd

<CsoundSynthesizer>
<CsOptions>
-o dac
</CsOptions>
<CsInstruments>

nchnls = 2
sr = 44100
ksmps = 256
0dbfs = 1
;NOTE THIS CSD WILL NOT RUN UNLESS
;IT IS IN THE SAME FOLDER AS THE FILE "STRING-128"
instr 1
ipos ftgen 1, 0, 128 , 10, 1
irate = .007
ifnvel ftgen 6, 0, 128 , -7, 0, 128, 0.1
ifnmass ftgen 2, 0, 128 , -7, 1, 128, 1
ifnstif ftgen 3, 0, 16384, -23, "string-128"
ifncentr ftgen 4, 0, 128 , -7, 1, 128, 2
ifndamp ftgen 5, 0, 128 , -7, 1, 128, 1
kmass = 1
kstif = 0.1
kcentr = .01
kdamp = 1
ileft = 0
iright = 1
kpos = 0
kstrngth = 0.
ain = 0
idisp = 1
id = 22
scanu ipos, irate, ifnvel, ifnmass, \
ifnstif, ifncentr, ifndamp, kmass, \
kstif, kcentr, kdamp, ileft, iright,\
kpos, kstrngth, ain, idisp, id
kamp = 0dbfs*.2
kfreq = 200
ifn ftgen 7, 0, 128, -5, .001, 128, 128.
a1 scans kamp, kfreq, ifn, id
a1 dcblock2 a1
iatt = .005
idec = 1
islev = 1
irel = 2
aenv adsr iatt, idec, islev, irel
;outs a1*aenv,a1*aenv; Uncomment for speaker destruction;
endin
</CsInstruments>
<CsScore>
f8 0 8192 10 1;
i 1 0 5
</CsScore>
</CsoundSynthesizer>
;Example by Christopher Saunders

 

The extreme volume of this .csd comes from a value given to scanu

El volumen extremo de este .csd proviene de un valor dado a scanu

kdamp = .1

.1 is not exactly a safe value for this argument, in fact, any value above 0 for this argument can cause chaos.

.1 no es exactamente un valor seguro para este argumento, de hecho, cualquier valor por encima de 0 para este argumento puede causar caos.

It would take a skilled mathematician to map out safe possible ranges for all the arguments of scanu. I figured out these values through a mix of trial and error and studying other .csd

Se necesitaría un matemático experto para trazar posibles rangos seguros para todos los argumentos de scanu. Me di cuenta de estos valores a través de una mezcla de ensayo y error y el estudio de otros .csd

We can use the opcode balance to listen to sine wave (a signal with consistent, safe amplitude) and squash down our extremely loud scanned synth output (which is loud only because of our intentional carelessness.)

Podemos utilizar el equilibrio del código de operación para escuchar la onda senoidal (una señal con una amplitud coherente y segura) y aplastar nuestra salida de sintetizador escaneada extremadamente fuerte (que es ruidosa sólo debido a nuestro descuido intencional).

EXAMPLE 04H10_Scan_balanced_amplitudes.csd

<CsoundSynthesizer>
<CsOptions>
-o dac
</CsOptions>
<CsInstruments>

nchnls = 2
sr = 44100
ksmps = 256
0dbfs = 1
;NOTE THIS CSD WILL NOT RUN UNLESS
;IT IS IN THE SAME FOLDER AS THE FILE "STRING-128"

instr 1
ipos ftgen 1, 0, 128 , 10, 1
irate = .007
ifnvel   ftgen 6, 0, 128 , -7, 0, 128, 0.1
ifnmass  ftgen 2, 0, 128 , -7, 1, 128, 1
ifnstif  ftgen 3, 0, 16384, -23, "string-128"
ifncentr ftgen 4, 0, 128 , -7, 1, 128, 2
ifndamp  ftgen 5, 0, 128 , -7, 1, 128, 1
kmass = 1
kstif = 0.1
kcentr = .01
kdamp = -0.01
ileft = 0
iright = 1
kpos = 0
kstrngth = 0.
ain = 0
idisp = 1
id = 22
scanu ipos, irate, ifnvel, ifnmass, \
ifnstif, ifncentr, ifndamp, kmass, \
kstif, kcentr, kdamp, ileft, iright,\
kpos, kstrngth, ain, idisp, id
kamp = 0dbfs*.2
kfreq = 200
ifn ftgen 7, 0, 128, -5, .001, 128, 128.
a1 scans kamp, kfreq, ifn, id
a1 dcblock2 a1
ifnsine ftgen 8, 0, 8192, 10, 1
a2 oscil kamp, kfreq, ifnsine
a1 balance a1, a2
iatt = .005
idec = 1
islev = 1
irel = 2
aenv adsr iatt, idec, islev, irel
outs a1*aenv,a1*aenv
endin
</CsInstruments>
<CsScore>
f8 0 8192 10 1;
i 1 0 5
</CsScore>
</CsoundSynthesizer>
;Example by Christopher Saunders

 

It must be emphasized that this is merely a safeguard. We still get samples out of range when we run this .csd, but many less than if we had not used balance. It is recommended to use balance if you are doing real-time mapping of k-rate profile scalar arguments for scans; mass stiffness, damping, and centering.

Hay que subrayar que esto no es más que una salvaguardia. Todavía obtenemos muestras fuera de rango cuando ejecutamos este .csd, pero muchos menos que si no hubiéramos usado el balance. Se recomienda utilizar el equilibrio si está realizando la asignación en tiempo real de los argumentos escalares del perfil k-rate para las exploraciones; Rigidez de masa, amortiguación y centrado.

REFERENCES AND FURTHER READING

Max Matthews, Bill Verplank, Rob Shaw, Paris Smaragdis, Richard Boulanger, John ffitch, Matthew Gilliard, Matt Ingalls, and Steven Yi all worked to make scanned synthesis usable, stable and openly available to the open-source Csound community. Their contributions are in the reference manual, several academic papers on scanned synthesis and journal articles, and the software that supports the Csound community.

Max Matthews, Bill Verplank, Rob Shaw, Smaragdis, Richard Boulanger, John Ffitch, Matthew Gilliard, Matt Ingalls y Steven Yi trabajaron para hacer que la síntesis escaneada sea utilizable, estable y abiertamente disponible para la comunidad Csound de código abierto. Sus contribuciones están en el manual de referencia, varios trabajos académicos sobre la síntesis escaneada y artículos de revistas, y el software que apoya a la comunidad Csound.

Csounds.com page on Scanned Synthesis

There has been error in communication with Booktype server. Not sure right now where is the problem.

You should refresh this page.