Normalization
Inside, ABox works with normalized numbers.
Values inside the connections are assumed to be between +1 and -1.
When a value is displayed on the screen, it must be converted.
To make circuits easier to understand, ABox allows you to specify the display units on knobs and readouts.
It is important to understand that ABox is using the value, not the units you've specified.
So when you see 440Hz, ABox sees 0.019954648.
In many cases, you don't need to worry about this.
But if you're designing a more sophisticated piece of circuitry,
you'll need to understand how the various units are translated.
The rest of this section defines each unit with a short description,
the conversion formula, and when applicable, how to perform arithmetic on the units.
The conversion formula can be used to create exact values with the equation builder,
or as a reference for designing your own equations.
The arithmetic rules state how to combine signals with the same units so as to produce the correct result.
|
|
Frequency, Hz Time, sec
Frequency and time are interchangeable.
Time in seconds equals the reciprocal of the frequency in Hertz.
value=Hz/22050
value=1/(sec×22050)
If you need to perform math operations on frequency or time remember that
ABox always uses the value, never the units.
This means that if you multiply 10Hz by 10Hz you will not get the expected 100Hz².
Instead, you get 0.004535Hz.
Use the following formulas to get the correct answers.
Combine: | Use: |
a Hz + b Hz | a+b |
a Hz × b Hz | a×b×22050 |
a sec + b sec | (a×b) / (a+b) |
a sec × b sec | a×b×22050 |
|
Tempo, BPM
Tempo is a frequency in Beats Per Minute.
value=BPM/1323000
To add and multiply tempos, use the same formulas for adding and multiplying frequencies.
Samples, smpl
Samples are a unit of time used by the delay object.
value=smpl/1024
sec=smpl/44100
Hz=44100/smpl
Combine samples using these formulas
Combine: | Use: |
a smpl + b smpl | a+b |
a smpl × b smpl | a×b×1024 |
|
Note Name
Note is a frequency unit of a musical note.
Read the display as: note octave ±cents
Middle A equals 440Hz, equally tempered scale.
value=(440/22050)×2note/12
where note middle C = 60
To combine notes, use the rules for Hertz.
Midi and Note are not interchangeable.
Use the MtoF, FtoM or Pitch Quantizer to convert.
|
Midi Note
Midi is a musical unit of note value.
1 midi is equivalent to ½ step on a piano.
Middle C is defined as midi 60.
value=midi/128
Combine midi using these formulas
Combine: | Use: |
a midi + b midi | a+b |
a midi × b midi | a×b×128 |
|
Table showing note name, octaves, and midi note numbers. |
| | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | | octave | |
| B | 11 | 23 | 35 | 47 | 59 | 71 | 83 | 95 | 107 | 119 | |
| A# | 10 | 22 | 34 | 46 | 58 | 70 | 82 | 94 | 106 | 118 | |
| A | 9 | 21 | 33 | 45 | 57 | 69 | 81 | 93 | 105 | 117 | |
| G# | 8 | 20 | 32 | 44 | 56 | 68 | 80 | 92 | 104 | 116 | |
| G | 7 | 19 | 31 | 43 | 55 | 67 | 79 | 91 | 103 | 115 | 127 |
| F# | 6 | 18 | 30 | 42 | 54 | 66 | 78 | 90 | 102 | 114 | 126 |
| F | 5 | 17 | 29 | 41 | 53 | 65 | 77 | 89 | 101 | 113 | 125 |
|
| E | 4 | 16 | 28 | 40 | 52 | 64 | 76 | 88 | 100 | 112 | 124 |
| D# | 3 | 15 | 27 | 39 | 51 | 63 | 75 | 87 | 99 | 111 | 123 |
| D | 2 | 14 | 26 | 38 | 50 | 62 | 74 | 86 | 98 | 110 | 122 |
| C# | 1 | 13 | 25 | 37 | 49 | 61 | 73 | 85 | 97 | 109 | 121 |
| C | 0 | 12 | 24 | 36 | 48 | 60 | 72 | 84 | 96 | 108 | 120 |
| | -1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | octave |
|
Ratios
Ratios are units that are only meaningful when multiplied to another value with a specific unit.
Percent, %
Unit of ratio applied to value.
value=percent/100
Combine percents using these formulas
Combine: | Use: |
a % + b % | a+b |
a % × b % | a×b×100 |
Attenuation, dB
Unit of ratio applied to audio signals and displayed as decibels.
value=10(dB/20)
Combine dBs using these formulas
Combine: | Use: |
a dB + b dB | a×b |
a dB × b dB | 10-20×log(a)×log(b) |
|
Interval, int
Unit of ratio applied to frequency and displayed as a musical interval.
Read the display as interval ±cents ±octave
value=2int/12
Combine intervals using these formulas
Combine: | Use: |
a int + b int | a×b |
a int × b int | 212×log2(a)×log2(b) |
Pan
Unit of left and right displayed as a percentage of the distance from center to outer edge.
+1.0 = full left
0.0 = center
-1.0 = full right
Combine pans using these formulas
Combine: | Use: |
a pan + b pan | a+b |
a pan × b pan | a×b |
|
Logic, bool
Digital representation of truth.
true = val < 0.0
false = val >= 0.0
To combine logic values, use the logic gates on the math object.
|
Degrees, deg
Units of angle.
value=deg/180
Combine degrees using these formulas
Combine: | Use: |
a ° + b ° | a+b |
a ° × b ° | a×b×180 |
|
Spectrum, bin
The spectrum signal is used by the FFT and FFTOP objects.
It is not an audio or control signal, but is instead an array of values representing frequency content.
Spectrums are arranged as 512 pairs of values.
Each pair represents the real and imaginary part of a particular frequency.
The frequency is determined by the bin index.
value = bin index / 512
Hz = bin index / 22050
Combine spectrums with care.
Remember that each bin is a complex number,
so multiplying two spectrums with a multiplier object will give you the wrong answer.
Instead, use the FFTOP set to multiply.
You may add or subtract two spectrums with an add object.
|
Midi Stream, strm
Midi streams are used by the Midi In, Midi Out and VST Instrument objects.
They are very much like a midi cable in that they carry commands from one location to another.
Unlike a midi cable, a stream only carries information in one direction.
A stream is not an audio or control signal.
Instead, it is very efficient transport mechanism for midi data.
There are no meaningful numbers attached to streams.
Knobs and readouts only display #####strm to indicate this.
Use the Midi In object to extract stream events into useful ABox signals.
Use the Midi Out object to inject ABox signals into a stream.
Any other operation on a stream will most likely destroy it.
|
Auto Units
Knobs and Readouts have an additional mode called Auto.
Using this mode will cause ABox to investigate the connections and objects in the circuit
and try to decide which units to display.
There are cases where the search will not succeed.
You may have to manually set the units on one knob to give ABox a clue as to how to set the rest of the objects.
Consult the units column in the objects section for specific details.
The basic idea is that all the pins marked as auto have to be able to agree on a unit to use.
Once this done, that unit will be passed along to all connected pins.
The process repeats until all pins are either set or are certain they can not be set.
|
Feedback
In electronics, it is common to use a feedback path to implement certain circuits.
Because ABox calculates the circuit in effcient blocks of 1024 samples,
there will be complications with this technique.
Namely, the data on the feedback will be delayed by 1024 samples.
To give two practical examples:
1) You can not build an op-amp with a multiplier object. What you'll get is a delay circuit.
2) You can not build a flip-flop using two nand gates. Use the digital divider instead.
If you need to build a circuit with sample accurate feedback,
there may be two alternatives:
1) With a little algebra, the delta object can be used for many types of recursive delay equations.
The help page for the delay object shows an example of this.
2) With a little calculus, the Differential System can be coerced into emulating short recursive delay equations.
|