op

package
v0.50.1 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckDynamic

func CheckDynamic(emphasis string) error

func DecomposeSequence added in v0.45.0

func DecomposeSequence(s core.Sequence) core.Sequenceable

Types

type AtIndex

type AtIndex struct {
	Target core.Sequenceable
	Index  core.HasValue
}

func NewAtIndex

func NewAtIndex(index core.HasValue, target core.Sequenceable) AtIndex

func (AtIndex) S

func (a AtIndex) S() core.Sequence

func (AtIndex) Storex

func (a AtIndex) Storex() string

type Dynamic

type Dynamic struct {
	Target   []core.Sequenceable
	Emphasis core.HasValue
}

func (Dynamic) Replaced

func (d Dynamic) Replaced(from, to core.Sequenceable) core.Sequenceable

Replaced returns a new Dynamic in which any occurrences of "from" are replaced by "to".

func (Dynamic) S

func (d Dynamic) S() core.Sequence

func (Dynamic) Storex

func (d Dynamic) Storex() string

func (Dynamic) ToNote

func (d Dynamic) ToNote() (core.Note, error)

type DynamicMap

type DynamicMap struct {
	Target        []core.Sequenceable
	IndexDynamics []index2dynamic
}

func NewDynamicMap

func NewDynamicMap(slist []core.Sequenceable, dynamics string) (DynamicMap, error)

func (DynamicMap) Replaced

func (d DynamicMap) Replaced(from, to core.Sequenceable) core.Sequenceable

Replaced is part of Replaceable

func (DynamicMap) S

func (d DynamicMap) S() core.Sequence

func (DynamicMap) Storex

func (d DynamicMap) Storex() string

type Fraction

type Fraction struct {
	Target    []core.Sequenceable
	Parameter core.HasValue
}

func NewFraction

func NewFraction(parameter core.HasValue, target []core.Sequenceable) Fraction

func (Fraction) Replaced

func (d Fraction) Replaced(from, to core.Sequenceable) core.Sequenceable

Return a new Fraction in which any occurrences of "from" are replaced by "to".

func (Fraction) S

func (d Fraction) S() core.Sequence

func (Fraction) Storex

func (d Fraction) Storex() string

func (Fraction) ToNote

func (d Fraction) ToNote() (core.Note, error)

type FractionMap

type FractionMap struct {
	// contains filtered or unexported fields
}

func NewFractionMap

func NewFractionMap(fraction core.HasValue, target core.Sequenceable) FractionMap

func (FractionMap) Replaced added in v0.44.0

func (f FractionMap) Replaced(from, to core.Sequenceable) core.Sequenceable

Return a new FractionMap in which any occurrences of "from" are replaced by "to".

func (FractionMap) S

func (f FractionMap) S() core.Sequence

S is part of core.Sequenceable

func (FractionMap) Storex added in v0.44.0

func (f FractionMap) Storex() string

type Group

type Group struct {
	Target core.Sequenceable
}

func (Group) Replaced

func (p Group) Replaced(from, to core.Sequenceable) core.Sequenceable

Replaced is part of Replaceable

func (Group) S

func (p Group) S() core.Sequence

func (Group) Storex

func (p Group) Storex() string

type IfCondition

type IfCondition struct {
	Condition core.HasValue
	Then      core.Sequenceable
	Else      core.Sequenceable
}

func (IfCondition) Replaced

func (i IfCondition) Replaced(from, to core.Sequenceable) core.Sequenceable

Replaced is part of Replaceable

func (IfCondition) S

func (i IfCondition) S() core.Sequence

func (IfCondition) Storex

func (i IfCondition) Storex() string

type Join

type Join struct {
	Target []core.Sequenceable
}

func (Join) Replaced

func (j Join) Replaced(from, to core.Sequenceable) core.Sequenceable

Replaced is part of Replaceable

func (Join) S

func (j Join) S() core.Sequence

func (Join) Storex

func (j Join) Storex() string

type JoinMap

type JoinMap struct {
	// contains filtered or unexported fields
}

func NewJoinMap

func NewJoinMap(v core.HasValue, indices core.HasValue) JoinMap

func (JoinMap) Replaced

func (j JoinMap) Replaced(from, to core.Sequenceable) core.Sequenceable

