# CollidingCombSynth

CollidingCombSynth is an experimental synthesizer which sounds like bowed string. Equipped with 24 Karplus-Strong string models which collide to each other. Tuning of pitch is possible, but difficult. So mostly suitable for sound effects.

- Download CollidingCombSynth 0.1.19 `full` - VST 3 (github.com)
- Download CollidingCombSynth 0.1.19 `macOS` - VST 3 (github.com)
- Download Presets (github.com)

`full` package contains following builds.

- Windows (x86_64)
- Linux (x86_64)
- macOS (Universal 2)

Linux build is built on Ubuntu 24.04. If you are using distribution other than Ubuntu 24.04, plugin will not likely to run. In this case, please take a look at build instruction.

`macOS` package is recommended for macOS user. I can’t purchase Apple Developer Program, therefore installation requires a workaround to bypass Gatekeeper. Details of workaround are written in Installation -> macOS Specific section.

## Contact

Feel free to contact me on GitHub repository or `ryukau@gmail.com.`

You can fund the development through paypal.me/ryukau.

## Installation

### Plugin

Move `*.vst3` directory to:

- `/Program Files/Common Files/VST3/` for Windows.
- `$HOME/.vst3/` for Linux.
- `/Users/$USERNAME/Library/Audio/Plug-ins/VST3/` for macOS.

DAW may provides additional VST3 directory. For more information, please refer to the manual of the DAW.

### Presets

Notice: Some plugins don’t have presets provided by Uhhyou Plugins.

Presets are included in the plugin package linked at the top of this page. To install presets, follow the steps below.

1. Download plugin from a link at the top of this page.
2. Extract downloaded zip file.
3. Open `presets` directory placed in extracted package.
4. Move `Uhhyou` directory into an OS specific preset directory (see below).

Below is a list of preset directories for each OS.

- Windows : `/Users/$USERNAME/Documents/VST3 Presets`
- Linux : `$HOME/.vst3/presets`
- macOS : `/Users/$USERNAME/Library/Audio/Presets`

Preset directory name must be the same as the plugin. If preset directory does not exist, create it.

- Preset Locations - VST 3 Developer Portal

### Windows Specific

If DAW doesn’t recognize the plugin, try installing C++ redistributable (`vc_redist.x64.exe`). Installer can be found in the link below.

- Latest supported Visual C++ Redistributable downloads | Microsoft Learn

### Linux Specific

On Ubuntu 24.04, those packages are required.

    sudo apt install libxcb-cursor0  libxkbcommon-x11-0

If DAW doesn’t recognize the plugin, take a look at `Package Requirements` section of the link below and make sure all the VST3 related package is installed.

- VSTGUI: Setup

REAPER on Linux may not recognize the plugin. A workaround is to delete a file `~/.config/REAPER/reaper-vstplugins64.ini` and restart REAPER.

### macOS Specific

Important: `full` package is not confirmed working. When using `full`, try removing following files.

- `Contents/Resources/Documentation`
- `Contents/x86_64-linux`
- `Contents/x86_64-win`

`macOS` package doesn’t contain above files. Also, all packages are in “ad-hoc signing” state set by `codesign` command.

#### Remove Quarantine

When trying to run plugin first time, following message may appear on macOS.

    <PluginName>.vst3 is damaged and can't be opened. You should move it to the Trash.

In this case, open terminal and try running one or both of following command to unzipped `.vst3` directory. Replace `/path/to/PluginName.vst3` according to your install location.

    xattr -rd com.apple.quarantine /path/to/PluginName.vst3
    xattr -rc /path/to/PluginName.vst3

#### Bypass Gatekeeper

Plugin may be considered as unsigned/un-notarized application. In this case, open System Preferences, go to Security & Privacy → General, then click the Open Anyway button. The offcial Apple help page linked below has screenshots for the procedure. See “If you want to open an app that hasn’t been notarized or is from an unidentified developer” section.

- Safely open apps on your Mac - Apple Support

If the plugin is still not working, try changing install location to `/Library/Audio/Plug-ins/VST3/` or `/Users/$USERNAME/Library/Audio/Plug-ins/VST3/` whichever still haven’t tried.

If all the above methods do not work, try following the steps below.

1. Open terminal and run `sudo spctl --master-disable`.
2. Go to System Preferences → Security and Privacy → General → Allow apps downloaded from, then select “Anywhere”.

