Calculator Tutorial

• This portion creates a number from 0-999 using three knobs. Each knob controls the ones, tens, or hundreds place. There are two number generators - this picture below shows the corresponding controls.

Each knob is multiplied by 9.9999 and then floored. This outputs integers from 0 to 9. If the .9999 wasn't there, it would only reach 9 when the knob is completely turned up.

The floor function rounds the values down to the nearest integer.

Each floored value is multiplied by 1, 10, or 100, and then summed together (1+10+100=111). The knobs are all set to 0 in this example, so it's as if it is outputting 000.

These value nodes display the two numbers on the calculator.

This is the calculator portion - all of the calculations are done simultaneously.

This selects which operation output is displayed as the calculator's result.

The sweep of the knob is divided into 4 sections - 0-1, 1-2, 2-3, and 3-3.9999. These sections correspond to +, -, *, and /. These numbers are floored (turned into integers) and sent to the OnOff inputs.

When the X number of OnOff==X is equal to the select number, the logic expression returns a one. When the throughput is multiplied by 1, it passes. Otherwise, it is multiplied by 0 and returns nothing.

The output is then displayed as the calculator's result.

Download the attached patch to play around with this calculator - it's a great way to familiarize yourself with some common math functions in Audulus. While you won't need Audulus to do your math homework, you will see the techniques modeled here in other modules.
• @biminiroad The GUI for the top level of the patch you posted seems incomplete. Interesting way to look at Audulus.
• @paulinko - Thanks for pointing that out - fixed!

#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!