SonifyTool¶
- sonipy.SonifyTool(x, y, frequency_args={'frequency_max': 1046.4, 'frequency_min': 261.6}, duration_args={'time_total': 2000.0}, duration_scale=None, bliplength=0.1, fade=True, alertMultitoneCreated=True, verbose=False)¶
This is a built-in-one sonification tool for creating a MultiTone.
It inputs the x values (x) and y values (y) to be sonified.
To account for how y scales with pitch, it takes in a dictionary of frequency_args. See the FrequencyScale object docstring to see details about inputs (frequency_min, frequency_max, cents_per_value, value_min, value_max).
To account for how x scales with time, it accepts a duration_scale in x value / time (ms). If a duration scale is not specified, it pays attention to a dictionary of duration_args. See the DurationsScale object and getScale() function for more info on your avaliable inputs (time_total, time_min, time_max).
Finally, you must specify the length you’d like each blip to last in seconds in the parameter bliplength. Default is .1 seconds.
- Parameters
- yarr
Array of y positions that will correspond to pitch values.
- xarr
Array of x positions that will correspond to blip times.
- frequency_argsdictionary
Dictionary with pitch y value arguments (frequency_min, frequency_max, cents_per_value, value_min, value_max). Defaults to min of C4 and max of four times C4.
- duration_argsdictionary
Dictionary with duration x value arguments (time_total, time_min, or time_max).
- duration_scalefloat
Scale argument for time axis (x value / time (ms)), as an alternate to duration_args input.
- bliplengthfloat
Duration of each blip in seconds.
- fadebool
Flag to toggle including fade on each blip. Recommended to include, especially when blips are dense.
- verbosebool
Flag for printing. Default False.
- alertMultitoneCreatedbool
Flag for alerting when Multitone created. Default True.
- Returns
- object
Multitone object