Browse Source

fixing transpose by removing broken buffer, hopefully will work now for both gcc 2.95 and gcc 3.x

master
aj_genius 21 years ago
parent
commit
aba49a296b
1 changed files with 6 additions and 28 deletions
  1. +6
    -28
      SpiralSound/Plugins/TransposePlugin/TransposePlugin.C

+ 6
- 28
SpiralSound/Plugins/TransposePlugin/TransposePlugin.C View File

@@ -93,35 +93,13 @@ void TransposePlugin::Execute () {
// input's half steps from base of 110 = round(alpha*logf(GetInputPitch(0, n)/110));
// cv's half steps from base of 110 = round(alpha*logf(GetInputPitch(1, n)/110));

if ((!m_BufferInitialized) || (input0 != m_Buffer[0][0]) || (input1 != m_Buffer[1][0]))
base = floor((alpha*logf(input0/110.0)) + 0.5);
if (InputExists(1))
{
if ((m_BufferInitialized) && (input0 == m_Buffer[0][0]))
{
base = m_Buffer[0][1];
}
else if (input0 != base)
{
base = round(alpha*logf(input0/110.0));
}
m_Buffer[0][0] = input0;
m_Buffer[0][1] = base;

if ((m_BufferInitialized) && (input1 == m_Buffer[1][0]))
{
transpose = m_Buffer[1][1];
}
else if (InputExists(1))
{
transpose = (input1 > 0)?round(alpha*logf(input1/110)):0;
}

m_Buffer[1][0] = input1;
m_Buffer[1][1] = transpose;

m_BufferInitialized = true;

m_Out = 110 * pow ((base+transpose) / 12, 2);
}
transpose = (input1 > 0)?floor((alpha*logf(input1/110)) + 0.5):8.176;
}

m_Out = 110 * powf(2, (base+transpose) / 12);
}
else
{


Loading…
Cancel
Save