Comments (5)
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.
Sure thanks!
from naumodular.
Can I delete the YT video?
from naumodular.
Was done! ;)
from naumodular.
@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)
- Here is a windows build. I had to change abs() to fabs() in Tension.cpp HOT 8
- [bug] Perlin: output mutes after a while. HOT 6
- when speed knob is turned down the output value doesn't change HOT 2
- Perlin noise produced by the module seems to be a repeating pattern HOT 2
- Linux Release HOT 3
- Fix versioning to be accepted into the Rack community repository HOT 1
- compile error (linux) HOT 1
- Osc.cpp: includes not working on windows HOT 9
- plugin manager HOT 9
- Use ARCH_* for architecture detection HOT 1
- Windows binaries here (v0.5.2) HOT 1
- VERSION update in Makefile HOT 3
- No docs for the OSC module HOT 1
- Perlin: hitting float limit causes constant output HOT 5
- Version 1.0 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from naumodular.