music.db_to_amp

music.db_to_amp(db_difference)[source]

Converts a difference in decibels to a difference in amplitude.

This function takes a difference in decibels as input and returns the corresponding difference in amplitude.

Parameters:
db_differencefloat

The difference in decibels to be converted.

Returns:
float

The difference in amplitude corresponding to the input difference in decibels.

Parameters:

db_difference (float)

Return type:

float

Examples

>>> db_to_amp(6)
2.0
>>> db_to_amp(-6)
0.5