Giter VIP home page Giter VIP logo

Comments (5)

naus3a avatar naus3a commented on July 29, 2024 1

Yes, I observed similar big peaks too and wondered if I should just let them "clip naturally" or add some kind of limitation.

Probably a limiter is a good idea. Will look into it.

from naumodular.

naus3a avatar naus3a commented on July 29, 2024 1

Sure thanks!

from naumodular.

DomiKamu avatar DomiKamu commented on July 29, 2024

Can I delete the YT video?

from naumodular.

DomiKamu avatar DomiKamu commented on July 29, 2024

Was done! ;)

from naumodular.

neoh4x0r avatar neoh4x0r commented on July 29, 2024

@naus3a
I just discovered this module a few days ago because I was looking for a way to do bitwise-math to check if a certain CV voltage was present (ie binary bit flags), but the BitHammer module does not do this in a predictable way.

I believe the issue with large voltages is due to the nature of how floating-point values are stored as binary (IEEE 745 format).

I can see that that you are using a union to convert back-and-forth between floats and ints.

Under this implementation the float is in unpacked format, whereas, the int is the 32-bit single precision representation (ie packed binary) and results in very large integral values.

As it stands doing a left shift will result in the output being zero (regardless of what is given for the inputs -- because you are shifting inA by a very large amount which always results in zero).

Where as the right shift's output will always be equal the value of input A.

Performing bitwise operations really only make sense when they are done on an unpacked binary representation (ie integral data types, 0, 1, 2, 3, 4, etc [ 0000, 0001, 0010, 0011, 0100, etc) [or even negative values which will be two's complemented, eg -2 = 11111110 ].

You should really cast the inputs to integers (chopping-off the decimal part) and then the bitwise operations would perform as expected, and in a predictable way (finite values).

PS: I'm sorry for necro-ing this issue (more than a year later), but I has just discovered VCV rack and all of the possibilities with the plugins about a month ago.

from naumodular.

Related Issues (16)

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.