PHPackages                             bviguier/php-rtmidi - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. bviguier/php-rtmidi

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

bviguier/php-rtmidi
===================

Realtime MIDI input/output, thanks to RtMidi and FFI.

v0.0.1(4y ago)1631MITPHPPHP &gt;=7.4

Since Jan 19Pushed 2y ago1 watchersCompare

[ Source](https://github.com/b-viguier/PhpRtMidi)[ Packagist](https://packagist.org/packages/bviguier/php-rtmidi)[ RSS](/packages/bviguier-php-rtmidi/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

PhpRtMidi
=========

[](#phprtmidi)

Php library for realtime MIDI input/output, thanks to [RtMidi](https://github.com/thestk/rtmidi) and [FFI](https://www.php.net/manual/en/book.ffi.php).

Requirements
------------

[](#requirements)

- Php `>=7.4` (for [FFI](https://www.php.net/manual/en/book.ffi.php) support)
- [RtMidi](https://github.com/thestk/rtmidi) *v6* library compiled on your system.

Installation
------------

[](#installation)

```
composer require bviguier/php-rtmidi
```

On MacOS, you can install [RtMidi](https://github.com/thestk/rtmidi) globally thanks to [`brew`](https://brew.sh/).

```
brew install rtmidi
```

⚠️ In Linux, package registries often provide `librtmidi.so.4` which is the version `3`! To compile it manualy:

- Download and extract
- `./configure`
- `make && make install`
- Be sure that the library is available in you `LD_LIBRARY_PATH` or to provide the full path to `PhpRtMidi`.

Features
--------

[](#features)

- Send midi messages (including system exclusive)
- Receive midi messages (including system exclusive)
- Create virtual input or output

Usage
-----

[](#usage)

If the [RtMidi](https://github.com/thestk/rtmidi) is not globally available on your system, you have to provide its path. By default, `PhpRtMidi` try to load the library by its *standard* name, but the name may depend on your OS or your build. You can also use `LIB_RTMIDI_PATH` environment variable to provide the path to the library.

This library doesn't match exactly original [RtMidi](https://github.com/thestk/rtmidi) interfaces, but try to expose a straightforward developer experience.

```
$browser = new \bviguier\RtMidi\MidiBrowser();

$input = $browser->openInput('My Input');
$output = $browser->openOutput('My Output');

echo "Midi thru enabled, use Ctr-C to exit…\n";
while (true) {
    if ($msg = $input->pullMessage()) {
        $output->send($msg);
    }
    usleep(100);
}
```

Check [`examples` directory](https://github.com/b-viguier/PhpRtMidi/tree/main/examples) to have a better overview of its usage.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 96% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1580d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5537799?v=4)[Benoit](/maintainers/b-viguier)[@b-viguier](https://github.com/b-viguier)

---

Top Contributors

[![b-viguier](https://avatars.githubusercontent.com/u/5537799?v=4)](https://github.com/b-viguier "b-viguier (24 commits)")[![t-geindre](https://avatars.githubusercontent.com/u/6348039?v=4)](https://github.com/t-geindre "t-geindre (1 commits)")

---

Tags

midiphprtmidi

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/bviguier-php-rtmidi/health.svg)

```
[![Health](https://phpackages.com/badges/bviguier-php-rtmidi/health.svg)](https://phpackages.com/packages/bviguier-php-rtmidi)
```

###  Alternatives

[davedevelopment/pimple-aware-event-dispatcher

A Symfony compatible event dispatcher that allows services to be lazy loaded from an instance of the Pimple DI container

122.5k1](/packages/davedevelopment-pimple-aware-event-dispatcher)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
