This example plays the first sixteen harmonics based on a fundamental frequency where the rate at which each harmonic play is period / # of harmonic. For example, with a period of 10000 ms—meaning the fundamental plays every 10000 ms—the 4th harmonic will be heard every 10000/4 ms, or 2500 ms.
This abstraction expects to get a number in any of its inlets, and will pass the number out the corresponding outlet, but before doing so it will send a 0 out the previous outlet.
To use floating point numbers with the poly object separate the integer portion and the fractional portion. Then recombine them after the poly object, as in the example.
This example shows a simple way to calculate the difference between an incoming value, and the previously received value (for integers).
This patch demonstrates a way to generate random numbers within a specified range.
Programming languages all provide some means of generating random numbers. Those numbers aren’t truly random, though. They’re what’s called pseudo-random. They’re actually generated by a known, deterministic process for generating a sequence of numbers, but that process generates a long series of apparently random numbers that doesn’t repeat for a very long time.