Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pulse wav octave down #1

Open
seanwayland opened this issue Jan 1, 2022 · 0 comments
Open

pulse wav octave down #1

seanwayland opened this issue Jan 1, 2022 · 0 comments

Comments

@seanwayland
Copy link

I love this repo !
in the band limited OSC I think the pulse wav is an octave higher than the other wav forms.

I edited the code like this .
I added a variable m_oneOverPi

m_oneOverPi = 1.f / M_PI;

It's in the right octave now :)

        // Pulse
        case 5:
            maxHarms = m_srOverEight / m_freq;
            numh = m_sharp * 46.f + 4.f;
            if (numh > maxHarms)
                numh = maxHarms;
            if (fmodf(numh, 2.f) == 0.f)
                numh += 1.f;
            value = tanf(powf(fabsf(sinf(m_twopi * m_pointer_pos)), numh));
            //value *= m_oneOverPiOverTwo;
            value *= m_oneOverPi;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant