mod-plugin-builderでlv2プラグインをビルドしよう
mod-plugin-builderとは
mod-plugin-builderはMODが開発したMOD Device(MOD Dwarfなど)のためののlv2プラグインビルド環境です。
mod-plugin-builderはLinux環境であれば動作しますので、ビルドしたlv2プラグインもLinuxで動作します。
しかしLinuxで利用できるlv2がビルドできるものの、GUIを利用するにはmod-hostやmod-uiが必要になってくるので、深入りしないことにします。
(私の環境がManjaro+PipewireなのでJACK2環境のMODデバイスと異なるためです。UbuntuやDebian環境ならうまく動作するかもしれません。)
その点、Carlaを使うとパラメーターを弄れるのでそちらを使うことを前提に話をしています。
デフォルトでビルドできるプラグインパッケージは mod-plugin-builder/plugins/packageの下にあり、184パッケージ(2023/7/8現在)あります。
abgate aether aidadsp-lv2 airwindows alo-labs ams-lv2-labs amsynth artyfx artyfx-labs beatslash-lv2-labs blop-lv2 blop-lv2-labs bluesbreaker bolliedelay bolliedelayxt cabsim calf calf-labs camomile-examples-labs caps-lv2 caps-lv2-labs cardinal-bin carla-plugins carla-plugins-labs chow-analogtapemodel chow-centaur chow-kick collisiondrive commercial-plugin-example crypt deteriorate-lv2-labs dexed-labs die-plugins die-plugins-labs distrho-ports distrho-ports-labs distrho-ports-v6 dm-graindelay dpf-plugins dpf-plugins-labs dragonfly-reverb eg-amp-dpf-labs eg-amp-lv2-labs eg-synth-dpf-labs fabla-labs fatfrog fluida-labs fluidplug fluidplug-labs fomp fomp-labs freaked guitarix guitarix-gxtuner guitarix-labs guitarix-studiopre gxbajatubedriver gxbottlerocket gxepic gxguvnor gxhotbox gxhyperion gxknightfuzz gxliquiddrive-labs gxosmu gxquack gxsaturate gxsd1 gxsd2lead gxsfp gxslowgear gxsunface-labs gxsupersonic gxsvt gxswitchlesswah gxtimray gxtonemachine gxultracab gxuvox gxvbass gxvintagefuzzmaster gxvmk2d gxvoodoo gxvoxtb gxvstb harmonicexciter infamous-plugins infamous-plugins-labs invada-lv2 invada-lv2-labs loopor-labs lsp-plugins lsp-plugins-impulsantworten lsp-plugins-labs lv2-examples lv2-examples-labs matk max-gen-zwabo-mirrorz metaltone midimsg-lv2-labs mod-ams-lv2 mod-arpeggiator mod-audio-mixers mod-cabsim-ir-loader mod-convolution-loader mod-cv-plugins mod-distortion mod-dwarf-jack-detector mod-mda-lv2 mod-mda-lv2-labs modmeter mod-midi-utilities mod-midi-utilities-labs mod-neural-amp mod-pitchshifter modspectre mod-step-sequencer mod-system-plugins mod-tal-noisemaker mod-utilities mod-utilities-labs mod-volume molot-lite-mono-lv2-labs mrfreeze-labs neural-amp-modeler-lv2 notes-lv2 oneknob-series oneknob-series-labs padthv1-labs pdlv2-labs pitchtracking-series plujain-channelb-labs portal-lv2 qmidiarp-labs quadrafuzz-labs regrader remaincalm-plugins rezonateur rkrlv2 rkrlv2-labs rumor samplv1 schrammel-ojd screcord setbfree setbfree-controller setbfree-labs setbfree-mod sfizz-labs shiro-plugins shiro-plugins-labs shiru-plugins-labs simsam-labs sooperlooper-lv2 sorcer-labs stone-phaser-labs string-machine-labs swh-lv2-labs synthv1-labs tal-reverb tamgamp-labs tap-lv2 tap-lv2-labs triceratops-labs vallsv-midi-display-labs veja-1960-cab wolf-shaper x42-fat1 x42-fil4 x42-mclk x42-midifilter x42-midigen x42-mtc x42-plugins-labs x42-stepseq x42-tinygain x42-tuna-lv2-labs x42-xfade x42-zconvo ykchorus-labs zam-plugins zam-plugins-labs zeroconvo-labs zynaddsubfx-labs
インストール方法
事前にいろいろな開発ツールをインストールする必要があります。 くわしくはhttps://github.com/moddevices/mod-plugin-builder。
初期設定
$ cd ~/git/mod-plugin-builder $ ./bootsplash.sh x86_64 $ git submodule init $ git submodule update
結構時間がかかりますが、$HOME/mod-workdirに開発環境がインストールされます。
ビルド方法
ビルド方法は下記の通りです。
$ cd ~/git/mod-plugin-builder $ ./build x86_64 abgate
ビルドが完了すると$HOME/mod-workdir/x86_64/plugins/以下にabGate.lv2が作成されます。 たまに???.lv2フォルダ内の???.soファイルに実行権限がついていない場合などがあるので、chmodで実行権限をつけます。
あとは$HOME/.lv2にコピーしたり、プラグインPATHに$HOME/mod-workdir/x86_64/plugins/を追加したりしたら利用できるようになります。
MODプラグイン
この記事の目的はMODのギターマルチエフェクターというかそれ以上のものであるMOD DWARFもどきの環境を作ろうというものです。
MOD DWARFはオープンソースのLinuxとlv2プラグインを利用しているので、Arch系のディストリビューションManjaroとプラグインホストのCalraを使って実現していきます。
2022年版Manjaro LinuxでのWine環境構築
Manjaro LinuxでWindowsのソフトが実行できるWine環境を構築していきます
おおまかに言うとLinuxで次のWindowsソフトを使えるようにしていきます。
本記事を書くきっかけ
Roland SOUND Canvas VAは故レイ・ハラカミも使っていたSOUND Canvasシリーズのソフトウェア版です。
ソフトとしては2015年にVSTインストルメントとして発売され、私は2020年に買っています。当時はLinuxではウィンドウサイズが変わらなくて使えない機能などがありました。
ということで、インストール.exeを持っているので久々にインストールしてみたら...ちゃんと動く... 動くんだけど、アクティベーションができないOrz 前はできていたのに‥‥といろいろやってみたのですが、やっぱりアクティベーションできません。
Rolandのサポートに尋ねてみて、2021年12月21日に返ってきた返答は…
Sound Canvas VAをご愛用いただきありがとうございます。 現在Sound Canvas VAのアクティベーションについては、Roland Cloudに移行しております。 Roland Content Storeで購入したSound Canvas VAのRoland Cloudへ移行については、 以下のページにまとめがございます。 https://www.roland.com/jp/content_store_migration/ Sound Canvas VAをご購入いただいたのは、「2012年」でよろしいでしょうか?であれば、 ご購入いただいた際にRoland Account Service に登録されていたメールアドレスで、 RolandCloudにご登録いただければ、、Sound Canvas VA の Lifetime-Key が取得可能です。 以下のページから登録を行ってください。 https://www.roland.com/jp/promos/about_roland_cloud/membership/ 引き続きSound Canvas VAをよろしくお願いいたします。
『Lifetime-Keyが取得可能』って書いてあるけれど、Windowsで使う気がないのでもはや「インストール.exeはゴミか」と思って、でも試しにRoland Cloud ManagerをWineにインストールしてみるかと試してみると、インストールもできて、多少エラーは出るものの動きます。SOUND Canvas VAもアップデートできてLifetime-KeyもGET!やったね。
ということで、Manjaro 21.2.0も出たところなので(ローリングリリースなのでほとんど意味はないと思いますが)、ほとんど使っていないノートPCにクリーンインストールしてからのWine設定などを説明していきたいと思います。
Manjaroのインストールと日本語環境の導入
このへんは他所を参考にしてください。
ManjaroへのPipewireの導入
unfaさんのYouTubeを見ましょう。
でも残念なことに、今現在unfaさんはPipewireを使っていません。 Ardourがたびたび落ちるなどの問題に直面したためです。
$ sudo pacman -Ru --nodeps pulseaudio pulseaudio-jack pulseaudio-lirc pulseaudio-rtp pulseaudio-zeroconf pulseaudio-bluetooth pulseaudio-alsa pulseaudio-ctl manjaro-pulse && sudo pacman -S manjaro-pipewire pipewire-jack-dropin
Wineのインストール
$ sudo pacman -S wine
依存関係でいろいろインストールされます。
SOUND Canvas VAのインストール
$ wine SOUND_Canvas_VA_Installer.exe
いくつかwineに必要なものがインストールされます。
$ yay -S yabridge-bin fakeroot
yabridgeについてはこちらが詳しいです。LinuxでWindows VSTプラグインを動かすために必要になります。
yabridgeの使い方
yabridgeの使い方はまず、yabridgectlコマンドのaddオプションでVSTプラグインの.dllファイルがあるディレクトリPATHを追加します。 そのあとyabridgectlのsyncオプションを実行すると、.soファイルが作成されます。
$ yabridgectl add "$HOME/.wine/drive_c/Program Files/Vstplugins/Roland/Sound Canvas VA/" $ yabridgectl sync
あとDAWやCalra(VSTホスト)が見つけやすいようにリンクしておきましょう。
$ ln -s "$HOME/.wine/drive_c/Program Files/Vstplugins/Roland/Sound Canvas VA" ~/.vst/yabridge-roland
それではVSTホストであるCarlaでSOUND Canvas VAを起動してみましょう。 その前にcarlaのインストール。
$ sudo pacman -S base-devel $ yay -S carla-git carla-bridges-win qjackctl
Carlaの使い方
Roland Cloud Manager
Roland Cloud Managerはこちらからダウンロードできます。Windows版をダウンロードしてください。
$ wine Roland-Cloud-Manager-Installer-2-6-1.exe
インストールするとRoland Cloud Managerが使えるようになります。 ただし、表示には時間がかかります。
SteamでWindowsゲームを使えるようにする準備
Steamは標準でインストールされていますし、wineはもうインストールしたので、Protonをインストールします。
$ yay -S proton
いろいろインストールされます。
設定はSteamを起動してSteam -> Settings -> Steam Playの"Enable Steam Play for all other titles"にチェックを入れます。
Protonで動作するWindowsゲームはProtonDBでまとめられています。
日本語だと文字化けしますので、下記が詳しくまとめられています。
Kindle for PC
はじめてのPKGBUILD(mimium)
pkgname=mimium pkgver=0.3.0 pkgrel=0 pkgdesc='An infrastructural programming language for sound and music' arch=('x86_64') url="https://mimium.org" license=("MPL 2.0') depends=() makedepends=('cmake' 'bison' 'flex' 'llvm' 'libsndfile' 'rtaudio') source=("https://github.com/mimium-org/mimium/archive/v$pkgver.zip") sha256sums=('c3de91760cc0985bb24d5564ec81a7f0f8744045c1eee81fc9ba8d99fe2e5425') build() { cmake -B build -S "${pkgname}-${pkgver}" \ -DCMAKE_INSTALL_PREFIX='/usr' cmake --build build -j } package() { cd "build" make DESTDIR="$pkgdir/" install }
まだまだよくわかっていなけれど、これでAURに上げればyayでインストールできるはず。AURに上げたことはないけれど...
mimiumのManjaro Linuxへのインストール(homebrewを使って失敗の時)
mimiumをインストールします。この記事の執筆時のバージョンは0.3.0です。
インストールについてはこちらで説明されています。
homebrewでインストールができると書いてあるので、homebrewをまずインストールします。
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
/home/linuxbrew以下にhomebrewがインストールされます。
==> Next steps: - Add Homebrew to your PATH in /home/aki/.bash_profile: echo 'eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)' >> /home/aki/.bash_profile eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv) - Run `brew help` to get started - Further documentation: https://docs.brew.sh - Install the Homebrew dependencies if you have sudo access: sudo pacman -S base-devel See https://docs.brew.sh/linux for more information - We recommend that you install GCC: brew install gcc [aki@x230 ~]$
Next Stepsとして次のコマンドを実行するように書いてあるので実行します。(PATHを通します)
[aki@x230 ~]$ echo 'eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)' >> /home/aki/.bash_profile [aki@x230 ~]$ eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
base-develもインストールしろと書いてあるので、一応インストールしておきます。
[aki@x230 ~]$ sudo pacman -S base-devel
mimium
[aki@x230 ~]$ brew tap mimium-org/mimium && brew install mimium
/home/linuxbrew/.linuxbrew/Cellar/mimium/0.3.0.reinstall/bin/mimiumがインストールされます。
[aki@x230 ~]$ /home/linuxbrew/.linuxbrew/Cellar/mimium/0.3.0.reinstall/bin/mimium --version 0.3.0
PATHを設定するかaliasを設定します。
[aki@x230 ~]$ /home/linuxbrew/.linuxbrew/Cellar/mimium/0.3.0.reinstall/bin/mimium hello.mmm ALSA lib dlmisc.c:341:(snd_dlobj_cache_get0) Cannot open shared library libasound_module_ctl_pulse.so (/home/linuxbrew/.linuxbrew/Cellar/alsa-lib/1.2.4/lib/alsa-lib/libasound_module_ctl_pulse.so: cannot open shared object file: No such file or directory) ALSA lib dlmisc.c:341:(snd_dlobj_cache_get0) Cannot open shared library libasound_module_ctl_pulse.so (/home/linuxbrew/.linuxbrew/Cellar/alsa-lib/1.2.4/lib/alsa-lib/libasound_module_ctl_pulse.so: cannot open shared object file: No such file or directory) ALSA lib dlmisc.c:341:(snd_dlobj_cache_get0) Cannot open shared library libasound_module_ctl_pulse.so (/home/linuxbrew/.linuxbrew/Cellar/alsa-lib/1.2.4/lib/alsa-lib/libasound_module_ctl_pulse.so: cannot open shared object file: No such file or directory) ALSA lib dlmisc.c:341:(snd_dlobj_cache_get0) Cannot open shared library libasound_module_ctl_pulse.so (/home/linuxbrew/.linuxbrew/Cellar/alsa-lib/1.2.4/lib/alsa-lib/libasound_module_ctl_pulse.so: cannot open shared object file: No such file or directory) ALSA lib dlmisc.c:341:(snd_dlobj_cache_get0) Cannot open shared library libasound_module_ctl_pulse.so (/home/linuxbrew/.linuxbrew/Cellar/alsa-lib/1.2.4/lib/alsa-lib/libasound_module_ctl_pulse.so: cannot open shared object file: No such file or directory) ALSA lib dlmisc.c:341:(snd_dlobj_cache_get0) Cannot open shared library libasound_module_ctl_pulse.so (/home/linuxbrew/.linuxbrew/Cellar/alsa-lib/1.2.4/lib/alsa-lib/libasound_module_ctl_pulse.so: cannot open shared object file: No such file or directory) ALSA lib dlmisc.c:341:(snd_dlobj_cache_get0) Cannot open shared library libasound_module_ctl_pulse.so (/home/linuxbrew/.linuxbrew/Cellar/alsa-lib/1.2.4/lib/alsa-lib/libasound_module_ctl_pulse.so: cannot open shared object file: No such file or directory) ALSA lib dlmisc.c:341:(snd_dlobj_cache_get0) Cannot open shared library libasound_module_ctl_pulse.so (/home/linuxbrew/.linuxbrew/Cellar/alsa-lib/1.2.4/lib/alsa-lib/libasound_module_ctl_pulse.so: cannot open shared object file: No such file or directory) ALSA lib dlmisc.c:341:(snd_dlobj_cache_get0) Cannot open shared library libasound_module_ctl_pulse.so (/home/linuxbrew/.linuxbrew/Cellar/alsa-lib/1.2.4/lib/alsa-lib/libasound_module_ctl_pulse.so: cannot open shared object file: No such file or directory) ALSA lib dlmisc.c:341:(snd_dlobj_cache_get0) Cannot open shared library libasound_module_ctl_pulse.so (/home/linuxbrew/.linuxbrew/Cellar/alsa-lib/1.2.4/lib/alsa-lib/libasound_module_ctl_pulse.so: cannot open shared object file: No such file or directory) ALSA lib dlmisc.c:341:(snd_dlobj_cache_get0) Cannot open shared library libasound_module_ctl_pulse.so (/home/linuxbrew/.linuxbrew/Cellar/alsa-lib/1.2.4/lib/alsa-lib/libasound_module_ctl_pulse.so: cannot open shared object file: No such file or directory) ALSA lib dlmisc.c:341:(snd_dlobj_cache_get0) Cannot open shared library libasound_module_ctl_pulse.so (/home/linuxbrew/.linuxbrew/Cellar/alsa-lib/1.2.4/lib/alsa-lib/libasound_module_ctl_pulse.so: cannot open shared object file: No such file or directory) ALSA lib dlmisc.c:341:(snd_dlobj_cache_get0) Cannot open shared library libasound_module_ctl_pulse.so (/home/linuxbrew/.linuxbrew/Cellar/alsa-lib/1.2.4/lib/alsa-lib/libasound_module_ctl_pulse.so: cannot open shared object file: No such file or directory) ALSA lib dlmisc.c:341:(snd_dlobj_cache_get0) Cannot open shared library libasound_module_pcm_pulse.so (/home/linuxbrew/.linuxbrew/Cellar/alsa-lib/1.2.4/lib/alsa-lib/libasound_module_pcm_pulse.so: cannot open shared object file: No such file or directory) RtApiAlsa::probeDeviceOpen: pcm device (default) won't open for output.
alsa-lib関連のファイルが存在しないようなので、次のコマンドを実行します。
[aki@x230 ~]$ brew reinstall alsa-lib
依存関係でいろいろなファイルが/home/linuxbrew/以下にインストールされます。 最初に失敗しているのかな?
でも、もう一度mimiumを実行してみても、同じ結果です。
Kindle for PCがネットに繋がらない
解決法かな?
- uninstall old kindle with command “wine64 uninstaller”
- mkdir -p ${WINEPREFIX:-$HOME/.wine}/drive_c/users/$USER/AppData/Local/Amazon/Kindle
- install Kindle for PC version 1.30.0.
WineではBug 46320のため、Kindleのインストーラーを動かす前に以下のコマンドでディレクトリを作成しないとクラッシュします:
— さがわ (@sagawa_aki) February 13, 2021
% mkdir -p ${WINEPREFIX:-$HOME/.wine}/drive_c/users/$USER/AppData/Local/Amazon/Kindle
Manjaro LinuxへのRoland Sound Canvas VAのインストール
1. Wineの準備
1.1 Wineのインストール
$ sudo pacman -S wine
下記に書いてあるように lib32-alsa-libとlib32-alsa-pluginsとlib32-libpulseをインストールします。 https://wiki.archlinux.org/index.php/Wine#Sound
$ sudo pacman -S lib32-alsa-lib lib32-alsa-plugins lib32-libpulse
wineasioをインストールします。realtime-privilegesも一緒にインストールします。 https://aur.archlinux.org/packages/wineasio/
$ yay -S wineasio realtime-privileges $ sudo usermod -aG realtime ユーザー名
インストールが完了したら次のコマンドを実行します。
$ wine64 regsvr32 wineasio.dll
下記の要領でwinetricksでmfc42、vcrun2008、urlmon、dotnet45、allfontsをインストールします。
$ winetricks mfc42
2. Roland Sound Canvas VA体験版の準備
Roland Sound Canvas VA体験版は下記からダウンロードできます。 www.roland.com
次のコマンドでインストールします。
$ unzip scva_win.zip $ cd SOUND_Canvas_VA_Win_v106 $ wine SOUND_Canvas_VA_Installer.exe
2.1 SAVIHostのインストール
SAVIHost www.hermannseib.com
savihostx64.zipをインストールして解凍します。 https://www.hermannseib.com/programs/savihostx64.zip
$ unzip savihostx64.zip $ cp savihost.exe ~/.wine/drive_c/Program\ Files/Vstplugins/Roland/Sound\ Canvas\ VA/SOUND\ Canvas\ VA.exe
winecfgでAdd applicationからSOUND Canvas VAの起動OSのversionをwindows XPにします。
$ winecfg
これでSOUND Canvas VAが下記のコマンドで起動するはずです。
$ wine ~/.wine/drive_c/Program\ Files/Vstplugins/Roland/Sound\ Canvas\ VA/SOUND\ Canvas\ VA.exe