synaesthetic v0.0.13
Syna.esth.etic
Process images with the SoX, the Swiss Army knife of audio manipulation.
Installation
npm install -g synaestheticRequirements
You need to have both SoX (sox) and ImageMagick (convert) installed, it should look like this
$ sox --version
sox: SoX v14.4.1
$ convert --version
Version: ImageMagick 6.8.9-9 Q16 x86_64 2017-03-14 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules OpenMP
Delegates: bzlib cairo djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png rsvg tiff wmf x xml zlibBasic use
Pass synaesthetic an input file and an output file, followed by any arguments to SoX. Make sure the output file has a .png extension.
synaesthetic infile.jpg outfile.png treble +20The
Effects section of the SoX man page
(man 1 sox) is your friend! You can chain as many transformations as you like!
synaesthetic infile.jpg outfile.png treble +20 echoes 0.7 0.8 10s 1 11s 1 dcshift 0.4Scripted use
You can write scripts in ClojureScript for more advanced uses, see the examples/ directory for some examples.
;; your_script.cljs
(sox {:channels 2 :depth 8}
(treble 21)
(bass -1)
(echos 0.7 0.8 "1s" 0.4 "1s" 1)
(dcshift 0.2))The syna.esth.sox namespace contains a bunch of functions you can use. Pass your script in with the -s flag.
synaesthetic -s your_script.cljs infile.jpg outfile.pngYou can have syna.esth.etic watch your script with the -w flag. This will
automatically re-run the script automatically re-run the it whenever it changes.
If your image viewer also auto-updates then this provides a really nice
workflow.
Command line switches
-h--helpShow the help screen-s--script SCRIPT_FILEThe name of a ClojureScript script to run-w--watchDon't exit but watch the script for changes and re-run. Use with-s.-H--header SIZESet the amount of bytes to preserve to not mess up the image header. Defaults to 512
You can use - as a file name to either read from stdout, or write to stdout.
Hashtag
Make sure to use the #synaesthetic hashtag when sharing your creations on social media!