hyperarp

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	C   note = 0
	Cis      = iota
	D
	Dis
	E
	F
	Fis
	G
	Gis
	A
	Ais
	B
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Arp

type Arp struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func New

func New(in drivers.In, out drivers.Out, opts ...Option) *Arp

New returns a new Arp, receiving from the given midi.In port and writing to the given midi.Out port

func (*Arp) AddNote

func (a *Arp) AddNote(key, velocity uint8)

func (*Arp) Close

func (a *Arp) Close() error

func (*Arp) ControlChannel

func (a *Arp) ControlChannel() int8

func (*Arp) Lock

func (a *Arp) Lock(by string)

func (*Arp) RLock

func (a *Arp) RLock()

func (*Arp) RUnLock

func (a *Arp) RUnLock()

func (*Arp) RemoveNote

func (a *Arp) RemoveNote(key uint8)

func (*Arp) Reset

func (a *Arp) Reset()

func (*Arp) Run

func (a *Arp) Run() error

func (*Arp) SetNoteDistance

func (a *Arp) SetNoteDistance(dist float64)

func (*Arp) SetNoteVelocity

func (a *Arp) SetNoteVelocity(key, velocity uint8)

func (*Arp) SetStartNoteVelocity

func (a *Arp) SetStartNoteVelocity(velocity uint8)

TODO maybe remove

func (*Arp) SetStyleLegato

func (a *Arp) SetStyleLegato()

func (*Arp) SetStyleNonLegato

func (a *Arp) SetStyleNonLegato()

func (*Arp) SetStyleStaccato

func (a *Arp) SetStyleStaccato()

func (*Arp) SetSwing

func (a *Arp) SetSwing(percent float32)

func (*Arp) SetTempo

func (a *Arp) SetTempo(bpm float64)

func (*Arp) Silence

func (a *Arp) Silence() (did bool)

func (*Arp) StartWithNote

func (a *Arp) StartWithNote(key, velocity uint8)

func (*Arp) Stop

func (a *Arp) Stop()

func (*Arp) StopWithNote

func (a *Arp) StopWithNote(key uint8)

func (*Arp) SwitchDirection

func (a *Arp) SwitchDirection(down bool)

func (*Arp) Unlock

func (a *Arp) Unlock(by string)

func (*Arp) WriteMsg

func (a *Arp) WriteMsg(msg midi.Message) error

func (*Arp) WriteNoteOff

func (a *Arp) WriteNoteOff(key uint8) error

func (*Arp) WriteNoteOn

func (a *Arp) WriteNoteOn(key, velocity uint8) error

type Option

type Option func(a *Arp)

func CCDirectionSwitch

func CCDirectionSwitch(controller uint8) Option

CCDirectionSwitch sets the controller for the direction switch

func CCStyle

func CCStyle(controller uint8) Option

CCStyle sets the controller for the playing style (staccato, legato, non-legato)

func CCTimeInterval

func CCTimeInterval(controller uint8) Option

CCTimeInterval sets the controller for the time interval

func ChannelIn

func ChannelIn(ch uint8) Option

ChannelIn sets the midi channel to listen to (0-15)

func ChannelOut

func ChannelOut(ch uint8) Option

ChannelOut sets the midi channel to write to

func ControlChannel

func ControlChannel(ch uint8) Option

ControlChannel sets a separate MIDI channel for the control messages

func NoteDirectionSwitch

func NoteDirectionSwitch(key uint8) Option

NoteDirectionSwitch sets the key for the direction switch

func NotePoolOctave

func NotePoolOctave(oct uint8) Option

NotePoolOctave sets the octave that defines the note pool, instead of the starting note

func NoteStyle

func NoteStyle(key uint8) Option

NoteStyle sets the key for the playing style (staccato, legato, non-legato)

func NoteTimeInterval

func NoteTimeInterval(key uint8) Option

NoteTimeInterval sets the key for the time interval

func Tempo

func Tempo(bpm float64) Option

func Transpose

func Transpose(halfnotes int8) Option

Transpose sets the transposition for the midi

Jump to

Keyboard shortcuts

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