Overview

EVALUA is an experimental VSTi synth plugin that uses math equations to 
describe various waveforms, ranging from the most basic ones to very 
complex evolving soundscapes. Inspired by the one-liner music programs
that rocked the web back in 2011, as well as by the 8BitSynth module in
the Caustic 3  software that came out sometime later. 

Please note that this plugin only shares the same concept, but has a
very different implementation, thus it is not directly compatible with
either of the mentioned things. 



Features

- 64-bit integer math only
- Arithmetics and logical operations
- Unary, binary and ternary operations supported
- Custom parser with very fast RPN-based calculator
- A number of variables to use in the equations
- Polyphonic or monophonic modes
- Portamento in the monophonic mode
- Multi-preset mode for MIDI channel 10



Usage

Waveform is defined by a math equation that may include decimal and 
hexadecimal integer values, variables containing time counters, and other 
parameters. Result of the equation calculation is the output sample value.
The  output value considered to be within range of -256..256 (yes,
not 255).  If it goes out of these limits, it gets clamped. 

Calculation  always done in signed 64-bit math. Supported operations
and their syntax, in order of priority:

( )		parenthesis

-		unary negation
!		logical not
~		binary not

*		multiple
/		divide
%		modulo (division remainder)

+		add
-		subtract

<<		shift left
>>		shift right

<		lesser than
<=		lesser or equal
>		greater than
>=		greater or equal
==		equal
!=		not equal

&		binary and
|		binary or
^		binary xor

&&		logical and
||		logical or

? :		conditional operator (A?B:C)

All logical operations produce 0 or 1 as the result.


What makes it a synth rather than an useless calculator is the
variables. You can use:

P		pitch counter, it changes in a way that 256 counts would
        make a single wave cycle for a note played
T		time since note started to play, fixed to 65536 counts
        per second
V		velocity 0..127
M		modulation wheel 0..127
R		random 0..32767
S		pseudo sine waveform, gives clean 8-bit sine when used instead
		of P, but does not go into proper harmonics
C		pseudo cosine waveform, i.e. phase shifted sine

P is the most important variable, as you can define a waveform that has
correct pitch for note that is played. The most basic example is this:

P&255

It clamps counter to 0..255 range (256 counts repeated) and uses it as
output value that is repeatedly rising 0 to 255 in a loop, with loop
speed depending from the pitch. This makes a regular saw waveform.

You can also make a square waveform:

P&256

It uses the 8th bit that gets inverted each 256 counts, as output value,
making a regular square waveform.

Don't forget about ternary operatiors, too. Here is how you can produce
a triangle way easily:

(P&256?P:~P)&255

These are simplest examples. The equation can be very long and complex,
producing long convoluted waveforms. Try some presets, or just experiment
to get more interesting sounds.



There is some global parameters that affects the sound. They're not
saved into a particular preset and get applied over any preset selected.
Besides them there is two extra buttons on the top:

Copy	copy current equation into Windows clipboard

Paste	paste text from Windows clipboard

Lerp	enable interpolation, the effect is very subtle

Clamp	once set, the output value gets clamped to -256..255;
		otherwise it gets wrapped inside 0..255 range
		
Time	time scale of the T variable

Gain	output gain of the plugin, 100 being normal volume

Poly	how many channels is there, 1 turns on the monophonic mode

Porta	defines how fast a note changes in the monophonic mode

Ch10    note number to call this preset from the MIDI channel 10



Multi-preset mode

This feature allows to create drum kits and other non-pitched
multi-sound sets, when a particular note plays with its own
assigned program. You can assign a note to any program, so when you
play notes on MIDI channel 10, they will be played by assigned
programs (or a current one, if none is assigned). The pitch for
assigned programs will be set to C-4.
	
		

License 

The plugin and its source code comes without any warranty. You can
redistribute it and/or modify it under the terms of the WTFPL. See
http://www.wtfpl.net/ for more details.



History

v1.2  16.02.20 - Multi-preset mode for MIDI channel 10, mouse
                 wheel to change parameters in the GUI
v1.1  01.02.20 - Corrected mono mode, copy/paste, lerp/clamp/time
                 options, GUI improvements, waveform preview, unary,
				 ternary, and logical operations
v1.01 30.05.19 - Fix for issue with multiple instances
v1.0  28.05.19 - Initial release, basic functionality



Mail:	 shiru@mail.ru
Web:     http://shiru.untergrund.net
Support: https://www.patreon.com/shiru8bit