Beware that steps above degrades security of your system. To revert the settings, follow the steps below.

1. Go to System Preferences → Security and Privacy → General → Allow apps downloaded from, then select option to “App Store and identified developers”.
2. Open terminal and run `sudo spctl --master-enable`.

#### Applying `codesign`

Note This section may not relevant to `macOS` packages. However it’s not verified. (GitHub issue)

To use `full` package, following command might be used.

    sudo codesign --force --deep -s - /path/to/PluginName.vst3

`codesign` might not be available without installing Xcode.

#### Reference

- Safely open apps on your Mac - Apple Support
- java - “libprism_sw.dylib” cannot be opened because the developer cannot be verified. on mac JAVAFX - Stack Overflow
- How to Fix App “is damaged and can’t be opened. You should move it to the Trash” Error on Mac
- Allowing unsigned/un-notarized applications/plugins in Mac OS | Venn Audio

## GUI Style Configuration

At first time, create color config file to:

- `/Users/USERNAME/AppData/Roaming/UhhyouPlugins/style/style.json` on Windows.
- `$XDG_CONFIG_HOME/UhhyouPlugins/style/style.json` on Linux.
  - If `$XDG_CONFIG_HOME` is empty, make `$HOME/.config/UhhyouPlugins/style/style.json`.
- `/Users/$USERNAME/Library/Preferences/UhhyouPlugins/style/style.json` on macOS.

`style.json` will be loaded for each time a plugin window opens.

Several color themes are available on the link below. To use, copy the text to `style.json`.

- VSTPlugins/package/style/themes at master · ryukau/VSTPlugins

Below is an example of `style.json`.

    {
      "guiScale"          : 1          ,
      "fontFamily"        : "Tinos"    ,
      "fontBold"          : true       ,
      "fontItalic"        : true       ,
      "foreground"        : "#000000"  ,
      "foregroundButtonOn": "#000000"  ,
      "foregroundInactive": "#8a8a8a"  ,
      "background"        : "#ffffff"  ,
      "boxBackground"     : "#ffffff"  ,
      "border"            : "#000000"  ,
      "borderCheckbox"    : "#000000"  ,
      "borderLabel"       : "#000000"  ,
      "unfocused"         : "#dddddd"  ,
      "highlightMain"     : "#0ba4f1"  ,
      "highlightAccent"   : "#13c136"  ,
      "highlightButton"   : "#fcc04f"  ,
      "highlightWarning"  : "#fc8080"  ,
      "overlay"           : "#00000088",
      "overlayHighlight"  : "#00ff0033"
    }

### GUI Scale

- `guiScale`: GUI scaling. For example, `0.75` is 75%, and `2.0` is 200%.

The minimum of `guiScale` is `0.01`. The maximum is practically non-existent (the max value of 64-bit float).

Notice: If `guiScale` is too large, DAW may place the “close” button on the plugin window out of screen, making it unclickable.

### Font Options

Following is a list of font options.

- `fontFamily`: Font family name.
- `fontBold`: Enable bold style when `true`, disable when `false`.
- `fontItalic`: Enable italic style when `true`, disable when `false`.

System font can be used as `fontFamily`. To use different fonts for different plugins, place `*.ttf` file into custom font path: `*.vst3/Contents/Resources/Fonts`.

Notice: If the combination of `fontFamily`, `fontBold`, `fontItalic` does not exist in custom font path, default font of VSTGUI is used.

If `fontFamily` is set to empty string `""`, then `"Tinos"` is used as fallback. If the length is greater than 1 and the font family name doesn’t exist, default font of VSTGUI is used.

Styles other than bold, italic or bold-italic are not supported by VSTGUI. For example, “Thin”, “Light”, “Medium”, and “Black” weights cannot be used.

### Color Options

Hex color codes are used.

- 6 digit color is RGB.
- 8 digit color is RGBA.

First letter `#` is conventional. Plugins ignore the first letter of color code, thus `?102938`, `\n11335577` are valid.

Do not use characters outside of `0-9a-f` for color value.

Following is a list of color options. If an option is missing, default color will be used.

