NAME

Synth::Config - Synthesizer settings librarian

VERSION

version 0.0004

SYNOPSIS

use Synth::Config ();

my $synth = Synth::Config->new(model => 'Moog Matriarch');

my $id = $synth->make_setting(foo => 'bar', etc => '...');

my $setting = $synth->recall_setting(id => $id);
# { foo => 'bar', etc => '...' }

#my $result = $synth->render_setting(...); # TODO

DESCRIPTION

Synth::Config provides a way to save and recall synthesizer control settings in a database.

This does not control the synth. It is simply a way to manually record the parameters defined by knob, slider, switch, or patch settings in an SQLite database. It is a "librarian", if you will.

ATTRIBUTES

model

$model = $synth->model;

The required model name of the synthesizer.

This is turned into lowercase and all non-alpha-num characters are converted to an underline character (_).

dbname

$dbname = $synth->dbname;

Database name

Default: synth-config.db

verbose

$verbose = $synth->verbose;

Show progress.

METHODS

new

$synth = Synth::Config->new(model => $model);

Create a new Synth::Config object.

This automatically makes an SQLite database with a table named for the given model.

make_setting

my $id = $synth->make_setting(%args);

Save a named setting with a db "update or insert" operation and return the record id.

Example:

name: 'My Best Setting!'
settings:
  group  parameter control bottom top   value unit is_default
  filter cutoff    knob    20     20000 200   Hz   true

recall_setting

my $setting = $synth->recall_setting(id => $id);

Return the parameters of a setting for the given id.

SEE ALSO

Moo

Mojo::JSON

Mojo::SQLite

Knob: https://codepen.io/jhnsnc/pen/KXYayG

Switch: https://codepen.io/magnus16/pen/grzqMz

Slider: ?

AUTHOR

Gene Boggs <gene@cpan.org>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2023 by Gene Boggs.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)