• Stars
    star
    157
  • Rank 238,359 (Top 5 %)
  • Language
    Go
  • License
    MIT License
  • Created over 4 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

miti is a musical instrument textual interface. Basically, its MIDI, but with human-readable text. 🎵

Version

miti is a musical instrument textual interface. Basically, its MIDI, but textual.

miti provides a program and musical notation that you can use to easily connect and control sounds in a very human way. It provides surprisingly simple sequencing for synthesizers or other instruments, namely control from your favorite text editor.

Features

  • Control one/many external/virtual MIDI devices simultaneously
  • Sequence single notes or chords, at any subdivision
  • Low latency (~2 ms) and low jitter (~2 ms, with rare spikes of 10-15 ms)
  • Real-time editing of sequences using any text editor
  • Sequences specified using human-readable text
  • Compatible with Windows, macOS, Linux, Raspberry Pis

Demos

Demo of playing

Demo of playing

Install

The easiest way to install is to download the latest release.

Its very easy to install from the source code too. To install from the source code, first install portmidi, following these directions.

Next install Go and then in a terminal:

> go install github.com/schollz/miti

Optional: If you want to input chord names then you need to also download and instal LilyPond on your system. (Here are instructions for installing on a Raspberry Pi).

That's it! miti is now available from the command-line.

Documentation

Quickstart

You don't need to be familiar with command-lines to get started. Simply plug in your instruments (or virtual instruments), and double-click on the miti program to get started. It will load up the default .miti file in the default text editor and start playing!

Getting started playing music

To get started, first plugin your instruments to your computer. Open a command prompt and type miti --list to see which instruments are available to you.

> miti --list
Available MIDI devices:
- midi through port-0
- nts-1 digital kit midi 1

You can then use these instruments to make a simple sequence. Make a new file called first.miti with the following:

pattern 1

instruments nts-1
C D E F G A B C

Make sure you replace nts-1 with the name of your MIDI device!

Also, note that I did not write out the full MIDI device for the instrument. miti will accept any part of the device name and map it to the correct device. So in that example it will accept nts-1 in place of writing nts-1 digital kit midi 1.

Now to play this sequence you can just do:

> miti --play first.miti
[info]  2020/07/17 08:18:12 playing

And you'll hear some music!

Getting started making sequences

You can make a sequence using any text editor you want. To get started quickly, though, you can record a sequence using your MIDI keyboard. Just plug in a keyboard and type:

> midi --record song2.miti 
Use MIDI keyboard to enter notes
Press . to enter rests
Press p to make new pattern
Press m to make new measure
Press backspace to delete last
Press Ctl+C to quit

Then you can just play chords and notes on your MIDI keyboard and it will generate the sequence. When you are done with a measure, just press m to start a new one. When you are done with a pattern, just press p to start a new one. If you are finished, press Ctl+C to finish and write the file to disk.

Once the sequence is written, you can play it and edit it as much as you want.

Basic pattern

miti reads a .miti file, which is a high-level musical notation developed for miti. The musical notation is simple and powerful, allowing you to create patterns of notes that can be played on many instruments simultaneously.

The basic unit is the pattern. A pattern contains a collection of instruments. Each instrument contains a collection of notes. For example, here is a simple pattern that plays Cmaj followed by Fmaj and then repeats.

pattern 1
instruments <instrument1>
CEG
FAC

The pattern 1 designates the pattern name, "1". This pattern has a single instrument, <instrument1>. The instrument name must be contained in the official MIDI instrument name, case insensitive. For example, "nts-1" is a viable name if the MIDI instrument is "NTS-1 digital kit 1 SOUND."

Each line under instruments designates a different measure. This is where you put notes. Notes without spaces are considered a chord and will be played simultaneously. The first measure plays C, E, and G (C major) and the second measure plays F, A and C (F major). This pattern will repeat indefinitely when played.

To add more patterns, simply add a line with pattern X and again add instruments and their notes. The patterns will be played in order.

Add instruments and subdivisions

You can easily add a second instrument to this section by adding another line with the instrument name:

pattern 1 
instruments <instrument1>
CEG 
FAC
instruments <instrument2>
A F E C A F E C

