Skip to contents

Gets the vibrato table as used by ProTracker in vibrato effects.

Usage

proTrackerVibrato(x)

Arguments

x

integer representing the table index ranging from 0 up to 31. Values outside this range can be used, but will produce results that are not valid in the context of ProTracker.

Value

Returns an integer sine value ranging from 0 up to 255 when a valid table index (x) is provided. It will otherwise return a sine value ranging from -255 up to 255.

Details

As the old Commodore Amiga computer didn't have built-in mathematical functions, many programs on that machine used their own data tables. As did ProTracker for vibrato effects for which a sine function was used. As there was no sine function that could be called, sine values were stored in a table.

This function returns the integer sine values (ranging from 0 up to 255) as a function of the table index (ranging from 0 up to 31).

Author

Pepijn de Vries

Examples

## this will return the table as used in ProTracker
proTrackerVibrato(0:31)
#>  [1]   0  24  49  74  97 120 141 161 180 197 212 224 235 244 250 253 255 253 250
#> [20] 244 235 224 212 197 180 161 141 120  97  74  49  24