Currently working on
Moogfilter could produce denormals - added some guards there.
Added some more PortAudio debugging info – see below.
Graph Image for S shaped attack on the ADSR envelope module was wrong, fixed it.
Added some code for trying to get some better idea as to why PortAudio
Added and off-beat output to the EuclideanRhythm module.
Added cross fade modulation to the Seq16 module and also added a random input.
Added an invert input to the Seq16 and the Sequencer modules.
Added inputs to the Switches4 module.
Added range modulation to NoteQuantizer, ScaleQuantizer and ModQuantizer modules.
in version 2017.3.14.0
Bug in DataGraph module for the splines mode, it outputs X values instead of Y
values. Using Y works way better - so that is fixed now. And its not in the
AudioGraph module, as that one can not use splines – pwew :-)
Mode and range changes through selectors were not handled when controlled with the
keyboard (only mouse clicks worked for that), fixed it.
Added an 'act' input for the EuclideanRhythm, SeqRandom, SeqRandVal, Pattern and
Added inv outputs on EnvAHD and EnvADSR modules, they output 1.0 minus the value
that is on the env output.
Made a controller module for the DataGraph module to allow it to do envelopes. The
help blurp says : A retriggerable envelope controller. The envelope will start
when the trig input goes from zero, or below zero, to above zero. The output will
then in the set Attack time go to the level set with the level control. When the
trig input falls off the output will start getting larger again for the set
Release time, till a value of 1 is reached. At every new trig start the ouput
value is reset to 0, and the above cycle will restart. Both the Attack and Decay
phase are linear, any non linearity is to be set in the controlled graph. This
module is meant to control the GraphControl module, the actual envelope shape is
then drawn in that module. The set level will then correspond to the vertical
distance in the graph where the hold value will be.
Made a pattern sequencer module to be used for drum patterns. When set at low
speed it can also be used to control the time structure for a self playing patch.
A full pattern is made from eight parts, where each part is composed of eight
sections and each section has eight elements. This makes for a total of 512 steps,
where each step controls 24 bit outputs simultaneously. The steps can be set to
off, to pass the incoming clock, or to be on.
For detail information please click on the module, or for some background
information have a look at the forum
Sequences can be saved to disk and reloaded just like any module (or any group of
modules) can - as a preset. Right click on the module and select load / save
preset from the context.
in version 2017.2.25.0
Range control for the pulses module was not working, fixed that.
Output signal type selection for the pulse delay module was not working, fixed
that. Also tried to clarify the help text a bit.
Constant module when put into 'note' mode is off. And this seems to be wrong in
more module types. Indeed it did affect the Constant, LUT and Knobs4 modules and
it is fixed now. Also made it so that when 'notes' mode is selected the note
controls have 128 steps now, and possiby some other number in the other modes.
Also the LUT module was having an offset in the 'notes' mode, this got fixed too.
These changes will affect old patches using any of these modules in 'notes' mode.
Made a Moog style 24 dB low pass filter.
Inspiration came from here, the
Huovilainen variation on the theme. I've found it to be a bit explosive …
the volume that is, so made it to oversample a bit more and also added a
saturation function (tanh) on the ouput, as it had a tendency to go like very loud
when resonating. This is not a cheap filter CPU wise, but I think it to be a nice
one with the built-in distortions. On the referenced web site there are some more
variations, I may try some other and make a selector maybe for different types.
Made a fixed divider module.
The module has a series of outputs with fixed divison rates. After
reset all the outputs will be off, to be toggled each time the number of input
clock periods matches the division count for that output. The ouput will stay high
for one clock period then.
Made a multiple waveform oscillator.
This module simultaneously makes a sine-, a
trianglar-, a saw- and a square-waveform. The PWM input provides linear Pulse
Width Modulation (on the square output only).
in version 2017.2.19.0
Delaytime range on stereo looper was not working, fixed now. Also changed the
start and length control modulation amount knobs to be displayed as linear (they
were actually working as linear controls already but not displayed as such).
Some screen painting took place on the desktop's device context, changed that to
happen on the editor's context only. This draws better selection rectangles and
better lines (on cable drawing). This may as well solve an issue with the screen
not being repaintd properly (which was reported by someone using Windows 10). Also
thickened up the lines a bit for better visibility.
Added inv outputs on EnvAR and EnvARRetrig modules, they output 1.0 minus the
value that is on the env output.
MIDI transmit bug. The command was never sent only the data bytes … Fixed
now. And of course I had forgotten to test some code …
Added f(x) = - x and f(x) = 1 - x funtions to the Monadic module.
Added a a modulation depth control module
. The graph illustrates it's workings
(where the red signal is the wanted modulation depth (mod), the green signal is
the modulation (in) and the blue signal represents the resulting output).
For the inputs and the ouput the signal type can be set, for the graph they were
set as in the mocule image. The mod signal and the ouput being unipolar and the
modulation (in) signal being bipolar. I've made this module primarily for AM
modulation (tremolo), but it would work for vibrato as well when applied to a PM
input of an oscillator.
The internal calculation used is : out = mod * ( in - 1) + 1, so that when mod = 0
the output will be 1 and when mod = 1 the output will be a copy of the in signal.
This is being calculated on signals assumed to be positive only (unipolar), the
input output type selecors are to be used to ensure such scaling.
in version 2017.1.29.0
When windows screen magnifiction is set to something else than 100% everything on
screen gets messed up. Turned off screen scaling, which paradoxically results in
better scaling - I guess the scaling property on forms is a promise to windows ...
anyways, windows will now scale all stuff properly - or so it seems.
Bug in LifeSeq module, the chain input does not work – fixed now.
Obscure bug in the wave file reader code, it would read more samples than present
in the audio file which would cause glitches on playback. Fixed now.
Some of the 6 dB filters (the high pass parts) could produce denormals, fixed
Bug in multiplier module where the leftmost input would not work due to having a
wrong name. Fixed that, but all patches using that input were not working properly
and on reload will not restore the connection. When needed this can be fixed
manually. Open the patch in a text editor, search for all occurances of the text
'multiplier_in47' and replace all of them by 'multiplier_in7', the patch would
then load again as intended.
Bug on pasting modules. It looks like when a selection laarger than what is
present in the current patch can not be pasted. This has to do with an internal
naming conflict for modules. This issue must have been present for years I think,
looking into it now. Is fixed now, it made the code somewhat simpler too :-)
Added a reverse input to the LifeSeq module, when active it plays from right to
left. Also added stops to the module. When one stop is set it will play from the
first column upto the row where the stop is set and it will then jump back. When
two stops are set it will start in the column afer the leftmost and it ends in the
column just before the rightmost. When the reverse input is active this gets
reversed. When no stops are selected the full range will be used. On reset the
cursor will jump to the column after the leftmost stop, unless only one stop is
set – in that case it will go to the first column. This also gets reversed
when reverse mode is active. I thinks the stops to be interesting mainly for the
Changed MIDI NoteOn handling a bit. When a NoteOn with velocity 0 is received it
gets translated into a NoteOff event. The velocity for the generated NoteOff was
set to zero, it is now set to 64 instead. Changed that for the MIDI file player
Implemented running status for the MIDI transmitter, this was already present for
Updated the MIDI decoder and encoder to be able to handle RPN and NRPN data, so
could make modules handling those MIDI messages now. Implemented a mode for this.
When 7 bits mode is on the callback will be called when the MSB comes in, in 14
bit mode the callback will be delayed until the LSB comes in. When MSB and LSB get
swapped by the sender it will still work, provided 7 bit mode is selected, as in
7 bit mode LSB reception will not trigger the callback (and the internal value
gets updated anyway on both MSB and LSB reception.
Data increment and decrement are implemented as well, in 7 bit mode they will
change with steps of size 128 and in 14 bit mode with steps of size 1. Increments
and decrements are clipped to the range [0 .. 16383] (which may get interpreted as
a range [-8192 .. 8191] depending on the actual receiver), no wrapping takes
place – could make a mode for that too though I guess.
All this is in preparation for MPE (Multidimensional Polyphonic Expression)
… going to be some messy fun that for what's basically a mono synth
… sorry paraphonic :-)
But first MIDI will need little more attention.
For PortAudio I've changed the way buffering is handled. It is now possible to set
buffer size of zero, whech means that PortAudio decides on it. This works for ASIO
as well. For legacy mode this is not possible, a 4096 byte buffer will be used in
legacy mode when 0 was set. I've noticed that the WASAPI interface gives me best
results for latency, but I've also noticed that I'll have to shave off some of the
peak load for some of the modules to be able to use that for larger patches. I've
added a buffersize display under the CPU load display to be able to see what gets
actually being used (it shows the number of samples delivered and requested by the
PortAudio callback). Setting the buffer size to zero may cause the VU meters of
the main window to be updated a tad irregualr, but didnt actually really see that.
Also, in the Debug Screen [F5] I've added latency indicators, they show what is
being reported by PortAudio.
Processing for the LifeSeq module is spread a bit better over time now. After a
change request was seen a column counter is set up which gets adjusted on every
control rate tick. On each tick only one column of the automaton gets updated. As
a consequence the updates should not occur any faster than once every 32 control
rate ticks (SampleRate / ( 8 * 32) Hz). Also the display will now get updated only
when there was a change.
Made it so that all MIDI sends from a patch on a channel > 16 are sent back into
the patch itself (and the channel is decremented by 16 then). This makes it
possible for a patch to send MIDI data to itself by allowing it to send on a
channel > 16. For the MIDI send modules these channels can be selected as ic 1 to
ic 16 (ic standing for Internal Channel). The MidiNoteOut and MidiCCOut modules
now allow for such channels to be selected, so a patch can now send notes and CC
messages to itself. Ssuch MIDI messages will be handled internally in the synth
patch and will not be visible outside it (like in the user interface, or in the
outgoing MIDI stream).
Two new modules, a Phasor
and a painted waveform thingie, the AudioGraph module
The Phasor was created to control the AudioGraph, but it can also do phase control
The AudioGraph is better suitable than the DataGraph module for audio rates as it
internally uses Differentiated Parabolic Waves to reduce the aliasing a bit.
I've added an auto scaling feature which after every data alteration rescales the
graph to use the full Y value range. This feature can be turned on or off.
Also added an input to randomize the graph, randomizition will occur when the
random input goes from zero or lower to something greater than zero. The actual
momentary value at that stage is used to control the amount of random to be
applied. Small amounts (near zero) of random cause the graph to be changed just a
bit, a value of one would create a totally uncorrelated new graph. Unfortuanately
the rnd input acts sluggish … maybe something to fix later on.
Added a tilt filter from here.
center frequency can be set for it and a tilt factor for the frequency response
line. With tilt in the mid position thre will be no filter acction, turn it up
for more highs or down for more lows in the output signal. The center frequency is
the point the response line rotates around. The maximum tilt is ± 6dB /
Added a txt end output to the Song module, it will fire when all phonemes are
spoken. It will not fire initially so it can not be used to make the module self
looping. However, the module does have a loop mode for that purpose. I've added it
to be able to only start the module when it was not already running (with an RS
Added hold mode to the Demux module. When active XFade will no longer work and
outputs will keep their value when they get muxed out (integrated sample and
hold). The new button toogles between cross fade and hold modes.
Added a sync output to the RandomWalkLfo module. The sync output goes active when
the output values change and it goes inactive halfway the LFO period. This so I
can get triggers at the LFO rate. Also added an output smoothng mode to this
module. When smoothing is off a stepped wave is produced, when it is on the wave
glides from old to new values. And also added a distance modulation input.
Added a maximum value display to the Value module, it will display the maximum of
the absolute value seen. A reset button was added too to be able to reset the
maximum to zero. Also a patch reset will set the maximum value to zero.
Changed ini file loading a bit, at first Wren will try to load an
inifile based on the name of the actual executable file name. When such does not
succeed it will try to read a file 'wren.ini' from the same folder the executable
is in. This assumes Wren originally will be called 'wren.exe', but
makes it possible to have a copy of the executable under a different name which
will then try to read the original settings (but they will be saved into an ini
file named after the actual executable fiel name). Anyway, this should make it a
bit easier to have two (differently mamed) Wren executables in the same
folder, and to have the new one to initially inherit the settings of the default
one (they can be set to differ later on). The looks will always be shared.
in version 2016.10.23.0
Oops ... a bug in the AM modulator causing an addressing error, fixed now.
I've changed the implementation for the intdif module a bit. For the integration
function the output value is divided now by the execution rate of the module. This
can be scaled with the gain control slider, but it means the output will be way
lower than it used to be. Likewise for the differentiation function the
output value is multiplied by the excution rate, and this is also scaled with the
gain slider. This results in way more output signal for the
differentiator. Also the output values for both integrator and differentiator are
clipped to a range [-10 .. 10] (this used to be the case for the integrator only).
The execution rate depends on the set sample rate and it can be either control
rate or audio rate depending on the rate of the input signals.
Trying my hands on some Markov stuff. Not sure if I can get the learning mode fast
enough for real time use, playback should not be a problem.
This is a first order implementation.
The internal state consists of a number of nodes each holding some value (for
which a maximum must be set with the max size control), a State variable holding
the current node index (which is not under direct user control) and a matrix of
transition chances (which is not under direct user control).
When the learn input goes active the current input value is looked up in the
nodes, and when found the transition probability from the previous input value to
this new one will be increased with the current strength value (which can be
negative). When the new value was not found it will first be appended to the node
list. When the node list becomes full and the mode is set to 'once' an overflow
condition occurs and the new transition will not be learned (also the Ovfl light
will go on then). When the mode is set to 'cont' no oveflows will occur but the
oldest transitions will be discarded instead.
When the 'new ouput' input goes active the current State variable will move to a
new one, this is a random process controlled by the transition chance matrix.
The state of the module can be saved to and loaded from a file (must still
implement some user interface for that), so … training could be done in
non-real time mode when the need arises. Anyways .. let's test things first
– actually it does not seem to perform so bad, great :-) It will depende on
the input material, when there are many different values things may be worse, but
for discrete events (like note values) it seems all fine.
Now it needs to be made a bit leaky … as currently when the input patterns
change it will take longer and longer before those new patterns will be learned.
Although setting random strength values seems to help here – just like
setting not too many nodes and using 'cont' mode.
Now working on some code to do do the Markov thing a bit more efficient so I can
hopefully implement a second order implementation which is fast enough for
Ok, that seems to work. It also seems to be not too hard to generalize it a bit to
arbitrary orders. I've implemented something, but found no time yet the check the
workings or the the performance.
After a little break and some bug fixes … arbitrary order seems to
basically work, it needs more testing though.
Made a variation of he Average filter with direct frequency control (instead of
just exposing alpha). The set frequency references the - 3dB point. Filter falloff
is 6 dB / Octave, just as for the Average filter. The filter should work on
control and audio rate signals (Rate Smart).
Made a bandpass variation on this and then made a stereo verson of that one too.
I've used this one on the final output of a patch to trim off excessive lows and
highs a bit.
When in control rate mode the frequencies are off by the control rate decimation
factor (currently 8), the displayed value being too high. I should fix that by
displaying the lower frequencies, but as of yet there is no proper mechanism for
Added a new tab for generators (gen) and moved some of the 'sequencers' there.
This tab is meant to hold modules to be primaraly used for generative music. So
state machines, song generators, cellular automata etc. Moved some modules from
the control tab to te new tab as well.
Automata … well … just one automaton for now, but will likely make a
couple more based on the same underlying engine. This one is a rhythm generator
This module implements an 'elementary cellular automaton'. Each cell can have a
value of either zero or one. Three cells are evaluated according to the set rule
and this will yield a new value for a next generation cell. The rule number [0 ..
255] is being interpreted as a bit pattern which is indexed by the three bit
pattern generated from the three evaluated cells. This is all according to
Wolfram's theory about elementary cellular automata. The start state of the
automaton consists of one single cell having a value of one.
With the steps parameter you can set the number generations to be calculated, this
results in a bit string. On every step a next bit will be sent to the output and
when the end of the string is reached the sequence will wrap back to the beginning.
The Faults parameter sets the average number of cell faults generated for each new
cell calculated. The set number is divided by 10,000.
The total length of the generated pattern increases with two on each new evaluated
step, which results in length = 2 * steps + 1, which is odd always. The reset
input can be used to wrap back sooner.
The blue output has a weighted sum of the last three bits ( Bit[ anIndex] + ( Bit[
anIndex - 1] shl 1) + ( Bit[ anIndex - 2] shl 2)) / 8.0. The dir input when active
reverses the play direction.
Some rules will not generate any output at all (like rule 0 or 255), some will
generate simple repeating patterns and others willl be almost random. For some
rules the steps setting may not change the sequence much, for others a next step
may differ wildly from the previous one.
For some ideas about possibly interesting rules have a look at my rules page. At
some stage I may build some of the visulas into Wren , but not at this
stage. That page, at the very end, also shows an implementation of the algorithm
And another cellular automaton based module. This one uses Conway's game of life.
the curent help text says (subject to change though):
A Life based sequencer.
Based on Conway's game of Life, but there are some extra modes selectable from the
mode selector. The step input moves the cursor, which will put the cell values
from the curent column on the green outputs. The change input triggers a new
generation of live cells, according to the currently selected rule. The blue sum
output has the column sum of the cells under the cursor, this can be a binary sum
or a linear one. The grid can be set to be wrapped or unwrapped. In wrapped mode
the top connects to the bottom and the left side to the right. The fault rate
parameter determines the amount of faults made in applying the evolution rule.
When the number of cells drops below the low count the grid will be filed with
random values, the chance of a cell becoming alive is set with the rnd amt
parameter. The rnd button will fill the grid with a random patttern, obeying the
rnd amt setting. The clr button will clear the grid, this usually will then
immediatly set random pattern as the live cell count drops below the minimum. It
is possible to draw on the grid, a single click will toggle the cell state, with
shift cells can be turned on and using ctrl instead will turn cells off.
Using a right click on the grid the current state can be saved to or loaded from a
This a a pretty big module, and 32 rows seems a bit much maybe, but I've found the
game of life to be more interesting on larger grids. The current 32 by 32 size
seemed a minimum for interesting patterns to occur. And at the same time 32 logic
outputs seems like overkill as well, for the sum output it's a nice amount though
(2.5 octaves in the note modes).
Made an inhibit control on the change input to be able to stop rule evaluation,
and also made a 'Freeze' mode (in addition to the various ;ife modes) in which the
current attern will not change – this allows for painting sequences.
Now if only I could get the module to load itself from a patch file … it
would then double as a 32 x 32 (event) sequencer (the sum output can be set to
make note values though) … it also reinitializes on every module insertion
or deletion … which it should not do. But otherwise it seems to work well.
Ok, the save and load stuff works too now, but the mode has to be set to 'Freeze'
for this to work properly (or else the internal Life machine will have it's own
ideas about the pattern).
The new grid control thingie could be nice for other modules as well :-)
When Wren is closed the current patch will be saved in the
application's home directory (where wren.ex resides) as
'__l__a__t__e__s__t__.wren'. This file can be reloaded from the file menu trough
the 'Load last patch' item. For just in case … This is not saved in the
most recently used patch list (unless you manually open it; it will not be opened
automatically on Wren startup).
in version 2016.10.2.0
Added the Markov module, but it has not been fully tested yet, see remarks in the
'working on' section above. Also I did not implement the code for saving and
loading models yet – or rather – I did, and then the code changed, so
it needs to be done anew.
Delay module, in 'short' mode, does not get correctly initialized on patch load,
it seems fine on patch recompiliation though.
Or actually … several parameters were not updated in the synth after for
instance a range change on a mixer or when clicking an rnd button on a sequencer,
etc. etc. Fixed that, it was introduced with the randomization features in the
last couple of previous releases.
Made some new noise modules with Perlin like noise, in which the roughness can be
controlled and the pattern length. A clocked one and a free running one. New noise
values can be inserted to change the pattern. The maximum pattern length is 4096,
the length controls set a fraction of that. The number of layers can be set, more
layers give more smoothness, at the expense of processing time. The new input when
unconected is active, giving noise like behavior, when it is set inactive the
behavior is tone like. When made active less frequently it will change the timbre.
I'll probably make LFO versions for this too, welp, would like to at this time, it
seems like a slowly clocked one can make nice percussion patterns. Also I'd like
modulation of the length – ok, added that. Not sure how stricly Perlin this
is, I've tweaked the interpolation function from one layer to the next to more or
less give the same amplitude for smooth and rough settinging (but it is random of
With the above … there now are 200 module types.
And then when on the Perlin you do not set new values very often it makes sense to
have frequency control as well. The maximum sequence length was set a bit shorter
for this one (256 vs 4096 for the Perlin noise modules). This can make some nice
metallic or tone like noise sounds. I should add a button to the Perlins to invert
the new input. As it is now the new input is set by default, this is not always
I've added the invert option ( i(nvert) vs n(ormal), the latter being the default
value on the noise modules, the former for the tone module).
And another new module, Random scales … the help blurp says something like:
This module implements a scale randomizer. Each time the rnd input goes from
inactive to active, or when the rnd button is clicked, a new random scale mapping
will be computed. A scale will always have 12 notes per octave, and all octave
mappings will be the same (with an octave shift, of course). Within an octave the
12 notes will be randomly mapped to 12 (probably, but not guaranteed so, it's
random after all) different notes.
A simple arpeggiator
On each clock on the 'new in' input a new input sample is is taken and added to a
list of samples, the oldest value present will be dropped from the list then.
This list can be left unsorted, it can be randomized or be set to play the lowest
or highest note first .
The list length is set with the length control.
On each output clock on the 'new out' input the next stored value from the sorted
list will be output.
In random mode the order in the sorted list will be randomized when the playout
wraps back to the first value.
In unsorted mode the playout will be the recording order.
On the input side an acceptance filter can be applied. All incoming values can be
accepted, values differing from the previous value or values not present yet in
the list of samples.
The toggle input when inactive causes the selected sort order to be in effect and
when active the next sort order will be used. This can be used to toggle between
low to high and high to low modes, for instance.
When there are not enough input values available (yet) arbitrary values will be
clocked out until the playout counter wraps back to zero.
The reset input (or a global reset) will cause the playout pointer to be set back
to zero without changing any stored values.
And another new one, a probabilistic sequencer.
For each note the probablility with which it will be played can be set with a
slider (and this value can be multiplied by the value on the associated input).
Notes have to be be enabled before they can sound, and note enables can be
selected from a scale preset.
The presets will be dynamically loaded from a file wren.scale that must be in the
same folder as the Wren executable file. When this file does not exist
Wren will create it. After that you can edit it with a text editor
(like Notepad for instance) and Wren will not touch it anymore.
A selected scale can be altered with the note buttons, and such a change will be
saved with the patch (making the shown scale preset name meaningless, of course).
The rnd button will set a random probability distribution, the clr button will set
a flat distribution. The distribution can be altered with the tilt control. A zero
value means that there is no tilt, a positive value maked higher notes more likely
to be selected and negative values will produce more low notes.
A transposition can be applied to the selected scale with the trans(pose) control.
C is the 'neutral' base note (not leading to any changes). Transpositions are not
reflected in the shown note pattern. The low and high note controls limit the
range of possible notes.
The sm(oo)th controls determine the likelihood that the next random value is
about the same as the current one. So with a larger smoothness the results will be
Added noise type selection to various noise modules (OSC and LFO). The default
type is Linear (which was the only available mode bfore), the added types are
Gaussian (with a fixed sigma of 1.0) and exponential (with a fixed lambda of 3.0).
This affects the Noise, NoiseTrig, NoiseLfo and NoiseLfoTrig modules, but
backwards compatibility was maintained.
Added mode control to the Pattern module. A mode can be set on each step, it can
be normal (nrm), random (rn1), weighted random (rn2, or rn3) or skip. Normal
meaning that it will do it's full count. The random modes will generate a random
number [0,Count] and use that as the step count. The first random mode considers
all numbers in the interval, the second random mode only divisions by 2, and
likewise rn3 uses divisions by 3. Skip will just skip the step. Also added
individual step outputs which will go active when the associated step causes an
output pulse to be made. The step outs will produce a 'per step' copy of the main
Added clear inputs to arpeggiator and poetry modules to allow them to forget
stuff. These are latching inputs capturing a low to high transition. When they are
in the set state a next value to be clocked in will not be the input value but
zero instead. After having been processed the set state will be cleared.
Added an Amplitude / Ring Modulator module, which is a multiplier with control
over modulation depth and modulation offset. This makes it a bit easier to apply
less than full depth AM or RM to a signal. The input signal type can be set, and
it can do a fade between amplitude modulation (AM) and ring modulation (RM).
And made a simple pattern rewrite module for which a couple of rewrite rules can
be specified, and an expansion level. There is a small alphabet of the letters A,
B, C, D and E. For each letter a substututon is specified in terms of other
letters from the same alphabet. For instance, given the rules:
Then a number of expansion steps is speciefied resulting in patterns being
generated from the start symbol 'A'. With the rules above the successive patterns
- A → ABC
- B → C
- C → D
- D → AC
- E → B
etc. The maximum depth to be set is 8, which would result in a pretty long pattern
already with the rules above.
- A → ABC
- ABC → ABCCDEDEACB
- ABCCDEDEACB → ABCCDEDEACBACBABCDEC
At each positive input step a next symbol from the generated pattern is selected
and the corresponding output will be made active. At the end of the pattern it
will start again from the beginning. Some rules (or all) can be left blank for
simpler patterns. All letters must be from the set [A..E], everything else will be
ignored for pattern generation.
This is after an idea found at
RobotPlanet, which in turn references this article.
Decided to generate all 8 expansions whenever the rules change, which made it
possible to have depth modulation – which I've added.
Made a variation on the previous module generating values instead of events. It
also has a couple more rules to compose with. It adds a lookup system so that for
each active step a value is put out. The value knobs are mode controlled, one of
the modes being 'note value'. There are the usual dB and linear ranges too.
A common chain input is avilable which is simply added to the curent rule based
value, and then there are individual rule chain inputs which are added to the
ouput only when the corresponding rule is active – with this the module can
be used as a rule based multiplexer too (when all values are set to a neutral C4
or to zero, depending on the selected mode).
A TuneSmithy module. This is a melody generator after an idea by Robert
Inventor and it is explained here. The sequence can be arbitrary long in principle, but
decided to cap it at 1024 steps. The pattern is a comma separated list of integer
values. The second link above explains the inner workings.
in version 2016.8.21.0
When during live morphing new modules are inserted some odd stuff happens. Ok,
only when the module does odd stuff, see next item – the GVerb module would
crash. Ah, and modules get set to all zero values when inserted while live morph
is active. Aha optical mostly … the first variation gets set from the
default knobs and all other variations get set to all zeros, which looks confusing
in a live morph situation. Still it would be better that on insertion of a new
module all the variations would be be set the same – according to the
default knob positions. Ok, fixed that.
Live morphing when the GVerb module is present sounds bad (even when it is not
being morphed), for FreeVerb it is fine tho. Ah, it was being recreated all the
time even when the parameters did not change, and then it would crash. Ok, fixed
it. But there also is the issue that automation will change parameters that it
should not change. Ok, stopped that too.
Bug in DataGraph where the rightmost point would always end up top right (1,1)
even when it would not be drawn there. Fixed.
The active variation randommizer got mixed up a bit with the randomize function
from the morpher, unmixed that. The active variation randomizr is selected from th
e action menu or by pressing 'R' on the keyboard and it sets random values for the
current variation only. The randomize function for the morpher sets random values
for variations 2 to 6 (for quickly generating a handful of new genes).
Bug in ScaleQuantizer, the selected scale selection is not properly read rom a
saved patch, the buttons are OK though. Was an issue for all dynamic count
selectors and got introduced with the introduction of variations. Fixed now.
Oopsie .. the filter inversions used '-' for 'off' (which can not work anymore
after some changes on how dashes are handled for popup menus in relation to
automation) changed them to '.'.
in version 2016.8.20.0
Made a Time Of Day (Tod) module which is a saw tooth LFO with a period of 24 hours
synced to the local PC clock. So at 00:00 it's output value will be zero and at
01:00 it will be 1 / 24. The clock has millisecond resolution. The output value
may drift a bit as windows does time syncs when it feels a need – but it
will be the best estimate of the current time. A couple of level shifters and
ChebGen modules could be used to obtain signals that run faster. Like first make
the signal bipolar, then multiply by 24 (first by 12 then by 2 using two ChebGens
in saw mode) and then level shift it again to unipolar positive to get a signal
with a rate of one hour. Then the same trick with a factor of 60 to get minutes,
60 again for seconds.
Hmm … instead, I've just added a couple of outs for hour, minute and second.
Made a new option for the morpher, it can do a live morph over the breeder too
now. Normal morphing is between the left and the right morph and morphing over the
breeder uses all eight variations present in the breeder instead (when the breeder
is morphed with the Morph botton this is equivalent to the non breeder morph, but
when mutate or mate is applied variations will be introduced). This new option
tends to (depending on settings and actions) give more lively morph results (like
for the XY controls the dot can then move in a rough curve instead of in a
straight line only).
And made a new 'soapy' worm shape – how cruel it now seems to hold them in a
cage like this …
I've turned the morpher code inside out a bit, that is, I've made variations for
patches and based the morpher on that. Variations are stored with the patch, so
they will still be there after patch reload. As the variation values are stored in
the controls (knobs and such) now, this also means that module additions and
deletions do not mess up the the the worms for other modules anymore. All this
needs some work though still; the worms are not always updated correctly, and
there is an issue with XY controls loosing data or something – but it
stopped crashing at least :-)
Changed the randomizer as well, it now works through the same mechanisms as used
by the morpher. It will set random variation values for the active variation now
(which then in turn moves the knobs, the randomizer used to work on the knobs
directly (which would then change the current variation)). It is all a little
easier this way. Anyway … some more work to do on this.
Most stuff is working now, but drag-drop of worms is messy still … some
more work …
But it's not working well; turning some more stuff inside out – the
mutations are all carried out on the patch now and then update the worms, instead
of working on the worms and updating the patch. Let's see what surprises will
arise from that …
Ok, that goes better, it seems to all work now as it should – except for it
being very slow all. Not sure if its the editor updates or the worm updates
… there aree a lot of params that change on a live morph … more work
Improved the speed somewhat, still not very fast, but it will do I guess.
Livemorphs are controlled trought the lights update routines, that is not ideal
(as the tempo goes all over the place) and this should be changed. Ok, changed
that, it is currently updated at a rate of 10 Hz triggered from the audio
generaton rate (and so independently of the lights update rate). So this should
work properly for recording to disk as well. The exact rate may change later from
10 Hz, not sure yet, or make it a user pref maybe.
Live morphing works over the variations now, and I've removed the left/right morph
worms. When a left/right morph is wanted you can do a morph operation on the
breeder, then copy the worms to the variations and then perform th elive morph. So
with less options the same functionality is still available.
Added a couple of buttons to the randomizer / morpher screen to make copying
easier. Drag / drop now works properly as well. Moved the live morph options from
the randomizer to the main toolbar – turn auto mode on or off, and the morph
control knob. Morphing no longer changes any variations, instead there now is a
temporary variation which is being used.
Changed some keyboard shortcuts related to the randomizer / morpher and added some
(Ctrl+R still is recent patch reload).
- R - randomizes the patch (was Ctrl+Shift+R).
- Shift + R - toggles the exclusion visibility. (was Ctrl+Shift+Alt+R)
- Alt + R - shows or hides the randomizer window.
For changing variations you can use the keys 1 … 8, or they can be selected
by clicking on a worm in the toolbar or from the View menu. Variations can be
dragged from one spot to another, or even from or to the randomizer window.
Made it so that it is still possible to see all of the toolbar in the space needed
for four horizontal modules … which is like 1024 pixels. This would be a
practical minimum value for the horizontal screen resolution needed for
Wren (see image above). And also added the mutator commands in there
(as well as into the action menu).
Had to change the patch format again … not really for the variations, but
could not store the active variation with the patch in the current format. Made
the format a little more flexible again, so that future patch parameters will not
need a new patch format (which already was the case for control and module
parameters). Anyway, it's backwards compatible, but not forwards, as in: old
patches can still be read.
Made an Auto module which can perform Auto-randomize, -mute, -mate or -morph in
the same way the buttons in the randomizer / Mutator window do. Making this a
synth that can truly auto-mate!
The '-' avoidance code has a bug it seems … causing Wren to
hang in an endless loop on some patches when the randomizer is used –
investigating. Ok, solved that, but still saw dashes on morphing … fixed
Which … of course … introduced an issue for selectors having only
two values and no dashes at all, fixed that too.
module can not support randomization on the delay parameter. I disabled that. The
problem is that when delay and shift are changed at the same time invalid internal
values can occur. All automation has to be and was set disabled for that knob.
When a control was set to be non-randomizable, or non-automatable actually, and in
the patch it was stored to allow for randomization the red exclusion rectangle
would not show. Fixed that, and when such a patch is saved the control will be
saved as non randomizable too.
PitchShift module would produce denormals under some conditions. Probbly fixed it
with normalizing the linear interpolation code's output.
Gabe made some new bitmaps for the looks. I've made some new omes too — had
a lag of about 40. Looks file got updated to 2016.8.2.
in version 2016.7.27.0
Fixed the patch randomizer for selectors having '-' values (these are meant to
generate separators in the associated popup menu). Trough the menu interface such
items can not be selected, but the randomizer found 'm allright …
Ah, and clicking on a selector or using the cursor keys or the space bar hits them
as well. Fixed that too.
Made the Pad, Spiral and DataGraph modules randomizable.
I'm working on a patch mutator, it's very much like what the G2 has. Still some
quirks to iron out on that, like what to do when the patch gets modules inserted
or deleted. The current implementation does not handle that as it should. Also the
images seem to not always be drawn correctly. Ok, found the issue, I'm misusing,
sort of, some selectors as indicators (on the ScaleQuantizer). This means that the
chord selector has to be disabled for randomization. It should maybe also indicate
that the key selection does not map to the selected chord anymore. But then again
… I could just consider the selector to be a preset selector only, not
reflecting the actual state. On a patch reload the actual keys will win anyway.
I may change this when i get ispiration.
I've made a FAQ entry for the morpher / randomizer.
The forum thread is here, it may have some info not listed here.
Made the mutator work for Pad, Spiral and DataGraph too. There are some issues
with the DataGraph, as points can be added to or removed from it. This means that
the number of data points present in the mutator may change. What I did for now is
that such a situation is detected and the mutator will be re-initialized (which
looses all the current worms in the mutator, making a random set of new ones, and
the scratch area will be cleared). Module insertions and deletions are handled in
the same way.
Added two extra worms to the mutator, a left and a right morph, and a knob to fade
between these two. Also added a modulation option to the knob, and a new module
which can do the fade from the patch. This works at the lights rate, which is user
controllable, but it can not be very fast nor can the exact timing be very
predictable, as a lot of screen updates need to be done. Still for slow morphs
between two variations it would be nice. It is possible to have more than one
LiveMorph module in the patch, but things may get a bit jumpy with that.
The randomization exclusion works for both the randomizer and the mutator in the
same way. There is a keyboard shortcut to visualize the exclusions, and also when
the randomuzer / mutator window is active exclusions will be made visible in the
patch (with red rectangles around the excluded controls or modules).
Made it so that when patch randomization is requested (as opposed to single
control or single module randomization) and there are no modules selected, that
all (randomizable) modules are randomized.
Changed some code for the components introducing a couple of interfaces for them:
IAutomatable (for MIDI control), IRandomizable (for plain randomization) and
ICollectable (for controls that can contribute to the genome used for patch
mutation). This makes things a bit easier to program, I hope … it was quite
some work. Please note that non automatable controls can not be randomized either.
In general anything that needs patch recompilation can not be automated or
in version 2016.7.23.0
Made a scale control for the Reverb module. It sets the internal length of the
delay lines to some factor of the original length. This alters the color and
buzziness of the reverb. As the lengths of the internal delays are modified a
change of scale needs patch recompilation( e.g. a change causes a brief silence).
Added an End Of Cycle (EOC) output for the AHD and ADSR envelopes. When fed back
into the trigger input turns the envelope into an LFO, but can it be used to chain
envelopes as well such that one triggers after another.
Moved the Constant, Amplifier and Ratio modules to the Math tab. This distributes
the modules a bit more evenly over the tabs.
Working on a patch randomizer. Randomization is possible on Knobs, Sliders and
Selectors. It is possible to randomiz a single control, all controls on a module,
or al controls on a selected set of modules. There will be options to dissalow
randomization on selected modules and on selected controls. The action menu will
get an option to make visible the modules excluded from randomization.
Made a randomizer control wimdow to make it possible to exclude module types and
control types, partly by category.
For the randomizer I had to change the patch format to allow for a new module
parameter type. Old Wren patches can still be read by the new
Wren but new Wren patches can not be read by old
Wren versions. I did make the change in such a way that in the future
it should be possible to add new module parameter types without altering the patch
version. This already was the case for new detail (knob etc.) parameters. Old
Wren's should then just skip the paramaters they don't know about.
in version 2016.7.4.0
Made a popup menu for the DataGraph, or for it's DataMaker component rather. Some
wave shapes can be selected and some basic operations on the data can be selected.
With the symmetries there are some duplicates in the operations, like a Bell
shape is the same as a vertically flipped cosine, and for the squares there are
some duplicates as well. Added load from file and save to file to the menu. Added
a left — right adjustment feature as 'make loopable' to the context menu.
MixMS8to1 and MixM16to1 were not working without modulation signals being
connected, fixed that.
The timer controlling the lights and VU meter updates is started in running mode.
When the startup is slow for some reason this may cause the VU meters to be
updated from non–existing objects. Fixed that by disabling the timer at
startup, after each patch compile it was turned on already, so things should be
all fine once an actual patch is present.
Decided to make all timers inactive during startup to enable them only in
FormShow or even later — when needed. Also typed some extra checks around
the VU meter calculator objects to see if they were allocated before being used.
MIDI TX messages were logged from the audio thread directly (when logging was
enabled), which was a bug. Fixed that.
Error in DataGraph module. It was meant to react to double left clicks or
ctrl+left clicks by adding a new data point, but ctrl+double left click would add
two points and would then mess up the order of the points. Fixed that and checked
at other places if such a problem could exist elsewhere – did not find such
There is some debug stuff left in the looper module (like the light), this should
be removed once the thing gets settled … which currently it is not.
Delayed help file creation a bit so that the looks are completely set up before
the images are being created – image previews on the module selector look
Made the trigger LEDs for the envelope modules light up 125 ms always, even for
very short trigger pulses. Some more will follow as some modules output very short
trigger pulses that could not been seen on all input lights. This also means that
for a non changing input signal the light will go off after a while, it will only
show the trigger moment. made an error in this making the sample and hold turn
into a track and and hold … and fixed that again.
It may be the case that there is a denormals issue for the Formant2 module,
running some debug tracking on that, but lost focus … focussing again
… After 10 or 11 hours of runtime on a patch, yup, got a denormal report,
looking into the why now, it is on the output signal, should not be possible
inspecting the code, odd.
Restyled the module documentation a bit and added a link to it in the main menu of this page.
Also for newer modules I started to add links from the module images in this page
to the documentation page (meaning that module images here are clickable now).
Also fixed some inaccurate help text.
I've started using a mark–down processor for easier markup of the generated
help file. See the Acknowledgements section for
more on this. This will allow for clickable links in the help, better looking
lists, etc., Expect more help restyling.
Changed some things for popup menus. They should now popup near where the cursor
is instead of near where the top–left of the control happens to be. Also in
the patch editor I've made the menu key work for the element the mouse cursor is
Moved wire toggling and wiggling from the edit to the action menu, keeping the
same shortcuts (Ctrl+space bar and Ctrl+W)
Made three new mixer types MixQS2to1, MixQS1to1 and QuadPan (which actually is a
panner, but it's on the mix tab …). Although these do have blue connectors
they are intended to be used for audio mainly and when audio signals get connected
the connectors will change to the audio rate color. The panner uses an equal power
distribution only. The mixers allow for 24 dB of amplification.
Made an audio to control rate converter, which can be used to keep large areas of
a patch from becoming red.
Added a 'retrig'(ger) option to the LfoTrig module. When set into retriggerable
mode and when the trigger input goes inactive and active again during the current
pulse train the module will be reset to start the train anew. The default setting
is 'normal' for compatibility with older patches. Together with the DataGraph
module this could be used to make retriggerable arbitrary envelopes, for instance.
Hmm … not quite … anyways …it seems useful … maybe.
Added a Polar
module, it translates rectangular coordinates into polar coordinates.
Added a Rectangular
module, it translates polar coordinates into rectangular
Made a stereo version of the looper. Igt still has the drawbacks of the moneo one,
but really wanted stereo.
Added a Spiral module, an experiment really. Per spiral winding of mouse movement
a settable amount of note steps is added. Along the positive X axis the white
places correspond with the steps. As this internally works with polar coordinates
I made outputs for the angle (phi) and distance / radius (norm) as well. The len
represents the spiral length for the current (X,Y) location (from which the note
output is calculated). So at least it doubles as a Polar sort of Pad module. (But
the latter can also be done by adding a Polar module after a Pad.)
Added an unattenuated frequency control input for the Lfo, SquareLfo and RandSig
modules. This makes it easier to add overall speed control to a patch.
Added an MConst module for selecting some more or less often used mathematical
constants, like 1, 2, e and 𝜋 etc.
Added a 'wrap' mode to the DataGraph module, the standard behaviour was 'clip',
which still is the default. In clipped mode an out of range input value will clip
on one of the graph edges and in wrapped mode it will wrap around and come in on
the other side again (modulo operation).
Added f(x)=x·𝜋, f(x)=x·2·𝜋,
f(x)=x∕𝜋 and f(x)=x∕(2·𝜋) functions to the
Monadic function module. Also added f(x)=floor(x), f(x)=round(x), f(x)=ceil(x) and
The Pad and Spiral module did not set their output values after a module load or
patch change, it needed a movement first – I've changed that. I may have
thought this to be a feature for the Pad module, but for the Spiral it was just a
Removed all the all-too-obvious email addresses from the web page and
Removed some unused stuff here and there from the code, making the executable a
Added some volume damping around patch recompile operations, the worst of the
recompilation click is out now.
I've made an option to disable automatic doc file generation. This option is off
by default (so docs will be generated out of the box), and this feature will only
work when you use the old wren.ini file, e.g. when you copy the new executable
over the old one (or copy the old ini file to the new location). You can always
manually generate documentation from the Settings Screen [F3] by using the
'generate documentation ...' button there. Note however that when no docs were
generated the popups from the module selector will not show a module, or an old
version of the image.
I've added commandline passing of a patch file name. You can now associate
Wren with '.wren' patches in windows such that double clicking on a
patch will open it in the Wren instance that got associated. It is
still possible to run multiple Wren instances, but they will have to
run from different directories now, and patches opened through the explorer will
always open in the associated instance. When starting Wren directly it
will still open the last patch it had loaded as well. BTW it is possible (it has
always been) to copy patches, or parts of it, from one Wren instance
to paste them into another) or into a text editor, or whatever program that will
in version 2016.6.5.0
Changes in text controls and data graphs marked the patch for needing
recompilation which was overkill. It should have been marked for change only.
Changed that, and internally renamed some 'PatchChanged' stuff into 'Recompile'.
While all modules seem to be properly execution locked now during heap operations
the patch as a whole was not locked. Changed that.
MIDI CC assignments to knobs are not working properly – CCs move the knobs
alright but the synth value is not changed. Ok fixed that, but now on very fast
MIDI I'm getting all kinds of memory issues. Ok, that actually is due to some
errors in MIDI transmission – it was doing memory allocations from the
audio thread. Ok, four bugs fixed in this … messy, but fixed now.
Added exponential FM control to looper. Oh that it was no longer clicky was a
mistaken observation, with long loop times or record being off it is not too
noticeable maybe. And a remark about the interpolation mode, all pass mode is not
to suitable when the interpolation point moves relatively fast, that is for
in version 2016.5.29.0
in version 2016.4.27.0
There was a bug in how the selectors worked, setting the value to zero by clicking
on the selector instead of using the left mouse click popup menu would not set
dependent modes correctly. Fixed that.
There was an error in the stereo RMS calculation used for the compressor. It
calculated the RMS of the sum of the left and right signals where it should have
calculated the root mean of sum of the squares. Changed that, it works better this
Fixed the range setting for the MixMM16to1 module.
Changed the looks a bit for this web page, checked the spelling for it (and for
the module help) a bit better, updated the online module docs and updated some of the module help
I've made the IntDif module rate smart, it would not otherwise differentiate
control rate signals the preferred way. Also added a gain control for the
integrator to make it possible to avoid clipping. Also made a horizontal slider
control type for this. Transparency acts on the differential output only and gain
on the integral output only.
Adding RMS mode to the envelope follower module. Note that in RMS mode the RMS
averaging filter time is set from the Attack time, which is a bit odd, but setting
it from the Release time seemed even less even.
Added a 'saw' mode to the ChebGen module. The image shows this mode for the order
five output for some standard input wave forms. Basically this is:
out := FloatMod( N * ( in + 1), 2) - 1;
This would 'sort of' work for non integer N as well. Will make a separate module
for that, the SawMill module.
(Also changed the graph colors back to something a little less psychedelic.)
Added the SawMill module. This module is rate smart and will switch to audio rate
when such a signal is present at one of it's inputs. The frequency multiplication
proper only works for integer multiplication factors, for non integer factors it
is more like a PWM effect on a sawtooth wave (that is the 'sort of' disclaimer
mentioned in the lemma above). This is quite a nice effect on sine or triangle
waves as well. This is a naive implementation … up to like 200 Hz this is
sort of OK.
Example output for the SawMill with modulation in the range [1.0, 5.0], controlled
by the red triangle wave. The blue signal is the input saw and the green signal
the frequency multiplied saw:
Added pulse modes to the divider modules. They can now give a square output, a
pulse output (a copy of the current binary value of the trigger signal) or pass
the analog trigger signal's current value when it is larger than zero and false
when it is not. The output level to be used for falseness can now be set on the
divider modules too – see next lemma.
Added output level selection to some logic modules. The default mode will always
be bipolar and non inverting to be compatible with the old situation. Any lights
will still show the internal logic state independent of the selected output type.
Added this for the divider modules as well now.
Added a 5 to 1
and an 8 to 1
stereo mixer to save some screen space in patches with many stereo mixers.
Made a phase distortion module, after an idea found here. The input signal is fed into a (short) delay line, and
the delay time is being modulated with a low pass filtered copy of the input
signal. The modulation depth can be set and modulated by an external signal. In
addition to the modulation from the filtered input signal The delay time can be
modulated by an external as well. The filter Q can be set and it's cutoff
frequency can be set and modulated.
Added Hysteresis to the CubicClip module, and moved it from the Control page to
the FX page (but it still can run at control rate as well). The default Hysteresis
value is zero for compatibility with old patches. It is very possible to let this
module clip now into one of it's two extreme states due to the positive feedback
used for Hysteresis control. I'll consider this to be a feature.
Added an option to choose between two modes for the fractional delay calculation
in the KS module. It used to have linear interpolation only, but can now do
all-pass interpolation alternatively. The difference is a bit more subtle than I
had thought it to be, but still may add this to more delay based modules.
Added an AllPass filter, which is a delay line with feedback and feed forward
around it. The feed amount can be modulated, which moves the frequency for the
'halfway phase shift point'. As it is a delay based algorithm it ended up on the
'delay' page. The delay time is specified in (whole) samples, so the actual delay
time depends on the currently set sample rate. I put this in mainly to do some
more experiments with phase distortion on arbitrary signals, it may be useful too
for reverb experiments … or to help make stuff LAWDy like (by smearing out
peak energies a bit for impulse like sounds).
Added a Rungler module. This is after idea from Rob Hordijk. It is to be found
amongst the logic modules. The idea is to let the Rungler control the frequency of
an oscillator where the output of that same oscillator goes to the data input of
the Rungler. The clock input is then clocked by an LFO, or faster for weird
effects, and from this little semi random patterns will emerge. For more info see
http://hordijk-synths.info/ (which is not Rob's own website). It is nice to
put some note quantization into the frequency control feedback loop (for tuned
patterns). This module is rate smart, it will switch to audio rates when needed.
I've made the number of taps used settable as well as the shift register length.
It is possible to set the number of taps larger than the length of the shifter,
this will result in non proper working. Default settings are 8 shift steps and 3
taps, like the original circuit has them. The output value is scaled with the
number of taps to always have a range [0.0, 1.0], and after that a final level
scaling is applied.
Added some measurement ranges for the Value display module. Possible settings
currently are : 'units', 'dB', 'Freq', 'Note', 'Lfo fast', 'Lfo med', 'Lfo Slow',
'Lfo BPM' and 'Lfo Lin'. All ranges assume the associated module parameter to be
set to it's minimum value and the modulation input to be fully opened for a
bipolar control signal. I.e. for the LFO fast range it is assumed that the speed
is set to it's minimum value (0.254 Hz, knob position 110) and that the 'fm'
control knob is set to the max (1.000).
In the image shown the current cycle time for the bottom LFO will be 10 minutes
and 36 s. (The top LFO provides the modulation for it.)
Made a logic pulse delay module which can either delay an incoming pulse or
stretch the length of it. The delay/stretch time can be set to the same ranges as
available for envelope times, and it can be modulated.
Added positive and negative Q modulation to the SVF filter.
Made a tap control … as in tap twice and it gets the tap rate from that to
control LFOs with, or delay times. There is a rate multiplier which can set a
factor of the tap rate to be applied to the control output. Also added a slave
input and output to allow for chaining of Tapper modules (so one can be in LFO
mode and another in DELAY mode,or a different rate multiplier can be used). Tap
rate can be set by clicking the mouse on the tap area or when the keyboard focus
is on the tap area (when it has a red colored border) the space bar can be used as
well. It is also possible to set the rate with a knob, or by typing it in
There is a sync output which goes active on every tap action, and also the sync
button can send a sync signal independent of the tap control (this is meant for
resetting LFO's, for instance).
An example patch for the tap control:
in version 2016.3.5.0
2016-02-20 : A user reported that when the windows theme is selected the text
used on the module selector tabs is too large (not fitting the buttons). The
styled font drawing for the module selector is a bit tricky, made a change to
TKnobsModuleSelectorStyleHook.DrawTab which might help, at least the font is
controllable then from the form designer … and no longer defined by the
component's owner, so should be fixed to 8 point Tahoma now.
Fixed the memory leak in the TextSequencer module, it was present after all.
A new module, the Pulser. This is after an idea from Ian Fritz. This
module only implements the pulsing bit though, and not the wave wrapper. The
pulsing works by letting trough the 'signal' input when it's absolute value is
larger than the 'shape' input value. When this is not the case the output is
zeroed. To get the full implementation of the Wavolver the 'inact' output could be
used to control mixing in some other signal, for instance from a wave wrapper
module. This output goes active when the main output (out) is inactive (zeroed).
And another new module, the Formant2. This is a formant type of filter, or a vowel
filter, for which presets can be loaded from a file.
Sofar I've typed in formant sets named swedish, usa, french, csound_alto,
csound_bass, csound_countertenor, csound_soprano and csound_tenor. See the
supplied wren.formants file for details. Not all formant sets are equally well
specified, only the csound ones did specify levels and bandwidths.
The filters used are second order State Variable Filters used in bandpass mode,
one for each formant. Bandwidth is being set by calculating a Q value and applying
that. When no bandwidth was specified a Q of 10 will be used.
in version 2016.2.14.0
Tested Wren with the JACK Audio
Connection Kit, looks like it is working fine here, but note that you'll need
to select some channels to be used from the audio setup. I've added a FAQ item for this.
There is an issue with MIDI connections, when the server can not be found there is
an endless amount of popups telling so. Ok, fixed that, and a couple of other
possible ways for the NetMidi connection to go haywire. When something fails
unexpectedly the auto connect feature will be turned off now, and error messages
will go into the log instead of into a popup window.
There is an instability in the Formant filter in that it makes huge signal levels
when modulated at audio rates. Ok, can fix this by setting the update rate lower,
at a tenth of the control rate it seems to behave better – set it to 1 / 20
to be sure and at 44k1 this still seems smooth enough without filtering (update
rate is then about 275 Hz).
An idea came in to make double click on a cable work like ctrl+normal mouse click, i.e. move or delete a connection.
This was supposed to be working, but the double click was tested at the wrong
point in the code, fixed it.
Added an average (avg) output to the Median module, it outputs the average value
of all samples present in the sample bin. This provides a linear moving average,
as opposed to the exponential type the Average filter and the Slew module use.
Added a simplified version of the Karplus - Strong oscillator. This one uses less
CPU, the noise stuff went out and modulation update frequency was lowered to
control rate. Also the brightness modulation was removed.
Changed the data buffering for the scope module a bit, seems to work better that
in version 2016.1.24.0
Thanks to Gabe I found a bug in the sample rate switching mechanism. Or two
actually. First one would freeze Wren when using legacy audio and
switching the sample rate. Second one caused general protection faults in the
PitchShift module on a sample rate change. I've fixed those.
Looks like I fukt the math modules … if they ever worked … something
to look into. Ok, it was only the monadic function module, fixed now.
The Third filter had some trouble with denormals, changed the code a bit, this
affects all the multi-filters.
Solved the no-drag issue with module imports. Also made a distinct module import /
export folder to be remembered over Wren sessions. This introduced a
problem with regular module insertions … modules sometimes jump to silly
places now … will need to check that. Found a quick and dirty patch for it,
this will need some more attention at some stage (as the underlying issue is one
that has been present for a long time already), but it's fine for now.
Module import and export:
Made regular patch folder and template folder to be remembered over
Added an Alternates item to the module pop menu, this can be used to change the
type of the selected module. After the change it will try to reconnect the module
(based on connector names, where they exist in both the old and the new module)
and it will try to copy over parameters from the old module to the new one (based
on control names, where they exist in both modules). Wire and parameter copying is
not always possible however as there are some naming inconsistencies between
modules (and to solve those would mean old patches can not be read anymore, not
naively at least).
And while at it … implemented non strict parameter paste as well, where you
can copy over values from one module type to another type. Only the matching
parameters (name based) will be copied in that case and the rest will be skipped.
This fuzzy parameter pasting can only work from one module to another.
This does not really work like I'd want it to work yet … it needs some more
Added peak / RMS mode selection to the compressor module. It used to do peak mode
2015-09-24 : Different distribution laws for panner, say power law or volume law.
Added some different fading curves for the XFade and Pan modules: linear (equal
volume), square root, sine (equal power), sine squared (s-shaped) and squared.
Added a mixing level scaler, an "attenuverter'" like thing. The
MixingScaler is on the Control page.
Added a a stereo widener module. For signals that are stereo already the base can
be widened by raising the inversion amount, this adds a bit of -L to R and a bit
of -R to L. For signals that are mono some delay can be added, amount and delay
time can be set. Modulating the delay time will result into a flanging effect.
This module can be found on the FX page.
Added a smaller mono mixer, taking less patch space. It has one input less than
the other mono mixer, but is still modulatable, mutable, chainable and rate smart.
The MixM3to1 module can be found on the Mixer page.
Added a volume control, with a preset, a mute and modulation. The Volume module
can be found on the Mixer page.
Wren is now four voice paraphonic or limited polyphonic! Added a couple
of note stealing algorithms 'none', 'cyclic', 'softest', 'oldest', 'lowest' and
'highest'. I've added level inputs too, note stealing can use that information
(for the 'softest' mode), these could be connected to voice envelope outputs for
instance. You'd still need to patch out the voices manually. The MidiMultiNoteIn
module can be found on the I/O page.
Added an RMS module, calculating the RMS value of it's input signal. The averaging
time can be set with the time control. The RMS module can be found on the Math
Was asked for a utility module just displaying the value on it's input, made it
and it can either show units or dB values. The Value module can be found on the
Added a soft clipper with a cubic transfer function.
in version 2015.12.15.0
The Hrast filter had a denormalization issue for the 24 dB section, added
normalizing code there.
LevelConverter was not working properly, it took the input mode setting for both
the input and the output mode (and so it acted like a .. wire).
Removed some the InternalName stuff, there were two mechanisms with one not being
Cleaned up the source code a bit by removing unused pascal units.
The previous distribution had an old version of the executable in it – fixed
New module type, a ScaleQuantizer, which is a NoteQuantizer with user definable
The presets will be dynamically loaded from a file wren.scale which must be in the
same folder as the Wren executable file. When this file does not exist
Wren will create it, after that you can edit it with a text editor
(like Notepad for instance) and Wren will not touch it anymore.
And yet another quantizer, a modulatable one. That is, the quantization steps can
be switched on or off by both a selector and a logic input signal (the logic xor
of those two signals). This one is a lot of fun actually, it can do trills for
Changed the input level control for all note quantizers to be an input range
control with a value to be set in semitones. This will not affect existing
patches, just the displayed value changed to something more intuitive. The default
range did change from 128 semitones to 48. The range can still be negative
(meaning that an up going ramp for an input would result in a down going note
sequence to be generated).
Made a chainable chord sequencer. This one outputs four note chords for which a
degree, a type an inversion and a base octave can be set.
Which chord is to be sent to the output is selected by the active inputs, the
leftmost active active input wins. Four gate outputs are available to control
envelopes, for this to work properly a gate input (which determines the length of
the logic output activation) has to be provided.
For chaining the logic inputs and the signal inputs are to be connected to the
respective outputs of a previous module. The last module in a chain having an
activated active input will be the one sounding. The activation inputs could be
controlled from a binary counter set to seq. mode, or probably a gate sequencer
would work as well. The logic in-outs are the ones closest to the indicator
The chords can be transposed with the transp. control, this only works on the
local chords and not on any incoming ones.
A slew control is present to get some gliding effect on the note changes, this
works on the local notes as well as on the incoming ones.
I'm not to sure that the chords played are theoretically
correct … if there even is such a thing, please inform me about any
mistakes I made – I'm not too good at this and basically just googled up
And a slew rate limiter, or lag, or control rate low pass filter. This actually
does the same thing as the Average module, except that the knob action is
reversed and that this is a control rate only module. And with that … this
text became longer than the code used to implement the module.
in version 2015.11.4.0
This version does no longer make use of the 'bitmaps' folder that the previous
version used. Instead there now is a folder 'looks' which has a sub-folder for
each selectable 'look'. This version comes with two pre defined sets, the default
one and the gabe one. The gabe one was made by … gabe, also known as
LfoHead on the electro-music.com forum. Thanks Gabe, great job!
As almost all coloring is user configurable now … all color references in
this document will be according to the default coloring scheme. Except that I have
substituted the color green by lime (bright green) in that scheme (which it used
to a long time ago as well … on a darker scheme Lime seems better visible
10-03 00:09 Octangula -> Blue_Hell: is it just me, or does the knob control mode
setting not make any difference?
Ok, the modes do work on modules but not on the other knobs, like settings and
main volume control strips. Fixed it for the next release – the code to do
it was never present … forgotten.
2015-10-09 : When a module with a MIDI assigned control is removed from a patch
the MIDI connection is not deleted, resulting in GPFs … Likewise, after
that got fixed … when undo is used after a module with a MIDI assigned
control was deleted … that CC does not work, although it is still shown to
be present with a blue border. Ok, fixed that too. Apart from that there was yet
another bug, CC's were never properly unregistered, also fixed now.
OSC sync was not working properly anymore, it sent a message /sync where it should
send /*/sync to match any listening synth, fixed that. Had not tested this
apparently after I incorporated the synth name into the OSC system. Likewise, the
the OscMessage module did not send a synth name (while expecting it in listen
I was not going to make any new modules for this one … but thought a
fourfold multiplier to be handy … so here it is, taking half the space of
And another one crept in … a 16 to one mono mixer with modulation controls.
Trying to make a more general look and feel settings control.
Look and feel is stored into a 'looks' sub directory of the Wren application directory, each theme goes into it's own sub folder there. These
folders can contain a set of bitmap files and a configuration file 'looks.ini'. On
loading a a look and feel preset the bitmaps will be loaded from the selected
folder and set as the application bitmaps. The file 'looks.ini' is then read and
any settings in there will override the settings as read from the normal ini file,
including the visual theme specified there. You can still override some settings
after loading a preset, and these will be stored in the normal ini file. The
'looks.ini' file will be overwritten by Wren only when explicitly
requested (by using the 'Save as preset ...' button). For example:
The following items can be customized (and can be stored in look and feel
Each module has a bitmap associated with it, when a bitmap file is found in
the looks folder that bitmap will be used. Bitmaps have to be named like
<ModuleName>.bmp for this to work. The bitmaps should have a size
of 21 by 21 pixels. I will supply example files as part of a default looks
Some bitmaps used by the modules can be overriden, this concerns the following
items (I will supply example files as part of the default looks set):
These bitmaps will have to be 'approriately sized', except for skin_module
which will be stretched as needed.
The following patch related colors can be changed from Wren directly:
- Editor background color
- Module color
- Connector border color
- Selector color
- Selector border color
- Selector border color single
- Display color
- Display border color
- Knob MIDI color
- Knob focus color
- Knob MIDI and focus color
- Viewer color
- Viewer border color
- Viewer line color
- Viewer fill color
- Indicatorbar peak color
- Indicatorbar valey color
- Audiorate color
- Controlrate color
- ControlrateLogic color
- Logic color
- Unconnected wire color
- Wire highlight color
- Module group I/O color
- Module group OSC color
- Module group LFO color
- Module group Env color
- Module group Filter color
- Module group Switch color
- Module group Mix color
- Module group Control color
- Module group Note color
- Module group Math color
- Module group Logic color
- Module group Seq color
- Module group FX color
- Module group Delay color
- Module group Utility color
A visual theme can be selected, this mostly is for the non editor related
visuals. Currently user made visual themes are not supported, it seems to be
possible to arrange for that though. Anyway, several themes are built in.
Guess it will survive the coming winter with all this fresh paint :-)
in version 2015.10.2.0
A multi compare module, after an idea I found here. Added individual outputs in addition to the bus outs,
added random and clear buttons as well. Moved the module from the Sequencer to the
Logic page … not sure … but hey, there is a module search function
Moved the Pad module to the Utility page and added a new Knobs4 module there too
– featuring larger knobs and memo fields to be able to give some information
about what the knobs do. Added a switches module as well, same idea. And buttons,
for momentary switches, with indicators lighting up when a pulse starts. The
button out's are active for 1 ms, the lights for 125 ms.
Added a simple level conversion module, direct translation of input range to
Made a new Math tab for the module selector and moved some modules over from the
control tab to the new one. Added some new math modules there as well.
Current monadic functions are x2, x3,
x1/2, x1/3, sin(x), cos(x),
tan(x), asin(x), acos(x), atan(x),
2x, ex, 10x,
log2(x), ln(x), log10(x),
2x/12 and 12 * log2(x). Invalid domain values
will output zero.
The current dyadic ones are x mod y, xy,
logx(y) and atan(y/x). Invalid domain values will pass on
More may follow.
Made the Space bar work on focused selectors (red border). It
will select the next value or when out of values the first one. This also works
for momentary switches (buttons, each hit on the Space bar will
pulse it then).
Fixed the lockout mechanism which must prevent module's real time execution during
memory allocation and de-allocation. This should cure some issues like access
violations or Wren stopping audio generation or knobs stopping to be
responsive, stuff like that, which would still happen under some conditions with
modules like the filter banks. The mechanism used only gives just a smidgen of
performance loss (full fledged synchronisation degraded performance by about 20%,
which made me prefer some instabilities) … I reasoned that the dirty trick
I used should be ok, may it be so :-)
As a consequence: Starting a second instance of Wren does not stop
audio for the first instance anymore, as it occasionally would do.
As a consequence: It should no longer be needed to restart Wren after a
sample rate change was made in the Settings Screen [F3].
As a consequence : It should no longer be needed to stop audio generation before a
sample rate change is being made in the Settings Screen [F3], the change
restrictions that were present have been removed. Wren needs to still
stop and restart audio to make the new sample rate work, but it can automate that
As a consequence : Removed the option to not use PortAudio when it is available
from the Settings Screen [F3]. This option can still be set from the
Wren ini file though (set 'UsePortAudio' to 0 (zero) there).
Changed the way output to input links are followed in a compiled patch. These are
now traversed from the modules themselves instead of from the synth patch. Not
only is this a tad more efficient, but once the compiled modules get properly
sorted as well, signals will have less delay trough the patch. Right the modules
were properly sorted already – great :-)
Module execution order is top to bottom and left to right. Which means that signal
flows from top to bottom and from left to right should have zero samples of delay,
and reverse direction links should have one sample of delay.
The lost feature is that in debug mode wire performance is no longer profiled
separately, it has become part of the module execution time. But then again, there
is no profiling support for release versions of the code.
Also feedback behavior in existing patches may have changed.
Changed the drawing order for the graphs, the leftmost output (channel 1 L) is now
Made help file generation automatic at program startup. The code will check the
version information and new files will only be generated when needed. This also
means that the image cache used for module previews in the module selector should
always be up to date now. The popup asking for confirmation on writing out the
help has been removed. It also means that starting up a new Wren version for the first time will generate some 'nervous window stuff'. I have no
solution for that yet – in order to generate a proper module image the
module has to be made visible, or some controls will not be painted correctly.
Forgot to actually update the patch version to 4 in both source code and for this
page (should have done so for version 2015.8.21.0), fixed it now.
Moved some controls and indicators from the I/O level pane to the top control
pane, and made the module selector resizable with a splitter bar.
When the buttons do not fit the width of the page in the module selector a left
and a right scroll button are added.
Also made a toggle on the visibility of the top pane as a whole, accessible
through the view menu and using Ctrl+T as a keyboard shortcut.
Currently the module finder has to be disabled when the top pane is not visible
– could maybe add a modal dialog for that later on.
So can do this now:
Made the CPU overload indicator larger.
Fixed some minor issues with displaying the file render status. Audio generation
will be restarted now as well when rendering was stopped (when it was on before
rendering was started). Changed the render indicator to be a slow green flashing
Added a context menu for the patch editor. It can be used to insert new modules
cut, copy and paste modules etc.
Changed the default sample rate to 88k2, that's just the 'out of the box setting',
an ini file present will override this.
Fixed the file history (menu File/Reopen) such that the files are actually listed
according to when they were last opened now.
Fixed the issues with menu shortcut keys, the original issue text was:
2014-12-13 : Ctrl+A in the Debug Screen [F5] selects all modules
in the editor … and more keyboard shortcuts go wrong there … like
Ctrl+C copies a patch, not handy.
The solution also fixes the issue with the Del key not working
in the popup editor for displays. The module title editor had the same issues,
fixed those as
Changed the way the Enter key works in display editors. Some
editors are multi-line and those will need the Enter key as
part of the text to be edited but most are single-line, and will accept a plain
Enter now for confirming the edit and closing the popup (as it
already did for the display title editor).
Re-grouped the items in the file menu, changed some other menu's as well.
Added a toggle for sound generation, Ctrl+D. This is
accessible from the action menu too. When active all sound outputs are muted but
the patch will stay in a running state.
Added a toggle for lights updating, Ctrl+L. This is
accessible from the action menu too. When active the indicator lights on modules
are disabled. This can save a little processing time, like 15% or so. Note that
the lights update rate can be changed too from the Settings Screen [F3]. This is
not very useful when PortAudio is being used, as in that case the lights update
process runs not on the same thread as audio processing. It would help a bit for
legacy mode though.
Also improved the speed at which the lights are handled – this used to work
with formatted strings that needed to be made and parsed, now just passing around
pointers to records with t the detail information. Also pre parsed the names of
the lights for faster comparison during the update process. Did the same for all
other data gathered for the editor from the synth, but lights are processed most
often. This could maybe be sped up more by letting the synth broadcast changes,
but it would need to maintain some state then and a synchronisation queue would be
needed. Prolly not worth the trouble.
Added 'panic' control, Ctrl+P. This will stop all pending notes
from MIDI inputs and from the MIDI player. This is accessible from the action menu
too. MIDI input modules will listen to a MIDI AllNotesOff command as well.
Made it so that when a knob or slider is locked that a rnd or clr button will
leave it as is.
There was a kludge used for the GVerb module to make the spread control work more
or less properly. That kludge was based on the lights timer, so when the lights
are disabled the kludge does not work anymore. As a kludge is still needed I
replaced it with another one, added a timer to the TModGVerb code … at
least stuff will not be broken by accident anymore that way … The thing is
that the RoomSize can not be properly modulated in the GVerb code, and I still
want to be able to do that. But the room size must be set before the spread can be
correctly calculated. The timer will cause a little delay after patch reset to
give some time for the room size to be set up, it will then recreate the reverb.
Also for this module, I've removed some needless calculations for parameters that
were not changed.
Fixed menu shortcuts for automatically generated menus, these would jump from '9'
to 'K' instead of 'A'.
Added shortcuts Alt+1 .. Alt+4 to show 1 ..
4 I/O level strips.
Some selectors have only one value to choose from, and thes effectively act as
momentary buttons (for reset or randomization mostly) I've given those a white
border instead of the selectors' default yellow one.
For PortAudio mode started using the PortAudio CPU usage indication, which is more
accurate than what was used before (and still is in Legacy mode). The CPU usage
shown will be lower, but it will run out of real–time now at 100%.
Added support for loading bitmaps from files, this needs a bitmaps sub folder of
the folder the Wren executable file is in. It also needs properly
named and sized bitmap (bmp) files – going for 21 x 21 pixels.
Changed the default for the bread and butter mixers to dB mode instead of linear.
Fixed the spacing in the module selector.
Toying a bit with skinning, for instance, with a couple of custom bitmaps in the
module selector (some more examples) :
Changed the default looks to be 'themeless' so it will look mostly like previous
versions, a user can select a theme then to fit her needs. I did have to change
some things in order to get things compatible with theming support. I will add a
zip file to this web page with a couple of bitmaps to enhance the looks a bit. For
now I'll not add any new module glyphs, that needs a bit more work, but these can
easily be added later on. The bitmaps will be included in the main zip download
It works reliable now, so theming will be available for the next release. When
needed it can be disabled from the ini file by setting UseThemes to zero –
by default theming is on though, and there is no way to change this from the
software itself. When theming is disabled the default Windows theme is used, just
like in previous versions of Wren. When theming is disabled it is still
possible to load your own user glyphs for the module selector.
Added a file opener for Scala files which shows the contents of the file selected
to ease the selection a bit (the first couple of lines having some useful comment
usually). You can enter a wildcard mask to zoom in on files as well. This is all a
bit Windows 3 like, but that was the plan with windows 8 eh :-) Anyway, it works.
The actual looks of this dialog are determined by the selected theme.
Changed the code a bit such that file open dialogs from the patch will try to go
to the directory that the currently used file is in.
in version 2015.9.2.0
And the filter bank is finally finished :-)
I had planned to realize this filter using Fourier transforms, but it ended up
using State Variable Filters … up to 102 of them when the steepness is set
to 6. It takes some amount of calculation time then, but steepness can be set
lower and it is not too bad actually. Steepness controls the number of filters put
in series 1 to 6 can be selected, where each step is a 12 dB filter and so amounts
to 6 dB / Octave of slope for the bandpass ones.
I've scaled the range for the Q control a bit so it's more or less usable over the
full range – it depends a little still on the selected steepness. Also
divided the effective internal filter Q by the number of filters cascaded, which
tames the silly amplitudes a bit, not perfect but it's workable. At high Q
settings and a large steepness it will do some ugly stuff still.
The low side filter can be set to either low pass (shelving) or to bandpass and
the high side filter can be set to high pass (shelving) or bandpass. The in
between ones are bandpass always. The Q control can be used to add in some
resonance. Added level modulation for each filter chain, and added FM control to
be able to sweep the filter as a whole, but note that there is an upper limit for
the frequency that can be used for a state variable filter. So for high
modulations the high end frequencies may turn out to be lower than expected, and
you might want to set some faders to zero there.
Decided to make two filter types, one having a half octave (tritone) filter
spacing, and the other a third-octave (major third) spacing. Both have the same
amount of filter bands and so the second type has a reduced frequency range.
And while we are at it … let's make a couple of splitters too. Added clip
indicators to these.
And … a simple modal thingie would be cool too :-) Added some random
buttons to this one to help search for timbres, it should probably have presets
that can be saved and reloaded. Come to think of it, I could make a general
purpose presets mechanism for modules making use of the existing parameter paste
mechanism. And then control it trough the module popup menu.
Just did that, added a presets mechanism for any selected set of modules or for
the patch as a whole. Module presets can be used by selecting the modules to save
as a preset, then right clicking on any of the selected
modules, and then use 'Save as preset'. Patch presets can be saved from the file
menu. On loading from a preset the selection will have to match the selection that
was used on saving the preset, or else there will be a structure mismatch. So this
probably is most useful for the patch as a whole or for single modules.
The file format used for presets is exactly the same as the one for patches, but
they will by default be saved with a '.preset' file extension. So they can always
be loaded 'as a patch' (for seeing the structure of it for instance).
Loading from a preset will only change the knob settings of the selection and
there will be no patch recompilation, and so the patch will just keep playing
using the new settings.
When there is a structural mismatch on pasting of parameters there will be a
warning generated now. These warnings can be disabled from the
Settings Screen [F3].
Made the search function to operate on the module selector as well.
Non–matching modules will be hidden from the selector. and when a page
becomes empty this way the page will be hidden too.
This feature can be disabled from the Settings Screen [F3], and also made it
possible to disable patch searches from there. When both options are disabled the
'find' control and the menu item for it will be disabled.
Pressing Esc while the keyboard focus is on the search box will
clear the search phrase.
Rate Smartness (where modules can change execution speed based upon the actually
connected signals) is now indicated with [RS] in the module popup description
shown from the module selector.
in version 2015.8.26.0
Added a new module type, a 16 step clocked delay (analog shift register). It is
rate smart and it has the option to clock it at audio or control rate with an
internal clock (fast mode) instead of from the clock input (clocked mode). When
the module is operating at audio rates the fast mode will be audio rate, control
rate otherwise. Just connect an audio rate signal to any input to make the
module operate at audio rates. This one could be used not only as a bucket
brigade like delay, but in fast mode you could implement your own FIR filters
with it when used in combination with the 16 input mixer for instance.
Made a NoteQuantizer module. It quantize it's input value to the note nearest to
one selected by the note selectors. When the highest and lowest nearest are
equidistant it will use the higher one, and when no notes are activated it will
pass the input value unchanged. Added an input conditioning knob to it to
attenuate the incoming signal, or to invert it (attenuverter).
Made a lookup table module with 16 sliders for the values. A select input selects
which fader will be output, and there is a cross fade option to be able to output
in-between values. This one is to be found on the sequencer tab, as it can be used
for sequencing when driven with a saw shaped input signal (range [ 0, 1]).
Made the Scala module working, copied the details about it over to a separate page.
It translates note information into scaled note information according to the Scala
keyboard mapping and scale files loaded. The input is supposed to be be connected
to anything that generates note information, like a sequencer or a MIDI note in
module, etc. This information is first translated into MIDI key numbers
internally, then the Scala algorithm is applied, then the output value is
translated back to an internal note value again (128 notes / unit).
You can get scales and keyboard mappings from http://www.huygens-fokker.org/scala/ but also there is the Scala program
itself on that site which can make such files to your own liking .. it will also
tell you how to hand-craft such files.
Made an inconvenient choice for the signal levels of the 'rec' buttons in the
granulators and had to invert them. This means that on patch reload granulator
recording will be inverted from how it was aved with the previous Wren version. Sorry about that …
I seem to have over 150,000 lines of code now
or 150 KLOC, sooo … there should be about 1500 – 7500 bugs …
or 'code defects' as they call them … when I perform as 'good' as the
'code industry'. Or around 75 when I'm as good as µsoft … or ZERO
when it is as good as space shuttle code. (see here for a rationale of this).
Fixed a bug causing Wren to refuse to stop under certain conditions. It
would also not allow the Delphi environment to be shut down after Wren had run in
debug mode. Forgot to call the inherited handler in a Notification function ... or
forgot ... it was omitted in some old code that used to work long ago without
that call (TKnobsWormPanel.Notification). I should have disabled the Friemels
module as it does nothing usuful anyway.
The lookup tables were about twice as large as I had meant them to be, halved
Poetry generator, XYScope, Vocoder, Convoder and Filterbank had a memory leaks,
The WaveWiper had its dezipper spec in the constructor instead of in SetDefaults.
in version 2015.8.21.0
Added a 'Poetry' generator, modeled after an idea found in a Phd thesis by
Johnathan Mackenzie found here. It finds seed patterns in a buffer starting at some random buffer
position, and it will get it's next output from the value following the found
seed. Then it will repeat this strategy, producing variations on a read in
pattern as it moves along. New values can be clocked into the buffer and the
search algorithm is triggered from a separate input. This is very similar to a
hidden Markov model.
This module is primarily meant to generate variations on control signal sequences,
but the module is rate smart and will switch to audio speed when needed. As is,
the history may be too small though for audio processing (and the search algorithm
is probably too slow to allow for substantially more history). Anyway, I like it
for control signals.
Added an eight tap delay where each delay output can be individually modulated.
Just like the regular delay module there is a fixed output having the maximum
delay with no time modulation, and the delay time can be set from 10 µs to 5
minutes - in three separate ranges. The delay modulation inputs modulate between
zero delay and max delay for input values from 0 to 1.
Added OSC support. Wren can be either an OSC transmitter or an OSC
receiver. See the FAQ for more info on this and about how to
set up OSC and about what OSC messages are implemented.
In the current OSC implementation there can only be one listener in a patch for
any specific address. The first listening entity seeing the message will disable
it for other potential listeners. There can however be multiple transmitters for
the same address. This is a feature of the OSC module I've used, and I may change
this for a future version – it does not seem to be a serious limitation
currently as further signal propagation can be done on the wire level in the
Added a sync module which can send sync signals from one Wren instance
to another. Or alternatively external OSC enabled software could make use of this.
This module sends and listens to OSC /<synthname>/sync messages. See
the FAQ for more info on OSC messages.
The sync rate must be lower than a quarter of the control rate (currently
amounting to the sample rate divided by 32), or else it will not work properly. A
practical maximum working for all sample rates would be 1 kHz.
Added an OscMessage module which can send or receive arbitrary float values over
OSC using a user defined address. When the current Wren instance is an
OSC transmitter it will send the value present on the blue output when the trigger
input goes from low to high, this value will be set as the output value too then.
When Wren is set to be an OSC receiver incoming OSC messages matching
the set address and having a float value as their first argument will set the
module output value (it will still copy the input value to the output as well on a
Messages may be sent with more than one parameter, only the first parameter will
be used, and only when it's type is 'f' (float).
Working on Granulator modules. These are all based upon sample storage in a delay
line (hence, the module can be found in the delay section). The length of the line
can be set up to five minutes. A maximum of 128 grains has been set currently,
which seems to be about what the system can do (although the maximum actually
obtainable in real time may be lower, depending on settings).
There is control for the grain playback speed (dly mod), the grain inter-onset
time, the grain duration, the grain volume and grains can be panned as well. There
is a record control to be able to stop recording into the delay line, when it is
off the delay line is being looped. The input left of the record control morphs
between recording and looping for dynamic record control.
For the first type the inter-onset time, the duration, the volume and the panning
can be randomized. Not quite sure yet on how parameter modulation should work.
Once the grain starts all the parameters are set, and they will not change during
the grain's lifetime.
Added a second type of granulator which does not have the parameter randomization,
instead this should be controlled trough the modulation inputs. It looks exactly
the same but the modulations work in a different way.
Added an input on both versions to control the grain start point within the
storage loop (this was just a random point before). Also upped the maximum grain
count to 256. This can easily get the CPU on it's knees for certain settings, but
for other settings it's nice to be able to have a higher grain count than
Renamed Granulator into RndGranulator and SimpleGranulator into Granulator, and
then added a new SimpleGranulator. For this one new grains are started from a
trigger input. This one has no pan or volume control. It should be a tad more
efficient CPU wise and the trigger input allows for tuned inter-grain delays.
Current envelope shapes are Bell, Exp, RevExp, Pulse, RndBell and RndExp.
Added a new mixer type, mono, 16 inputs, a chain input and one output. Control
type can be linear or dB with a couple of ranges.
Added S-shaped envelopes for all modules having envelope slope shape selection
(including the interpolation curves on the Seq16 module). Also sped up the
envelope shape calculation a tad by working out an unnecessary multiplication.
Added an 'env' out to the compressor module, an envelope of the sum of the
Changed the timing for the net MIDI and OSC lights from 250 ms to 125 ms and added
an OSC enabled indicator light.
Added a SynthName property which can be used to distinguish Wren incarnations for the purpose of OSC addressing. The synth name can optionally be
shown in the title bar and it can be changed as part of the OSC settings.
Also added an OSCAddress property to compiled modules in the synth patch, it's
value is set from the module title in the patch editor. A module title starting
with '@' will enable the module for OSC activities.
Furthermore I've changed the value popups for knobs to show the OSC address
fragment to use for addressing them as the first line in the popup. When the
control is not automatable an exclamation mark will be shown on the first line
The OSC specific modules such as Sync and OscMessage are OSC enabled always
regardless of their title.
Working on OSC enabling all modules, and maybe the controls of the main program as
well, the above is in preparation of that.
OSC patterns starting with /*/ should be accepted by all running
incarnation that do have OSC enabled.
Optimized Pan, XFade, MultiMult and Multiplier a bit by getting some
Changed the patch format to version 4 to allow for MIDI CC values to be bound to
ValuedControls. Old patch format versions 2 and 3 should still be readable, but
older Wren versions will not be able to read the new version 4 patches.
Also allowed for more options to be added in the future with better backward
compatibility. This change was needed to allow for CC to knob associations to be
stored into the patch.
Added an item on the context menu for knobs, sliders and selectors for associating
a MIDI CC with them. Most knobs, sliders and selectors have support for this, not
all. When a a CC is associated with a control it will be painted with a blue
border (when not focused, otherwise the indicator color will be red still). The
associated CC will also be shown in the hint popup when it appears, and the popup
menu will show the currently associated CC as well.
Also added a 'learn' feature to quickly assign the last CC received.
Also added a CC un-assign item to the popup menu, and and un-assign button in the
MIDI CC assignment window.
Added a MIDI channel selector to the Settings Screen [F3] to select what channel
to use for the non MIDI modules (that is: passing on CC values). This can be set
to listen to all MIDI channels. The MIDI modules have an independent channel
MIDI CCs on knobs are working now, the CC directly controls the knob, which in
turn will change the value in the synth – dezippering is not used on MIDI
Added a couple of quick select buttons to set the the amount of visible I/O
channels more easily.
Some more work will be needed before general OSC will actually work, but the
editor supports it now. Made code for general OSC support too now but did not test
it yet. Controls are addressed by the OSC pattern
/<synthname>/<modulename>/<controlname> and they want to
see a float value in the range 0.0 to 1.0 for full travel. Every control that
allows for MIDI automation can be OSC controlled as well. When a control is not
automatable this will be shown on the control's popup menu by having an
exclamation mark in the first line.
Made selectors focusable, they will get a red border to indicate focus (and a blue
border to indicate that a MIDI CC was associated, or fuchsia when both focused and
having CC control). Selectors also listen to the arrow up/down keys now when they have focus. Knobs will get a fuchsia border too now under the
latter condition. Focusable controls will get focus now when the mouse cursor
hovers over them regardless of the mouse wheel mode selected.
Output 10 of the Counter and the ChebGen module were not working, fixed now.
Demux module was not working, fixed.
Knob controls for Pan and Fade modules were incorporating the input type selected,
not handy, changed that. It is a level conversion on the control input only now.
This will probably break some patches … but it was just not good.
Fixed memory leaks.
Made the 'unfocus' feature work better with a 'sort of' hidden control that will
get focus when knob focus gets lost. The 'use unfocus' feature is on by default,
this can be changed from the Settings Screen [F3]. The unfocus option causes
controls to loose focus when the mouse moves out.
Fixed sample and hold (which stopped working properly after making it rate smart).
Seem to have weeded out the access violations on the granulators.
in version 2015.7.12.0
in version 2015.6.27.0
in version 2015.6.21.0
Another error in displaying the envelope curves … the range settings were
all taken from the attack range – fixed now.
Added some glyphs for a bunch of new modules, it got all a bit confusing with the
Updated some help text, some new modules still had text copied from the modules
they were copied from.
Fixed the tab order for some new modules.
Decreased the spacing between module buttons on the module selector a bit to get
room for more module types. Resized all module glyphs to 20×20 px. to make
Changed the default font for the module title to Corbel 8 pt bold, seems lighter
but more readable than the previous font used. Only thing is that it has
'oldstyle' numerals, that is lower case. When this font is not available (as in
Windows XP apparently) the module titles will use the old font (Small Fonts 7 pt
bold). But read on …
Made user selectable fonts for module titles and module text. It is probably best
to keep using Small Fonts for the module text, as some of the text was measured
out with that font, but one could still change the color.
in version 2015.6.19.0
An instant crash was reported by a user, no clues yet.
Inspecting the code I did find a bug in the audio handling. When it ever happens
that there is no compiled patch and the audio stream runs, the audio I/O
processing will write out of the array bounds of the audio out buffer …
seems likely to be that … on a slower system audio I/O may run before the
patch got compiled. Also it would be worse with largish audio buffers (seeing that
user's buffer size is 4096, using 512 or so here). Fixed that issue.
It fixed the problem too.
in version 2015.6.18.0
Made a WaveWiper module after a schematic made by PHOBoS, which he in
turn based on a Voltage Splitter idea published by Jim Patchell. Not sure if it
does exactly the same thing, but it is quite a nice wave shaper I think. This
module is rate smart, it runs at control rate when all inputs are control rate
signals, at audio rate otherwise.
InSig1 := FInputs[ i_in1 ];
InSig2 := FInputs[ i_in2 ];
BreakSig := FInputs[ i_break];
Mute := SignalToMute( FInputs[ i_mute]);
FOutPuts[ o_out1] := ( Max( Insig1, BreakSig) + Min( InSig2, BreakSig) - BreakSig) * Mute;
FOutPuts[ o_out2] := ( Max( Insig2, BreakSig) + Min( Insig1, BreakSig) - BreakSig) * Mute;
With a sqare and a triangle input modulated (on the break input) by a sine wave:
And while wave warping .. made a WaveWrapper module too. This one will mirror the
input signal in a user set low and high bound limit. The limits can be modulated
by the mod input. This module is rate smart.
Modulation := Normalize( FInputs[ i_mod] * FInputs[ i_modamt]); // Modulation amount
LoMirror := FInputs[ i_lowlevel ] - Modulation; // Get low mirror and subtract modulation
MirrorDelta := 2.0 * ( FInputs[ i_Highlevel] + Modulation - LoMirror); // High mirror gets modulation added. calc mirror distance, times 2
Mute := SignalToMute( FInputs[ i_mute]); // Get Mute multiplier
if Abs( MirrorDelta) < 1e-6 // When mirrors are too close to each other
then FOutputs[ o_out] := 0 // make an exception ...
Amp := 4.0 / MirrorDelta; // Amplitude reduction factor due to wrapping - times two
Signal := MathFloatMod( FInputs[ i_in] + LoMirror, MirrorDelta); // Lift signal by LoMirror, and take signal modulo 2 * Delta
if Signal > 0.5 * MirrorDelta // Reflect bit above Delta back
then Signal := MirrorDelta - Signal;
FOutputs[ o_out] := Normalize(( Amp * Signal - 1.0) * Mute); // Bring signal into -1, 1 range and apply Mute signal
With a sine wave input (range -1, 1), the low level set to about -0.6 and the high
level to about 0.4:
Made a logistic map module. This one is rate smart, driven by an input clock signal.
Not sure yet what the definitive form will be. R values below three and different
start values seem not to interesting, so I may remove those. And the cross fade
works good only when the clock rate does not change .. so I may change this into
an oscillator module.
A new LFO module based on strange attractors, a Lorenz type and a Rössler
type. Both the Lorenz and Rössler systems are 3D, so I made three outputs for both types.
Made an audio rate version too and had some trouble to get the calculations stable
for that. It needed quite a bit of over sampling to get it right (or actually the
time step must be smaller than some critical value). For a sample rate of 44k1 12
times over sampling for Rössler (time step ⪅ 0.08), 15 times for Lorenz
(time step ⪅ 0.02) seem to do the trick). For higher sample rates the amount
of over sampling could be set lower but it betters the sound quality too. This may
have to be adjusted later.
Maybe these should get some means to set initial conditions, but otoh they seem to
visit a lot of places already.
» Decoupled the connector color from it's signal type. In the designer the
signal type should be set now and the default wire color will follow that. Also
made a separate color lookup for painting connectors and wires. User selected
cable colors are possible now; connector colors still reflect the signal type.
» Note : The patch version got changed to 3. The patch reader will still
read version 2 patches, and previous Wren versions can read type 3
patches as well, just ignoring the wire colors in it.
Changed the default wire color Lime (for control rate logic signals) into Green,
Lime was not very visible on most module colors.
Moved Quantizer to the Note tab and made it a control rate module. Also the Scala
and the TransInv modules are control rate now.
» Made rate smart modules. These execute at control rate normally unless one
of their inputs gets connected to an audio rate output, they switch to audio rate
» rate smart modules are: Inverter, Adder, Multiplier, Scaler, Ratio,
Rotator, Rectifier, MinMax, MultiMult, Median, HardClip, Not, Gate, Divider,
DFlipFlop, RSFlipFlop, Counter, ADC, DAC, Compare, LogicSelector, ProgDivider,
XFade, Pan, MixM4to1, MixS2to1, MixTto1, MixQ1to1, SampleAnsHold, TrackAndHold,
Switch2to1, MultiSandH, Mux, Demux, DigiMux, DigiDemux, TerraGen, Average,
GateSeq, Seq16, SeqSeq, SeqStep, SeqClockStep, EuclideanRhythm, PhaseDetect and
Changed the built–in module help to indicate rate smart Modules and what
rate smart–ness does.
Removed a tab control level, all screens are on the same tab control now, giving a
bit more screen space for the settings, graphs and debug screens.
Made a couple of new checkboxes in the Settings Screen [F3] to control what appears
in the title bar.
Changed the PortAudio handler in FrmMain to combine the loops for input and for
output into one.
Sped up the Normalize function considerably by not using the Delphi internal
TDoubleHelper methods. Requested it to be inlined, but Delphi seems to mostly not
do that. The SignalToMute function basically uses the same code as Normalize,
changed that one too.
FreeVerb internally works with Singles, not with Doubles (for floats) as the rest
of the synth does. The standard Normalization routine would not always properly
deal with that – changed the value for the smallest acceptable number to
1e-20 (-400 dB).
Local copy of Normalize routine in GVerb module fixed too now.
Error in drawing the shapes for EnvAHD (and likely EnvADSR as well). I had changed
the way the knobs work and how their values are calculated, but this was not
reflected in the drawing of the envelope shapes, fixed now.
Older release notes