glslEditor for VST サンプルコード

MIDI CC入力のサンプルコード

MIDI CC入力を受信していることを確認する実装例です。

varying vec4 destinationColour;
varying vec2 textureCoordOut;

#extension GL_OES_standard_derivatives : enable

uniform float time;
uniform vec2 mouse;
uniform vec2 resolution;
uniform float midiCC[128];
uniform float wave[256];
uniform float spectrum[256];

#define pi 3.1415

void main()
    vec2 position = (gl_FragCoord.xy / resolution.xy);
    float power = midiCC[position.x * 128];

    float r = position.y * 1.0;
    float g = 1-position.y * 1.0;
    float b = 0.;

    if(position.y < power * 0.01)
        gl_FragColor = vec4(r, g, b, 1.0);
        gl_FragColor = vec4(0, 0, 0, 0.0);

A GLSL editor running on VST / AU plug-in has been released

※2017/03/06 Update: Add the distribution of Windows installer version.


Download (free)

VST for Windows (64bit&32bit):

インストーラー版 for Windows(64bit)


インストーラー版 for Windows(32bit)


ZIP版 for Windows(64bit&32bit)


VST/AU for macOS (64bit&32bit):

for macOS (64bit&32bit)


What is this?

It is an editor that describes a shader language called GLSL (OpenGL Shading Language) and a VST / AU plugin that displays a window to execute OpenGL drawing. Using the plug-in form, we have implemented the following distinctive functions.

  • Supports audio input from DAW (VST host)
  • Supports MIDI CC input from DAW (VST host)
  • Full screen display with multi display is also possible

By using these functions, you can control the shader in conjunction with DAW’s voice and MIDI automation. It may be used for VJ applications.
The shader that can be edited with this plug-in is “fragment shader” only.

What is GLSL?

For details, refer to the Wikipedia article.
I think that it would be nice if you could catch the article of “WebGL Honkyama” for more detailed information and fun illustrations.

Usage / compatibility with GLSL Sandbox

The GLSL editor of this plugin is designed to be compatible with GLSL Sandbox. By typing the same code as the GLSL Sandbox gallery into the editor you can draw in the same way.
Attention: Please properly operate / use shader code based on the existence of copyright. Especially, do not steal others’s code, or misrepresent others’ code as yourself.

Usage / uniform variables

Some uniform variables are specific to the GLSL Sandbox and others are provided by this plugin.

▼ GLSL Sandbox Specific

uniform float time:
 Get current time. Real-time animation can be realized by using this.
 * Ver 1.0 gives the frame counter every 0.2.

uniform vec2 mouse:
 While mouse dragging in the rendering window, you can get mouse coordinates. Both the X and Y directions range from 0 to 1.

uniform vec2 resolution:
 You can get the resolution of the current rendering window.

uniform vec2 surfacePosition:
 You can get the coordinates of the current surface (like billboard).

▼ This plug-in original implements

uniform float midiCC[128]:
 You can obtain MIDI CC events from the DAW (VST host). Get MIDI CC events as an array. "MidiCC [0]" means the value of "CC 0".
 The range of values ​​stored in each array is roughly 0 to 127, depending on the DAW.
 * For MIDI CC specifications, refer to the article of Wikipedia.

uniform float wave[256]:
 You can acquire voice waveform from DAW's mixer. Acquires 256 speech waveforms as an array. "Wave [0]" means the value of the "first sample" of the waveform.
 The range of values ​​stored in each array is roughly 0 to 1, depending on the DAW.

uniform float spectrum[256]:
 It is possible to obtain the value obtained by converting the speech waveform on the mixer of the DAW into the frequency spectrum. Acquire the frequency spectrum of 256 resolution as an array. "Spectrum [0]" means the value of the "lowest frequency" counted from the lower frequency in the frequency spectrum.
 The range of values ​​stored in each array is roughly 0 to 1, depending on the DAW.

License / source code

This software is distributed under “GPL v3” license.
The source code repository (GitHub) can be accessed from the following link.






Windows版VST (64bit&32bit):

インストーラー版 for Windows(64bit)


インストーラー版 for Windows(32bit)


ZIP版 for Windows(64bit&32bit)


macOS版VST/AU (64bit&32bit):

macOS版VST/AU (64bit&32bit)



GLSL (OpenGL Shading Language)というシェーダ専用言語を記述するエディタと、OpenGLの描画を実行するウインドウを表示するVST/AUプラグインです。プラグイン形式ということを活かし、以下の特徴的な機能を実装しています。

  • DAW(VSTホスト)からの音声入力に対応
  • MIDI CCの入力に対応
  • マルチディスプレイでフルスクリーン表示も可能



もっと詳しい情報や楽しい実例は『WebGL 総本山』さんの記事を漁っていただけるとよろしいかと思います。

使い方 / GLSL Sandboxとの互換性

このプラグインのGLSLエディタは、GLSL Sandboxと互換性があるように設計しています。GLSL Sandboxのギャラリーと同じコードをエディタに打ち込むことで、同じように描画することができます。

使い方 / uniform変数

uniform変数などはGLSL Sandbox固有のものと、本プラグイン独自に用意したものがあります。

▼GLSL Sandbox固有

uniform float time:
 ※ver 1.0では0.2毎のフレームカウンタを渡しています。

uniform vec2 mouse:

uniform vec2 resolution:

uniform vec2 surfacePosition:


uniform float midiCC[128]:
 DAW(VSTホスト)からMIDI CCイベントを取得することができます。MIDI CCイベントを配列で取得します。"midiCC[0]"は"CC 0"の値を意味します。
 ※MIDI CCの仕様については、Wikipediaの記事を参考に。

uniform float wave[256]:

uniform float spectrum[256]:


本ソフトウェアは『GPL v3』ライセンスの下で配布しています。