Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER for macOS X

Thread Tools Display Modes
Old 03-23-2009, 09:32 PM   #1
Admiral Quality
Human being with feelings
Admiral Quality's Avatar
Join Date: Jun 2008
Location: Toronto, Canada
Posts: 132
Default BUG: Plugin output of values +1.0 and -1.0 are silent. (Demo plugin attached).

Sorry for the cross-post but I just noticed most of the OSX bug reports are in here. (Which forum is preferred for OSX bug reports?)

BUG: When the output of my plugins are EXACTLY 1.0 or -1.0, no sound comes from Reaper's output (however the peak meters correctly display signal at 0 db).

This causes a horrible ripping sound whenever a 1.0 or -1.0 is output. (And my plugin has a soft-clip saturation feature which limits output at -1.0 to 1.0, this is how I discovered it.)

Changing either the track volume, or the master volume, from 0 dB to any other value immediately allows the sound to come through. Also, changing the output level in my plugin does it too.

Doesn't happen on Windows.

Here's a plugin I quickly made from Steinberg's again sample project. It ignores the input and every 44 samples changes the output level from exactly -1.0 to 1.0. This gives an approximate 1 kHz square wave at 44.1 kHz. (You'll get a higher pitch with higher sample rates.) There's also a gain control in the plugin, which is set to 0 dB by default. (You can set any of the gains to 0 dB by doubleclicking their slider thumb). Changing this gain to anything above or below 0 dB will cause the sound to come through. But it's still outputting sound at 0 dB, as you'll see in the peak meters. You just can't hear it.

You can download the demo plugin here,
(Also attached to my original post: http://forum.cockos.com/showthread.php?t=33692 ).

Just in case it's a driver issue, I'm using an Edirol UA-1000 with latest greatest OSX driver. (Works great! I have it down to 16 samples latency on the Mac! I can't go lower than 64 samples in Windows.)

(Also, make sure you put a synth or an input before it or Reaper will assume there's nothing to do and not activate the plugin.)

Known issue?

The process code from this demo plugin, FYI:
void AGain::processReplacing (float** inputs, float** outputs, VstInt32 sampleFrames)
    //float* in1  =  inputs[0];
    //float* in2  =  inputs[1];
    float* out1 = outputs[0];
    float* out2 = outputs[1];

    while (--sampleFrames >= 0)
		float fVal = -1.f;
		if (iSampleCount++ > 20)
			if (iSampleCount > 40) iSampleCount = 0;
			fVal = 1.f;
		(*out1++) = fVal * fGain * 2.f;
		(*out2++) = fVal * fGain * 2.f;

void AGain::processDoubleReplacing (double** inputs, double** outputs, VstInt32 sampleFrames)
    //double* in1  =  inputs[0];
    //double* in2  =  inputs[1];
    double* out1 = outputs[0];
    double* out2 = outputs[1];
	double dGain = fGain;

    while (--sampleFrames >= 0)
		float fVal = -1.f;
		if (iSampleCount++ > 20)
			if (iSampleCount > 40) iSampleCount = 0;
			fVal = 1.f;
		(*out1++) = (double) fVal * dGain * 2.0;
		(*out2++) = (double) fVal * dGain * 2.0;
"Matter, doesn't."
Admiral Quality is offline   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -7. The time now is 07:28 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.