This second instrument will play arpeggios. It consists of a single repeated measure which eight notes. Since each note is separated by a space, they are not played together as a chord (unlike in instrument1) and are automatically subdivided according to the number of notes in that measure. In this case they are subdivided into 1/8th notes since there are eight of them in that measure. Since there is only one measure for the instrument2, it will repeat over every chord of instrument1.

You can add rests in using . to create specific subdivisions. For example, we can change instrument1 to play chords on the off-beat of beat 1 and beat 2:

instruments <instrument1>
. CEG . . . CEG . . 
. FAC . . . FAC . . 

Adding comments

You can add in comments into the .miti file by putting a # in the beginning of the line:

# this is a comment
pattern 1 

Chain patterns

If you have multiple patterns you can chain them together in any order using chain. The order will repeat once it gets to the end. For example, this repeats the first pattern followed by 5 of the second pattern:

chain a b b b b b

pattern a
CEG

pattern b 
DFA

Specifying octave of note

By default, the note played will be the note closest to the previous. If you want to specify the exact note you can add a suffix to include the octave. For example, instead of writing CEG you could instead write C3E4G5 which will span the chord over three octaves.

Setting the tempo

You can add a line to change the tempo, anywhere in the file.

tempo <10-300>

Changing the legato

The legato specifies how much to hold each note until releasing it. Full legato (100) holds to the very end, while the shortest legato (1) will release immediately after playing.

legato <1-100>

Sustain

For a pedal note (sustain) add a * to the end of the note. For example, the following will sustain a C major chord for two measures:

CEG- 
CEG

This next example shows how to hold out a C major chord for three beats and resting on the fourth beat:

CEG- CEG- CEG .

Multiple instruments

You can assign multiple instruments to a pattern by separating each instrument by a comma. For example:

instruments <instrument1>, <instrumnet2>
C E G

will play the C, E, G arpeggio on both instruments 1 and 2.

Chord names

Note: Inputting chord names directly requires first downloading and installing LilyPond.

To directly use chords, you can use the semicolon operator flanking the chord name. For instance, here are two C major chords followed by two A minor chords:

:C :C :Am :Am

If you want to alter the chord octave or add sustain, you do same as before but add another semicolon operator on the right side. In this example, the C major chord is played on the 3rd octave and held out for two beats using a sustain (- suffix):

:C:3- :C:3 :Am :Am

Chords can get pretty complex, and they should be understood. For example, you can add chord adjusters:

:Cm7/G

Click track

It's useful to get a click track going to be used to sync audio equip. miti will output a click track on the default audio using the --click track and can be lagged (if needed) by setting --clicklag.

Other similar work

  • textbeat is a text-based musical notation to do complex sequences using a columnated workflow.
  • helio-workstation is a simplified GUI based sequencer.
  • lilypond is a GUI based sequencer and musical notation software.
  • foxdot is a Python + SuperCollider music environment.
  • Sonic Pi is a SuperCollider live coding environment.
  • Pure Data is a GUI program that enables music synthesis.
  • Chuck is a music programming language.
  • melrose is a melody programming language.

To Do

  • Add legato control legato: 90
  • Hot-reload file
  • in midi, create a channel for each instrument
  • in midi, each instrument keeps track of which notes are off
  • in midi, accept -1 to turn off all notes
  • in midi, accept -2 to turn off all notes and shut down
  • Add - suffix for adding sustain
  • Easily identify instruments with partial matches (if contains)
  • Allow chaining patterns in different ways chain: a a b b a a
  • allow comments
  • Find source of spurious jitter
  • use portmidi scheduling to further eliminate jitter

License

MIT

More Repositories

1

croc

Easily and securely send things from one computer to another 🐊 📦
Go
23,068
star
2

howmanypeoplearearound

Count the number of people around you 👨‍👨‍👦 by monitoring wifi signals 📡
Python
6,759
star
3

find

High-precision indoor positioning framework for most wifi-enabled devices.
Go
5,006
star
4

find3

High-precision indoor positioning framework, version 3.
Go
4,494
star
5

progressbar

A really basic thread-safe progress bar for Golang applications
Go
3,367
star
6

hostyoself

Host yo' self from your browser, your phone, your toaster.
Go
1,777
star
7

find-lf

