Fun image to Vectorscope audio CLI tool. With support for complex sequences.
Project description
PicTone
PicTone is a simple, fun Python CLI tool that converts images into vectorscope audios. It supports tweaking multiple parameters and sampling sequences of images.
Installation
To install PicTone, use pip:
pip install pictone
You'll need Python 3.6 or higher.
Usage
PicTone is a command-line tool that converts the images into WAV files using a sampler with edge detection. You can tweak its parameters and the way the images are passed to it.
Command Line
The basic command structure for using PicTone is as follows:
pictone -i input_path -o output_path [options]
Input can be either an image or a folder with an ordered sequence of them.
In addition to the required input and output paths, there are some optional arguments to shape the result:
-r
--rate
: Sample rate for the output audio. Default is 44100 Hz.-d
--depth
: Bit depth for audio samples. Can be 8, 16, or 24. Default is 16.-s
--samples
: Number of samples the inputs should be forced to last. By default, they'll last the minimum. This is useful if you are converting a sequence (e.g. Forcing to 735 with a rate of 44100 would achieve a ~60 fps visualization).-a
--aspect
: Boolean value to decide whether to preserve the input aspect ratio. Defaults toTrue
.
As a Library
If you want to experiment, the sampler can be instantiated and configured by yourself. Although it just outputs a single input raw data:
import cv2
from pictone.sampler import EdgeSampler
image = cv2.imread("image.png", 0)
image_edges = cv2.Canny(image, 100, 200)
edge_threshold = 0
byte_depth = 2
sampler = EdgeSampler(edge_threshold, byte_depth) # Basic params
sampled_data = sampler.sample_frames(image_edges)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pictone-1.0.0.tar.gz
.
File metadata
- Download URL: pictone-1.0.0.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 830f53ddca86c736fea668614ad08aa968031495f9c41017b6d466a9d38504d9 |
|
MD5 | f50ebf1876baed504b0959650e7eee0c |
|
BLAKE2b-256 | dd411e9bda3b6572187f0d767dee1dcc68d7fb994727f69ae763c8a99b617090 |
File details
Details for the file pictone-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: pictone-1.0.0-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d8bcd6e2e738b4d8a88ba8359e3d0af75a49e84097ab2246d170008a5a3ce15 |
|
MD5 | f412367b4234feaee4f0f4c5b165fb4f |
|
BLAKE2b-256 | ccaeed8a351348c4404208a12bccb86053e92f059f561e0949a7fc64194a08d1 |