ほとんどのオーディオプラグインにはパラメータが必要です。例えば、ローパスフィルタープラグインは、カットオフ周波数、スロープの急峻さ、およびレゾナンスパラメータを提供できます。すべてのオーディオプラグイン形式は、プラグインパラメータを定義および操作するためのメカニズムを提供しています。オーディオプラグイン開発用の最も人気のあるクロスプラットフォームフレームワークであるJUCE C++フレームワークは、これらのパラメータメカニズムに対して抽象化レイヤーを提供しています。しかし、パラメータの定義、使用、および保守は簡単ではありません。プラグイン開発者が必要とする可能性のあるさまざまな機能があります。例えば:- 型安全性
- 範囲と値の検証
- 値のフォーマットおよびラベリング
- 監視(UI制御またはオーディオ処理の更新用)
- スムージング
- シリアライゼーション(例:プリセット用)
- パラメータグループ
- メタパラメータ
長年にわたり、JUCEベースのプラグイン向けのパラメータ管理システムがいくつか提案されてきましたが、いずれも深刻な欠陥がありません。それらの中で最も有名なAudioProcessorValueTreeStateは、広く批判されています。このトークでは、現在のプラグインパラメータの課題と既存のソリューションについて説明し、その後、型消去技術に基づく新しいソリューションを提案します。これは、ポリモーフィズムを非侵襲的な方法で置き換えることを目的とした高度なC++デザインパターンです。型消去されたオーディオパラメータ:- 型安全性を保証します(低レベルの表現がない、dynamic_castがない)
- 異種のパラメータインスタンスをコレクションとして使用するために必要な抽象化を提供します
- 仮想ポリモーフィズムを使用しません(ベースクラスやインターフェースがない)
- JUCEをフォークしたり、パラメータクラスシステムを一から作成したりすることなく、簡単に機能を追加できます(使用しないものに対しては料金を払いません)
このトークは、JUCEのようなパラメータAPIに少なくとも1つ精通している中級以上のC++開発者を対象としています。---
Most audio plugins need parameters. For example, a low-pass filter plugin can provide a cutoff frequency, a slope steepness, and a resonance parameter.
All audio plugin formats provide some mechanism for defining and interacting with plugin parameters. The JUCE C++ framework, the most popular cross-platform framework for developing audio plugins, provides an abstraction layer over those parameter mechanisms.
Yet defining, using, and maintaining parameters is a non-trivial task. There are various features a plugin developer may need, like
- type safety,
- range and value validation,
- value formatting and labeling,
- observing (for UI controls or audio processing updates),
- smoothing,
- serialization (e.g., for presets),
- parameter groups, or
- meta parameters.
Over the years, a few parameter management systems for JUCE-based plugins have been proposed, but none have been without serious flaws. The most famous of them, AudioProcessorValueTreeState, has been widely criticized.
This talk will provide a tour of current plugin parameter challenges and existing solutions, and then propose a new solution based on the
type erasure technique: an advanced C++ design pattern meant to replace polymorphism in a non-intrusive manner.
Type-erased audio parameters
- guarantee type safety (no low-level representation, no dynamic_casts)
- provide the necessary abstractions to use heterogeneous parameter instances as a collection
- don't use virtual polymorphism (no base classes or interfaces)
- enable easy feature addition without forking JUCE or writing a new parameter class system from scratch (you don't pay for what you don't use)
- is relatively easy to integrate into existing codebases.
The talk is aimed at intermediate or advanced C++ developers who are familiar with at least one parameter API, such as the one in JUCE.