Track the location of every Wi-Fi device (📱) in your house using Raspberry Pis and FIND
Go
977
star
8

rwtxt

A cms for absolute minimalists.
JavaScript
934
star
9

cowyo

A feature-rich wiki webserver for minimalists 🐮 💬
JavaScript
906
star
10

raspberry-pi-turnkey

How to make a Raspberry Pi image that can be deployed anywhere and assigned to a WiFi network without SSH 👌
Python
767
star
11

peerdiscovery

Pure-Go library for cross-platform local peer discovery using UDP multicast 👩 🔁 👩
Go
594
star
12

closestmatch

Golang library for fuzzy matching within a set of strings 📃
Go
407
star
13

gojot

A command-line journal that is distributed and encrypted, making it easy to jot notes 📓
Go
343
star
14

PIanoAI

Realtime piano learning and accompaniment from a Pi-powered AI 🎹
Go
331
star
15

spotifydownload

A dependency-free Spotify playlist downloader that should just work
Shell
318
star
16

poetry-generator

A Python2 based Backus-Naur poetry generator
Python
294
star
17

musicsaur

Music synchronization from your browser.
Go
280
star
18

offlinenotepad

An offline-first, secure, private notepad. 📔 ✏️
JavaScript
236
star
19

pluck

Pluck text in a fast and intuitive way 🐓
Go
214
star
20

pake

PAKE library for generating a strong secret between parties over an insecure channel
Go
180
star
21

meanrecipe

Get a consensus recipe for your next meal. 🍪 🍰
Go
156
star
22

find3-cli-scanner

The command-line scanner that supports Bluetooth and WiFi
Go
142
star
23

playlistfromsong

Create an offline music playlist from a single song 🎶
Python
136
star
24

recursive-recipes

Visualize the recursive nature of recipes 🍰 🍪
Go
135
star
25

teoperator

Make OP-1 and OP-Z drum and synth patches from any sound. 🎹
Go
134
star
26

jsonstore

Simple thread-safe in-memory JSON key-store with persistent backend
Go
130
star
27

getsong

Download any song mp3 with no dependencies except ffmpeg
Go
124
star
28

find3-android-scanner

An android app that scans Bluetooth and WiFi for FIND3
Java
119
star
29

linkcrawler

Cross-platform persistent and distributed web crawler 🔗
Go
111
star
30

ingredients

Extract recipe ingredients from any recipe website on the internet.
HTML
109
star
31

share

Simple file sharing from the browser and the command-line.
Go
106
star
32

faas

Make any Go function into a API (FaaS)
Go
96
star
33

_core

firmware for the zeptocore, zeptoboard, and ectocore
C
77
star
34

find-maraudersmap

Internal positioning for everyone, in the style of Harry Potter
HTML
67
star
35

broadcast-server

A simple Go server that broadcasts any data/stream.
Go
65
star
36

streammyaudio

Easily stream audio from any computer to the internet.
HTML
63
star
37

cowyodel

Easily move things between computers with a code phrase and https://cowyo.com 🐮 💬
Go
62
star
38

extract_recipe

Extract recipes from websites, calculates cooking times, collects nutrition info from USDA database
Python
61
star
39

crawdad

Cross-platform persistent and distributed web crawler 🦀
Go
61
star
40

pikocore

source for the pikocore drum machine
C++
60
star
41

duct

Inspired by patchbay.pub
Go
59
star
42

svg2gcode

Converts svg to gcode for pen plotters
Go
53
star
43

snaptext

A simple webapp to send and receive self-destructing messages in real-time. ✉️ ⚡
Go
53
star
44

pywebsitechanges

Change detection with a simple Python script to email you whenever a website changes.
Python
51
star
45

rpi_ai

An AI developed for the Raspberry Pi
Python
50
star
46

websitechanges

Alerts you via email about a website change.
Go
47
star
47

kiki

An experimental social network that works offline.
Go
46
star
48

goagrep

agrep-like fuzzy matching, but made faster using Golang and precomputation.
Go
45
star
49

oooooo

digital tape loops for monome norns, x6.
Lua
43
star
50

readable

Making web pages readable in a browser and in the command line 🔗 📖
Go
41
star
51

onetwothree