Replaced is part of Replaceable

func (JoinMap) S

func (j JoinMap) S() core.Sequence

func (JoinMap) Storex

func (j JoinMap) Storex() string

type Merge

type Merge struct {
	Target []core.Sequenceable
}

func (Merge) Replaced

func (m Merge) Replaced(from, to core.Sequenceable) core.Sequenceable

Replaced is part of Replaceable

func (Merge) S

func (m Merge) S() core.Sequence

func (Merge) Storex

func (m Merge) Storex() string

type NoteMap

type NoteMap struct {
	Target  core.HasValue
	Indices []int
	// contains filtered or unexported fields
}

func NewNoteMap

func NewNoteMap(indices string, note core.HasValue) (NoteMap, error)

NewNoteMap returns a NoteMap that creates a sequence from occurrences of a note. The format of indices can be one of: 1 2 4 ; each number is an index in the sequence where the note is present; rest notes are placed in the gaps. ! . ! ; each dot is a rest, each exclamation mark is a presence of a note.

func (NoteMap) Inspect

func (n NoteMap) Inspect(i core.Inspection)

Inspect implements Inspectable

func (NoteMap) Replaced

func (n NoteMap) Replaced(from, to core.Sequenceable) core.Sequenceable

Replaced is part of Replaceable

func (NoteMap) S

func (n NoteMap) S() core.Sequence

func (NoteMap) Storex

func (n NoteMap) Storex() string

type Octave

type Octave struct {
	Target []core.Sequenceable
	Offset core.HasValue
}

func (Octave) Replaced

func (o Octave) Replaced(from, to core.Sequenceable) core.Sequenceable

Replaced is part of Replaceable

func (Octave) S

func (o Octave) S() core.Sequence

func (Octave) Storex

func (o Octave) Storex() string

type OctaveMap

type OctaveMap struct {
	Target       core.Sequenceable
	IndexOffsets []int2int // one-based
}

func NewOctaveMap

func NewOctaveMap(target core.Sequenceable, indices string) OctaveMap

func (OctaveMap) Notes

func (o OctaveMap) Notes() [][]core.Note

func (OctaveMap) Replaced

func (o OctaveMap) Replaced(from, to core.Sequenceable) core.Sequenceable

Replaced is part of Replaceable

func (OctaveMap) S

func (o OctaveMap) S() core.Sequence

func (OctaveMap) Storex

func (o OctaveMap) Storex() string

type Probability

type Probability struct {
	// contains filtered or unexported fields
}

*

prob(0.8,note('c')) = a sequence with 80% chance of playing C

*

func NewProbability

func NewProbability(chance, target core.HasValue) *Probability

func (*Probability) S

func (p *Probability) S() core.Sequence

func (*Probability) ToNote

func (p *Probability) ToNote() (core.Note, error)

type RandomInteger

type RandomInteger struct {
	From core.HasValue
	To   core.HasValue
	// contains filtered or unexported fields
}

func NewRandomInteger

func NewRandomInteger(from, to core.HasValue) *RandomInteger

func (*RandomInteger) Next

func (r *RandomInteger) Next() interface{}

Next is part of Nextable

func (RandomInteger) Storex

func (r RandomInteger) Storex() string

Storex is part of Storable

func (*RandomInteger) Value

func (r *RandomInteger) Value() interface{}

Value is part of HasValue

type Repeat

type Repeat struct {
	Target []core.Sequenceable
	Times  core.HasValue
}

func (Repeat) Replaced

func (r Repeat) Replaced(from, to core.Sequenceable) core.Sequenceable

Replaced is part of Replaceable

func (Repeat) S

func (r Repeat) S() core.Sequence

func (Repeat) Storex

func (r Repeat) Storex() string

type Replace

type Replace struct {
	Target   core.Sequenceable
	From, To core.Sequenceable
}

Replace will replace a Sequenceable upon creating a Sequence.

func (Replace) S

func (r Replace) S() core.Sequence

S is part of Sequenceable

func (Replace) Storex

func (r Replace) Storex() string

Storex is part of Storable

type Resequencer

type Resequencer struct {
	Target  core.Sequenceable
	Indices [][]int
	Pattern core.HasValue
}

