Skip to content

A utility to generate custom waveform graphics for use in presentations and such.

License

Notifications You must be signed in to change notification settings

thegalexc/waveform-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Waveform Generator

A utility to generate custom waveform graphics for use in presentations and such.

Allows basic customization with reasonable randomness.

Quick Start

$ pip install -e .
$ waveform single

Environment Setup

Python Environment

Recommended to use a virtual environment. I use pyenv and pyenv-virtualenv. See more about pyenv here and pyenv-virtualenv here.

Then, install the version of python as specified in the .python-version file. e.g.

$ pyenv install 3.10.12

Create a virtual environment and activate it, e.g.

$ cd /path/to/waveform-generator
$ mkvirtualenv -a `pwd` waveform

Install the requirements.

$ pip install -e .

Usage

$ waveform --help

Usage: waveform [OPTIONS] COMMAND [ARGS]...

Waveform CLI.

Options:
    --help  Show this message and exit.

Commands:
    batch   Save a batch of waveform graphics with random variations.
    single  Plot and optionally save a single waveform graphic.

Examples

Basic, default usage. This will open a window with a single waveform graphic so you can see what it looks like.

$ waveform single
$ waveform single --closed-loop

Save a batch of random variations to your base settings to the tmp/ directory.

$ waveform batch --save-path tmp/

Some fun variations that will open in a window for you to see. You can set --save-path to save them to a directory and run in batch mode to save a bunch at once (set --num-images to the number of variations you want to save). Note: remove --seed to get different variations each time with same base settings.

$ waveform single --seed 19 --spread 0.5
$ waveform single --seed 9 --spread 0.25 --closed-loop --perturbation-base-curve 0.25 --perturbation-between-curves 0.02 --num-points 20

Images With Seeds

See the filenames for the seed and other values used to generate the images below.

Waveform 1 Waveform 2 Waveform 3 Waveform 4 Waveform 5

About

A utility to generate custom waveform graphics for use in presentations and such.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages