Your numbers don't make sense to me but probably I just dont understand it.

The latency should be independent of the sample rate, right?

You search for similarity in the wave, chop it up, and replay the grains at different speeds and/or rates.

What you need for this is a certain amount of time of the wave.

If you need a latency of <= 100 ms you can have two wave cycles stored
of 50ms length / 20 Hz, which should be sufficient, given taht voice is ususally well above 20 Hz.


Am 06.10.2018 um 13:45 schrieb Alex Dashevski:
I have project with pitch shifting (resampling with wsola), It implements on android NDK. Since duration of pitch is ~20ms, I can't use system recommendedB parameters for the fast path. for example, for my device: SampleRate:48Khz and buffer size 240 samples. That means, duration time is 5ms (< pitch duration = 20ms). What can I do so I can use recommended parameters because it increases latency. For example if I use 48Khz and 240 samples then latency is 66 ms but if buffer size is 24000 samples then latency is 300ms.
I need latency < 100ms.

Thanks,
Alex

b> <b>
    You've got it backwards -- downsample means fewer samples. If you
    have a 240-sample buffer at 48kHz, then resample to 8kHz, you'll
    have 240/6=40 samples.

    -Ethan


    On Sat, Oct 6, 2018 at 4:10 AM, Alex Dashevski <alexd...@gmail.com
    <mailto:alexd...@gmail.com>> wrote:

        Hi,
        Let's assume that my system has sample rate = 48Khz and audio
        buffer size = 240 samples. It should be on RealTime.
        Can I do that:

        1. Dowsampe to 8Khz and buffer size should be 240*6
        2. To do proccessing on buffer 240*6 with 8Khz sample rate.
        3. Upsample to 48khz with original buffer size.

        Thanks,
        Alex


        b>         <b>
            I have only used libraries for resampling myself. I
            haven't looked at their source, but it's available. The
            two libraries I'm aware of are at
            http://www.mega-nerd.com/SRC/download.html
            and
            
https://kokkinizita.linuxaudio.org/linuxaudio/zita-resampler/resampler.html

            perhaps they can give you some insight.

            On Wed, Oct 3, 2018 at 2:46 PM Alex Dashevski
            <alexd...@gmail.com <mailto:alexd...@gmail.com>> wrote:

                I wrote on android ndk and there is fastpath concept.
                Thus, I think that resampling can help me.
                Can you recommend me code example ?
                Can you give me an example of resampling ? for example
                from 48Khz to 8Khz and 8Khz to 48Khz.
                I found this:
                https://dspguru.com/dsp/faqs/multirate/resampling/
                but it is not enough clear for me,

                Thanks,
                Alex


                b>                 Jacksonb>                 
<mailto:ssjackso...@gmail.com>b>


                    On Wed, Oct 3, 2018 at 3:17 AM Alex Dashevski
                    <alexd...@gmail.com <mailto:alexd...@gmail.com>>
                    wrote:


                        if I do resampling before and after
                        processing. for example, 48Khz -> 8Khz and
                        then 8Khz -> 48Khz then will it help ?


                    Lowering sample rate can help achieve lower
                    latencies by giving you fewer samples to process
                    in the same amount of time but just downsampling
                    and then upsampling back doesn't really have any
                    effect.


                        I don't understand why I need filter, This is
                        to prevent alias but I can't understand why ?

                    Technically you only need a filter if your signal
                    has information above the nyquist frequency of the
                    lowest rate but this is not usually the case.B  I
                    think wikipedia explains aliasing pretty well:
                    
https://en.wikipedia.org/wiki/Aliasing#Sampling_sinusoidal_functions
                    . Once the high frequency information aliases it
                    cannot be recovered by resampling back to the
                    higher rate and your lower band information is now
                    mixed in with the aliased information. The filter
                    removes this high freqency data so that the low
                    band stays clean through the whole process.


                        Is there option to decrease latency or delay ?


                    The only way to reduce latency in your algorithm
                    (unless there is some error in the implementation)
                    is to reduce the block size, so you process 128
                    samples rather than 240. 240 isn't a very large
                    amount of latency for a pitch shifter which is
                    typically a CPU intensive process and therefore
                    most implementations have relatively high latencies.

                    I'm not sure I understand what you mean by the
                    pitch duration requiring a buffer-resize or
                    sample-rate decrease. WSOLA creates a signal with
                    more samples than the input, you must resample
                    that (usually by a non-integer amount) to make it
                    the correct number of samples then output that,
                    and reload your buffer with the next block of
                    input data. Please clarify if you mean some other
                    issue.

                    _Spencer
                    _______________________________________________
                    dupswapdrop: music-dsp mailing list
                    music-dsp@music.columbia.edu
                    <mailto:music-dsp@music.columbia.edu>
                    https://lists.columbia.edu/mailman/listinfo/music-dsp

                _______________________________________________
                dupswapdrop: music-dsp mailing list
                music-dsp@music.columbia.edu
                <mailto:music-dsp@music.columbia.edu>
                https://lists.columbia.edu/mailman/listinfo/music-dsp

            _______________________________________________
            dupswapdrop: music-dsp mailing list
            music-dsp@music.columbia.edu
            <mailto:music-dsp@music.columbia.edu>
            https://lists.columbia.edu/mailman/listinfo/music-dsp


        _______________________________________________
        dupswapdrop: music-dsp mailing list
        music-dsp@music.columbia.edu <mailto:music-dsp@music.columbia.edu>
        https://lists.columbia.edu/mailman/listinfo/music-dsp


    _______________________________________________
    dupswapdrop: music-dsp mailing list
    music-dsp@music.columbia.edu <mailto:music-dsp@music.columbia.edu>
    https://lists.columbia.edu/mailman/listinfo/music-dsp



_______________________________________________
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp

_______________________________________________
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp

Reply via email to