midicatdrv

package module
v0.0.0-...-fccd5eb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2022 License: MIT Imports: 13 Imported by: 2

README

midicatdrv

This driver is based on the slim midicat tool (see tools/midicat for more information).

Installation

This is driver uses the midicat binary that you can get here for Windows and Linux (it should be possible to compile it on your own, e.g. for the Mac).

The midicat binary is based on the rtmidi project and connects MIDI ports to Stdin and Stdout. The idea is, to have just one binary that requires CGO (midicat) and for all the Go projects that need to connect to MIDI ports just pipe the MIDI data from and to this binary.

This driver connects to the midicat binary via Stdin and Stdout while providing the same unified https://gitlab.com/gomidi/midi.Driver interface as rtmididrv and portmididrv. But projects importing this midicatdrv will not required CGO (like that would be the case otherwise).

Download or compile the midicat binary and place it in your PATH before using this driver. midicat version >= 0.5.0 is required.

Documentation

Overview

Package midicatdrv provides a Driver to connect via the program midicat (from the tools).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloseErrors

type CloseErrors []error

CloseErrors collects error from closing multiple MIDI ports

func (CloseErrors) Error

func (c CloseErrors) Error() string

type Driver

type Driver struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func New

func New() (*Driver, error)

New returns a driver based on the default rtmidi in and out

func (*Driver) Close

func (d *Driver) Close() (err error)

Close closes all open ports. It must be called at the end of a session.

func (*Driver) Ins

func (d *Driver) Ins() (ins []drivers.In, err error)

Ins returns the available MIDI input ports

func (*Driver) Outs

func (d *Driver) Outs() (outs []drivers.Out, err error)

Outs returns the available MIDI output ports

func (*Driver) String

func (d *Driver) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL