markov

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2024 License: Unlicense Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate added in v0.1.0

func Generate(filepath string, train []mlsic.Sine, h *Harmonics, ngen int)

Generate .

Types

type Harmonics added in v0.1.0

type Harmonics struct {
	Partials map[int]float64
}

Harmonics .

func (*Harmonics) Naive added in v0.1.0

func (h *Harmonics) Naive()

Naive .

type Song

type Song struct {
	// NGenerations is the number of generations to generate based on the initial seed.
	NGenerations int
	// FilePath is the directory the audio files wil be saved.
	FilePath string
	// ModelsPath is the directory the models produced out of each ngeneration wil be saved.
	ModelsPath string
	// SeedModelPath is the path of the initial seed jsons.
	SeedModelPath string

	// Harmonics is the harmonics structure that will be used for audio generation.
	Harmonics *Harmonics
}

Song works as the entrance to the Markov chains generation.

func (*Song) NGen

func (s *Song) NGen()

NGen will process the seed model and based on it will generate the appropriate amount of generation cycles.

type Train

type Train struct {
	Freq *gomarkov.Chain
	Amp  *gomarkov.Chain
	Dur  *gomarkov.Chain
}

Train .

func (*Train) Add

func (t *Train) Add(train []mlsic.Sine)

Add .

func (*Train) Export added in v0.1.0

func (t *Train) Export(path string) error

Export .

Directories

Path Synopsis
seed

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL