Skip to content

Commit

Permalink
just refactoring for endline
Browse files Browse the repository at this point in the history
  • Loading branch information
yiitozer committed Mar 12, 2024
1 parent 45c5213 commit 4ac7a6b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libsoni/core/methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,9 @@ def generate_tone_fm_synthesis(pitch: int = 69,
assert 0 <= pitch <= 127, f'Pitch is out of range [0,127].'

pitch_frequency = pitch_to_frequency(pitch=pitch, tuning_frequency=tuning_frequency)
generated_tone = np.sin(2 * np.pi * pitch_frequency * (np.arange(int(duration * fs))) / fs + modulation_amplitude * np.sin(2 * np.pi * pitch_frequency * modulation_rate_relative * (np.arange(int(duration * fs)))))
generated_tone = np.sin(2 * np.pi * pitch_frequency * (np.arange(int(duration * fs))) / fs +
modulation_amplitude * np.sin(2 * np.pi * pitch_frequency * modulation_rate_relative *
(np.arange(int(duration * fs)))))
generated_tone = gain * fade_signal(signal=generated_tone, fs=fs, fading_duration=fading_duration)

return generated_tone
Expand Down

0 comments on commit 4ac7a6b

Please sign in to comment.