Documentation ¶
Index ¶
- Constants
- func BPMString(bpm float32) string
- func BPMToCV(bpm float32) units.CV
- func CVToBPM(cv units.CV) float32
- func CVToGateDuration(cv units.CV) time.Duration
- func GateDurationString(dur time.Duration) string
- func GateDurationToCV(dur time.Duration) units.CV
- type ClockGenerator
- func (m *ClockGenerator) BPM() float32
- func (m *ClockGenerator) Enabled() bool
- func (m *ClockGenerator) GateDuration() time.Duration
- func (m *ClockGenerator) Init(config Config) error
- func (m *ClockGenerator) SetBPM(bpm float32)
- func (m *ClockGenerator) SetEnabled(enabled bool)
- func (m *ClockGenerator) SetGateDuration(dur time.Duration)
- func (m *ClockGenerator) Tick(deltaTime time.Duration)
- func (m *ClockGenerator) Toggle()
- type Config
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 GateDurationString ¶
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()
Click to show internal directories.
Click to hide internal directories.