Skip to main content

Flitter is a functional programming language and declarative system for describing 2D and 3D visuals

Project description

Screenshot from a Flitter program showing colourful distorted ellipse shapes with trails moving outwards from the centre of the screen.

Flitter

CI lint CI test CI coverage docs

Flitter is a functional programming language and declarative system for describing 2D and 3D visuals. It is designed to encourage an iterative, explorative, play-based approach to constructing visuals.

The language supports the basic range of functional language features: first-class recursive and anonymous functions, comprehensions, let/where, conditional expressions, lists ("vectors"). However, unusually, all values are vectors and all operators are element-wise, and the language is built around constructing trees of attributed nodes. The language is designed to be familiar to Python programmers.

The engine is able to live reload all code and assets (including any shaders, images, videos, models, etc.) while retaining the current system state - thus supporting live-coding. It also has support for interacting with running programs via MIDI surfaces (plus basic pointer and keyboard support).

Flitter is implemented in a mix of Python and Cython and requires at least OpenGL 3.3 (Core Profile) or OpenGL ES 3.0. At least Python 3.10 is also required as the code uses match/case syntax.

Flitter is designed for expressivity and ease of engine development over raw performance, but is fast enough to be able to do interesting things.

The engine that runs the language is capable of:

  • 2D drawing (loosely based on an HTML canvas/SVG model)
  • 3D rendering, including:
    • primitive box, sphere, cylinder and cone shapes
    • external triangular mesh models in a variety of formats including OBJ and STL
    • planar slicing, union, difference and intersection of solid models
    • ambient, directional, point/sphere, line/capsule and spotlight sources (currently shadowless)
    • multiple (simultaneous) cameras with individual control over location, field-of-view, clip planes, render buffer size, color depth, MSAA samples, perspective/orthographic projection, fog, conversion to monochrome and colour tinting
    • PBR forward-rendering pipeline with emissive objects, transparency and translucency, plus the ability to plug in custom GLSL shaders for arbitrary groups of objects
    • texture mapping, including with the output of other visual units (e.g., a drawing canvas or a video)
  • simulating physical particle systems, including spring/rod/rubber-band constraints, gravity, electrostatic charge, adhesion, buoyancy, inertia, drag (including in flowing media), Brownian motion, uniform electric fields, barriers and particle collisions
  • playing videos at arbitrary speeds (including in reverse)
  • running GLSL shaders as stacked image filters and generators, with per-frame control of arbitrary uniforms, and support for multi-pass and downsampling
  • built-in filters for: scaling/translating/rotating, Gaussian blurring, bloom, edge detection, vignetting, video feedback, lens flares, color and exposure adjustments, tone-mapping with the Reinhard and ACES Filmic functions, and 2D noise-map generation
  • compositing all of the above and rendering to one or more windows
  • saving rendered output to image and video files (including lockstep frame-by-frame video output suitable for producing perfect loops and direct generation of animated GIFs)
  • taking live inputs from Ableton Push 2 or Behringer X-Touch mini MIDI surfaces (other controllers relatively easy to add)
  • driving arbitrary DMX fixtures via an Entec-compatible USB DMX interface
  • driving a LaserCube plugged in over USB (other lasers probably easy-ish to support)

Flitter also has a plug-in architecture that allows extension with new image and 3D mesh generators, MIDI and DMX interfaces, or completely novel input and output systems.

Installation

Flitter can be installed from the flitter-lang PyPI package with:

pip3 install flitter-lang

and then run as:

flitter path/to/some/flitter/script.fl

More details can be found in the installation documentation.

Documentation

The documentation is available on Read the Docs.

There are a few quick examples in the main repository. However, there is also a separate repo containing many more interesting examples that are worth checking out.

License

Flitter is copyright © Jonathan Hogg and licensed under a 2-clause "simplified" BSD license except for the OpenSimplex 2S noise implementation, which is based on code copyright © A. Svensson and licensed under an MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flitter_lang-1.0.0b20.tar.gz (2.9 MB view details)

Uploaded Source

Built Distributions

