Skip to main content

A simple class for sending MIDI messages

Project description

fts-rtmidi

My name is Ferdinand Tonby-Strandborg, and I am creating this library as I want an easy, quick class for sending midi messages.

Installation

Available on PyPi

pip install fts-rtmidi

Usage

To check what MIDI ports are available, use the rtmidi library. To send messages, use the ftsmidi library.

from rtmidi  import MidiOut
from ftsmidi import MidiSender
from time    import sleep

## Print available MIDI channels using rtmidi class
print(MidiOut().get_ports())


## Connect to MIDI channel "Microsoft GS Wavetable Synth 0"
midi = MidiSender("Microsoft GS Wavetable Synth 0")


## Trigger note middle-C with velocity 120 for 1 second
midi.note_on(60, 120)
sleep(1)
midi.note_off(60)

MIDI protocol

For an in-depth explanation of the MIDI format, please see: https://www.cs.cmu.edu/~music/cmsip/readings/davids-midi-spec.htm

Note on implementation

A lot of the functions are implemented in a way that is unnecessarily hard to read. This is simply as I wanted to test features of Python I haven't used before.

rtmidi

This uses the python-rtmidi library, which is currently available through pypi. All classes here simply wrap the rtmidi classes, and handle formatting the messages.
To learn more about RtMidi, visit their PyPi page or their GitHub repository.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fts-rtmidi-0.0.6.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fts_rtmidi-0.0.6-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file fts-rtmidi-0.0.6.tar.gz.

File metadata

  • Download URL: fts-rtmidi-0.0.6.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for fts-rtmidi-0.0.6.tar.gz
Algorithm Hash digest
SHA256 c064ee9cfcd94ab82b298349cf017693defd04a496b482e8e2ebecbfc1dafdb1
MD5 de340fab01848884ba2d3c66c5e70fd2
BLAKE2b-256 9801fbdcf3229dacf9b3b9240ca6a4d32f603f15dc2d17192d059f033ee069cf

See more details on using hashes here.

File details

Details for the file fts_rtmidi-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: fts_rtmidi-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for fts_rtmidi-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 b7e49ed72572f4c37d307807ebd3de40e822a8dc84a63ff3e763a9df642a4e82
MD5 42546f6132df8f7e93d1033ea925f72a
BLAKE2b-256 0c228a864ea0855714527d18663ee9ed666fd7407b72680a738e56f68a354e64

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page