Documentation
¶
Index ¶
- type Color
- type ColorMK2
- type ColorMK2RGB
- type ColorS
- type Hit
- type Launchpad
- type LaunchpadMK2
- func (l *LaunchpadMK2) Clear() error
- func (l *LaunchpadMK2) Close() error
- func (l *LaunchpadMK2) In() midi.In
- func (l *LaunchpadMK2) Light(x, y int, color Color) error
- func (l *LaunchpadMK2) ListenToHits() (<-chan Hit, error)
- func (l *LaunchpadMK2) ListenToScrollTextEndMarker() (<-chan interface{}, error)
- func (l *LaunchpadMK2) Out() midi.Out
- func (l *LaunchpadMK2) Text(color Color) ScrollingTextBuilder
- func (l *LaunchpadMK2) TextLoop(color Color) ScrollingTextBuilder
- type LaunchpadS
- func (l *LaunchpadS) Clear() error
- func (l *LaunchpadS) Close() error
- func (l *LaunchpadS) In() midi.In
- func (l *LaunchpadS) Light(x, y int, color Color) error
- func (l *LaunchpadS) ListenToHits() (<-chan Hit, error)
- func (l *LaunchpadS) ListenToScrollTextEndMarker() (<-chan interface{}, error)
- func (l *LaunchpadS) Out() midi.Out
- func (l *LaunchpadS) Text(color Color) ScrollingTextBuilder
- func (l *LaunchpadS) TextLoop(color Color) ScrollingTextBuilder
- type ScrollingTextBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Color ¶ added in v1.2.0
type Color interface {
AsBytes() []byte
}
Color can be ColorS for "Launchpad S"-Devices and ColorMK2 or ColorMK2RGB for "Launchpad MK2"-Devices
type ColorMK2 ¶ added in v1.2.0
type ColorMK2 struct { //Code represents the color code of color palette. //It can be from 0 to 127 Code int }
ColorMK2 represents a color from the "Launchpad MK2"s color palette
type ColorMK2RGB ¶ added in v1.2.0
type ColorMK2RGB struct { //Red part of color. It can be from 0 to 63! Red int //Green part of color. It can be from 0 to 63! Green int //Blue part of color. It can be from 0 to 63! Blue int }
ColorMK2RGB represents a rgb-color for the "Launchpad MK2"
func (ColorMK2RGB) AsBytes ¶ added in v1.2.0
func (c ColorMK2RGB) AsBytes() []byte
type ColorS ¶ added in v1.2.0
type ColorS struct { //Red part of color. It can be from 0 to 3! Red int //Green part of color. It can be from 0 to 3! Green int }
ColorS represents a color for the "Launchpad S"
type Launchpad ¶
type Launchpad interface { // ListenToHits listens the input stream for hits. // It will return an error if listening initialisation failed. ListenToHits() (<-chan Hit, error) // ListenToScrollTextEndMarker listens the input stream for text end marker events. // It will return an error if listening initialisation failed. ListenToScrollTextEndMarker() (<-chan interface{}, error) // Light lights the button at x,y with the given color. // x and y are [0, 8] and color can be a ColorS or ColorMK2 / ColorMK2RGB (depends on connected launchpad) // Note that x=8 corresponds to the round scene buttons on the right side of the device, // and y=8 corresponds to the round buttons on the top of the device. Light(x, y int, color Color) error // Text will return a scrolling text builder whether you can build and // perform an text with the given color (for Launchpad MK2 only ColorMK2 will work) which will be scrolled on the launchpad. Text(color Color) ScrollingTextBuilder // TextLoop will return a scrolling text builder whether you can build and // perform an text with the given color (for Launchpad MK2 only ColorMK2 will work) which will be scrolled endless on the launchpad. // If you want to stop an text loop you have to build and execute an empty textLoop! TextLoop(color Color) ScrollingTextBuilder // Clear turns off all the LEDs on the Launchpad. Clear() error // Close will close all underlying resources such like the streams and so on. // It will return an error if any of the underlying resources will return an error // on closing. Close() error // Out will return the underlying midi output stream. Out() midi.Out // In will return the underlying midi input stream. In() midi.In }
Launchpad represents a device with an input and output MIDI stream.
type LaunchpadMK2 ¶ added in v1.2.0
type LaunchpadMK2 struct {
// contains filtered or unexported fields
}
func (*LaunchpadMK2) Clear ¶ added in v1.2.0
func (l *LaunchpadMK2) Clear() error
func (*LaunchpadMK2) Close ¶ added in v1.2.0
func (l *LaunchpadMK2) Close() error
func (*LaunchpadMK2) In ¶ added in v1.2.0
func (l *LaunchpadMK2) In() midi.In
func (*LaunchpadMK2) Light ¶ added in v1.2.0
func (l *LaunchpadMK2) Light(x, y int, color Color) error
func (*LaunchpadMK2) ListenToHits ¶ added in v1.2.0
func (l *LaunchpadMK2) ListenToHits() (<-chan Hit, error)
func (*LaunchpadMK2) ListenToScrollTextEndMarker ¶ added in v1.2.0
func (l *LaunchpadMK2) ListenToScrollTextEndMarker() (<-chan interface{}, error)
func (*LaunchpadMK2) Out ¶ added in v1.2.0
func (l *LaunchpadMK2) Out() midi.Out
func (*LaunchpadMK2) Text ¶ added in v1.2.0
func (l *LaunchpadMK2) Text(color Color) ScrollingTextBuilder
func (*LaunchpadMK2) TextLoop ¶ added in v1.2.0
func (l *LaunchpadMK2) TextLoop(color Color) ScrollingTextBuilder
type LaunchpadS ¶ added in v1.2.0
type LaunchpadS struct {
// contains filtered or unexported fields
}
func (*LaunchpadS) Clear ¶ added in v1.2.0
func (l *LaunchpadS) Clear() error
func (*LaunchpadS) Close ¶ added in v1.2.0
func (l *LaunchpadS) Close() error
func (*LaunchpadS) In ¶ added in v1.2.0
func (l *LaunchpadS) In() midi.In
func (*LaunchpadS) ListenToHits ¶ added in v1.2.0
func (l *LaunchpadS) ListenToHits() (<-chan Hit, error)
func (*LaunchpadS) ListenToScrollTextEndMarker ¶ added in v1.2.0
func (l *LaunchpadS) ListenToScrollTextEndMarker() (<-chan interface{}, error)
func (*LaunchpadS) Out ¶ added in v1.2.0
func (l *LaunchpadS) Out() midi.Out
func (*LaunchpadS) Text ¶ added in v1.2.0
func (l *LaunchpadS) Text(color Color) ScrollingTextBuilder
func (*LaunchpadS) TextLoop ¶ added in v1.2.0
func (l *LaunchpadS) TextLoop(color Color) ScrollingTextBuilder
type ScrollingTextBuilder ¶
type ScrollingTextBuilder interface { // Add adds a text snipped with a given speed to the builder. // The speed can be a value from 1-7. The text must be ASCII // characters! Otherwise the result could be weired. Add(speed byte, text string) ScrollingTextBuilder // Perform sends the pre-built scrolling text to the launchpad. Perform() error }
ScrollingTextBuilder is used to build and display an scrolling text on the Launchpad.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.