- `foreground`: Text color.
- `foregroundButtonOn`: Text color of active toggle button. Recommend to use the same value of `foreground` or `boxBackground`.
- `foregroundInactive`: Text color of inactive components. Currently, only used for TabView.
- `background`: Background color.
- `boxBackground`: Background color of inside of box shaped components (Barbox, Button, Checkbox, OptionMenu, TextKnob, VSlider).
- `border`: Border color of box shaped components.
- `borderCheckbox`: Border color of CheckBox.
- `borderLabel`: Line color of parameter section label.
- `unfocused`: Color to fill unfocused components. Currently, only used for knobs.
- `highlightMain`: Color to indicate focus is on a component. Highlight colors are also used for value of slider components (BarBox and VSlider).
- `highlightAccent`: Same as `highlightMain`. Used for cosmetics.
- `highlightButton`: Color to indicate focus is on a button.
- `highlightWarning`: Same as `highlightMain`, but only used for parameters which requires extra caution.
- `overlay`: Overlay color. Used to overlay texts and indicators.
- `overlayHighlight`: Overlay color to highlight current focus.

## Controls

`Right Click` on the controls pops up a context menu provided by DAW.

Knob and slider provides following controls:

- `Ctrl` + `Left Click`: Reset value.
- `Shift` + `Left Drag`: Fine adjustment.
- `Middle Click` : Rotate through minimum, default and maximum value.
- `Shift` + `Middle Click` : Take floor of current value.
  - Note: For decibel (`dB`) parameters, floor is applied after the value is converted to amplitude.

Control with many blue vertical bars (BarBox) have some keyboard shortcuts. Shortcuts are enabled after left clicking BarBox and mouse cursor is on the inside of BarBox.

Input | Control
--- | ---
`Left Drag` | Change Value
`Shift` + `Left Drag` | Change Value (Snapped)
`Ctrl` + `Left Drag` | Reset to Default
`Ctrl` + `Shift` + `Left Drag` | Change Value (Skip Between Frames)
`Middle Drag` | Draw Line
`Shift` + `Middle Drag` | Edit One Bar
`Ctrl` + `Middle Drag` | Reset to Default
`Ctrl` + `Shift` + `Middle Drag` | Toggle Lock
`a` | Alternate Sign
`d` | Reset Everything to Default
`D` | Toggle Min/Mid/Max
`e` | Emphasize Low
`E` | Emphasize High
`f` | Low-pass Filter
`F` | High-pass Filter
`i` | Invert Value (Preserve minimum)
`I` | Invert Value (Minimum to 0)
`l` | Toggle Lock under Mouse Cursor
`L` | Toggle Lock for All
`n` | Normalize (Preserve minimum)
`N` | Normalize (Minimum to 0)
`p` | Permute
`r` | Randomize
`R` | Sparse Randomize
`s` | Sort Descending Order
`S` | Sort Ascending Order
`t` | Subtle Randomize (Random walk)
`T` | Subtle Randomize (Converge to 0)
`z` | Undo
`Z` | Redo
`,` (Comma) | Rotate Back
`.` (Period) | Rotate Forward
`1` | Decrease
`2`-`4` | Decrease 2n-4n
`5`-`9` | Decimate by holding 2n-5n

Snapping is not available for all BarBox. If you’d like to have snapping for certain BarBox, feel free to open issue to GitHub repository.

Edit One Bar with `Shift` + `Right Drag` holds a bar under the cursor when mouse right button is pressed. Then only changes that one bar while holding down mouse right button.

Toggle Lock with `Ctrl` + `Shift` + `Right Drag` behaves as line edit. When right mouse button (RMB) is pressed, it holds the opposite state of the bar below mouse cursor, then use the state for the rest of bars. For example, if RMB is pressed on a locked bar, dragging unlocks bars while holding down RMB.

Some BarBox has scroll bar to zoom in. Scroll bar has handles on left end and right end. To control zoom, use `Left Drag` on one of the handle. Scroll bar also has following controls:

- `Right Click` : Reset zoom.
- `Mouse Wheel` : Zoom in/out.

## Caution

Output amplitude varies a lot, even if `Compressor` is turned on. Recommend to always insert limiter after CollidingCombSynth.

## Block Diagram

If the image is small, use `Ctrl` + `Mouse Wheel` or “View Image” on right click menu to scale.

Diagram only shows overview. It’s not exact implementation.

## Parameters

### Gain

Gain, Boost

  Master gain. Value of `Gain` and value of `Boost` will be multiplied.

      masterGain = Gain * Boost

