Difference between revisions of "Demiurge/Standard Blocks"

From Stm32World Wiki
Jump to navigation Jump to search
Line 53: Line 53:
 
[https://github.com/AwesomeAudioApparatus/demiurge/tree/master/software/components/demiurge/src/averager.c Source Code]
 
[https://github.com/AwesomeAudioApparatus/demiurge/tree/master/software/components/demiurge/src/averager.c Source Code]
  
=== Inputs ===
+
{|  class="wikitable"
| Name | Description |
+
|+ Inputs
|------|-------------|
+
|-
| input | The signal to be averaged. |
+
! Name !! Description  
| averaging_control | The amount of averging to be applied to the signal |
+
|-
 +
| input || The signal to be averaged.
 +
|-
 +
| averaging_control || The amount of averging to be applied to the signal.
 +
|}
  
 
== Calculator ==
 
== Calculator ==
 
[https://github.com/AwesomeAudioApparatus/demiurge/tree/master/software/components/demiurge/src/calculator.c Source Code]
 
[https://github.com/AwesomeAudioApparatus/demiurge/tree/master/software/components/demiurge/src/calculator.c Source Code]
  
=== Inputs ===
+
{|  class="wikitable"
| Name | Description |
+
|+ Inputs
|------|-------------|
+
|-
| input | The signal to apply the [***Function***](functions.md) on. |
+
! Name !! Description  
         
+
|-
 +
| input || The signal to apply the [***Function***](functions.md) on.
 +
|}
  
 
== CFX RBJ Filter ==
 
== CFX RBJ Filter ==
 
[https://github.com/AwesomeAudioApparatus/demiurge/tree/master/software/components/demiurge/src/cfxrbjfilter.c Source Code]
 
[https://github.com/AwesomeAudioApparatus/demiurge/tree/master/software/components/demiurge/src/cfxrbjfilter.c Source Code]
  
=== Inputs ===
+
{|  class="wikitable"
| Name | Description |
+
|+ Inputs
|------|-------------|
+
|-
| input | Signal to be filtered |
+
! Name !! Description  
| frequency | Frequency to be filtered at |
+
|-
| Q | Q factor which sets slope and ringing |
+
| input || Signal to be filtered
| gain | Gain/attenuation in the filter |
+
|-
| type | <ul><li>0 - low pass</li><li>1 - high pass</li><li>2 - bandpass (csg)</li><li>3 - bandpass (czpg) </li><li>4 - notch</li><li>5 - allpass</li><li>6 - peaking</li><li>7 - low shelf</li><li>8 - high shelf</li></ul> |
+
| frequency || Frequency to be filtered at
 +
|-
 +
| Q || Q factor which sets slope and ringing
 +
|-
 +
| gain || Gain/attenuation in the filter
 +
|-
 +
| type || <ul><li>0 - low pass</li><li>1 - high pass</li><li>2 - bandpass (csg)</li><li>3 - bandpass (czpg) </li><li>4 - notch</li><li>5 - allpass</li><li>6 - peaking</li><li>7 - low shelf</li><li>8 - high shelf</li></ul>
 +
|}
  
 
== Control Pair ==
 
== Control Pair ==
Line 105: Line 118:
 
[https://github.com/AwesomeAudioApparatus/demiurge/tree/master/software/components/demiurge/src/cv_outport.c Source Code]
 
[https://github.com/AwesomeAudioApparatus/demiurge/tree/master/software/components/demiurge/src/cv_outport.c Source Code]
  
=== Inputs ===
+
{|  class="wikitable"
| Name | Description |
+
|+ Inputs
|------|-------------|
+
|-
| input | The signal to be set to the physical output prot as a CV signal |
+
! Name !! Description  
 +
|-
 +
| input || The signal to be set to the physical output prot as a CV signal
 +
|}
  
 
== Fixed Signal ==
 
== Fixed Signal ==
Line 124: Line 140:
 
[https://github.com/AwesomeAudioApparatus/demiurge/tree/master/software/components/demiurge/src/gate_inport.c Source Code]
 
[https://github.com/AwesomeAudioApparatus/demiurge/tree/master/software/components/demiurge/src/gate_inport.c Source Code]
  
=== Inputs ===
+
{|  class="wikitable"
| Name | Description |
+
|+ Inputs
|------|-------------|
+
|-
| *none* |  |
+
! Name !! Description  
 +
|-
 +
| input || The audio signal to be set to the physical output port as an audio signal.
 +
|}
  
 
== Gate Outport ==
 
== Gate Outport ==
 
[https://github.com/AwesomeAudioApparatus/demiurge/tree/master/software/components/demiurge/src/gate_outport.c Source Code]
 
[https://github.com/AwesomeAudioApparatus/demiurge/tree/master/software/components/demiurge/src/gate_outport.c Source Code]
  
=== Inputs ===
+
{|  class="wikitable"
| Name | Description |
+
|+ Inputs
|------|-------------|
+
|-
| input | The signal to be set to the physical output prot as a Gate signal. |
+
! Name !! Description  
 +
|-
 +
| input || The signal to be set to the physical output prot as a Gate signal.
 +
|}
 +
 
  
 
== Inverter ==
 
== Inverter ==
 
[https://github.com/AwesomeAudioApparatus/demiurge/tree/master/software/components/demiurge/src/inverter.c Source Code]
 
[https://github.com/AwesomeAudioApparatus/demiurge/tree/master/software/components/demiurge/src/inverter.c Source Code]
  
=== Inputs ===
+
{|  class="wikitable"
| Name | Description |
+
|+ Inputs
|------|-------------|
+
|-
| input | The signal to be inverted. |
+
! Name !! Description  
| scale | Scaling of the signal |
+
|-
| offset | Offset around which the signal should be inverted. |
+
| input || The signal to be inverted.
 +
|-
 +
| scale || Scaling of the signal.
 +
|-
 +
| offset || Offset around which the signal should be inverted.
 +
|}
  
 
== LED ==
 
== LED ==
 
[https://github.com/AwesomeAudioApparatus/demiurge/tree/master/software/components/demiurge/src/led.c Source Code]
 
[https://github.com/AwesomeAudioApparatus/demiurge/tree/master/software/components/demiurge/src/led.c Source Code]
  
=== Inputs ===
+
{|  class="wikitable"
| Name | Description |
+
|+ Inputs
|------|-------------|
+
|-
| input | The RGB value of the LED to be set. Only used if r, g and b are not configured. |
+
! Name !! Description  
| r | The RED value to be set to the physical LED. |
+
|-
| g | The GREEN value to be set to the physical LED. |
+
| input || The RGB value of the LED to be set. Only used if r, g and b are not configured.
| b | The BLUE value to be set to the physical LED. |
+
|-
 +
| r || The RED value to be set to the physical LED.
 +
|-
 +
| g || The GREEN value to be set to the physical LED.
 +
|-
 +
| b || The BLUE value to be set to the physical LED.
 +
|}
  
 
== Lg ==
 
== Lg ==
 
[https://github.com/AwesomeAudioApparatus/demiurge/tree/master/software/components/demiurge/src/lg.c Source Code]
 
[https://github.com/AwesomeAudioApparatus/demiurge/tree/master/software/components/demiurge/src/lg.c Source Code]
  
=== Inputs ===
+
{|  class="wikitable"
| Name | Description |
+
|+ Inputs
|------|-------------|
+
|-
| input | The signal that wil have *ln* (the natural logarithm) applied to it |
+
! Name !! Description  
 +
|-
 +
| input || The signal that will have '''ln''' (the natural logarithm) applied to it.
 +
|}
  
 
== Lg2 ==
 
== Lg2 ==
 
[https://github.com/AwesomeAudioApparatus/demiurge/tree/master/software/components/demiurge/src/lg2.c Source Code]
 
[https://github.com/AwesomeAudioApparatus/demiurge/tree/master/software/components/demiurge/src/lg2.c Source Code]
  
=== Inputs ===
+
{|  class="wikitable"
| Name | Description |
+
|+ Inputs
|------|-------------|
+
|-
| input | The signal that wil have *log2* applied to it |
+
! Name !! Description  
 +
|-
 +
| input | The signal that will have '''log2''' applied to it.
 +
|}
 +
 
  
 
== Lg10 ==
 
== Lg10 ==
 
[https://github.com/AwesomeAudioApparatus/demiurge/tree/master/software/components/demiurge/src/lg10.c Source Code]
 
[https://github.com/AwesomeAudioApparatus/demiurge/tree/master/software/components/demiurge/src/lg10.c Source Code]
  
=== Inputs ===
+
{|  class="wikitable"
| Name | Description |
+
|+ Inputs
|------|-------------|
+
|-
| input | The signal that wil have *log10* applied to it |
+
! Name !! Description  
 +
|-
 +
| input | The signal that will have '''log10''' applied to it.
 +
|}
  
 
== Mixer ==
 
== Mixer ==
 
[https://github.com/AwesomeAudioApparatus/demiurge/tree/master/software/components/demiurge/src/mixer.c Source Code]
 
[https://github.com/AwesomeAudioApparatus/demiurge/tree/master/software/components/demiurge/src/mixer.c Source Code]
  
=== Inputs ===
+
{|  class="wikitable"
| Name | Description |
+
|+ Inputs
|------|-------------|
+
|-
| inputs[] | An array of signals to be mixed to the ***Output*** |
+
! Name !! Description  
| volumes[] | An array of volume controllers, one for each ***Input*** |
+
|-
 +
| inputs[] || An array of signals to be mixed to the '''''Output'''''.
 +
|-
 +
| volumes[] || An array of volume controllers, one for each '''''Input'''''.
 +
|}
  
 
== Offset ==
 
== Offset ==
 
[https://github.com/AwesomeAudioApparatus/demiurge/tree/master/software/components/demiurge/src/offset.c Source Code]
 
[https://github.com/AwesomeAudioApparatus/demiurge/tree/master/software/components/demiurge/src/offset.c Source Code]
  
=== Inputs ===
+
{|  class="wikitable"
| Name | Description |
+
|+ Inputs
|------|-------------|
+
|-
| input | The signal to be offsetted |
+
! Name !! Description  
| offset_control | The amount of offset to be applied to the ***Input*** |
+
|-
 +
| input || The signal to be offsetted
 +
|-
 +
| offset_control || The amount of offset to be applied to the ***Input***
 +
|}
  
 
== Oscillator ==
 
== Oscillator ==
Line 208: Line 260:
 
[https://github.com/AwesomeAudioApparatus/demiurge/tree/master/software/components/demiurge/src/oscillator.c Source Code]
 
[https://github.com/AwesomeAudioApparatus/demiurge/tree/master/software/components/demiurge/src/oscillator.c Source Code]
  
=== Inputs ===
+
{|  class="wikitable"
| Name | Description |
+
|+ Inputs
|------|-------------|
+
|-
| frequency | The frequency to generate. For non-SINE, it is the inverse of the full cycle period |
+
! Name !! Description  
| amplitude | The amplitude of the output signal. |
+
|-
| trigger | Re-trigger the wave generation to time zero. |
+
| frequency || The frequency to generate. For non-SINE, it is the inverse of the full cycle period.
 +
|-
 +
| amplitude || The amplitude of the output signal.
 +
|-
 +
| trigger || Re-trigger the wave generation to time zero.
 +
|}
  
 
== Pan ==
 
== Pan ==
 
[https://github.com/AwesomeAudioApparatus/demiurge/tree/master/software/components/demiurge/src/pan.c Source Code]
 
[https://github.com/AwesomeAudioApparatus/demiurge/tree/master/software/components/demiurge/src/pan.c Source Code]
  
=== Inputs ===
+
{|  class="wikitable"
| Name | Description |
+
|+ Inputs
|------|-------------|
+
|-
| input | The signal to be split in a *left* and *right* channel. |
+
! Name !! Description  
| control | The balance between *left* (0V) and *right* (10V) channel |
+
|-
 +
| input || The signal to be split in a *left* and *right* channel.
 +
|-
 +
| control || The balance between *left* (0V) and *right* (10V) channel.
 +
|}
  
=== Sub-blocks ===
+
{|  class="wikitable"
| Name | Description |
+
|+ Inputs
|------|-------------|
+
|-
| left_channel | |
+
! Name !! Description  
| right_channel | |
+
|-
 +
| left_channel ||
 +
|-
 +
| right_channel ||
 +
|}
  
 
== Passthru ==
 
== Passthru ==
 
[https://github.com/AwesomeAudioApparatus/demiurge/tree/master/software/components/demiurge/src/passthru.c Source Code]
 
[https://github.com/AwesomeAudioApparatus/demiurge/tree/master/software/components/demiurge/src/passthru.c Source Code]
  
=== Inputs ===
+
{|  class="wikitable"
| Name | Description |
+
|+ Inputs
|------|-------------|
+
|-
 +
! Name !! Description  
 +
|-
 
| input | The signal to be pass to the output. |
 
| input | The signal to be pass to the output. |
 +
|}
  
 
== Potentiometer ==
 
== Potentiometer ==
Line 263: Line 331:
 
[https://github.com/AwesomeAudioApparatus/demiurge/tree/master/software/components/demiurge/src/scale.c Source Code]
 
[https://github.com/AwesomeAudioApparatus/demiurge/tree/master/software/components/demiurge/src/scale.c Source Code]
  
=== Inputs ===
+
{|  class="wikitable"
| Name | Description |
+
|+ Inputs
|------|-------------|
+
|-
| input | The signal to be scaled. |
+
! Name !! Description  
| control | The amplication/attenuation control. 0V=muted, 10V=~20dB gain
+
|-
 +
| input || The signal to be scaled.
 +
|-
 +
| control || The amplication/attenuation control. 0V=muted, 10V=~20dB gain
 +
|}
  
 
== State Variable Filter ==
 
== State Variable Filter ==
 
[https://github.com/AwesomeAudioApparatus/demiurge/tree/master/software/components/demiurge/src/svf.c Source Code]
 
[https://github.com/AwesomeAudioApparatus/demiurge/tree/master/software/components/demiurge/src/svf.c Source Code]
  
=== Inputs ===
+
{|  class="wikitable"
| Name | Description |
+
|+ Inputs
|------|-------------|
+
|-
| input | Signal to be filtered |
+
! Name !! Description  
| frequency | Frequency to be filtered at |
+
|-
| Q | Q factor which sets slope and ringing |
+
| input || Signal to be filtered.
| gain | Gain/attenuation in the filter |
+
|-
 +
| frequency || Frequency to be filtered at.
 +
|-
 +
| Q || Q factor which sets slope and ringing.
 +
|-
 +
| gain || Gain/attenuation in the filter.
 +
|}
  
=== Sub-blocks ===
+
{|  class="wikitable"
| Name | Description |
+
|+ Inputs
|------|-------------|
+
|-
| lowpass_out | Low pass filter output signal |
+
! Name !! Description  
| highpass_out | High pass filter output signal |
+
|-
| bandpass_out | Bandpass filter output signal |
+
| lowpass_out || Low pass filter output signal.
| notch_out | Notch filter output signal |
+
|-
 +
| highpass_out || High pass filter output signal.
 +
|-
 +
| bandpass_out || Bandpass filter output signal.
 +
|-
 +
| notch_out || Notch filter output signal.
 +
|}
  
 
== Volume ==
 
== Volume ==
 
[https://github.com/AwesomeAudioApparatus/demiurge/tree/master/software/components/demiurge/src/volume.c Source Code]
 
[https://github.com/AwesomeAudioApparatus/demiurge/tree/master/software/components/demiurge/src/volume.c Source Code]
  
=== Inputs ===
+
{|  class="wikitable"
| Name | Description |
+
|+ Inputs
|------|-------------|
+
|-
 +
! Name !! Description  
 +
|-
 
| input  | Signal to be volume controlled.  |
 
| input  | Signal to be volume controlled.  |
| control  | The amplication/attenuation control. output=input*(0.05 * control + 0.5)  |
+
|-
 +
| control  | The amplification/attenuation control. output=input*(0.05 * control + 0.5)  |
 +
|}

Revision as of 09:58, 20 August 2022


All blocks has a single Output signal, to which an Input on another block can be connected. The rare cases of multiple Output blocks, such as #Pan, and accomplishes this by having sub-blocks for each Output that downstream blocks can be connected to.

ADSR - Attack, Decay, Sustain, Release

Source Code

Inputs
Name Description
attack Sets the attack time of the ADSR function
decay Sets the decay time of the ADSR function
sustain Sets the sustain level of the ADSR function
release Sets the release time of the ADSR function
gate Gate signal for the ADSR function
trig Re-trig signal for the ADSR function

Audio Inport

Source Code

Inputs
Name Description
None

Audio Outport

Source Code

Inputs
Name Description
input The audio signal to be set to the physical output port as an audio signal.

Averager

Source Code

Inputs
Name Description
input The signal to be averaged.
averaging_control The amount of averging to be applied to the signal.

Calculator

Source Code

Inputs
Name Description
input The signal to apply the [***Function***](functions.md) on.

CFX RBJ Filter

Source Code

Inputs
Name Description
input Signal to be filtered
frequency Frequency to be filtered at
Q Q factor which sets slope and ringing
gain Gain/attenuation in the filter
type
  • 0 - low pass
  • 1 - high pass
  • 2 - bandpass (csg)
  • 3 - bandpass (czpg)
  • 4 - notch
  • 5 - allpass
  • 6 - peaking
  • 7 - low shelf
  • 8 - high shelf

Control Pair

Source Code

Inputs
Name Description
None

CV Inport

Source Code

Inputs
Name Description
None

CV Outport

Source Code

Inputs
Name Description
input The signal to be set to the physical output prot as a CV signal

Fixed Signal

Source Code

Inputs
Name Description
None

Gate Inport

Source Code

Inputs
Name Description
input The audio signal to be set to the physical output port as an audio signal.

Gate Outport

Source Code

Inputs
Name Description
input The signal to be set to the physical output prot as a Gate signal.


Inverter

Source Code

Inputs
Name Description
input The signal to be inverted.
scale Scaling of the signal.
offset Offset around which the signal should be inverted.

LED

Source Code

Inputs
Name Description
input The RGB value of the LED to be set. Only used if r, g and b are not configured.
r The RED value to be set to the physical LED.
g The GREEN value to be set to the physical LED.
b The BLUE value to be set to the physical LED.

Lg

Source Code

Inputs
Name Description
input The signal that will have ln (the natural logarithm) applied to it.

Lg2

Source Code

Inputs
Name Description
The signal that will have log2 applied to it.


Lg10

Source Code

Inputs
Name Description
The signal that will have log10 applied to it.

Mixer

Source Code

Inputs
Name Description
inputs[] An array of signals to be mixed to the Output.
volumes[] An array of volume controllers, one for each Input.

Offset

Source Code

Inputs
Name Description
input The signal to be offsetted
offset_control The amount of offset to be applied to the ***Input***

Oscillator

The [Oscillator](blocks/oscillator.md) is a block that generates waveforms at a controllable frequency and amplitude. The start of the waveform is also controllable with the *trigger*, but should be used with caution as it introduces spike frequencies.

Source Code

Inputs
Name Description
frequency The frequency to generate. For non-SINE, it is the inverse of the full cycle period.
amplitude The amplitude of the output signal.
trigger Re-trigger the wave generation to time zero.

Pan

Source Code

Inputs
Name Description
input The signal to be split in a *left* and *right* channel.
control The balance between *left* (0V) and *right* (10V) channel.
Inputs
Name Description
left_channel
right_channel

Passthru

Source Code

Inputs
Name Description
The signal to be pass to the output. |

Potentiometer

Source Code

Inputs
Name Description
None

Push Button

Source Code

Inputs
Name Description
None

Scale

Source Code

Inputs
Name Description
input The signal to be scaled.
control The amplication/attenuation control. 0V=muted, 10V=~20dB gain

State Variable Filter

Source Code

Inputs
Name Description
input Signal to be filtered.
frequency Frequency to be filtered at.
Q Q factor which sets slope and ringing.
gain Gain/attenuation in the filter.
Inputs
Name Description
lowpass_out Low pass filter output signal.
highpass_out High pass filter output signal.
bandpass_out Bandpass filter output signal.
notch_out Notch filter output signal.

Volume

Source Code

Inputs
Name Description
Signal to be volume controlled. |
The amplification/attenuation control. output=input*(0.05 * control + 0.5) |