Documentation ¶
Index ¶
- Constants
- Variables
- func BinDir() string
- func BinFilePath(nm string) string
- func ClearExternalScale()
- func ErrorResponse(err error, id string) string
- func GetBool(paramvalues *map[string]string, name string) (bool, error)
- func GetFloat(paramvalues *map[string]string, name string) (float32, error)
- func GetInt(paramvalues *map[string]string, name string) (int, error)
- func GetMorphArgs(name string) ([]string, error)
- func GetRequest(conn *websocket.Conn) (method, params, id string, err error)
- func GetString(paramvalues *map[string]string, name string) (string, error)
- func ISFFilePaths(nm string) (string, string)
- func IsTrueValue(value string) bool
- func LoadEffectsJSON()
- func LoadImage(path string) (*image.NRGBA, error)
- func LoadParamDefs() error
- func LoadParamEnums()
- func MidiFilePath(nm string) string
- func ParamValueMap(params string) (*map[string]string, error)
- func ParseBool(s string, name string) (bool, error)
- func ParseFloat32(s string, name string) (float32, error)
- func ParseInt(s string, name string) (int, error)
- func ReadVizUsers() error
- func RecordingsFilePath(nm string) string
- func ResultResponse(resultObj interface{}, id string) string
- func SendErrorResponse(conn *websocket.Conn, rpcerr error, id string)
- func SendResponse(conn *websocket.Conn, result string, err error, id string)
- func SendResultResponse(conn *websocket.Conn, result string, id string)
- func SetExternalScale(pitch int, on bool)
- func VenueDir() string
- func VenueFilePath(nm string) string
- func VizDir() string
- func WorldDir() string
- func WorldFilePath(nm string) string
- func WriteUsers() error
- type APIEvent
- type ActivePhrase
- type ActivePhrasesManager
- func (mgr *ActivePhrasesManager) AdvanceActivePhrasesByOneStep()
- func (mgr *ActivePhrasesManager) CallbackOnOutput(callback NoteOutputCallbackFunc) CallbackID
- func (mgr *ActivePhrasesManager) StartPhrase(p *Phrase, cid string)
- func (mgr *ActivePhrasesManager) StopPhrase(cid string, active *ActivePhrase, forceDelete bool)
- func (mgr *ActivePhrasesManager) UncallbackOnOutput(id CallbackID)
- type Alg
- type AlgDefault
- type AlgMaze
- type CallbackID
- type Clicks
- type CursorEvent
- type DebugFlags
- type Guest
- type LoopEvent
- type MIDIFile
- type MidiDevice
- type MidiEvent
- type MorphDef
- type Note
- type NoteOutputCallback
- type NoteOutputCallbackFunc
- type NoteType
- type PadSetting
- type ParamCallback
- type ParamDef
- type ParamValue
- type ParamValues
- func (vals *ParamValues) ParamBoolValue(name string) bool
- func (vals *ParamValues) ParamFloatValue(name string) float32
- func (vals *ParamValues) ParamIntValue(name string) int
- func (vals *ParamValues) ParamStringValue(name string) string
- func (vals *ParamValues) SetParamValue(nm string, v ParamValue)
- func (vals *ParamValues) SetParamValueWithString(name, value string, callback ParamCallback) error
- type Phrase
- func (p *Phrase) AdjustTimes(shift Clicks) *Phrase
- func (p *Phrase) Append(n *Note)
- func (p *Phrase) Arpeggio() *Phrase
- func (p *Phrase) AtTime(tm Clicks) *Phrase
- func (p *Phrase) Copy() *Phrase
- func (p *Phrase) CopyAndAppend(n *Note) *Note
- func (p *Phrase) CutTime(fromclick, toclick Clicks) *Phrase
- func (p *Phrase) Format(f fmt.State, c rune)
- func (p *Phrase) InsertNoLock(note *Note) *Phrase
- func (p *Phrase) InsertNote(nt *Note) *Phrase
- func (p *Phrase) Legato() *Phrase
- func (p *Phrase) Lock()
- func (p *Phrase) LowestPitch(delta int) uint8
- func (p *Phrase) Merge(fromPhrase *Phrase) *Phrase
- func (p *Phrase) NextTime(st Clicks) Clicks
- func (p *Phrase) NumNotes() int
- func (p *Phrase) RLock()
- func (p *Phrase) RUnlock()
- func (p *Phrase) ResetLengthNoLock()
- func (p *Phrase) Step(stepsize Clicks) *Phrase
- func (p *Phrase) ToString() string
- func (p *Phrase) Transpose(delta int) *Phrase
- func (p *Phrase) Unlock()
- type Recording
- type Remote
- type Scale
- type Step
- type StepLoop
- type Venue
- type VenueEventCallback
- type VizColor
- type VizEvent
- type VizUser
- func (u *VizUser) GetEmail() string
- func (u *VizUser) GetID() interface{}
- func (u *VizUser) GetPasswordHash() []byte
- func (u *VizUser) GetPasswordToken() (string, time.Time)
- func (u *VizUser) GetRoles() []string
- func (u *VizUser) GetState() int
- func (u *VizUser) GetVerificationID() (string, time.Time)
- func (u *VizUser) SetEmail(email string)
- func (u *VizUser) SetID(id interface{})
- func (u *VizUser) SetPasswordHash(hash []byte)
- func (u *VizUser) SetPasswordToken(id string, created time.Time)
- func (u *VizUser) SetState(state int)
- func (u *VizUser) SetVerificationID(id string, created time.Time)
- type World
Constants ¶
const ( NoteOnStatus byte = 0x90 NoteOffStatus byte = 0x80 PressureStatus byte = 0xa0 ControllerStatus byte = 0xb0 ProgramStatus byte = 0xc0 ChanPressureStatus byte = 0xd0 PitchbendStatus byte = 0xe0 )
These are the values of MIDI status bytes
const MaxClicks = Clicks(math.MaxInt64)
MaxClicks is the high-possible value for Clicks
const UnfinishedDuration = math.MaxInt32 - 1
UnfinishedDuration is an 'unset' value for Duration
Variables ¶
var DebugWorld = DebugFlags{ MIDI: false, API: false, Loop: false, Gen: false, Realtime: false, OSC: false, ISF: false, }
DebugWorld controls some debugging output
var DefaultFragmentShader = `
#version 330
uniform sampler2D tex;
uniform vec2 tjt;
in vec2 fragTexCoord;
in vec4 finalcolor;
in vec2 finaldebug;
in vec2 finaltjt;
out vec4 outputColor;
void main() {
outputColor = finalcolor;
// if ( finaldebug.x < 0.5 ) {
// outputColor = texture(tex, fragTexCoord);
// } else if ( finaldebug.x > 0.5 ) {
outputColor.r = 0.0;
outputColor.g = 0.8;
outputColor.b = 0.0;
outputColor = texture(tex, fragTexCoord);
outputColor.r = 1.0;
// }
}
` + "\x00"
DefaultFragmentShader is
var DefaultVertexShader = `
#version 330
uniform mat4 projection;
uniform vec4 color;
uniform vec4 misc;
uniform vec2 debug;
in vec3 vert;
in vec2 vertTexCoord;
out vec2 fragTexCoord;
out vec4 finalcolor;
out vec4 finalvert;
out int finaltype;
out vec2 finaldebug;
vec3 hsl2rgb( in vec3 c )
{
vec3 rgb = clamp( abs(mod(c.x*6.0+vec3(0.0,4.0,2.0),6.0)-3.0)-1.0, 0.0, 1.0 );
return c.z + c.y * (rgb-0.5)*(1.0-abs(2.0*c.z-1.0));
}
vec3 HueShift (in vec3 Color, in float Shift)
{
vec3 P = vec3(0.55735)*dot(vec3(0.55735),Color);
vec3 U = Color-P;
vec3 V = cross(vec3(0.55735),U);
Color = U*cos(Shift*6.2832) + V*sin(Shift*6.2832) + P;
return vec3(Color);
}
vec3 rgb2hsl( in vec3 c ){
float h = 0.0;
float s = 0.0;
float l = 0.0;
float r = c.r;
float g = c.g;
float b = c.b;
float cMin = min( r, min( g, b ) );
float cMax = max( r, max( g, b ) );
l = ( cMax + cMin ) / 2.0;
if ( cMax > cMin ) {
float cDelta = cMax - cMin;
//s = l < .05 ? cDelta / ( cMax + cMin ) : cDelta / ( 2.0 - ( cMax + cMin ) ); Original
s = l < .0 ? cDelta / ( cMax + cMin ) : cDelta / ( 2.0 - ( cMax + cMin ) );
if ( r == cMax ) {
h = ( g - b ) / cDelta;
} else if ( g == cMax ) {
h = 2.0 + ( b - r ) / cDelta;
} else {
h = 4.0 + ( r - g ) / cDelta;
}
if ( h < 0.0) {
h += 6.0;
}
h = h / 6.0;
}
return vec3( h, s, l );
}
vec3 rgb2hsv(vec3 c)
{
vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g));
vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r));
float d = q.x - min(q.w, q.y);
float e = 1.0e-10;
return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);
}
vec3 hsv2rgb(vec3 c)
{
vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
}
void main() {
float angle = misc.x;
float invsize = 1.0 / misc.y;
float size = misc.y;
float x = misc.z;
float y = misc.w;
fragTexCoord = vertTexCoord;
finalvert = vec4(size*vert.x,size*vert.y,vert.z,1);
if (angle != 0.0) {
mat4 rotation = mat4(mat2(
cos(angle), -sin(angle),
sin(angle), cos(angle)));
finalvert = finalvert * rotation;
}
finalvert.x += x;
finalvert.y += y;
gl_Position = projection * finalvert;
vec4 mycolor = vec4(hsl2rgb(vec3(color.x,color.y,color.z)), color.a);
finalcolor = mycolor;
finaltype = 1;
finaldebug = debug;
}
` + "\x00"
DefaultVertexShader is
var EffectsJSON map[string]interface{}
EffectsJSON is an unmarshalled version of the Effects.json file
var FragmentShader2 = `
#version 330
uniform sampler2D tex;
uniform vec2 tjt;
in vec2 fragTexCoord;
in vec4 finalcolor;
in vec2 finaldebug;
in vec2 finaltjt;
out vec4 outputColor;
void main() {
outputColor = finalcolor;
// if ( finaldebug.x < 0.5 ) {
// outputColor = texture(tex, fragTexCoord);
// } else if ( finaldebug.x > 0.5 ) {
outputColor.r = 0.0;
outputColor.g = 0.0;
outputColor.b = 0.8;
outputColor = texture(tex, fragTexCoord);
outputColor.g = 1.0;
// }
}
` + "\x00"
FragmentShader2 is
var LineVerticesForLines = []float32{
0.0, 0.0, 1.0, 0.0, 0.0,
1.0, 0.0, 1.0, 1.0, 0.0,
}
LineVerticesForLines is
var LineVerticesForLines2 = []float32{
0.0, 0.0, 1.0, 0.0, 0.0,
1.0, 0.0, 1.0, 1.0, 0.0,
}
LineVerticesForLines2 is
var PadSettings = map[string]PadSetting{
"A": {Sidmin: 11000, Sidmax: 12999, Reslayer: 1},
}
PadSettings gives va;ies
var ParamDefs map[string]ParamDef
ParamDefs is the set of all parameter definitions
var ParamEnums map[string][]string
ParamEnums contains the lists of enumerated values for string parameters
var Scales map[string]*Scale
Scales maps a name to a Scale
var SquareVerticesForLines = []float32{
-1.0, -1.0, 1.0, 0.0, 0.0,
1.0, -1.0, 1.0, 1.0, 0.0,
1.0, -1.0, 1.0, 1.0, 0.0,
1.0, 1.0, 1.0, 1.0, 1.0,
1.0, 1.0, 1.0, 1.0, 1.0,
-1.0, 1.0, 1.0, 0.0, 1.0,
-1.0, 1.0, 1.0, 0.0, 1.0,
-1.0, -1.0, 1.0, 0.0, 0.0,
}
SquareVerticesForLines is
var SquareVerticesForLines2 = []float32{
-1.0, -1.0, 1.0, 0.0, 0.0,
1.0, -1.0, 1.0, 1.0, 0.0,
1.0, -1.0, 1.0, 1.0, 0.0,
1.0, 1.0, 1.0, 1.0, 1.0,
1.0, 1.0, 1.0, 1.0, 1.0,
-1.0, 1.0, 1.0, 0.0, 1.0,
-1.0, 1.0, 1.0, 0.0, 1.0,
-1.0, -1.0, 1.0, 0.0, 0.0,
}
SquareVerticesForLines2 is
var SquareVerticiesForTriangles = []float32{
-1.0, -1.0, 1.0, 1.0, 0.0,
1.0, -1.0, 1.0, 0.0, 0.0,
-1.0, 1.0, 1.0, 1.0, 1.0,
1.0, -1.0, 1.0, 0.0, 0.0,
1.0, 1.0, 1.0, 0.0, 1.0,
-1.0, 1.0, 1.0, 1.0, 1.0,
}
SquareVerticiesForTriangles is
var SquareVerticiesForTriangles2 = []float32{
-1.0, -1.0, 1.0, 1.0, 0.0,
1.0, -1.0, 1.0, 0.0, 0.0,
-1.0, 1.0, 1.0, 1.0, 1.0,
1.0, -1.0, 1.0, 0.0, 0.0,
1.0, 1.0, 1.0, 0.0, 1.0,
-1.0, 1.0, 1.0, 1.0, 1.0,
}
SquareVerticiesForTriangles2 is
var VertexShader2 = `
#version 330
uniform mat4 projection;
uniform vec4 color;
uniform vec4 misc;
uniform vec2 debug;
in vec3 vert;
in vec2 vertTexCoord;
out vec2 fragTexCoord;
out vec4 finalcolor;
out vec4 finalvert;
out int finaltype;
out vec2 finaldebug;
vec3 hsl2rgb( in vec3 c )
{
vec3 rgb = clamp( abs(mod(c.x*6.0+vec3(0.0,4.0,2.0),6.0)-3.0)-1.0, 0.0, 1.0 );
return c.z + c.y * (rgb-0.5)*(1.0-abs(2.0*c.z-1.0));
}
vec3 HueShift (in vec3 Color, in float Shift)
{
vec3 P = vec3(0.55735)*dot(vec3(0.55735),Color);
vec3 U = Color-P;
vec3 V = cross(vec3(0.55735),U);
Color = U*cos(Shift*6.2832) + V*sin(Shift*6.2832) + P;
return vec3(Color);
}
vec3 rgb2hsl( in vec3 c ){
float h = 0.0;
float s = 0.0;
float l = 0.0;
float r = c.r;
float g = c.g;
float b = c.b;
float cMin = min( r, min( g, b ) );
float cMax = max( r, max( g, b ) );
l = ( cMax + cMin ) / 2.0;
if ( cMax > cMin ) {
float cDelta = cMax - cMin;
//s = l < .05 ? cDelta / ( cMax + cMin ) : cDelta / ( 2.0 - ( cMax + cMin ) ); Original
s = l < .0 ? cDelta / ( cMax + cMin ) : cDelta / ( 2.0 - ( cMax + cMin ) );
if ( r == cMax ) {
h = ( g - b ) / cDelta;
} else if ( g == cMax ) {
h = 2.0 + ( b - r ) / cDelta;
} else {
h = 4.0 + ( r - g ) / cDelta;
}
if ( h < 0.0) {
h += 6.0;
}
h = h / 6.0;
}
return vec3( h, s, l );
}
vec3 rgb2hsv(vec3 c)
{
vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g));
vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r));
float d = q.x - min(q.w, q.y);
float e = 1.0e-10;
return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);
}
vec3 hsv2rgb(vec3 c)
{
vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
}
void main() {
float angle = misc.x;
float invsize = 1.0 / misc.y;
float size = misc.y;
float x = misc.z;
float y = misc.w;
fragTexCoord = vertTexCoord;
finalvert = vec4(size*vert.x,size*vert.y,vert.z,1);
if (angle != 0.0) {
mat4 rotation = mat4(mat2(
cos(angle), -sin(angle),
sin(angle), cos(angle)));
finalvert = finalvert * rotation;
}
finalvert.x += x;
finalvert.y += y;
gl_Position = projection * finalvert;
vec4 mycolor = vec4(hsl2rgb(vec3(color.x,color.y,color.z)), color.a);
finalcolor = mycolor;
finaltype = 1;
finaldebug = debug;
}
` + "\x00"
VertexShader2 is
Functions ¶
func ErrorResponse ¶
ErrorResponse return a JSON 2.0 error response
func GetRequest ¶
GetRequest reads a JSON request from a websocket
func IsTrueValue ¶
IsTrueValue returns true if the value is some version of true
func LoadEffectsJSON ¶
func LoadEffectsJSON()
LoadEffectsJSON returns an unmarshalled version of the Effects.json file
func LoadParamEnums ¶
func LoadParamEnums()
LoadParamEnums initializes the list of enumerated parameter values
func ParamValueMap ¶
ParamValueMap takes a JSON string and returns a map of elements
func ReadVizUsers ¶
func ReadVizUsers() error
ReadVizUsers reads the users database and returns it all
func ResultResponse ¶
ResultResponse returns a JSON 2.0 result response
func SendErrorResponse ¶
SendErrorResponse sends a JSON 2.0 response
func SendResponse ¶
SendResponse sends a JSON 2.0 response
func SendResultResponse ¶
SendResultResponse sends a JSON 2.0 response
func WriteUsers ¶
func WriteUsers() error
WriteUsers writes out all users data. Assumes the caller has done the mutex.
Types ¶
type APIEvent ¶
type APIEvent struct {
// contains filtered or unexported fields
}
APIEvent is an API invocation
type ActivePhrase ¶
type ActivePhrase struct {
// contains filtered or unexported fields
}
ActivePhrase is a currently active MIDI phrase
func NewActivePhrase ¶
func NewActivePhrase(p *Phrase) *ActivePhrase
NewActivePhrase constructs a new ActivePhrase for a Phrase
type ActivePhrasesManager ¶
type ActivePhrasesManager struct { ActivePhrasesMutex sync.RWMutex // contains filtered or unexported fields }
ActivePhrasesManager manages ActivePhrases
func NewActivePhrasesManager ¶
func NewActivePhrasesManager(mididevice MidiDevice) *ActivePhrasesManager
NewActivePhrasesManager is
func (*ActivePhrasesManager) AdvanceActivePhrasesByOneStep ¶
func (mgr *ActivePhrasesManager) AdvanceActivePhrasesByOneStep()
AdvanceActivePhrasesByOneStep is
func (*ActivePhrasesManager) CallbackOnOutput ¶
func (mgr *ActivePhrasesManager) CallbackOnOutput(callback NoteOutputCallbackFunc) CallbackID
CallbackOnOutput is
func (*ActivePhrasesManager) StartPhrase ¶
func (mgr *ActivePhrasesManager) StartPhrase(p *Phrase, cid string)
StartPhrase is NOTE: startPhrase assumes that the r.activePhrasesMutex is held for writing
func (*ActivePhrasesManager) StopPhrase ¶
func (mgr *ActivePhrasesManager) StopPhrase(cid string, active *ActivePhrase, forceDelete bool)
StopPhrase is NOTE: stopPhrase assumes that the r.activePhrasesMutex is held for writing
func (*ActivePhrasesManager) UncallbackOnOutput ¶
func (mgr *ActivePhrasesManager) UncallbackOnOutput(id CallbackID)
UncallbackOnOutput is
type Alg ¶
type Alg interface { // Draw(pl *Pipeline) // ID() string // State() SpriteState // Params() *SpriteParams // AdjustForAge(secs float32) CanHandleCursor(ce *CursorEvent) bool ExecuteIncomingCursor(ce *CursorEvent) }
Alg is
type Clicks ¶
type Clicks int64
Clicks is a time or duration value. It is NOT MIDI clock. NOTE: A Clicks value for a Note can be negative because it's relative to the starting time of a Phrase
type CursorEvent ¶
type CursorEvent struct { ID string // of the form {sessionid}@{IP} X float32 Y float32 Z float32 Downdragup string LoopsLeft int Fresh bool Quantized bool }
CursorEvent is a down, drag, or up event inside a loop step
type DebugFlags ¶
DebugFlags is
var DebugUtil DebugFlags // default is no debugging, all false
DebugUtil controls debugging
type LoopEvent ¶
type LoopEvent struct {
CursorEvent *CursorEvent
}
LoopEvent is what gets played back in a loop
type MIDIFile ¶
type MIDIFile struct {
// contains filtered or unexported fields
}
MIDIFile lets you read a MIDI File
type MidiDevice ¶
type MidiDevice interface { Inputs() []string ListeningInputs() []string Outputs() []string SendNote(note *Note, debug bool, callbacks []*NoteOutputCallback) SendANO(outputName string) // lame ReadEvent(inputName string) (MidiEvent, error) Poll(inputName string) (bool, error) Listen(inputName string) error }
MidiDevice mediates all access to MIDI devices
type Note ¶
type Note struct { TypeOf NoteType // NOTE, NOTEON, NOTEOFF, NOTEBYTES Clicks Clicks // nanoseconds Duration Clicks // nanoseconds, when it's a NOTE // Channel uint8 // MIDI Channel 1-based, 0 if not set? Pitch uint8 // 0-127 Velocity uint8 // 0-127 Synth string // contains filtered or unexported fields }
Note is a single item in a Phrase
func NewNoteOff ¶
NewNoteOff creates a new NOTEOFF
func (*Note) ReadablePitch ¶
ReadablePitch returns a readable string for a note pitch Note that it also includes a + or - if it's a NOTEON or NOTEOFF. If it's not a NOTE-type note, "" is returned
type NoteOutputCallback ¶
type NoteOutputCallback struct { Callback func(n *Note) // contains filtered or unexported fields }
NoteOutputCallback is a call
type PadSetting ¶
type PadSetting struct {
Sidmin, Sidmax int
Reslayer int // Resolume layer number
ResolumePort int // OSC
}
PadSetting specifies a range of sid (session IDs from TUIO)
type ParamCallback ¶
ParamCallback is the callback when setting parameter values
type ParamValue ¶
type ParamValue interface{}
ParamValue is a single parameter value which could be any of the param*Value types
type ParamValues ¶
type ParamValues struct {
// contains filtered or unexported fields
}
ParamValues is the set of all parameter values
func (*ParamValues) ParamBoolValue ¶
func (vals *ParamValues) ParamBoolValue(name string) bool
ParamBoolValue is
func (*ParamValues) ParamFloatValue ¶
func (vals *ParamValues) ParamFloatValue(name string) float32
ParamFloatValue is
func (*ParamValues) ParamIntValue ¶
func (vals *ParamValues) ParamIntValue(name string) int
ParamIntValue is
func (*ParamValues) ParamStringValue ¶
func (vals *ParamValues) ParamStringValue(name string) string
ParamStringValue is
func (*ParamValues) SetParamValue ¶
func (vals *ParamValues) SetParamValue(nm string, v ParamValue)
SetParamValue is
func (*ParamValues) SetParamValueWithString ¶
func (vals *ParamValues) SetParamValueWithString(name, value string, callback ParamCallback) error
SetParamValueWithString is
type Phrase ¶
type Phrase struct { Length Clicks // contains filtered or unexported fields }
Phrase is a time-ordered list of Notes which are MIDI messages and other realtime events).
func (*Phrase) AdjustTimes ¶
AdjustTimes returns a new Phrase shifted by shift Clicks
func (*Phrase) Append ¶
Append appends a note to the end of a Phrase, assuming that the last note in the Phrase is before or at the same time as tne appended note.
func (*Phrase) Arpeggio ¶
Arpeggio returns an arpeggiated version of the phrase. One way of describing is that all the notes have been separated and then put back together, back-to-back.
func (*Phrase) AtTime ¶
AtTime returns those notes in the specified phrase that are sounding at the specified time. If a note ends exactly at the specified time, it is not included.
func (*Phrase) CopyAndAppend ¶
CopyAndAppend makes a copy of a Note and appends it to the Phrase
func (*Phrase) InsertNoLock ¶
InsertNoLock adds a Note to a Phrase
func (*Phrase) InsertNote ¶
InsertNote inserts a note into a Phrase NOTE: it's assumed that the Phrase is already locked for writing.
func (*Phrase) Legato ¶
Legato extends the duration of each note to abutt the start of the next note. Doesn't modify the duration of the last note.
func (*Phrase) LowestPitch ¶
LowestPitch returns the lowest pitch in a Phrase
func (*Phrase) Merge ¶
Merge merges a second Phrase into a Phrase NOTE: we get a Write lock on the Phrase, since we're actually changing it.
func (*Phrase) NextTime ¶
NextTime returns the time of the next note AFTER time st. If there are no notes after it, returns -1.
func (*Phrase) ResetLengthNoLock ¶
func (p *Phrase) ResetLengthNoLock()
ResetLengthNoLock sets the length of a Phrase to the end of the lastnote
type Remote ¶
type Remote struct {
// contains filtered or unexported fields
}
Remote represents a remote Viz thing, either an engine or hub
func (*Remote) CheckConnection ¶
CheckConnection returns true if the connection is respondig
type Scale ¶
type Scale struct {
// contains filtered or unexported fields
}
Scale says whether a pitch is in a scale
type StepLoop ¶
StepLoop is one loop
func (*StepLoop) AddToStep ¶
func (loop *StepLoop) AddToStep(ce *CursorEvent, stepnum Clicks, debug bool)
AddToStep adds a StepItem to the loop at the current step
type Venue ¶
type Venue struct {
// contains filtered or unexported fields
}
Venue is
func (*Venue) FeedMeEventsLive ¶
func (rm *Venue) FeedMeEventsLive(callback VenueEventCallback)
FeedMeEventsLive is
type VizColor ¶
type VizColor struct {
// contains filtered or unexported fields
}
VizColor is
func ColorFromHLS ¶
ColorFromHLS creates a color from hue, luminance, and saturation
func ColorFromRGB ¶
ColorFromRGB creates a VizColor from red, green, blue
type VizUser ¶
type VizUser struct {
// contains filtered or unexported fields
}
VizUser is
func (*VizUser) GetPasswordToken ¶
GetPasswordToken is
func (*VizUser) GetVerificationID ¶
GetVerificationID is
func (*VizUser) SetPasswordToken ¶
SetPasswordToken is