Compressor

  Turn on/off the comporessors. Each voice has a compressor.

Time

  Attack/Release time of compressor.

  Larger `Time` value may sound more natural, but compression becomes leaky. In this case, try turning down the value of `Threshold`.

Threshold

  Compressor starts compressing the signal when input amplitude exceeds `Threshold`. Usually, `Threshold` is set to less than 1.0.

### Tuning

Octave, Semi, Milli

  Changes master pitch.

  - `Semi` stands for semitone.
  - `Milli` is 1/1000 of semitone or 1/10 cent.
ET, A4 [Hz]

  Changes tuning.

  `ET` stands for equal temperament. Note that when `ET` is less than 12, some notes may become silent due to frequency becomes too high or too low.

  `A4 [Hz]` is frequency of note A4.

### Unison

nUnison

  Number of voices used by unison.

  To avoid interruption of release, increase the number of `Poly` in Misc. section. Note that increasing `Poly` consumes more resources.

Detune, Random Detune

  `Detune` is the difference of pitch between voices used in a unison.

  When `Random Detune` is checked, amount of detune changes for each note-on.

      random = RandomDetune ? rand() : 1
      detune = pitch * (1 + random * unisonIndex * Detune)

Spread

  Amount of stereo spread for a unison.

Gain

  Amount of randomization of gain for voices used in a unison.

### Random

Random section has configurations for 4 random number generators (RNG).

- Noise: RNG for gaussian noise oscillator on exciter.
- Comb: RNG to randomize `Comb Time` in `Exciter` section.
- Str.Freq: RNG to randomize `Frequency` in `String` section.
- Unison: RNG used in `Detune` and `Gain` in `Unison` section.

Amount

  Amount of randomization. Randomization is disabled when `Amount` is set to 0.

Seed

  Seed value. Different seed generates different sequence of pseudo random number.

Retrigger

  When checked, the synth resets seed for each note-on.

### Exciter

Configuration of exciter. Excitation is some force to start physical model. For example, picking of guitar, impact of piano string and hammer, impact of stick and drumhead, are excitation.

The exciter of CollidingCombSynth consists of sawtooth/noise oscillator and serially connected 8 comb filters.

LP Cutoff

  Cutoff frequency of lowpass filter which applies to oscillator output. Unit of display value is Hz.

Gain

  オシレータの音量です。

A, D

  `A` is the attack time of oscillator. `D` is the decay time of oscillator.

  Turning `A` knob to right makes sound softer.

Saw/Noise

  Mixing ratio of sawtooth and gaussian noise in oscillator output. When set to leftmost, oscillator only outputs sawtooth. When set to rightmost, oscillator only outputs gaussian noise.

Comb Time

  Delay time of comb filter. Unit of display value is seconds.

### String

Configurations of Karplus-Strong strings.

LP Cutoff

  Cutoff frequency of lowpass filter which is inserted in feedback path of string model. Unit of display value is Hz.

HP Cutoff

  Cutoff frequency of highpass filter which applies to string output. Unit of display value is Hz.

Distance

  Distance between strings. When an immediate amplitude of a string exceeds `Distance`, exceeded amplitude will be propagated to a neighbouring string.

Propagation

  The value of `Propagation` changes the loss of force when strings are collided. The bounce will be weaken if `Propagation` is smaller.

Connection

  Connection type of strings.

  - `Parallel`: Connect strings in parallel. Input of excitation starts from string 0, then incrementally going through the rest of strings. Collided signal is accumulated to the excitation signal incrementally.
  - `Serial`: Connect strings in serial. Excitation is only input to string 0. Then output of string 0 goes to input of string 1, output of string 1 goes to input of string 2, and so on. Beware that output signal may become louder than `Parallel`, so take care when turn off `Compressor`.
A, D, S, R

  Envelope parameters which modulates `LP Cutoff`. This envelope basically works as the gain envelope of CollidingCombSynth.

  - `A` : Attack time which is the length from note-on to reaching `LP Cutoff` value.
  - `D` : Decay time which is the length from `LP Cutoff` value to reaching `(LP Cutoff) * S`.
  - `S` : Sustain level which is the gain after decay.
  - `R` : Release time which is the length from note-off to the `LP Cutoff` reaching to 0.
