Documentation ¶
Index ¶
- func Alert(format string, args ...interface{})
- func Defer(fn func())
- func Error(format string, args ...interface{})
- func Init(name string, init InitCallback, handle HandleCallback, process ProcessCallback, ...)
- func IsMainThread() bool
- func Log(format string, args ...interface{})
- func Pretty(a ...interface{})
- func Register(name string, prototype Instance)
- func ToFloat(atom Atom) float64
- func ToInt(atom Atom) int64
- func ToString(atom Atom) string
- type AdvancedInstance
- type Atom
- type Event
- type FreeCallback
- type HandleCallback
- type InitCallback
- type Inlet
- type Instance
- type Object
- type Outlet
- type ProcessCallback
- type ProcessingInstance
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Error ¶
func Error(format string, args ...interface{})
Error will print an error to the max console.
func Init ¶
func Init(name string, init InitCallback, handle HandleCallback, process ProcessCallback, free FreeCallback)
Init will initialize the Max class with the specified name using the provided callbacks to initialize and free objects. This function must be called from the main packages main() function.
The provided callbacks are called to initialize and object, handle messages, process audio and free the object when it is not used anymore. The callbacks are usually called on the Max main thread. However, the handler may be called from an unknown thread in parallel to the other callbacks.
func IsMainThread ¶
func IsMainThread() bool
IsMainThread will return if the Max main thead is executing.
func Log ¶
func Log(format string, args ...interface{})
Log will print a message to the max console.
func Register ¶
Register will initialize the Max class using the provided instance. This function must be called from the main packages main() function. The instance methods are usually called on the Max main thread. However, the handler may be called from an unknown thread in parallel to the other callbacks.
Types ¶
type AdvancedInstance ¶ added in v0.5.0
type AdvancedInstance interface { Loaded() DoubleClicked() }
AdvancedInstance is an object that responds to advanced messages.
type FreeCallback ¶ added in v0.6.0
type FreeCallback func(obj *Object)
FreeCallback is called to free objects.
type HandleCallback ¶ added in v0.6.0
HandleCallback is called to handle messages.
type InitCallback ¶ added in v0.6.0
InitCallback is called to initialize objects.
type Inlet ¶
type Inlet struct {
// contains filtered or unexported fields
}
Inlet is a single Max inlet.
type Instance ¶
type Instance interface { Init(obj *Object, args []Atom) bool Handle(inlet int, msg string, data []Atom) Free() }
Instance is a generic object instance.
type Object ¶
type Object struct {
// contains filtered or unexported fields
}
Object is single Max object.
func (*Object) Inlet ¶
Inlet will declare an inlet. If no inlets are added to an object it will have a default inlet to receive messages.
type Outlet ¶
type Outlet struct {
// contains filtered or unexported fields
}
Outlet is a single MAx outlet.
type ProcessCallback ¶ added in v0.6.0
ProcessCallback is called to process audio.
type ProcessingInstance ¶ added in v0.6.0
type ProcessingInstance interface {
Process(input, output [][]float64)
}
ProcessingInstance is an object that can processes audio.