Description
port_midi is a wrapper around the cross-platform PortMidi MIDI I/O library.
The low-level wrapper around PortMidi is in the lib LibPortMIDI.
The module PortMIDI contains a few helper functions that are useful when
converting between MIDI data and PortMidi messages. It also contains the
function PortMIDI#list_all_devices which prints out all of the input and
output devices available to PortMidi.
At a higher level of abstraction, InputStream and OutputStream represent
the two kinds of streams that do reading and writing of MIDI data.
Finally, a SimpleMIDIDevice wraps one input stream and one output stream.
port_midi alternatives and similar shards
Based on the "Misc" category.
Alternatively, view port_midi alternatives based on common mentions on social networks and blogs.
-
sentry
Build/Runs your crystal application, watches files, and rebuilds/restarts app on file changes -
immutable
Thread-safe, persistent, immutable collections for the Crystal language -
crystagiri
An Html parser library for Crystal (like Nokogiri for Ruby) -
crz
Functional programming library for https://github.com/crystal-lang/crystal -
crystal-web-framework-stars
⭐️ Web frameworks for Crystal, most starred on Github -
cron_scheduler
Simple job scheduler with crontab patterns for Crystal Language. -
crystal-futures
Future type implementation for Crystal language -
inflector.cr
Inflector shard for Crystal. A port of ActiveSupport::Inflector -
aasm.cr
:arrows_clockwise: Easy to use finite state machine for Crystal classes -
kreal
Kreal is a model sharing & RPC library built on and works with Kemal seamlessly. -
retriable.cr
Retriable.cr is a simple DSL to retry failed code blocks -
ulid
Universally Unique Lexicographically Sortable Identifier (ULID) in Crystal -
CrSerializer
Extensible annotation based serialization/deserialization library -
circuit_breaker
Implementation of the circuit breaker pattern in crystal -
burocracia.cr
No dependency Crystal shard to validate, generate and format Brazilian burocracias such as CPF, CNPJ and CEP -
wikicr
Wiki in crystal, using Markdown and Git, inspired by dokuwiki. Last features to build are pretty hard, if you have some time to help... :) -
m3u8
Generate and parse m3u8 playlists for HTTP Live Streaming (HLS) in Crystal. -
message_verifier.cr
Rails compatible MessageVerifier for Crystal-lang apps
Access the most powerful time series database as a service
Do you think we are missing an alternative of port_midi or a related project?
README
port_midi
port_midi
is a wrapper around the cross-platform
PortMidi MIDI I/O library.
The low-level wrapper around PortMidi is in the lib LibPortMIDI
.
The module PortMIDI
contains a few helper functions that are useful when
converting between MIDI data and PortMidi messages. It also contains the
function PortMIDI#list_all_devices
which prints out all of the input and
output devices available to PortMidi.
At a higher level of abstraction, InputStream
and OutputStream
represent
the two kinds of streams that do reading and writing of MIDI data.
Finally, a SimpleMIDIDevice
wraps one input stream and one output stream.
Installation
- Install the PortMidi library. If you are on MacOS and you use Homebrew,
you can run
brew install portmidi
. Otherwise, download the PortMidi source from http://portmedia.sourceforge.net/portmidi/ and compile it. - Add the dependency to your
shard.yml
:yaml dependencies: port_midi: github: jimm/crystal_port_midi
- Run
shards install
Usage
require "port_midi"
PortMIDI.initialize
See the examples
directory for a few sample applications that use
port_midi
and the InputStream
, OutputStream
, and SimpleMIDIDevice
classes.
To build the examples, run shards build
.
Development and Testing
To run the tests, run crystal spec
.
When running tests on Travis CI or CircleCI, we limit ourselves to tests
that do not return PortMidi errors. That is because the installation of
libportmidi available to Travis through apt-get
is compiled with the
PM_CHECK_ERRORS
flag enabled. When an error such as an invalid device ID
happens, the flag causes the PortMidi code to display a message, prompt the
user to hit ENTER, and exit immediately. I can work around the prompt by
running /usr/bin/yes
| crystal spec
, but I can't work around the call to exit
.
Documentation
To generate the docs, run crystal docs
.
Contributing
- Fork the repo
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- Jim Menard - creator and maintainer