wscore [main]

class wscore

  provides all methods of window("phrase") objects,
  allowing a custom graphical display for all phrase windows in KeyKit
See: OverridePhraseWindowWithScore RevertToUsualPhraseWindows
Related topics: GUI custom

Documented methods: 
method .resize(...)
the resize method of wscore accepts "invisible" as argument this will prevent the windows to be redrawed, until it is resized again (with no argument or with a xy() array, as usual)
See: .visible

method .visible()
returns 1 if the window is visible, 0 if it is invisible
See: .resize

method .closestnote(xyarray)
Returns the note in the window that is closest to the specified point.
method .drawphrase(phrase, mode)
Draws the specified phrase in the window. The optional mode can be set to XOR, CLEAR, or STORE. The default mode is STORE.
method .scaletogrid(xyarray)
Scales the coordinates in xyarray from raw window values (pixels) to click (time) and pitch coordinates. The scaled coordinates are relative to the window's current view (as set by the view() method).
method .sweep(fifo,type,xyarray)
Begins a sweep operation.
method .trackname(string)
Sets the name of the track displayed in the window.
method .view(xyarray)
This method controls what area of the phrase is seen within the window, i.e. it allows you to zoom and pan around the phrase, using the window as a viewport. The argument to this method is assumed to be an xyarray value that specifies the desired viewing area. The coordinates are specified in terms of click (time) and pitch values. For example, if the phrase in window w were 32 beats in length, this statement would cause it to be dislayed in its entirety: w.view(xy(0,0,32b,127))
method .x(time)
returns the x screen value corresponding to a given time
See: .y .dx .dy

method .y(pitch)
returns the y screen value corresponding to a given pitch
See: .x .dx .dy

method .dx(duration)
returns the pixel distance corresponding to a given duration
See: .x .y .dy

method .dy(dp)
returns the pixel distance corresponding to a given pitch range
See: .x .y .dx

method .xynote(n)
returns the screen point (pixel) corresponding to note n
See: .x .y .dx

method .paty(y)
returns the pitch value corresponding at y screen value
See: .tatx

method .tatx(x})
returns the time value at screen value x
See: .paty

wscore [main]