Giter Site home page Giter Site logo

weird lfo wave? about tinytricks HOT 4 CLOSED

Nowhk avatar Nowhk commented on June 1, 2024
weird lfo wave?

from tinytricks.

Comments (4)

thomassidor avatar thomassidor commented on June 1, 2024 1

Hi again :)

Yes, lfoWave is set once - it's a random float value between 0 and 3.

But in line 79 to 84 that float value is used to create a weighted sum of the pure waves - so if lfoWave is 0.5 you'll get both a bit of a sine wave and a triangle wave.

from tinytricks.

thomassidor avatar thomassidor commented on June 1, 2024

Hi @Nowhk

I think what you are seeing is actually the intended behavior.

The modulation generator generates a "random" waveform each time. It's an weighted average between a square, sine, saw and triangle. The glitch you're seeing is probably because there's a bit of a square waveform in there.

Does that make sense?

Best regards, Thomas

from tinytricks.

Nowhk avatar Nowhk commented on June 1, 2024

Not sure I got it :)
The regenerate function https://github.com/thomassidor/tinytricks/blob/master/src/modulation-generator.cpp#L26 is called once, when I click Trigger. If I click once, I would expect it select a single lfoWave. Than, on each step, is always use the same (only) waveform, no?

I mean, it will only use sin or tri or saw or sqr for each trigger https://github.com/thomassidor/tinytricks/blob/master/src/modulation-generator.cpp#L80, not mixing them :O

from tinytricks.

Nowhk avatar Nowhk commented on June 1, 2024

Oh now I see the trick :) Thanks

from tinytricks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.