Documentation ¶
Index ¶
- Variables
- func Reset(wd *writer.Writer)
- func SetDigit(digit Digit, char Char) midi.Message
- func SetFaderPos(fader Channel, pos uint16) midi.Message
- func SetLCD(offset uint8, text string) midi.Message
- func SetLED(led Switch, state State) midi.Message
- func SetMeter(ch Channel, value MeterLevel) midi.Message
- func SetTimeDisplay(letters string) (m []midi.Message)
- func SetVPot(ch Channel, mode VPotMode, led VPotLED) midi.Message
- type Channel
- type Char
- type Digit
- type Line
- type MeterLevel
- type State
- type Switch
- type VPotLED
- type VPotMode
Constants ¶
This section is empty.
Variables ¶
var (
Channels = map[int]Channel{
1: 0x10,
2: 0x11,
3: 0x12,
4: 0x13,
5: 0x14,
6: 0x15,
7: 0x16,
8: 0x17,
9: 0x18,
}
)
var (
IDs = map[string]Switch{}/* 117 elements not displayed */
)
var (
Letters = map[rune]Char{
'@': 0x00,
'A': 0x01,
'B': 0x02,
'C': 0x03,
'D': 0x04,
'E': 0x05,
'F': 0x06,
'G': 0x07,
'H': 0x08,
'I': 0x09,
'J': 0x0A,
'K': 0x0B,
'L': 0x0C,
'M': 0x0D,
'N': 0x0E,
'O': 0x0F,
'P': 0x10,
'Q': 0x11,
'R': 0x12,
'S': 0x13,
'T': 0x14,
'U': 0x15,
'V': 0x16,
'W': 0x17,
'X': 0x18,
'Y': 0x19,
'Z': 0x1A,
'[': 0x1B,
'\\': 0x1C,
']': 0x1D,
'^': 0x1E,
'_': 0x1F,
' ': 0x20,
'!': 0x21,
'"': 0x22,
'#': 0x23,
'$': 0x24,
'%': 0x25,
'&': 0x26,
'\'': 0x27,
'(': 0x28,
')': 0x29,
'*': 0x2A,
'+': 0x2B,
',': 0x2C,
'-': 0x2D,
'.': 0x2E,
'/': 0x2F,
'0': 0x30,
'1': 0x31,
'2': 0x32,
'3': 0x33,
'4': 0x34,
'5': 0x35,
'6': 0x36,
'7': 0x37,
'8': 0x38,
'9': 0x39,
':': 0x3A,
';': 0x3B,
'<': 0x3C,
'=': 0x3D,
'>': 0x3E,
'?': 0x3F,
}
)
Functions ¶
func Reset ¶
Reset resets and quickly triggers all the available features on the control surface. I recommend running this both to avoid some errors and as a sanity check to make sure that your entire control surface is working.
func SetDigit ¶
SetDigit sets an individual digit on the timecode or Assignment section. Refer to Char for more information on valid characters.
func SetFaderPos ¶
SetFaderPos sets the position of the chosen fader to a number between 0 (bottom) and 16382 (top).
func SetLCD ¶
SetLCD sets the text (an ASCII string) found on the LCD starting from the specified offset.
func SetMeter ¶
func SetMeter(ch Channel, value MeterLevel) midi.Message
SetMeter sets the level meter for the selected Channel to the desired value.
func SetTimeDisplay ¶
SetTimeDisplay sets multiple characters on the timecode display. Note: letters is limited to ten characters and is right aligned. Refer to timecode.Digit for valid characters.
Types ¶
type Channel ¶
type Channel byte
A Channel is used to define which Fader, Meter or VPot should be modified.
type Char ¶
type Char byte
Char is an ASCII character between 0x21 (33) and 0x60 (96). Note: if the character is above 0x40 (64) subtract 0x40 from it, otherwise the wrong character will be displayed.
const ( SymbolAt Char = iota CharA CharB CharC CharD CharE CharF CharG CharH CharI CharJ CharK CharL CharM CharN CharO CharP CharQ CharR CharS CharT CharU CharV CharW CharX CharY CharZ SymbolOpenBracket SymbolBackSlash SymbolCloseBracket SymbolAccent SymbolUnderscore SymbolSpace SymbolExclamation SymbolDoubleQuote SymbolNumberSign SymbolDollar SymbolPercentSign SymbolAmpersand SymbolSingleQuote SymbolOpenParen SymbolCloseParen SymbolAsterisk SymbolPlus SymbolComma SymbolHyphen SymbolPeriod SymbolForwardSlash Char0 Char1 Char2 Char3 Char4 Char5 Char6 Char7 Char8 Char9 SymbolColon SymbolSemiColon SymbolLessThan SymbolEqual SymbolGreaterThan SymbolQuestion // Add DigitDot to the character you want to display to show the dot found on each 7-segment display. DigitDot )
type MeterLevel ¶
type MeterLevel byte
MeterLevel is the height (in decibels) that the meter should be set to.
const ( LessThan60 MeterLevel = iota MoreThan60 MoreThan50 MoreThan40 MoreThan30 MoreThan20 MoreThan14 MoreThan10 MoreThan8 MoreThan6 MoreThan4 MoreThan2 MoreThan0 // Clipping enables the clipping warning LED on the meter. Clipping // ClipOff disables the clipping warning LED on the meter. ClipOff LenMeterLevel = 15 )
type Switch ¶
type Switch byte
A Switch is a button and/or LED that can be pressed and or lit.
const ( Rec1 Switch = iota Rec2 Rec3 Rec4 Rec5 Rec6 Rec7 Rec8 Solo1 Solo2 Solo3 Solo4 Solo5 Solo6 Solo7 Solo8 Mute1 Mute2 Mute3 Mute4 Mute5 Mute6 Mute7 Mute8 Select1 Select2 Select3 Select4 Select5 Select6 Select7 Select8 V1 V2 V3 V4 V5 V6 V7 V8 AssignTrack AssignSend AssignPan AssignPlugin AssignEQ AssignInstrument BankL BankR ChannelL ChannelR Flip GlobalView NameValue SMPTEBeats F1 F2 F3 F4 F5 F6 F7 F8 MIDITracks Inputs AudioTracks AudioInstrument Aux Busses Outputs User Shift Option Control CMDAlt Read Write Trim Touch Latch Group Save Undo Cancel Enter Marker Nudge Cycle Drop Replace Click Solo Rewind FastFwd Stop Play Record Up Down Left Right Zoom Scrub UserA UserB Fader1 Fader2 Fader3 Fader4 Fader5 Fader6 Fader7 Fader8 FaderMaster STMPELED BeatsLED RudeSoloLED RelayClickLED LenIDs = 120 )