Code Monkey home page Code Monkey logo

models's Introduction

drawing drawing

Go Reference

elektron:models

Go package to programmatically control Elektron's model:cycles & model:samples via midi.

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

A complete example can be found in the example folder.

The relevant cycles/samples manuals' part for this library is the APPENDIX A: MIDI SPECIFICATIONS.

drawing drawing

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)
}

There are four Free methods to use, Preset to set preset on the fly, Note to fire a note on/off for given duration, CC to send a single control change message && PC for program changes.

models's People

Contributors

bh90210 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

models's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.