mod-plugin-builderでlv2プラグインをビルドしよう

mod-plugin-builderとは

mod-plugin-builderMODが開発したMOD Device(MOD Dwarfなど)のためののlv2プラグインビルド環境です。

mod-plugin-builderはLinux環境であれば動作しますので、ビルドしたlv2プラグインLinuxで動作します。

しかしLinuxで利用できるlv2がビルドできるものの、GUIを利用するにはmod-hostmod-uiが必要になってくるので、深入りしないことにします。

(私の環境がManjaro+PipewireなのでJACK2環境のMODデバイスと異なるためです。UbuntuDebian環境ならうまく動作するかもしれません。)

その点、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を使って実現していきます。

MODデバイスには次のようなプラグインが入っています。

作者名:MODプラグイン パッケージ名(本家,AUR) ソース等
A. Bruzas https://github.com/antanasbruzas/abGate
AIDA DSP aida-x https://github.com/AidaDSP/aida-x
Aurelien ams-lv2 https://github.com/blablack/ams-lv2
Bollie bolliedelayxt.lv2-git https://ca9.eu/lv2/
brummer10 https://github.com/brummer10/CollisionDrive
https://github.com/brummer10/MetalTone
David Robillard, lv2 http://drobilla.net/drobilla
DoGood Sound https://dogoodsound.com/
Dowell amsynth https://amsynth.github.io/
calf calf https://calf-studio-gear.org/
CAPS caps-lv2-git http://quitte.de/dsp/caps.html
CHOWDSP chowcentaur-bin https://chowdsp.com/
DISTRHO distrho-ports https://distrho.sourceforge.io/plugins.php
Dragonfly dragonfly-reverb https://michaelwillis.github.io/dragonfly-reverb/
falkTX,FluidGM, AV Linux fluidplug-git https://github.com/falkTX/FluidPlug
FOMP fomp.lv2 https://gitlab.com/drobilla/fomp
fowrad https://www.forward-audio.com/
Freaked https://github.com/pjotrompet/Freaked
Guitarix gxplugins.lv2 https://sourceforge.net/projects/guitarix/
infamous infamousplugins https://ssj71.github.io/infamousPlugins/
INVADA invada-studio-plugins-lv2 https://launchpad.net/invada-studio/
K-Devices https://k-devices.com/
looperativ https://www.looperlative.com/
lsp-plugins https://lsp-plug.in/
Mayank Sanganeria https://github.com/e7mac
MDA mda-lv2-git https://gitlab.com/drobilla/mda-lv2
Mike https://github.com/mikeoliphant/neural-amp-modeler-lv2
MOD mod-utilities-lv2-git https://github.com/moddevices
OMK notes.lv2-git https://git.open-music-kontrollers.ch/~hp
OpenAV openav-artyfx-git https://github.com/openAVproductions/openAV-ArtyFX
OverToneDSP overtone-wpc-plugins-bin (非公開?) https://www.overtonedsp.co.uk/
Rackarrack rkr.lv2-git https://github.com/ssj71/rkrlv2
remaincalm https://github.com/remaincalm
ReMasterMed https://remastermediapro.com/
Schrammel https://github.com/janosgit/schrammel_ojd
SHIRO shiro-plugins-git https://github.com/ninodewit/SHIRO-Plugins
TAL tal-reverb2-bin https://tal-software.com/products/tal-reverb
TAP tap-plugins https://sourceforge.net/projects/tap-plugins/
VeJa https://github.com/VeJa-Plugins
X42 x42-plugins https://x42-plugins.com/x42/
ZamAudio zam-plugins https://www.zamaudio.com/

2022年版Manjaro LinuxでのWine環境構築

Manjaro LinuxWindowsのソフトが実行できるWine環境を構築していきます

おおまかに言うとLinuxで次のWindowsソフトを使えるようにしていきます。

本記事を書くきっかけ

Roland SOUND Canvas VAは故レイ・ハラカミも使っていたSOUND Canvasシリーズのソフトウェア版です。

ソフトとしては2015年にVSTインストルメントとして発売され、私は2020年に買っています。当時はLinuxではウィンドウサイズが変わらなくて使えない機能などがありました。

ja.wikipedia.org

ということで、インストール.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設定などを説明していきたいと思います。

forum.manjaro.org

Manjaroのインストールと日本語環境の導入

このへんは他所を参考にしてください。

ManjaroへのPipewireの導入

unfaさんのYouTubeを見ましょう。

youtu.be

でも残念なことに、今現在unfaさんはPipewireを使っていません。 Ardourがたびたび落ちるなどの問題に直面したためです。

youtu.be

$ 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についてはこちらが詳しいです。LinuxWindows VSTプラグインを動かすために必要になります。

scrapbox.io

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版をダウンロードしてください。

www.rolandcloud.com

$ wine Roland-Cloud-Manager-Installer-2-6-1.exe

インストールするとRoland Cloud Managerが使えるようになります。 ただし、表示には時間がかかります。

Roland Cloud Manager
Roland Cloud Manager

SteamでWindowsゲームを使えるようにする準備

Steamは標準でインストールされていますし、wineはもうインストールしたので、Protonをインストールします。

$ yay -S proton

いろいろインストールされます。

設定はSteamを起動してSteam -> Settings -> Steam Playの"Enable Steam Play for all other titles"にチェックを入れます。

proton設定
proton設定

Protonで動作するWindowsゲームはProtonDBでまとめられています。

www.protondb.com

日本語だと文字化けしますので、下記が詳しくまとめられています。

miyacopl.hatenablog.com

Kindle for PC

linuxaudio.hatenablog.com

はじめての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です。

mimium.org

インストールについてはこちらで説明されています。

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がネットに繋がらない

Kindle for PC with Wine
Kindle for PC with Wine

解決法かな?

  1. uninstall old kindle with command “wine64 uninstaller”
  2. mkdir -p ${WINEPREFIX:-$HOME/.wine}/drive_c/users/$USER/AppData/Local/Amazon/Kindle
  3. install Kindle for PC version 1.30.0.

Manjaro LinuxへのRoland Sound Canvas VAのインストール

  1. Wineの準備
  2. 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 

winecfg
winecfg

これでSOUND Canvas VAが下記のコマンドで起動するはずです。

$ wine ~/.wine/drive_c/Program\ Files/Vstplugins/Roland/Sound\ Canvas\ VA/SOUND\ Canvas\ VA.exe