LoginSignup
0
1

More than 1 year has passed since last update.

Neothesiaでピアノロール動画を生成

Last updated at Posted at 2022-05-11

Neothesia とは

  • MIDIファイルを入力することでピアノロールを生成してくれるアプリケーション。
  • Synthesiaのオープンソース版。
  • mp4(x264)形式でエンコードすることも可能だが、リリースされているバイナリでは不可。(v0.0.11時点)
  • よって、コンパイルが必要。

環境

  • Ubuntu 22.04(最小インストールしたての状態を想定)
  • GPUクセラレーションが使える環境(UHD Graphics 620環境で確認)

ビルド手順

sudo apt update
sudo apt upgrade
sudo apt install git
sudo apt install curl
sudo apt install ffmpeg
sudo apt install build-essential
sudo apt install libasound2-dev
sudo apt install libudev-dev
sudo apt install libavcodec-dev
sudo apt install libavformat-dev
sudo apt install libswscale-dev 
sudo apt install libclang-dev
sudo apt install pkg-config
sudo apt install cmake
sudo apt install libfontconfig1-dev
sudo apt install nasm
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
git clone https://github.com/PolyMeilex/Neothesia.git
cd Neothesia/
cargo build --release --no-default-features --features record

実行方法

./target/release/neothesia-cli ./test.mid 

TIPS

  • リリース版でGUI上に表示される色と、neothesia-cliでエンコードされた動画の色が異なる。
  • エンコードされたファイルを他の編集ソフトで編集できない
  • https://github.com/PolyMeilex/Neothesia/issues/20 に記載の通りに編集すると改善する。
src/bin/neothesia-cli.rs
- encoder.encode_rgba(1920, 1080, data, false); 
+ encoder.encode_bgra(1920, 1080, data, false); 
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1