flitter_lang-1.0.0b20-cp312-cp312-win_amd64.whl (4.6 MB view details)

Uploaded CPython 3.12 Windows x86-64

flitter_lang-1.0.0b20-cp312-cp312-musllinux_1_1_x86_64.whl (15.9 MB view details)

Uploaded CPython 3.12 musllinux: musl 1.1+ x86-64

flitter_lang-1.0.0b20-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.0 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

flitter_lang-1.0.0b20-cp312-cp312-macosx_11_0_arm64.whl (4.8 MB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

flitter_lang-1.0.0b20-cp312-cp312-macosx_10_9_x86_64.whl (5.0 MB view details)

Uploaded CPython 3.12 macOS 10.9+ x86-64

flitter_lang-1.0.0b20-cp311-cp311-win_amd64.whl (4.7 MB view details)

Uploaded CPython 3.11 Windows x86-64

flitter_lang-1.0.0b20-cp311-cp311-musllinux_1_1_x86_64.whl (16.3 MB view details)

Uploaded CPython 3.11 musllinux: musl 1.1+ x86-64

flitter_lang-1.0.0b20-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.2 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

flitter_lang-1.0.0b20-cp311-cp311-macosx_11_0_arm64.whl (4.8 MB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

flitter_lang-1.0.0b20-cp311-cp311-macosx_10_9_x86_64.whl (5.0 MB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

flitter_lang-1.0.0b20-cp310-cp310-win_amd64.whl (4.7 MB view details)

Uploaded CPython 3.10 Windows x86-64

flitter_lang-1.0.0b20-cp310-cp310-musllinux_1_1_x86_64.whl (15.1 MB view details)

Uploaded CPython 3.10 musllinux: musl 1.1+ x86-64

flitter_lang-1.0.0b20-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.0 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

flitter_lang-1.0.0b20-cp310-cp310-macosx_11_0_arm64.whl (4.7 MB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

flitter_lang-1.0.0b20-cp310-cp310-macosx_10_9_x86_64.whl (4.9 MB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

File details

Details for the file flitter_lang-1.0.0b20.tar.gz.

File metadata

  • Download URL: flitter_lang-1.0.0b20.tar.gz
  • Upload date:
  • Size: 2.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for flitter_lang-1.0.0b20.tar.gz
Algorithm Hash digest
SHA256 d8e48ed64df861aeac85cca4ef359eb11411c602e707195a57eb460d17146b8f
MD5 4c7886c57c9c8fe9f5cccdb2cb947350
BLAKE2b-256 cfd9278efbbdb7269624c1768b2abe8fa42353bfd29f176efe355944fcdfba5c

See more details on using hashes here.

Provenance

The following attestation bundles were made for flitter_lang-1.0.0b20.tar.gz:

Publisher: release-package.yml on jonathanhogg/flitter

Attestations:

File details

Details for the file flitter_lang-1.0.0b20-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for flitter_lang-1.0.0b20-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 f5a011199a370b504dd9bc40febc243a92b8e395bc1fb377f8d8fdf747e7051e
MD5 d9785cc713290d36915b344c2de2eba8
BLAKE2b-256 75b72d7b58826013f9af705750f03b3b2b09e051477a8d90a3647664b5530db2

See more details on using hashes here.

Provenance

The following attestation bundles were made for flitter_lang-1.0.0b20-cp312-cp312-win_amd64.whl:

Publisher: release-package.yml on jonathanhogg/flitter

Attestations:

File details

Details for the file flitter_lang-1.0.0b20-cp312-cp312-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for flitter_lang-1.0.0b20-cp312-cp312-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 34ac87f163ae4e64c4550d1ee18fe534b213a88a5c5f1a88884bc31e3ceb9a72
MD5 ead83c793416a91c04f02cd3579d78ab
BLAKE2b-256 3ab23ecf8cfbc07700d0cbf12726fd201caee1f58dbee950aa458b74922858b0

See more details on using hashes here.

Provenance

The following attestation bundles were made for flitter_lang-1.0.0b20-cp312-cp312-musllinux_1_1_x86_64.whl:

Publisher: release-package.yml on jonathanhogg/flitter

Attestations:

File details

Details for the file flitter_lang-1.0.0b20-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for flitter_lang-1.0.0b20-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 08debb9e70f82cd61ec40a5d5794455c98b091808a4324d75d3a627343e0455e
MD5 80a5445908c9f64f79d470d20ca14715
BLAKE2b-256 3995c5243aa03d43027d5c8300af3b4411490ff91a8ce520b7820def1f57f812

See more details on using hashes here.

Provenance

The following attestation bundles were made for flitter_lang-1.0.0b20-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release-package.yml on jonathanhogg/flitter

Attestations:

File details

Details for the file flitter_lang-1.0.0b20-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for flitter_lang-1.0.0b20-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f40abce275b41e768d1f2e5237bddec91aa678b1b6fb9563f05bf015acdec833
MD5 f247dc5a0bc8ff175eeccced7a46c0dd
BLAKE2b-256 cbc529a09c60a66f807c4395be52dab9a4305ea512bb8811c7a6e5cb2d183c81

See more details on using hashes here.

Provenance

The following attestation bundles were made for flitter_lang-1.0.0b20-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: release-package.yml on jonathanhogg/flitter

Attestations:

File details

Details for the file flitter_lang-1.0.0b20-cp312-cp312-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for flitter_lang-1.0.0b20-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0031f92cd37bf6e0c1fa0d0bb7d135cd7080d548dec7e6569e2c3553dfd565a0
MD5 978193da63fc1061104def23cab0c66b
BLAKE2b-256 310b9be205416661709a84a9f2026cf06c7223410a1728fe9e528cc0c3d08503

See more details on using hashes here.

Provenance

The following attestation bundles were made for flitter_lang-1.0.0b20-cp312-cp312-macosx_10_9_x86_64.whl:

Publisher: release-package.yml on jonathanhogg/flitter

Attestations:

File details

Details for the file flitter_lang-1.0.0b20-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for flitter_lang-1.0.0b20-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 5dac8826192ff168bc8c1a3ce7e5c5e8d97271e4398cd04d614f24194d60e920
MD5 61d2d8be6667de92c31c3c383bb68995
BLAKE2b-256 de7e1616ea21f7a50c5212fe1b0619ec13fc08030ac8d22e9759a4a5bc2a4ca9

See more details on using hashes here.

Provenance

The following attestation bundles were made for flitter_lang-1.0.0b20-cp311-cp311-win_amd64.whl:

Publisher: release-package.yml on jonathanhogg/flitter

Attestations:

File details

Details for the file flitter_lang-1.0.0b20-cp311-cp311-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for flitter_lang-1.0.0b20-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 8d8b5819547272118f082f4fe326b70f0b6db84736e03125a2671b997b8b8e19
MD5 14e748917f5c787edb3196cc465a7265
BLAKE2b-256 bec83c107d19ae90811a840cad91d48032bcce43c401f0da1f1f66b1c01a63da

See more details on using hashes here.

Provenance

The following attestation bundles were made for flitter_lang-1.0.0b20-cp311-cp311-musllinux_1_1_x86_64.whl:

Publisher: release-package.yml on jonathanhogg/flitter

Attestations:

File details

Details for the file flitter_lang-1.0.0b20-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for flitter_lang-1.0.0b20-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d55c729e8d1d11c1f51b817fb4cc86f986d4d1ec7fb1fc4572d55d4b9698611f
MD5 2dc1139538b95ce6a37c96993b399e22
BLAKE2b-256 cab19a0c391760af384d837cf70d65f3dc9f25b622d0636181febd988782c3ef

See more details on using hashes here.

Provenance

The following attestation bundles were made for flitter_lang-1.0.0b20-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release-package.yml on jonathanhogg/flitter

Attestations:

File details

Details for the file flitter_lang-1.0.0b20-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for flitter_lang-1.0.0b20-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fa033a5775aa3cc9b279d9f219feb4cbfbf680f22322ef041a0bc76e780c4c39
MD5 d3cd1a00c2f72fee91c1b83f33bbcef9
BLAKE2b-256 5875513f3f885f953998605886bd90568f450003f2dbd263e36f84119b08279b

See more details on using hashes here.

Provenance

The following attestation bundles were made for flitter_lang-1.0.0b20-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: release-package.yml on jonathanhogg/flitter

Attestations:

File details

Details for the file flitter_lang-1.0.0b20-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for flitter_lang-1.0.0b20-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a65eed9e4c2f1e1b8fab050fc8477e55d11e69479e14fd4ed4544eb77f52b9df
MD5 042a8fa6ef0b53204721578b5b5d647e
BLAKE2b-256 3d8fcb146da042fae4cbcc9de1e76cd4838fbe6af1a2a38a134f0e7d6f696f6a

See more details on using hashes here.

Provenance

The following attestation bundles were made for flitter_lang-1.0.0b20-cp311-cp311-macosx_10_9_x86_64.whl:

Publisher: release-package.yml on jonathanhogg/flitter

Attestations:

File details

Details for the file flitter_lang-1.0.0b20-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for flitter_lang-1.0.0b20-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 02c8114ace91e5736f884aebcf4042cf26125e7d82b48764916b10bcbc1c0b0c
MD5 d6ade23f625894cea6006b9115294c95
BLAKE2b-256 d44e16bdd934fb6a665896e89022514d8749a4a771767eea20a6ae7b9040b5f9

See more details on using hashes here.

Provenance

The following attestation bundles were made for flitter_lang-1.0.0b20-cp310-cp310-win_amd64.whl:

Publisher: release-package.yml on jonathanhogg/flitter

Attestations:

File details

Details for the file flitter_lang-1.0.0b20-cp310-cp310-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for flitter_lang-1.0.0b20-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 26f79ad3798c28dd5193b150d2bec8d8430c83c0da93c81cb613ba81853c8324
MD5 59a844f3f4be514820b46af1cd1143ba
BLAKE2b-256 153de8f91aa239261d73e5f34bace97a6aa6e5397879b099710f851bcb3d1ea5

See more details on using hashes here.

Provenance

The following attestation bundles were made for flitter_lang-1.0.0b20-cp310-cp310-musllinux_1_1_x86_64.whl:

Publisher: release-package.yml on jonathanhogg/flitter

Attestations:

File details

Details for the file flitter_lang-1.0.0b20-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for flitter_lang-1.0.0b20-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8f54a6a9569f34c8bb51b28ae24583f707f0dce5b22e56ece3b9d8eae4397d1d
MD5 edb0d7ce0de790a2f51a328f5a778fe2
BLAKE2b-256 1c58fd4eea4d3eeb3a07f982ebae0936bdae1464453daa6d3c4b442219f46384

See more details on using hashes here.

Provenance

The following attestation bundles were made for flitter_lang-1.0.0b20-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release-package.yml on jonathanhogg/flitter

Attestations:

File details

Details for the file flitter_lang-1.0.0b20-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for flitter_lang-1.0.0b20-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e2edf51f45474922d781307765ba295dbff2419d3cc7e9dd939c1c3023d1c507
MD5 543cdb994a475ef31eb8fa82b755ff10
BLAKE2b-256 8263e74e70df83786e21ea7dd2374c503b9c4e228e23c8df678a7e4c0e6b9377

See more details on using hashes here.

Provenance

The following attestation bundles were made for flitter_lang-1.0.0b20-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: release-package.yml on jonathanhogg/flitter

Attestations:

File details

Details for the file flitter_lang-1.0.0b20-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for flitter_lang-1.0.0b20-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4977da985e2832988dbdc4b3886bb22fe68a01499277e8ee24f47fb00f2edc24
MD5 ecba0ce16e5b98f8c56123eba7c74153
BLAKE2b-256 33421d80e08b7892ae143a3b0ced1e1e70a96f4bd2df6ea4e162b2433a115289

See more details on using hashes here.

Provenance

The following attestation bundles were made for flitter_lang-1.0.0b20-cp310-cp310-macosx_10_9_x86_64.whl:

Publisher: release-package.yml on jonathanhogg/flitter

Attestations:

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page