Gtk application to visualize MIDI file as piano tutorial videos.
A project for the course Multimedium Computing Environment (National Taiwan University, 2018 Spring).
$ sudo apt install python3-venv python3-pip gstreamer1.0-plugins-bad ffmpeg libffi-dev
$ make startThe Makefile script downloads a soundfont (249 MB) and creates virtualenv environment.
- Install Python 3.4
- Noted that PyGObject for Windows do not support Python 3.5 or above
 
- Install PyGObject for Windows
- Choose these items in GNOME libraries:
- Base packages
- Gst-plugins
- Gst-plugins-extra
- Gst-plugins-more
- Gstreamer
- GTK+
- JSON-glib
 
- Choose none in non-GNOME libraries
- Choose none in development packages
 
- Choose these items in GNOME libraries:
- Open the cmd.exeto prepare for installing dependencies> python -m pip install --upgrade pip > pip install requests pycparser 
- Download wheel packages from Unofficial Windows Binaries for Python Extension Packages
- cffi‑1.11.5‑cp34‑cp34m‑win_amd64.whl
- moviepy‑0.2.3.4‑py2.py3‑none‑any.whl
 
- Open the cmd.exeagain to install dependencies> pip install cffi‑1.11.5‑cp34‑cp34m‑win_amd64.whl > pip install moviepy‑0.2.3.4‑py2.py3‑none‑any.whl > pip install gizeh mido intervaltree 
- Open C:\Python34\Lib\site-packages\cairocffi\__init__.py- Change line 41 and save
- cairo = dlopen(ffi, 'cairo', 'cairo-2') + cairo = dlopen(ffi, 'cairo', 'cairo-2', 'cairo-gobject-2') 
 
- Change line 41 and save
- Download soundfont from musical-artifacts.com, save it to soundfont/touhou.sf2
- Execute python3 src/main.py
- Gtk framework
- Dependent packages
- gizeh: a Python library for vector graphics
- moviepy: a Python library for video editing
- mido: a library for working with MIDI messages and ports
- intervaltree: a mutable, self-balancing interval tree
 
- Resources
- midi/charming-domination.midfrom Chris33711
- midi/at-the-end-of-the-spring.midfrom Chris33711
- soundfont/Touhou.sf2from Musical Artifacts
 


