NAME

MIDI::Bassline::Walk - Generate walking basslines

VERSION

version 0.0100

SYNOPSIS

use MIDI::Bassline::Walk;

my $bassline = MIDI::Bassline::Walk->new(verbose => 1);

my $notes = $bassline->generate('C7b5', 4);

# MIDI:
# $score->n('qn', $_) for @$notes;

DESCRIPTION

MIDI::Bassline::Walk generates randomized, walking basslines.

ATTRIBUTES

intervals

$verbose = $bassline->intervals;

Allowed intervals passed to Music::VoiceGen.

Default: -3 -2 -1 1 2 3

octave

$octave = $bassline->octave;

Lowest MIDI octave.

Default: 2

verbose

$verbose = $bassline->verbose;

Show progress.

Default: 0

METHODS

new

$bassline = MIDI::Bassline::Walk->new(
    intervals => $intervals,
    octave    => $octave,
    verbose   => $verbose,
);

Create a new MIDI::Bassline::Walk object.

generate

$notes = $bassline->generate;
$notes = $bassline->generate($chord, $duration);

Generate a walking bassline over the given chord for duration quarter notes.

Defaults:

chord: C
duration: 4

SEE ALSO

Data::Dumper::Compact

Carp

List::Util

Music::Chord::Note

Music::Note

Music::Scales

Music::VoiceGen

Moo

strictures

namespace::clean

AUTHOR

Gene Boggs <gene@cpan.org>

COPYRIGHT AND LICENSE

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

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)