func NewResequencer

func NewResequencer(s core.Sequenceable, pattern core.HasValue) Resequencer

func (Resequencer) Replaced

func (p Resequencer) Replaced(from, to core.Sequenceable) core.Sequenceable

Replaced is part of Replaceable

func (Resequencer) S

func (p Resequencer) S() core.Sequence

func (Resequencer) Storex

func (p Resequencer) Storex() string

type Reverse

type Reverse struct {
	Target core.Sequenceable
}

func (Reverse) Replaced

func (r Reverse) Replaced(from, to core.Sequenceable) core.Sequenceable

Replaced is part of Replaceable

func (Reverse) S

func (r Reverse) S() core.Sequence

func (Reverse) Storex

func (r Reverse) Storex() string

type Rotate

type Rotate struct {
	Target core.Sequenceable
	Times  core.HasValue
}

func (Rotate) S

func (r Rotate) S() core.Sequence

func (Rotate) Storex

func (r Rotate) Storex() string

type Serial

type Serial struct {
	Target []core.Sequenceable
}

func (Serial) Replaced

func (a Serial) Replaced(from, to core.Sequenceable) core.Sequenceable

Replaced is part of Replaceable

func (Serial) S

func (a Serial) S() core.Sequence

func (Serial) Storex

func (a Serial) Storex() string

Storex is part of Storable

type Stretch

type Stretch struct {
	// contains filtered or unexported fields
}

func NewStretch

func NewStretch(factor core.HasValue, target []core.Sequenceable) Stretch

func (Stretch) Replaced

func (s Stretch) Replaced(from, to core.Sequenceable) core.Sequenceable

Replaced is part of Replaceable

func (Stretch) S

func (s Stretch) S() core.Sequence

func (Stretch) Storex

func (s Stretch) Storex() string

Storex is part of Storable

type Transpose

type Transpose struct {
	Target    core.Sequenceable
	Semitones core.HasValue
}

func (Transpose) Replaced

func (p Transpose) Replaced(from, to core.Sequenceable) core.Sequenceable

Replaced is part of Replaceable

func (Transpose) S

func (p Transpose) S() core.Sequence

func (Transpose) Storex

func (p Transpose) Storex() string

type TransposeMap

type TransposeMap struct {
	IndexOffsets []int2int // one-based
	Target       core.Sequenceable
}

func NewTransposeMap

func NewTransposeMap(target core.Sequenceable, indices string) TransposeMap

func (TransposeMap) Notes

func (p TransposeMap) Notes() [][]core.Note

func (TransposeMap) Replaced

func (p TransposeMap) Replaced(from, to core.Sequenceable) core.Sequenceable

Replaced is part of Replaceable

func (TransposeMap) S

func (p TransposeMap) S() core.Sequence

func (TransposeMap) Storex

func (p TransposeMap) Storex() string

Storex is part of Storable

type Trim added in v0.43.0

type Trim struct {
	Start  core.HasValue
	End    core.HasValue
	Target core.Sequenceable
}

func (Trim) Replaced added in v0.43.0

func (t Trim) Replaced(from, to core.Sequenceable) core.Sequenceable

Replaced is part of Replaceable

func (Trim) S added in v0.43.0

func (t Trim) S() core.Sequence

func (Trim) Storex added in v0.43.0

func (t Trim) Storex() string

type Undynamic

type Undynamic struct {
	Target core.Sequenceable
}

func (Undynamic) S

func (u Undynamic) S() core.Sequence

func (Undynamic) Storex

func (u Undynamic) Storex() string

type VelocityMap

type VelocityMap struct {
	Target          core.Sequenceable
	IndexVelocities []int2int // one-based
}

func NewVelocityMap

func NewVelocityMap(target core.Sequenceable, indices string) VelocityMap

func (VelocityMap) Notes

func (v VelocityMap) Notes() [][]core.Note

func (VelocityMap) Replaced

func (v VelocityMap) Replaced(from, to core.Sequenceable) core.Sequenceable

Replaced is part of Replaceable

func (VelocityMap) S

func (v VelocityMap) S() core.Sequence

func (VelocityMap) Storex

func (v VelocityMap) Storex() string

Jump to

Keyboard shortcuts

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