Divide by constant object: why just 128 maximun denominator?


#1

I need something similar to "Mod" (Modulo) object in Pure data to migrate a patch from PD to Axo...

The most similar object I found on the Axo world is "Divremc" (divide by constant with remainder) so i can use the remainder as a "Modulo" out. (there is no Green color "X/Y" object)
The problem is the maximum constant I can set on it is 128 and need to divide by 10000 .
There is a reason for this? why just 128 in a "green I/O" module?
Any ideas?


#2

x/y is generally avoided because it is much less efficient than special cases (dividing by a power of 2: 2, 4, 8, 16 etc), or multiplying with the inverse.
The 128 value limit on divremc is a bug, but for Shepard tones, you only need one set to 12 (semitones).


#3

Thanks!
And is there a easy way to extend this range editing the object?


#4

Hey @Diego

I have made a new version of the DIvremC object with 256 instead of 128. You can basicly set the number to anything you'd like if you use a program like Textwrangler(Free) to edit the objects code. It is very easy.

  1. Install TextWrangler, which is free.
  2. I dont know if you are on Mac or PC but you have to locate your object folder and start with making a new copy of the object youd like to edit.... and use TextWrangler to open the object.
  3. When you opened the object it will look like this:


    You'd need to change the red number to what you'd like and save it. And also change the name of the object so you dont have 2 identical object names ans rremeber save.

  4. Now when you open Axoloti again you will probably get an error messages in the dialog window, which says something like "wrong UUID" and "wrong SHA".... But next it will also give you a correct UUID and SHA. Go back to the TextWrangler editor and paste those suggested UUID and SHA in the right places. You can see from the picture. And save the object again. Reload objects or restart Axoloti software and it should be working.

If you have problems, let me know and Ill help you out getting it right.. I dont think you will :smile: It is pretty easy to do.


#5

I just fixed this version of my own. It has 1024 vaue instead of 128. And the UUID & SHA & UPGRADE SHA doesnt conflict with any objects here. Try it out:

divremc1.axo (1.1 KB)