You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+62-38Lines changed: 62 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,53 +10,69 @@ We aim to provide efficient reference implementations of score followers for use
10
10
11
11
The full documentation for matchmaker is available online at [readthedocs.org](https://pymatchmaker.readthedocs.io/).
12
12
13
-
14
13
## Setup
15
14
16
15
### Prerequisites
17
16
18
-
- Available Python version: 3.9 (other versions will be supported soon!)
17
+
- Available Python version: 3.12
19
18
-[Fluidsynth](https://www.fluidsynth.org/)
20
19
-[PortAudio](http://www.portaudio.com/)
21
20
22
-
First, install Fluidsynth, and then install the `pyfluidsynth` Python library. Note that `pyfluidsynth` only provides Python bindings for Fluidsynth; it does not install Fluidsynth itself. Be aware that there is also a `fluidsynth` Python library (without the `py-` prefix), but it is not compatible with `matchmaker`.
21
+
First, install Fluidsynth, and then install the `pyfluidsynth` Python library. We recommend to install Fluidsynth using conda as well (see instructions below).
23
22
24
-
### Install from PyPI
25
-
26
-
```bash
27
-
pip install pymatchmaker
28
-
```
23
+
Note that `pyfluidsynth` only provides Python bindings for Fluidsynth; it does not install Fluidsynth itself. Be aware that there is also a `fluidsynth` Python library (without the `py-` prefix), but it is not compatible with `matchmaker`. We recommend installing Fluidsynth using conda
29
24
30
25
### Install from source using conda
31
26
32
-
Please refer to the [requirements.txt](requirements.txt) file for the minimum required versions of the packages.
33
27
Setting up the code as described here requires [conda](https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html). Follow the instructions for your OS.
34
28
35
29
To setup the experiments, use the following script.
If you have a ImportError with 'Fluidsynth' by `pyfluidsynth` library on MacOS, please refer to the following [link](https://stackoverflow.com/a/75339618).
49
+
# Install glib and fluidsynth
50
+
conda install -c conda-forge glib fluidsynth
51
+
```
57
52
58
53
Because of the dependency of `partitura`, which uses `MuseScore_General.sf3` (free soundfont provided by MuseScore) as the default soundfont, the soundfont will be installed automatically inside the `partitura` package. This might take a while for the first time.
59
54
55
+
### Known Setup Issues
56
+
57
+
#### Missing Visual C++ build tools (on Windows)
58
+
59
+
The solution seems to be to download vs_BuildTools.exe from <https://visualstudio.microsoft.com/visual-cpp-build-tools/> and then execute
#### Issues with Fluidsynth and pyfluidsynth on Windows
66
+
67
+
On Windows, pyfluidsynth expects fluidsynth.exe to be located in `C:\tools\bin` (other users have reported that it is expected in `C:\tools\fluidsynth\bin`). You can fix the issue by
68
+
69
+
1. Get the ZIP file for your Windows version from <https://github.com/FluidSynth/fluidsynth/releases/latest>
70
+
2. Extract the contents to `C:\tools` (or wherever pyfluidsynth expects the executable to be).
71
+
72
+
#### Using Fluidsynth installed from Homebrew on MacOS
73
+
74
+
We recommend to install Fluidsynth from conda in a dedicated environemnt. If however, you want to use the system-wide Fluidsynth installed with homebrew, you might run into an `ImportError("Couldn't find the FluidSynth library.")` with `pyfluidsynth`. Please refer to the following [link](https://stackoverflow.com/a/75339618).
75
+
60
76
## Usage Examples
61
77
62
78
### Quickstart for live streaming
@@ -98,19 +114,33 @@ for current_position in mm.run():
98
114
### Testing with Specific Input Device
99
115
100
116
To use a specific audio or MIDI device that is not the default device, you can pass the device name or index.
117
+
By default, `input_type` is set to `“audio”`. If you are using a MIDI device, you can change the input type to `“midi”`.
101
118
102
119
```python
103
120
from matchmaker import Matchmaker
104
121
105
122
mm = Matchmaker(
106
123
score_file="path/to/score",
107
-
input_type="audio",
108
124
device_name_or_index="MacBookPro Microphone",
109
125
)
110
126
for current_position in mm.run():
111
127
print(current_position)
112
128
```
113
129
130
+
### Running Examples
131
+
132
+
The repository includes a ready-to-use example script that demonstrates the complete workflow:
133
+
134
+
```bash
135
+
# Run with audio input (default)
136
+
python run_examples.py
137
+
138
+
# Run with MIDI input
139
+
python run_examples.py --midi
140
+
```
141
+
142
+
This script runs a complete example with score following and evaluation, saving results to the `results/` directory.
143
+
114
144
### Testing with Different Methods or Features
115
145
116
146
For testing with Audio input, you can specify the alignment method as follows:
@@ -130,24 +160,6 @@ for current_position in mm.run():
130
160
For options regarding the `method`, please refer to the [Alignment Methods](#alignment-methods) section.
131
161
For options regarding the `feature_type`, please refer to the [Features](#features) section.
132
162
133
-
### Custom Example
134
-
135
-
If you want to use a different alignment method or custom method, you can do so by importing the specific class and passing the necessary parameters.
136
-
In order to define a custom alignment class, you need to inherit from the Base `OnlineAlignment` class and implement the `run` method. Note that the returned value from the `OnlineAlignment` class should be the current frame number in the reference features, not in beats.
137
-
138
-
```python
139
-
from matchmaker.dp import OnlineTimeWarpingDixon
140
-
from matchmaker.io.audio import AudioStream
141
-
from matchmaker.features import ChromagramProcessor
print(current_frame) # frame number in the reference features
150
-
```
151
163
152
164
## Alignment Methods
153
165
@@ -187,7 +199,17 @@ Initialization parameters for the `Matchmaker` class:
187
199
188
200
If you find Matchmaker useful, we would appreciate if you could cite us!
189
201
202
+
```bibtex
203
+
@inproceedings{park_matchmaker_2025,
204
+
title = {Matchmaker: {An} {Open}-{Source} {Library} for {Real}-{Time} {Piano} {Score} {Following} and {Systematic} {Evaluation}},
205
+
booktitle = {Proceedings of the 26th {International} {Society} for {Music} {Information} {Retrieval} {Conference} ({ISMIR} 2025)},
206
+
author = {Park, Jiyun and Cancino-Chacón, Carlos and Chiruthapudi, Suhit and Nam, Juhan},
207
+
address = {Daejeon, South Korea}
208
+
year = {2025}
209
+
}
190
210
```
211
+
212
+
```bibtex
191
213
@inproceedings{matchmaker_lbd,
192
214
title={{Matchmaker: A Python library for Real-time Music Alignment}},
193
215
author={Park, Jiyun and Cancino-Chac\'{o}n, Carlos and Kwon, Taegyun and Nam, Juhan},
@@ -197,6 +219,8 @@ If you find Matchmaker useful, we would appreciate if you could cite us!
197
219
}
198
220
```
199
221
222
+
223
+
200
224
## Acknowledgments
201
225
202
226
This work has been supported by the Austrian Science Fund (FWF), grant agreement PAT 8820923 ("*Rach3: A Computational Approach to Study Piano Rehearsals*"). Additionally, this work was supported by the National Research Foundation of Korea (NRF) grant funded by the Korea government (MSIT) (No. NRF-2023R1A2C3007605).
0 commit comments