# MaybeSnare

MaybeSnare is a synthesizer that resembles sound of snare drum. This is basically 2 MembraneSynth coupled by cross feedback. Snare wire is not included. However, the noise of modulation adds rattling texture similar to snare wire.

- Download MaybeSnare 0.1.11 `full` - VST 3 (github.com)
- Download MaybeSnare 0.1.11 `macOS` - VST 3 (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

Recommend to insert limiter after MaybeSnare because output amplitude varies greatly.

### Blow-up and Oscillation

Blow-up (or divergence) is the state when the sound is getting louder and louder. Oscillation is the state when the amplitude is not changing, but the sound doesn’t stop.

Blow-up may happen when `Coupling -> Amount` is large. An recommendation is to set `Coupling -> Amount` to 2 or less. Even when the output blows up, the sound stops roughly after the time specified on `Coupling -> Decay`. However, beware that the output amplitude may become very loud. Also, sending many notes in short period of time increases the chance of blow-up.

It may oscillates when following conditions are met:

- `Modulation -> Amount` is greater than 0.
- `Interp. Rate` is greater than 0.
- `Envelope` is disabled.

Oscillation can be utilized for some noisy drone or sound effects, however it can be a problem when making percussion sounds. Recommend to always enable `Envelope` for percussion sounds.

## 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

Characters inside of square brackets [] represents unit. Following is a list of units used in MaybeSnare.

- [dB] : Decibel.
- [s] : Second.
- [st.] : Semitone.
- [Hz] : Hertz.

Following is a list of terms used in this documentation.

- FDN: Feedback delay network.
- Batter side: Membrane on the upper side of snare drum.
- Snare side: Membrane on the lower side of snare drum, or the side where snare wires are attached.
- Coupling: On MaybeSnare, coupling specifically refers to propagation of vibration between batter side and snare side.

### Gain

Output [dB]

  Output gain.

Batter-Snare Mix

  Mixing ratio of batter side and snare side.

Normalize

  When checked, output gain is normalized to keep almost same gain regardless of `Impact -> Amplitude`.

2x Sampling

  When checked, it enables 2-fold oversampling.

### Tuning

Tuning section provides pitch related parameters.

Note that most of the time, the output of MaybeSnare might be out of tuning. If it is required to tune the pitch exactly to provided note, recommend to render the output sound, and use external sampler.

Snare Side Oct.

  Pitch of snare side relative to batter side. Unit is octave.

Semitone, Cent

  Pitch in semitone or cent. 1 semitone equals to 100 cents.

Equal Temp., A4 [Hz]

  `Equal Temp.` is abbreviation of equal temperament (ET). When `Equal Temp.` is 12, then the tuning becomes standard 12 ET. Setting `Equal Temp.` to less than 12 might increase the range of note that doesn’t change output sound, due to the internal pitch becomes too high or too low.

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

P.Bend Range [st.]

  Range of pitch bend in semitone.

Slide Time [s]

  Time to slide the pitch of latest note.

  Note that the time indicated in user interface is not exact. Internally, the value is converted to cutoff frequency of smoothing filter.

Slide at Note-on, Note-off

  When checked, apply pitch slide at note-on or note-off.

  For percussion sounds, it may sound more natural without pitch slide.

### Impact

Impact section provides parameters for excitation. Excitation here means the signal that imitates the impact of stick and membrane. MaybeSnare provides 2 types of signal for excitation which are exponential decay and random noise from normal distribution.

Amplitude [dB]

  Maximum amplitude of exponential decay. Roughly represents the intensity of impact.

Decay [s]

  Time of exponential decay. Roughly represents the time that the membrane returns to resting position after impact.

  Increasing the value of `Decay` adds more low frequency. Depending on other parameter settings, rattling may vanish when `Decay` is greater than some certain value.

Position

  `Position` introduces bias the FDN input gain to resemble the position of impact.

  Intention was to represent the center of membrane for `Position = 0`, and the rim of membrane for `Position = 1`. However, it doesn’t make much difference to the output sound.

Noise Mix

  Mixing ratio of exponential decay and noise.

Noise Decay [s]

  Decay time of noise.

Noise LP [Hz]

  Cutoff frequency of a lowpass filter which applies to noise signal.

### Coupling

Amount

  Amount of coupling.

  More coupling means more chance of blow-up. For usual case, recommend to set the value to 2 or less. When setting the value to greater than 2, reducing `Coupling -> Decay` and `Coupling -> Reduction` might prevent blow-up.

Decay [s]

  Decay time of coupling amount.

Reduction

  Coefficient to accelerate the coupling decay envelope. This value is only used when the amplitude of coupling signal is over an internal threshold.

  Reducing this value makes blow-up to end faster.

### Random

Random section provides parameters for randomization for each note-on.

Seed

  Seed value of random number sequence.

  Changing `Seed` also changes the feedback matrix of FDN, and it changes the texture of cross feedback.

Matrix Rnd.

  Ratio of randomization to the feedback matrix of FDN.

Overtone Rnd.

  Maximum of random number that added to delay time multiplier.

### Batter Side, Snare Side

`Batter Side` tab and `Snare Side` tab shares same set of parameters.

By the way, MaybeSnare doesn’t have anything related to snare wire. The texture of rattling comes from the discontinuity that occurs when delay time modulation is too fast. Increasing the value of `Interp. Rate` adds this discontinuity more often.

#### Delay

Delay section provides parameters for feedback and delay time tuning.

Cross Feed

  Amount of cross feedback between delays.

  Higher value of `Cross Feed` adds more cross feedback, and harmonics become more complex.

Feedback

  Amount of feedback of FDN.

  `Feedback` is used to change the length of sound. Oscillation can also be suppressed by decreasing `Feedback`.

Shape

  Switch the delay time multiplier between string modes and circular membrane modes.

  When `Shape` is 0, the multipliers use string modes and it becomes 1, 2, 3, and so on. When `Shape` is 1, the multipliers use circular membrane modes and it becomes 1, 1.59, 2.13, and so on.

#### Modulation

Modulation section provides parameters related to self-modulation of FDN.

Amount

  Amount of modulation to delay time by the absolute amplitude of feedback signal.

  When `Amount` is not 0, the pitch might drop like tom tom.

Interp. Rate

  Slew rate of delay time modulation per sample.

  Higher `Interp. Rate` means more modulation, but also increases the risk of oscillation.

Max Ratio

  Maximum of modulation represented as a ratio to resting delay time.

  For example, when `Max Ratio` is 0.3, and resting delay time is 1.0, the maximally modulated delay time becomes 0.7.

Batter Mod. Envelope, Snare Mod. Envelope

  When lit, it enables modulation envelope.

  Modulation envelope decreases `Modulation -> Amount` through time to suppress oscillation. Recommend to always turn on for percussion sounds.

Sustain [s]

  Sustain time of modulation envelope. Lengthen the sustain time tends to be more unnatural sound.

Release [s]

  Release time of modulation envelope. When oscillating, shorten the release time might result in more natural sound.

#### Filter

Filter section provides parameters to tune the filters inserted in the feedback path of FDN.

LP Cut [Hz], HP Cut [Hz]

  Cutoff frequency of lowpass (LP) or highpass (HP) filters.

  Lowpass is actually highshelf with the gain fixed to 0.5 (~= -6.02 dB). It is labeled as lowpass on the interface because it felt more intuitive.

LP Q, HP Q

  Q factor of lowpass (LP) or highpass (HP).

  Q factors don’t change the output sound that much. They can be ignored unless fine tuning is required. That said, following 2 recipes might be useful to suppress oscillation in some cases. Both reduces low frequency of the output sound.

  - Decrease index 0 (leftmost) of `HP Q`.
  - Decrease index 12 to 15 (3 bars from rightmost) of `HP Q`.

## Change Log

- 0.1.11
  - Fixed a bug that plugin to show up with incorrect window size (likely 512x512 pixels) at initialization.
- 0.1.10
  - Added GUI scaling.
  - Fixed a bug on BarBox that the “ascending sort” shortcut was disabled.
  - Updated the Linux patch for VSTGUI4.
- 0.1.9
  - Fixed GUI on Linux.
- 0.1.8
  - Changed to include presets in plugin zip package.
  - Fixed a bug that invalid `style.json` crashes plugin.
- 0.1.7
  - Changed default style color of `foregroundInactive`.
  - Fixed performance drop caused by subnormal floating point numbers.
- 0.1.6
  - Fixed crash on Renoise. Previous code was trying to access freed memory of GUI widgets, and it was causing the crash.
- 0.1.5
  - Fixed stuttering on Audacity where `processContext` is `nullptr`.
  - Removed bypass processing that is causing crash. Parameter is still available, but it has no effect.
- 0.1.4
  - Updated splash screen text.
- 0.1.3
  - Added decimation by holding shortcut to BarBox. Shortcut is `5`-`9`.
  - Added floor shortcut to number sliders. Shortcut is `Shift` + `Middle Click`.
- 0.1.2
  - Added to `virtual` to destructor of common components. This may prevent some cause of crash or memory leak.
- 0.1.1
  - Changed to reset random number generator when `Seed` is changed. With this change, the same sound comes out when `Seed` is changed and when full reset is done.
- 0.1.0
  - Initial release.

## Old Versions

- MaybeSnare 0.1.10 - VST 3 (github.com)
- MaybeSnare 0.1.9 - VST 3 (github.com)
- MaybeSnare 0.1.8 - VST 3 (github.com)
- MaybeSnare 0.1.7 - VST 3 (github.com)
- MaybeSnare 0.1.6 - VST 3 (github.com)
- MaybeSnare 0.1.5 - VST 3 (github.com)
- MaybeSnare 0.1.4 - VST 3 (github.com)
- MaybeSnare 0.1.3 - VST 3 (github.com)
- MaybeSnare 0.1.2 - VST 3 (github.com)
- MaybeSnare 0.1.1 - VST 3 (github.com)
- MaybeSnare 0.1.0 - VST 3 (github.com)

## License

MaybeSnare 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.