ABox Help Basics Objects Signals Tutorials

ABox Signals

This discusses how ABox uses signals.
   It is perhaps the most difficult part to understand, but crucial for advanced use. As full breadth and sublety of DSP go far beyond the scope of this help system, the interested reader is encoraged to review the resources available both on-line and in text books.

   The first section, Concepts, presents a short list of concepts and facts.

   Subsequent sections follow up and provide useful insite into developing applications.

   The last section lists some tips for creating efficient circuits.


Concepts

   ABox operates on blocks of 1024 samples at 44100 samples per second.

   Samples are reffered to as values to differentiate them from the 16 bit samples used by the audio system.

   The values are normalized floating point numbers (between ±1.0).

   The pin label determines how the values are interpereted (mapped) by objects.

There are three defined interperatations:

   Objects appear to act instantaneously unless part of a feedback path.


Normalized values
   ABox uses normalized values through-out it's calculation. This minimizes the need to range-check every value. It also reduces run-away signals and saturation.
   It is often desirable to produce values outside of the normalized range by using addition. ABox will not prevent this, but some objects will introduce aliasing and/or clipping.

Cliping
   Objects may clip values to prevent saturation, or to avoid mathematically undefined operations. By clipping, the object will always produce output, instead of exploding.

Objects that clip values to ±1.0:

  • WaveOut clips input values.
  • IIR Filters ( z and block ) clip output values.
  • Pitch Quantizers clip input values.

Aliasing
   Aliasing is inherant in sampled signals. There is no way to fix it, only to understand or prevent it. Aliasing occurs at most frequency inputs and behaves as follows:

  • An F value of 2.0 will result in a constant output.
  • Any whole multiple of 2.0 also results in constant output.
  • A fractional multiple of 1.0 (eg 1.25) results in a frequency of 1.0 minus the fraction (eg 0.75).
   Severe aliasing can be heard in the Ramp and Square waves. Their waveshape results in harmonic frequencies well beyond the sample rate. These wrap around and are heard as un-musical distortion.


Signal mappings

Linear Frequecy and Time
   F pins interperet the signal as a frequency. The values map linearly to frequencies, with 1.0 = 22050Hz. eg. A value of 0.5 maps to a frequency of 11025Hz, half of 22050Hz.
   Negative values produce positive frequencies.
   Oscillator objects will correctly run backwards given a negative F input.
   ADSR objects will not run backwards.

   Time is the inverse of frequency (1/F).
   Negative times are converted to positive times.

Musical Frequency
   M pins are interpeted as MIDI notes, a linear scale corresponding to the keys on a piano.
   A value of 0.5 maps to MIDI note 60 (C4), (middle C).
   A value of 0.0 maps to MIDI note 0 (C-2)
   A value of 1.0 maps to to MIDI note 120 (C10).
   Negative values are converted to positive values.
   Values > 1.0 are clipped.
   Fractional notes (eg. 60.24), are valid (eg. C4+24 cents).
   MIDI notes do NOT map to frequencies without first being converted. Applying a MIDI note to an F input will NOT produce that note. Use the pitch quantizer, MtoF, or FtoM functions to convert.

Logic and Zero Crossing Triggers
   ABox uses the sign of a value to indicate true and false.

  • false is any positive number, the sign bit is OFF.
  • true is any negative number, the sign bit is ON.
   This is equivalent to inverse logic in digital electronics.
   0.0 is considered positive (false).
   Objects provide two schemes for logical output, bipolar and digital. This is settable on the object's popup menu. Both schemes return -1.0 for true.
  • Bipolar outputs return +1.0 for false
  • Digital outputs return 0.0 for false

   Many objects require a trigger to operate. The trigger is always a zero-crossing event, also know as an edge-trigger.
   The sign of the value has to change. A constant value of zero will not fire a trigger.
   Bipolar and digital outputs trigger the same.
   Most trigger inputs allow you to set which edge the trigger will detect.
  • Positive edge (- to + ; true to false )
  • Negative edge (+ to - ; false to true )
  • Both edges.


Timing and Feedback
   As in analog electronics, ABox objects behave as if they operate instantaneously. A signal change in one object affects all sucessive objects, in the same sample period.

   These objects indroduce time delays as part of their normal operation:

  • IIR filter (z and block )
  • Damper
  • Delay

Feedback
   Feedback paths are NOT instantaneous.
   Because it is far more efficient to compute in localized blocks of samples, ABox will not correctly calculate feedback paths on a per sample basis.
   A single feedback path will introduce a delay of one sample frame ( 1024 samples, ~23ms ) for that path.
   Feedback paths from objects with multiple outputs (eg. the Mixer) may result in longer, staggered delays.
   The order in which the feedback path operates can not be directly specified by the user. It is posible to insert an no-compute object (like a splitter) in the path to fool ABox into rearranging the calculation order to suit a specific purpose. Be sure to Stop and Start play to verify that the solution still works.


Tips and Tricks

Signaling
Assuming values within ±1.0, the following rules-of-thumb are useful:

  • Add signals to "mix" them.
  • Add MIDI notes to get another MIDI note.
  • Multiply frequencies to get a lower frequency.
  • Multiply times to get a longer time.
  • Multiply a waveform by a unit to get a range of values, with the same unit.
  • Adding the same unit to a range moves the center.
  • Using feedback must be done with care, it is easy to produce run away signals that saturate clipping devices. Always use an attenuator in the feedback path (Multiply Control or equiv.)

Calculation
These tips help optimize circuit performance.

  • ABox keeps track of changing signals, optimizing it's calculation for static signals. When applicable, use triggered devices to take advantage of this.
  • Oscillators always produce a changing signal, even when F is zero.
  • Try to minimize the number of objects and utilize built in operations. eg. Instead of running a random through a multiply control, connect a knob to the random's A input.
  • Use A and O pins to create controlled ranges of meaningful values.
  • Use O pins to mix in signals from previous stages.
  • Use knobs driving a bus to assign constant values.
  • Objects with a display (eg. the oscilloscope) use large amounts of CPU time.