First time here? Check out the FAQ!
x

Large numbers in vcs

0 votes
411 views
For a design I am working on i need to deal with large numbers (actually numbers in binary format), and was very surprised to find out that in VCS  large numbers are limited to 8 digits, 5 only after float point! I suppose it has to do with the bit depth limit.
Is there a workaround?
Is there a way to type numbers in bin format in the VCS?
asked Oct 31, 2016 in Using Kyma by malcolm-braff (Practitioner) (770 points)
edited Oct 31, 2016 by malcolm-braff

1 Answer

+1 vote
The width limit is based on visibility, not the bit-depth.  You could split your binary numbers into two or more numbers and place their faders next to each other to display as a single number.  For example, you could shift left using

((binaryNumber mod: 1) * digitsToShift twoExp) truncated

or

(binaryNumber * digitsToShift twoExp) truncated mod: digitsToShift twoExp
answered Oct 31, 2016 by ssc (Savant) (127,060 points)
thank you, that's good to know. But i think the visibility limit is also limiting the input of the number, correct? Also if I type in 0.123456 for example, the vcs will round it to 0.12346 and i suppose this could be an unwanted behavior. Or is the rounding only for the display and the number passed to CapyTalk is the correct number?
For my application what I want is to type the number at once, without the need to change faders. The idea is to type in rhythm patterns, using 1s for accents and 0s for rests. Like this i could type in the rhythms as they are played (rhythmically speaking). I vote for unlimited (or much higher limit) VCS digits :-)
Another approach might be to set the bits using faders !B00, !B01, etc and, in the VCS, change those faders to Toggles.  Using Kyma Control on the iPad, you could make quick changes (including changing multiple digits at the same time).
BTW, whatever you type into the field is sent to the Pacarana.  What you see in the field is rounded, but what you typed is sent exactly as you typed.
If you use Integers, rather than fractions, it won't round them in the display and it will show all significant digits.
I have used SoundToGlobalControllers to test, and it seems that the rounding is actually occurring. Also, the maximum value of the grid setting in VCS keeps me from typing numbers with more digits...
I have found a way to workaround by using numbers in 10-base format instead of binary, and sending them from another software via osc where binary format is allowed, but I can only wish for a binary format for numbers in the VCS (and why not hex and octal as well).
You can enter binary, hex, octal and other radix numbers in the VCS fields.  The only problem is that we have defined 'r' to mean roll the dice in the VCS, so if you type 2r1010, you will roll the dice! ;)  You could, however, copy and paste 2r1010 into the numeric part of a fader, press Enter and it will enter the number and change it to base 10.
If you don't like the idea of using a Toggle for each bit (which gives you the option of setting multiple bits at one time from the iPad), then you could switch to using a Tool.  The Tool doesn't have any Dice option, so you can enter numbers in any base you like.  The Smalltalk convention is to type the base, then 'r' (for radix), then the number.  So for example: 16rffff is the decimal number 65535.
great! thank you very much! I like very much the toggle suggestion, but wanted to have the two possibilities :) So i will definitely use a tool now.
it is great to learn about radix numbers in smalltalk! and also the trick of 'r' rolling the dice might be useful. thank you!
...