music.proportional

music.proportional(factor=0.01, offset=0.0)[source]

A bond that rises with the frequency: factor * f + offset.

The article’s first example, “a vibrato frequency proportional to note pitch”.

Parameters:
factorscalar

What to multiply the frequency by.

offsetscalar

Added afterwards.

Returns:
callable()

A function of one frequency, for Bonds.

Parameters:
Return type:

Callable[[float], float]

Examples

>>> rate = proportional(1 / 100)
>>> rate(220), rate(440)
(2.2, 4.4)