Frequency

  Fundamental frequency of string. The final frequency of a string is calculated by multiplying note pitch by `Frequency`.

      noteFrequency = A4Hz * pow(2, Octave + (Semi - 69) / ET + Milli / (ET * 1000))
      stringFrequency = Frequency * noteFrequency

## Change Log

- 0.1.19
  - Fixed a bug that plugin to show up with incorrect window size (likely 512x512 pixels) at initialization.
- 0.1.18
  - Added GUI scaling.
  - Fixed a bug on BarBox that the “ascending sort” shortcut was disabled.
  - Updated the Linux patch for VSTGUI4.
- 0.1.17
  - Changed to reduce click at note-on when a note number is repeatedly played. This happened when proper note IDs are not provided from DAW. Bitwig, Live, REAPER are affected.
- 0.1.16
  - Fixed GUI on Linux.
- 0.1.15
  - Changed to include presets in plugin zip package.
  - Fixed a bug that invalid `style.json` crashes plugin.
- 0.1.14
  - Changed default style color of `foregroundInactive`.
  - Fixed performance drop caused by subnormal floating point numbers.
- 0.1.13
  - Fixed crash on Renoise. Previous code was trying to access freed memory of GUI widgets, and it was causing the crash.
- 0.1.12
  - Updated splash screen text.
- 0.1.11
  - Added decimation by holding shortcut to BarBox. Shortcut is `5`-`9`.
  - Added floor shortcut to number sliders. Shortcut is `Shift` + `Middle Click`.
- 0.1.10
  - Added to `virtual` to destructor of common components. This may prevent some cause of crash or memory leak.
- 0.1.9
  - Updated VST 3 SDK to version 3.7.6. This also fixes the crash when opening multiple GUI of same plugin on Linux.
  - Change BarBox to only send modified parameter values to host. This prevents to overwrite unchanged parameter automation on the same BarBox.
- 0.1.8
  - Changed BarBox to get focus on mouse down, and release focus on mouse exit.
- 0.1.7
  - Removed dependency to x86_64 specific SIMD instructions.
- 0.1.6
  - Fixed crash on Linux.
  - Fixed BarBox to receive shift key.
- 0.1.5
  - Fixed the condition of acceptable channel count. This is a fix for unintentional muting on sidechain in REAPER.
- 0.1.4
  - Added custom font options for `style.json`.
- 0.1.3
  - Updated VSTGUI from 4.10 to 4.11.
- 0.1.2
  - Changed font to Tinos.
- 0.1.1
  - Fixed to reset properly.
  - Fixed `bypass` parameter behavior. This fixes playing all the notes at the moment of unmute, even if host sends note to plugin while muting. This bug was only happening on the hosts which respect VST 3 `bypass` parameter.
- 0.1.0
  - Initial release.

## Old Versions

- CollidingCombSynth 0.1.18 - VST 3 (github.com)
- CollidingCombSynth 0.1.17 - VST 3 (github.com)
- CollidingCombSynth 0.1.16 - VST 3 (github.com)
- CollidingCombSynth 0.1.15 - VST 3 (github.com)
- CollidingCombSynth 0.1.14 - VST 3 (github.com)
- CollidingCombSynth 0.1.13 - VST 3 (github.com)
- CollidingCombSynth 0.1.12 - VST 3 (github.com)
- CollidingCombSynth 0.1.11 - VST 3 (github.com)
- CollidingCombSynth 0.1.10 - VST 3 (github.com)
- CollidingCombSynth 0.1.9 - VST 3 (github.com)
- CollidingCombSynth 0.1.8 - VST 3 (github.com)
- CollidingCombSynth 0.1.7 - VST 3 (github.com)
- CollidingCombSynth 0.1.6 - VST 3 (github.com)
- CollidingCombSynth 0.1.5 - VST 3 (github.com)
- CollidingCombSynth 0.1.4 - VST 3 (github.com)
- CollidingCombSynth 0.1.2 - VST 3 (github.com)
- CollidingCombSynth 0.1.1 - VST 3 (github.com)
- CollidingCombSynth 0.1.0 - VST 3 (github.com)

## License

CollidingCombSynth is licensed under GPLv3. Complete licenses are linked below.

- https://github.com/ryukau/VSTPlugins/tree/master/License

If the link above doesn’t work, please send email to `ryukau@gmail.com`.

### About VST

VST is a trademark of Steinberg Media Technologies GmbH, registered in Europe and other countries.