Documentation ¶
Index ¶
- func Alert(format string, args ...interface{})
- func Defer(fn func())
- func Error(format string, args ...interface{})
- func Init(name string, init func(*Object, []Atom) bool, ...)
- func IsMainThread() bool
- func Log(format string, args ...interface{})
- func Pretty(a ...interface{})
- func Register(name string, prototype Instance)
- type Atom
- type Inlet
- type Instance
- type Object
- type Outlet
- 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 func(*Object, []Atom) bool, handler func(*Object, string, int, []Atom), free func(*Object))
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 init() function as the main() function is never called by a Max external.
The provided callbacks are called to initialize and object, handle messages 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 and 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.
Types ¶
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(msg string, inlet int, data []Atom) Free() }
Instance is a generic object instance.
type Object ¶
Object is single Max object.