GitHunt
BH

bh90210/models

Programmatically control various synths (see list in README) via midi using Go

Go Reference

Models

Go package to programmatically control via midi:

  • Elektron model:cycles
  • Elektron model:samples
  • Nord Lead x2
  • Dreadbox Nymphes

Prerequisites

Go

Install Go https://golang.org/doc/install.

RtMidi

Ubuntu 20.04+

apt install librtmidi4 librtmidi-dev

For older versions take a look here.

MacOS

brew install rtmidi

For more information see the formulae page.

Windows

Help needed.

Quick Use

Complete examples can be found in the examples folder.

Code to get a single kick drum hit at C4 key, with velocity set at 120 and length at 200 milliseconds:

package main

import (
	"time"

	m "github.com/bh90210/models"
)

func main() {
	p, _ := m.NewProject(em.CYCLES)
	defer p.Close()

	p.Note(m.T1, m.C4, 120, 200, m.PT1())
	time.Sleep(200 * time.Millisecond)
}

Languages

Go100.0%

Contributors

The Unlicense
Created August 27, 2020
Updated January 21, 2026