[FFmpeg-devel] [PATCH] avfilter: add tremolo filter

Kyle Swanson k at ylo.ph
Tue Sep 22 00:36:58 CEST 2015


>  Doesn't produce similar output as sox.
>
>  Looks like there is no need to use generate_wave_table
>  as phase is calculated differently, even tremolo from
>  tap plugins do something different.
>
>  Can you elaborate this approach?

This filter is just amplitude modulation. Just took a listen and
tremolo from SoX is the same, but it expects its depth parameter to be
a percentage between 0-100. This filter expects the same parameter,
but the range is 0.0-1.0.

You may be thinking of `vibrato' which is phase modulation, not an
amplitude modulation. I could implement a vibrato as a filter as well.

I calculate my envelope with ff_generate_wave_table() to avoid having
to re-calculate sine for every sample. This is faster, but uses a
small amount of memory.

On Mon, Sep 21, 2015 at 4:18 PM, Paul B Mahol <onemda at gmail.com> wrote:
> On 9/21/15, Kyle Swanson <k at ylo.ph> wrote:
>> Signed-off-by: Kyle Swanson <k at ylo.ph>
>> ---
>>  doc/filters.texi         |  19 +++++
>>  libavfilter/Makefile     |   1 +
>>  libavfilter/af_tremolo.c | 177
>> +++++++++++++++++++++++++++++++++++++++++++++++
>>  libavfilter/allfilters.c |   1 +
>>  libavfilter/version.h    |   2 +-
>>  5 files changed, 199 insertions(+), 1 deletion(-)
>>  create mode 100644 libavfilter/af_tremolo.c
>>
>
> Doesn't produce similar output as sox.
>
> Looks like there is no need to use generate_wave_table
> as phase is calculated differently, even tremolo from
> tap plugins do something different.
>
> Can you elaborate this approach?
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


More information about the ffmpeg-devel mailing list