Documentation ¶
Index ¶
- Constants
- Variables
- func ParameterCategories() map[string]bool
- func RotdirValue(s string) int
- func SpriteAdjustForAge(s Sprite, age float32)
- type APIHandler
- type ActiveCursor
- type Command
- type Engine
- type OSCEvent
- type Params
- type Pipeline
- type PlaybackEvent
- type PressedNote
- type Reactor
- type Sprite
- type SpriteLine
- type SpriteParams
- type SpriteSquare
- type SpriteState
- type SpriteVector
- type TuioCursor
- type Vizlet
- type VizletDrawer
- func (viz *VizletDrawer) AddSprite(s Sprite)
- func (viz *VizletDrawer) AgeSprites()
- func (viz *VizletDrawer) DoVizlet() error
- func (viz *VizletDrawer) DrawSprites()
- func (viz *VizletDrawer) Height() int
- func (viz *VizletDrawer) Name() string
- func (viz *VizletDrawer) OutputTexture() *glhf.Texture
- func (viz *VizletDrawer) SetInputFromVizlet(from Vizlet)
- func (viz *VizletDrawer) SetSpoutIn(spoutin string)
- func (viz *VizletDrawer) SetSpoutOut(spoutout string)
- func (viz *VizletDrawer) Shader() *glhf.Shader
- func (viz *VizletDrawer) Sprites() []Sprite
- func (viz *VizletDrawer) Width() int
- type VizletISF
- func (viz *VizletISF) DoVizlet() error
- func (viz *VizletISF) Height() int
- func (viz *VizletISF) Name() string
- func (viz *VizletISF) OutputTexture() *glhf.Texture
- func (viz *VizletISF) SetInputFromVizlet(from Vizlet)
- func (viz *VizletISF) SetSpoutIn(spoutin string)
- func (viz *VizletISF) SetSpoutOut(spoutout string)
- func (viz *VizletISF) Shader() *glhf.Shader
- func (viz *VizletISF) Width() int
Constants ¶
const ( RadToDeg = 180 / math.Pi DegToRad = math.Pi / 180 )
RadToDeg and DegToRad are conversion factors
Variables ¶
var DebugEngine = util.DebugFlags{}
DebugEngine controls debugging output
Functions ¶
func ParameterCategories ¶
ParameterCategories is the list of parameter categories (both per-pad and global) Someday the value will be something more interesting than bool
func SpriteAdjustForAge ¶
SpriteAdjustForAge updates a SpriteState's values to reflect a given age
Types ¶
type APIHandler ¶
APIHandler is an API execution func
type ActiveCursor ¶
type ActiveCursor struct {
// contains filtered or unexported fields
}
ActiveCursor is a currently active (i.e. down) cursor
type Command ¶
type Command struct { Action string // e.g. "addmidi" Arg interface{} }
Command is sent on the control channel of the Engine
type Engine ¶
type Engine struct { Reactors map[string]*Reactor MIDINumDown int MIDIOctaveShift int // contains filtered or unexported fields }
Engine takes events and routes them
func (*Engine) ChangeClicksPerSecond ¶
ChangeClicksPerSecond is what you use to change the tempo
func (*Engine) InitializeClicksPerSecond ¶
InitializeClicksPerSecond initializes
func (*Engine) StartRealtime ¶
func (e *Engine) StartRealtime()
StartRealtime runs the looper and never returns
type PlaybackEvent ¶
type PlaybackEvent struct {
// contains filtered or unexported fields
}
PlaybackEvent is a time-tagged cursor or API event
type PressedNote ¶
type PressedNote struct {
// contains filtered or unexported fields
}
PressedNote is a currently active MIDI note
type Reactor ¶
type Reactor struct { ParamsOfCategory map[string]*util.ParamValues MIDIFile *util.MIDIFile // contains filtered or unexported fields }
Reactor is an entity that that reacts to things (cursor events, apis) and generates output (midi, graphics). In Space Palette Pro, each pad has a Reactor
func NewReactor ¶
func NewReactor(midiOutput util.MidiDevice, router *Engine, pad string, sidmin int, sidmax int) *Reactor
NewReactor makes a new Reactor
func (*Reactor) CanHandleCursor ¶
func (r *Reactor) CanHandleCursor(ce *util.CursorEvent) bool
CanHandleCursor returns true if event handled by this Reactor
func (*Reactor) ExecuteIncomingCursor ¶
func (r *Reactor) ExecuteIncomingCursor(ce *util.CursorEvent)
ExecuteIncomingCursor xxx
type Sprite ¶
type Sprite interface { Draw(*glhf.Shader) ID() string SpriteState() *SpriteState SpriteParams() *SpriteParams AdjustForAge(age float32) }
Sprite xxx
type SpriteLine ¶
type SpriteLine struct { Sprite State *SpriteState Params *SpriteParams }
SpriteLine xxx
func NewSpriteLine ¶
func NewSpriteLine(x, y, z float32, params *util.ParamValues) *SpriteLine
NewSpriteLine xxx
func (*SpriteLine) SpriteParams ¶
func (s *SpriteLine) SpriteParams() *SpriteParams
SpriteParams xxx
type SpriteParams ¶
type SpriteParams struct {
// contains filtered or unexported fields
}
SpriteParams xxx
func NewSpriteParams ¶
func NewSpriteParams(params *util.ParamValues) *SpriteParams
NewSpriteParams xxx
type SpriteSquare ¶
type SpriteSquare struct { Sprite State *SpriteState Params *SpriteParams }
SpriteSquare xxx
func NewSpriteSquare ¶
func NewSpriteSquare(x, y, z float32, params *util.ParamValues) *SpriteSquare
NewSpriteSquare xxx
func (*SpriteSquare) SpriteParams ¶
func (s *SpriteSquare) SpriteParams() *SpriteParams
SpriteParams xxx
func (*SpriteSquare) SpriteState ¶
func (s *SpriteSquare) SpriteState() *SpriteState
SpriteState xxx
type SpriteState ¶
type SpriteState struct { NoAging bool // if true, the Sprite doesn't age // contains filtered or unexported fields }
SpriteState xxx
type SpriteVector ¶
type SpriteVector struct {
// contains filtered or unexported fields
}
SpriteVector xxx
type TuioCursor ¶
type TuioCursor struct {
// contains filtered or unexported fields
}
TuioCursor is a TUIO cursor, the main purpose being to know when it hasn't been seen for a while, to generate an UP event
type Vizlet ¶
type Vizlet interface { Name() string DoVizlet() error OutputTexture() *glhf.Texture SetSpoutIn(string) SetSpoutOut(string) SetInputFromVizlet(Vizlet) AddSprite(Sprite) // Eventually this should go elsewhere, when cursor handling gets put into Vizlet interface AgeSprites() // Ditto, when Vizlet interface starts handling click advance HandleStepCursorEvent(*util.CursorEvent) }
Vizlet xxx
func NewVizletDrawer ¶
NewVizletDrawer xxx
type VizletDrawer ¶
type VizletDrawer struct { Vizlet // contains filtered or unexported fields }
VizletDrawer is one Drawer shader within a Pipeline
func (*VizletDrawer) OutputTexture ¶
func (viz *VizletDrawer) OutputTexture() *glhf.Texture
OutputTexture xxx
func (*VizletDrawer) SetInputFromVizlet ¶
func (viz *VizletDrawer) SetInputFromVizlet(from Vizlet)
SetInputFromVizlet xxx
func (*VizletDrawer) SetSpoutIn ¶
func (viz *VizletDrawer) SetSpoutIn(spoutin string)
SetSpoutIn xxx
func (*VizletDrawer) SetSpoutOut ¶
func (viz *VizletDrawer) SetSpoutOut(spoutout string)
SetSpoutOut xxx
type VizletISF ¶
type VizletISF struct { Vizlet // contains filtered or unexported fields }
VizletISF is one ISF shader within a Pipeline
func (*VizletISF) OutputTexture ¶
OutputTexture xxx
func (*VizletISF) SetInputFromVizlet ¶
SetInputFromVizlet xxx