# Grainimogrifier

**URL:** <https://forum.audacityteam.org/t/grainimogrifier/51457>\
**Category:** New Plug-Ins\
**Created:** [January 7, 2019, 12:35am UTC](https://forum.audacityteam.org/t/grainimogrifier/51457 "2019-01-07T00:35:14Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![dem](https://forum.audacityteam.org/letter_avatar_proxy/v4/letter/d/9fc348/32.png) [@dem](https://forum.audacityteam.org/u/dem)\
**Post date:** [January 7, 2019, 12:35am UTC](https://forum.audacityteam.org/t/grainimogrifier/51457/1 "2019-01-07T00:35:14Z")

</div>

A basic granular plugin. It chops some input audio into little pieces, rearranges the pieces and plays them back.

Here’s how to use this one:

Apply to a selection of three or more audio tracks, the first two being monaural “control tracks” and the rest “input tracks”.

The first track is treated as a graph whose height is the length of time until the next grain starts. Negative heights are treated as zero.

The second track is treated as a graph whose height indicates where in the input tracks the grains are being sampled from: a height of zero means the grain is taken from the beginning of the input track, a height of 0.5 indicates the grain starts halfway through the track, and a height of 1 indicates the grain starts at the end of the track (this will result in silence). If “Normalize Sample Start Control Envelope” is set to “Yes”, this graph will be adjusted so that it spans from 0 to 1 exactly.

The remaining tracks are then grainimogrified according to the plugin’s inputs:  
“Number of Grains” is the total number of grains.  
“Grain Length (Seconds)” is the length of each grain in seconds, and  
“Grain Envelope” controls the shape of an envelope applied to each grain, where

- Triangle is the first half-period of a triangle wave.
- Sine is the first half-period of a sine wave.
- Exponential is a misnomer - it starts at full volume when the grain starts, and decays to zero during the Grain Length.
- Rectangle is no envelope. May cause artifacts.

There’s a bug where the second track can’t be processed (argument stack overflow) if the number of grains is somewhere bigger than 1950, so for now I’ve limited that to 1750.  
[GRAINIMOGRIFIER.ny](https://forum.audacityteam.org/uploads/short-url/ojjcNrgXjkKF2fVPZp1FJdMkkm5.ny) (4.57 KB)

---

_[View the full topic](https://forum.audacityteam.org/t/grainimogrifier/51457)._
