sequencer

package
Version: v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const QUARTERNOTES_PER_MEASURE = 4

Variables

View Source
var ClickPerQuarterNote = 2.0

Functions

This section is empty.

Types

type Measure

type Measure struct {
	// Emit contains the data that will be emitted
	Emit   map[int][]music.Chord
	Chords []music.Chord
}

Measure is all the notes contained within 4-beats

type Part

type Part struct {
	Instruments []string
	Measures    []Measure
	Legato      int
}

Part contains the list of instruments and their measures

type Section

type Section struct {
	Name        string
	Parts       []Part
	NumMeasures int
	Tempo       float64
}

type Sequencer

type Sequencer struct {
	Sections []Section

	sync.Mutex
	// contains filtered or unexported fields
}

func New

func New(clickTrack bool, latency int64, midiPlay func(string, music.Chord)) (s *Sequencer)

func (*Sequencer) Emit

func (s *Sequencer) Emit(pulse int)

func (*Sequencer) Parse

func (s *Sequencer) Parse(fname string) (err error)

func (*Sequencer) Start

func (s *Sequencer) Start()

func (*Sequencer) Stop

func (s *Sequencer) Stop()

func (*Sequencer) UpdateTempo

func (s *Sequencer) UpdateTempo(tempo float64)

Source Files

Jump to

Keyboard shortcuts

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