private void Start()
    {
        evenGrain       = new Grain();
        evenGrain.Start = 0;

        oddGrain       = new Grain();
        oddGrain.Start = 0;

        int grainSizeSamples = (int)(AudioSettings.outputSampleRate * grainSizeMS / 1000f);

        window = NWindow.BlackmanHarris(grainSizeSamples);
    }
    private void Update()
    {
        sampleLength = 1.0 / AudioSettings.outputSampleRate;
        int grainSizeSamples = (int)(AudioSettings.outputSampleRate * grainSizeMS / 1000f);

        evenGrain.Length = grainSizeSamples;
        oddGrain.Length  = grainSizeSamples;

        if (window.Length != grainSizeSamples)
        {
            window = NWindow.BlackmanHarris(grainSizeSamples);
        }
    }