Skip to content
a makefile-like farbfeld mixer
Perl Makefile Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore fix: infinite loop, adds ffextract Aug 1, 2018
LICENSE adds pkgbuild and license Aug 15, 2018
Makefile adds pkgbuild and license Aug 15, 2018
PKGBUILD adds pkgbuild and license Aug 15, 2018
Readme.md adds pkgbuild and license Aug 15, 2018
config.mk adds pkgbuild and license Aug 15, 2018
demo.fm first working version Jul 17, 2018
ffextract adds pkgbuild and license Aug 15, 2018
ffmk adds pkgbuild and license Aug 15, 2018
result.png first working version Jul 17, 2018

Readme.md

ffmk — a makefile-like farbfeld mixer

demo image

This perl script is able to parse a specific input file (see demo.fm for syntax) and call the farbfeld tools specified. It is possible to include mathematical expressions (inside []) and use variables. These variables are simple text replacements and are replaced before the mathematical expressions.

Usage

The program receives a recipe file via STDIN. You can choose the output style:

1. Output directly to files. With the --files flag you can tell the tool to output all targets to their own files (called <target>.ff).

2. Output to STDOUT. The default behaviour is to output the targets to STDOUT. The format is like this: target:farbfeld<binary-data>dlefbraf:target:farbfeld<binary-data>dlefbraf...

You can also treat the resulting data stream as input for the ffextract script. This script can extract the image channels and extract one to STDOUT or more to files (--files).

Output EBNF

This information can help you write a parser/filter program. For more information about farbfeld see the official site.

Output = Record | ( Record, Output ) ;
Record = Target, ":", FarbfeldData, MagicReverse, ":" ;
Target = AlphaNumeric ;
MagicReverse = "dlefbraf" ;

FarbfeldData = Magic, Width, Height, ImageData ;
Magic = "farbfeld" ;
ImageData = { Red, Green, Blue, Alpha } ;

Example Recipe File

Assuming you have my farbfeld tools installed.

# the size (this is a comment btw)
SIZE=256

result: dep color
	dep color | ff-mul

dep: glow sine
	glow sine | ff-mul

# it is also possible to make calculations inside []
glow:
	ff-glow([SIZE*2/2])

sine:
	ff-singen(SIZE SIZE 5)

color:
	ff-color(SIZE SIZE 1.0 0.8 0.2 1.0)

Installation

make
sudo make install

To remove the package use sudo make uninstall. Please note that there is a valid PKGBUILD for Arch Linux.

You can’t perform that action at this time.