DRUMGRID(3)

NAME
drumgrid - a wishm widget to display and edit drum patterns

SYNOPSIS
drumgrid pathName [options]

  STANDARD OPTIONS
-background color
-borderwidth width
-cursor cursor
-font font
-foreground color
-relief relief
-xscrollcommand command
-yscrollcommand command

  WIDGET SPECIFIC OPTIONS

-beatcolor color
    This option specifies the color of the lines dividing beats. If not specified the color blue is used. It's class in BeatColor.

-beats beats
    This option specifies how many beats are in a measure. If not specified the value 4 is used. It's class is Beats.

-boxheight height
    This option specifies the height of the boxes. If not specified the value 20 is used. It's class is BoxHeight.

-boxwidth width
    This option specifies the width of the boxes. If not specified the value 20 is used. It's class is BoxWidth.

-height height
    This option specifies how many rows should be displayed. The remainder can be viewed by scrolling. If not specified the number of labels is used. It's class is Height.

-labels labelList
    This option specifies the labels for each row. It is a list and each element in the list corresponds to one row. If not specified the list {Kick Snare {High Hat Open} {High Hat Closed} Crash Ride {High Tom} {Middle Tom} {Low Tom}} is assumed. It's class is Labels.

-levels levels
    This option specifies how many different dynamic levels exist. If not specified the value 8 is assumed. It's class is Levels.

-linecolor color
    This option specifies the colors of lines that are neither dividing beats nor dividing measures. If not specified the value bisque3 is assumed. It's class is LineColor.

-linethickness thickness
    This option specifies the thickness of the lines. If not specified the value 2 is assumed. It's class is LineThickness.

-measurecolor color
    This option specifies the color to use when drawing lines that divide measures. If not specified the color red is assumed. It's class is MeasureColor.

-measures measures
    This option specifies how many measures are in the pattern. If not specified a value of 2 is assumed. It's class is Measures.

-padx pad
    This option specifies how many pixels to insert in front of the labels. If not specified a value of 2 is assumed. It's class if PadX.

-pitches pitchList
    This option specifies the pitches associated with each row. It is a list and each element corresponds to one row. If not specified a pitchlist of {35 38 56 42 49 51 48 45 41} is assumed. This corresponds to pitches on an Alesis HR-16 appropriate for the default labels. It's class is Pitches.

-quantization quantization
    This option specifies the quantization of the grid. It should be a multiple of 4 and corresponds to the number of boxes per measure. If not specified a quantization of 16 is assumed. It's class is Quantization.

-width width
    This option specifies the number of boxes to display. The remainder can be viewed by scrolling. If a value is not specified, one measure's worth of boxes will be displayed. It's class is Width.

DESCRIPTION
drumgrid is a TCL/TK compatible widget designed for use as an aid in creating and editing drum rhythms, though it could be used for other purposes as well. These rhythms are represented in a grid with each row corresponding to one voice of the drum kit and each column a time period when a voice can be struck. The time is shown as increasing on the x-axis. The columns are grouped by beats and measures. There are quantization divided by 4 columns per beat, beats beats per measure, and measures measures per pattern. Varying dynamics are represented by different shadings in each box. There are levels distinct levels of dynamics available.

The default bindings for drumgrid are loaded automatically by wishm(1) when it is started. Pressing mouse button 1 in a box will increase the velocity of the box by 1. Pressing mouse button 3 decrease the velocity by 1, and pressing mouse button 2 sets the velocity to zero. The velocity of a box can be set directly to a specific value by first moving the mouse to the box and then pressing a key in the range 0 - 9, where the key value is the desired velocity. The '+' key can be used to increment the velocity of a box by 10 and the '-' decrements the velocity by 10. Thus, you can set the value to velocities greater than 9. If you specify a velocity greater than the maximum level, the maximum level will be used.

WIDGET COMMAND
The drumgrid command creates a new Tcl command whose name is pathName. This command may be used to invoke various operations on the widget. It has the following general form:
    pathName option [arg arg ...]
The following options are possible for the drumgrid widgets:

configure [option
    [value]] The configure command allows you to change to configuration parameters of the widget. These parameters are listed in the STANDARD OPTIONS and WIDGET SPECIFIC OPTIONS sections. If no option and value are specified, then this command returns all of the options and their settings. If an option is specified without a value, then the setting for that option only is returned. If both an option and a value are specified, then that parameter will be set to the given value. The grid will be cleared whenever a configure parameter is changed. This is due to difficulties in placing existing patterns into new beat/measure/quantization combinations.

down x y
    This command will change the relief the the box specified by the x and y coordinates to sunken.

label add label
    This command adds another row to the grid. The row will initially be empty and the label will be label.

label remove {label | index} value
    This command will remove a row from the grid. This row can be specified by either its label or its index.

label list
    This command returns a list of all the current labels.

pitch get index
    This command returns the pitch value associated with a row. The row is specified in by the index value.

pitch set index value
    This command set the pitch associated with a row. The row is specified by the index parameter and the new pitch by the value parameter.

pitch list
    This command returns a list of all the current pitch values. This first element is for row 0, the second for row 1, etc.

up x y
    This command changes the relief of the box specified by the x and y coordinates to raised.

volume get {all | x y}
    This command returns the volume setting for either one box or the entire grid. If the string all is the argument instead of a x and y positions, then a list will be returned. The list will have sublists for each column. Each sublist will contain the volume settings for each row in that time slice. If x and y positions are specified in stead of the string all, then the volume setting for that one box is returned.

volume set x y value
    This command sets the volume at a given x and y coordinate to the value specified.

xview [index]
    This command adjusts the display so that the column specified by index is in the far left position unless there will not be enough boxes to the right of index to span the display area. In this case the last box will be placed in the far right position and the preceding boxes filled to the left. If an index is not specified then the current index of the left most box in the display is returned.

yview [index]
    This command adjusts the display so that the row specified by index is in the top position unless there will not be enough rows below index to fill the display area. In this case the last row will be placed in the bottom positions and preceding rows placed above it. If an index is not specified then the current index of the top label in the display is returned.

RETURN VALUES
The drumgrid command returns the specified pathName.

SEE ALSO
tclm(1), wish(1)

AUTHORS
TCL and TK
    John Ousterhout - ouster@cs.berkeley.edu
TCLM and XDRUM
    Mike Durian - durian@advtech.uswest.com

BUGS
Just because I don't currently know of any doesn't mean they aren't there.