A responsive minimalist theme for Hugo that is simple as 1, 2, 3
CSS
39
star
52

logue

A collection of Korg logue patches for the NTS-1 (or possibly minilogue XD)
C
37
star
53

midi2cv-pi

Use a simple Python script, a few wires, and a MCP4725 to convert any MIDI signal to a control voltage.
Python
37
star
54

sqlite3dump

A Golang library for dumping SQL text
Go
35
star
55

wifiscan

A platform-independent WiFi scanning library for getting BSSID + RSSI
Go
35
star
56

norns.online

online norns with norns.online
Go
35
star
57

bol

Command-line and web journal that stays synchronized and encrypted across devices
Go
34
star
58

syncdir

Automatically discover peers and synchronize a folder
Go
33
star
59

18000

18,000 seconds of music.
SuperCollider
32
star
60

nyblcore

ATtiny85-based sample machine with tempo-based effects.
C++
31
star
61

beowulf_ssh_cluster

Skeleton program for a simple Beowulf cluster that uses ssh to communicate
Python
31
star
62

markdown2tufte

Process markdown into a nice Tufte-like website 📖
CSS
31
star
63

carp

Browser-based Korg NTS-1 chord arpeggiator (carp) sequencer
JavaScript
28
star
64

httpfileserver

Wrapper for Golang http.FileServer that is faster (serving from memory) and uses less bandwidth (gzips when possible)
Go
27
star
65

browsersync

A simple live-reloading tool for developing HTML.
Go
26
star
66

tape-synth

Instructions to create a cassette synthesizer.
Go
26
star
67

squirrel

Like curl, or wget, but downloads directly go to a SQLite databse
Go
25
star
68

workshops

workshops
SuperCollider
23
star
69

patchitup

Backup your file to your remote server using minimum bandwidth.
Go
23
star
70

norns-desktop

norns in docker
Dockerfile
22
star
71

logger

Simplistic, opinionated logging for Golang
Go
21
star
72

mnemonicode

Go
20
star
73

boltdb-server

Fancy server and Go package for connecting to BoltDB databases
Go
20
star
74

zget

zack's wget
Go
19
star
75

wormhole

Transfer files over TCP in Go
Go
19
star
76

quotation-explorer

Explore and search over 120,000 quotations, with the click of a mouse 🌎💬
Go
19
star
77

o-o-o

dot-connected fm synth and sequencer for norns
Lua
18
star
78

tapedeck

norns tape deck emulator.
Lua
17
star
79

amenbreak

a dedicated amen break script for norns.
Lua
16
star
80

zxcvbn

a norns script for a tracker on norns.
Lua
16
star
81

anonfiction

A CMS for reading and writing stories in a online magazine format. 📖
Go
16
star
82

prevent-link-rot

Simple utility to convert links in any file to permanent links via the https://archive.org/web/ or http://perma.cc
HTML
16
star
83

raw

Go
16
star
84

mx.samples

like mr. radar or mr.coffee but for samples on norns.
Lua
15
star
85

supertonic

an instrospective drum machien
Lua
15
star
86

mx.synths

norns script for polyphonic synths
Lua
14
star
87

autojack

norns mod for automatically jacking in usb audio
Lua
14
star
88

fbdb

File based database
Go
14
star
89

broadcast

Lua
14
star
90

paracosms

norns script to play and sample many samples.
Lua
14
star
91

heartbpm

Control the tempo of electronic instruments with your heart rate. 💗 🎵
JavaScript
14
star
92

web-archiver

A tiny Python clone of https://archive.org/web/ for your own personal websites.
Python
13
star
93

album-at-the-place

Open-sourcing my latest music album.
12
star
94

indeterminate-music

A framework for creating indeterminate music (in development) 🎵
HTML
12
star
95

ipfs-connect

Easily connect two computers in the IPFS
Go
11
star
96

googleit

Get results from search engines.
Go
11
star
97

stringsizer

A very simple way to encode short strings.
Go
11
star
98

supercollisions

collection of SuperCollider scripts
SuperCollider
11
star
99

amen

sampler & mangler for monome norns
Lua
11
star
100

string_matching

A simple and fast approach to selecting the best string in a list of strings despite errors or mispelling.
Python
11
star