module

package
v0.0.0-...-0cb7d88 Latest Latest
Warning

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

Go to latest
Published: May 6, 2023 License: MIT, MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MinBPM float32 = 0.1
	MaxBPM float32 = 480.0
)
View Source
const (
	MinGateDuration time.Duration = time.Microsecond
	MaxGateDuration time.Duration = time.Millisecond * 990
)
View Source
const (
	DefaultGateDuration = time.Millisecond * 100
)

Variables

This section is empty.

Functions

func BPMString

func BPMString(bpm float32) string

func BPMToCV

func BPMToCV(bpm float32) units.CV

func CVToBPM

func CVToBPM(cv units.CV) float32

func CVToGateDuration

func CVToGateDuration(cv units.CV) time.Duration

func GateDurationString

func GateDurationString(dur time.Duration) string

func GateDurationToCV

func GateDurationToCV(dur time.Duration) units.CV

Types

type ClockGenerator

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

func (*ClockGenerator) BPM

func (m *ClockGenerator) BPM() float32

func (*ClockGenerator) Enabled

func (m *ClockGenerator) Enabled() bool

func (*ClockGenerator) GateDuration

func (m *ClockGenerator) GateDuration() time.Duration

func (*ClockGenerator) Init

func (m *ClockGenerator) Init(config Config) error

func (*ClockGenerator) SetBPM

func (m *ClockGenerator) SetBPM(bpm float32)

func (*ClockGenerator) SetEnabled

func (m *ClockGenerator) SetEnabled(enabled bool)

func (*ClockGenerator) SetGateDuration

func (m *ClockGenerator) SetGateDuration(dur time.Duration)

func (*ClockGenerator) Tick

func (m *ClockGenerator) Tick(deltaTime time.Duration)

func (*ClockGenerator) Toggle

func (m *ClockGenerator) Toggle()

type Config

type Config struct {
	BPM          float32
	GateDuration time.Duration
	Enabled      bool
	ClockOut     func(high bool)
}

Jump to

Keyboard shortcuts

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