Documentation
¶
Index ¶
- Constants
- Variables
- func BaudRateList() string
- func IsValidBaudRate(r int) bool
- type Command
- type SPICommand
- type SerialPort
- func (sp *SerialPort) Close()
- func (sp *SerialPort) Flush() bool
- func (sp *SerialPort) SendAllOff()
- func (sp *SerialPort) SendAnalogGain(g int)
- func (sp *SerialPort) SendFineTune(ch, INT, FRAC int)
- func (sp *SerialPort) SendFineTuneByFloat(ch int, r float64)
- func (sp *SerialPort) SendKeyOff(ch, ToneNum int)
- func (sp *SerialPort) SendKeyOn(ch int, note enums.Note, delta float64, VoVol, ToneNum int)
- func (sp *SerialPort) SendMasterVolume(v int)
- func (sp *SerialPort) SendMuteAndEGReset(ch int)
- func (sp *SerialPort) SendPitch(ch int, note enums.Note, delta float64)
- func (sp *SerialPort) SendSeqVol(v int)
- func (sp *SerialPort) SendTerminate()
- func (sp *SerialPort) SendTones(data []*voice.VM35FMVoice)
- func (sp *SerialPort) SendVibrato(ch, vib int)
- func (sp *SerialPort) SendVolume(ch, ChVol int, DIR_CV bool)
- func (sp *SerialPort) SendWait(msec int)
- type TerminateCommand
- type WaitCommand
Constants ¶
View Source
const ( SKETCH_VERSION_GTE = 120 SKETCH_VERSION_LT = 130 ARDUINO_BUFFER_SIZE = 60 )
Variables ¶
View Source
var BaudRates = []int{300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 28800, 38400, 57600, 115200}
Functions ¶
func BaudRateList ¶ added in v1.1.0
func BaudRateList() string
func IsValidBaudRate ¶ added in v1.1.0
Types ¶
type SPICommand ¶ added in v1.1.0
func NewSPICommand ¶ added in v1.1.0
func NewSPICommand(addr uint8, data []byte) *SPICommand
func NewSPICommand1 ¶ added in v1.1.0
func NewSPICommand1(addr uint8, data byte) *SPICommand
func (*SPICommand) Bytes ¶ added in v1.1.0
func (c *SPICommand) Bytes() []byte
type SerialPort ¶
type SerialPort struct {
// contains filtered or unexported fields
}
func NewSerialPort ¶
func NewSerialPort(deviceName string, baudRate int) (*SerialPort, error)
func (*SerialPort) Close ¶
func (sp *SerialPort) Close()
func (*SerialPort) Flush ¶ added in v1.2.0
func (sp *SerialPort) Flush() bool
func (*SerialPort) SendAllOff ¶
func (sp *SerialPort) SendAllOff()
func (*SerialPort) SendFineTune ¶
func (sp *SerialPort) SendFineTune(ch, INT, FRAC int)
0<=INT<4 0<=FRAC<512
func (*SerialPort) SendFineTuneByFloat ¶
func (sp *SerialPort) SendFineTuneByFloat(ch int, r float64)
func (*SerialPort) SendKeyOff ¶
func (sp *SerialPort) SendKeyOff(ch, ToneNum int)
func (*SerialPort) SendMuteAndEGReset ¶
func (sp *SerialPort) SendMuteAndEGReset(ch int)
func (*SerialPort) SendPitch ¶
func (sp *SerialPort) SendPitch(ch int, note enums.Note, delta float64)
func (*SerialPort) SendTerminate ¶
func (sp *SerialPort) SendTerminate()
func (*SerialPort) SendTones ¶
func (sp *SerialPort) SendTones(data []*voice.VM35FMVoice)
func (*SerialPort) SendVolume ¶
func (sp *SerialPort) SendVolume(ch, ChVol int, DIR_CV bool)
0<=ChVol<32
func (*SerialPort) SendWait ¶ added in v1.1.0
func (sp *SerialPort) SendWait(msec int)
type TerminateCommand ¶ added in v1.1.0
type TerminateCommand struct { }
func (*TerminateCommand) Bytes ¶ added in v1.1.0
func (c *TerminateCommand) Bytes() []byte
type WaitCommand ¶ added in v1.1.0
type WaitCommand struct {
Msec int
}
func (*WaitCommand) Bytes ¶ added in v1.1.0
func (c *WaitCommand) Bytes() []byte
Click to show internal directories.
Click to hide internal directories.