Removes dead files and updates readme

This commit is contained in:
sloumdrone 2019-07-20 19:45:14 -07:00
parent 4c5537c0e0
commit affb82e15f
3 changed files with 5 additions and 91 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@ -4,7 +4,11 @@ Filtress is an interpreter for the filtress [domain-specific-language](https://e
## The language
The filtress language is pretty basic as far as languages go. All filtress filters/scripts should be contained in a file with the suffix frs (ex. myFilter.frs)
All elements in a filtress script are either a procedure, a variable, an opperator, or an opperand. Opperands are always positive integer values and variables always represent positive integer values as well. The following opperators are available: +, -, \*, /, %, =. If an opperator is not passed to a procedure before an opperand then = is assumed. As such, you never have to use =, just know that that is what filtress is doing in those cases. All opperands can be passed as variables rather than as integers directly, with the exception of loops. Loops are started with the keyword (procedure) _BEG_ followed by a number, like so: _BEG 20_. Anything that comes on the following lines is a part of the loop until the keyword _END_. At present, due to the way loops are handled by the parser, this number cannot be filled in by a variable. Many procedures represent a data value and as such can also be used as a variable. For example: _RED +100_ increases the value of _RED_ by 100. If instead a person wanted to double red they could do _RED \*100_ or _RED +RED_. Multivalue procedures such as _COL_ and _LOC_ cannot be used as variables, nor can things that do not represent a specific value, such as _APY or BEG_. Similarly there are two values that cannot be used as procedures, only as variables: _WID_ and _HIG_.
All elements in a filtress script are either a procedure, a variable, an opperator, or an opperand. Opperands are always positive integer values and variables always represent positive integer values as well.
The following opperators are available: +, -, \*, /, %, =. If an opperator is not passed to a procedure before an opperand then = is assumed. As such, you never have to use =, just know that that is what filtress is doing in those cases.
All opperands can be passed as variables rather than as integers directly, with the exception of loops. Loops are started with the keyword (procedure) _BEG_ followed by a number, like so: _BEG 20_. Anything that comes on the following lines is a part of the loop until the keyword _END_. At present, due to the way loops are handled by the parser, this number cannot be filled in by a variable. Many procedures represent a data value and as such can also be used as a variable. For example: _RED +100_ increases the value of _RED_ by 100. If instead a person wanted to double red they could do _RED \*100_ or _RED +RED_. Multivalue procedures such as _COL_ and _LOC_ cannot be used as variables, nor can things that do not represent a specific value, such as _APY or BEG_. Similarly there are two values that cannot be used as procedures, only as variables: _WID_ and _HIG_.
Aside from the above, there are a few things to know. Comments are begun with the _#_ symbol and go until end of line. These will be ignored by the parser. Each statement, consisting of a procedure and, optionally in some cases, an expression and or comment, must be on its own line.

View File

@ -1,90 +0,0 @@
Filtress
Inspired by interval.rs (generates audio via a simple command language), but filtering or otherwise drawing on images.
Things have shifted to maybe doing image mangling based on input file. To do so I could just use the standard go image library to deal with the images.
+ + + + + + + + +
Meta-langauge:
__________________
Comments:
# This is a comment. It begins with a pound sign
# Multiline comments use multiple lines all starting with a pound sign
. . .
Operators:
# Operators get applied to numerical values and always lead the number
# = is implicit when writing just an int, but can be optionally included for clarity
+, -, / (floors on decimal), *, %, =
. . .
Variables:
# The following global variables are available
WID # The image width
HIG # The image height
REG # A register for saving numbers?
. . .
Setting the current pixel:
# Valuesthat over or underflow the image dimensions will be looped to aceptable locations
LOC int:int
LOC [op]int:int
LOC int:[op]int
LOC [op]int:[op]int
. . .
Applying changes:
# Just calling APY alone applies the filter to the current selected pixel
# Calling with a ratio sets the width and height of a square in which to apply the filter
APY
APY [op]int:[op]int
. . .
Colors get set either individually or as a group:
# Using COL as opposed to the individuals requires that all four values are set
# Passing an int with no op sets to that value
# Values udner or overflowing will loop to acceptable values
RED [op]int
GRN [op]int
BLU [op]int
APH [op]int
COL [op]int:[op]int:[op]int:[op]int
. . .
Set the apply mode:
# Using an op with MOD will always loop through the modes as needed based on the operator
#
# Values:
# 0 - Hard mode, replaces pixel contents with the color settings on apply
# 1 - Average mode, averages the incoming channel with the existing channel
# 2 - Loop mode, adds the values of the existing and incoming channels and loops around on overflow
# 3 - Fade mode, works as average mode, but uses the fade timer to fade over the course of a number of pixel adjustments
MOD [op]int
. . .
Doing loops:
# The int after BEG represents the number of times to loop
# At present, loops may not be nested
BEG int
[loop contents]
END
. . .