# Range of values for add method for Sound oscillators

**URL:** https://discourse.processing.org/t/range-of-values-for-add-method-for-sound-oscillators/17813
**Category:** Libraries
**Created:** [February 14, 2020, 3:25am UTC](https://discourse.processing.org/t/range-of-values-for-add-method-for-sound-oscillators/17813 "2020-02-14T03:25:02Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![paul-reiners](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/paul-reiners/32/8084_2.png) [@paul-reiners](https://discourse.processing.org/u/paul-reiners)
#### Post date: [February 14, 2020, 3:25am UTC](https://discourse.processing.org/t/range-of-values-for-add-method-for-sound-oscillators/17813/1 "2020-02-14T03:25:02Z")

</div>

What is the range of values for the [add](https://processing.org/reference/libraries/sound/SinOsc_add_.html) method for Sound oscillators?

The documentation says that the method “offset[s] the output of the oscillator by given value”. But what does this mean, exactly?

---

<div class="post-metadata">

### Author: ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)
#### Post date: [February 17, 2020, 1:05am UTC](https://discourse.processing.org/t/range-of-values-for-add-method-for-sound-oscillators/17813/2 "2020-02-17T01:05:01Z")

</div>

Here is the source:

> <https://github.com/processing/processing-sound/blob/f8e184db6238a1f15f04b882e34b636141d36ef9/src/processing/sound/SinOsc.java#L104>

…which is from Oscillator, which is from SoundObject …

> <https://github.com/processing/processing-sound/blob/f8e184db6238a1f15f04b882e34b636141d36ef9/src/processing/sound/SoundObject.java#L42>

…and it looks like `circuit` is a JSynCircuit, and its processor is a JSynProcessor

> <https://github.com/processing/processing-sound/blob/master/src/processing/sound/JSynCircuit.java>

…and in the JSynProcessor, add is set as a variable, then mixed in directly in `generate()`

> <https://github.com/processing/processing-sound/blob/f8e184db6238a1f15f04b882e34b636141d36ef9/src/processing/sound/JSynProcessor.java#L23-L37>

---

<div class="post-metadata">

### Author: ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)
#### Post date: [February 19, 2020, 12:58am UTC](https://discourse.processing.org/t/range-of-values-for-add-method-for-sound-oscillators/17813/3 "2020-02-19T00:58:58Z")

</div>

Also, since `add` is a float, and outleft and outright values are doubles, you _could_ effectively shift the output values up to Float.MAX\_VALUE, or 3.4028235E38 (if I’m understanding correctly) – so I think the bigger question is what values make sense for what are representing and how much you _want_ to shift them.
