4 samples delay?



  • Is it possible to give some delay to the fx plugin in samples unit?

    I am asking this because in ShapeFX:

    When the oversampling is on, delay is 7 samples.
    When the oversampling is off, delay is 3 samples.

    So I just thought that I can enable the artificial (7 - 3 = 4 samples) delay when the oversampling is off. Otherwise delay compensation won't be stabile.

    Any way to do this? Or any other way?



  • Maybe this:
    32e2fb9e-bd86-4608-8a3a-c640d753a1fa-image.png



  • @d-healey Thank you, but I think this is only for MIDI event delays.

    Can I use it for FX plugins?



  • @Steve-Mohican No, only for instruments I think (I didn't ready your post properly it seems 😛 ).



  • I found a Script FX delay core module, but I can't see the parameter name to give delay amount in samples.

    alt text

    HiseSnippet 1201.3oc4XstZabDEdVIuMQJUkjhKzetX5OVCtFIkj1BlRTrrcPTeQX4jz+EFO6QVCd0LKyNqaTMF5iVeD5iPeD5aP6Y1KRirUb1JHtgz0fMy4xLemybNeyA2WIYPbrTQbpcxjHf374tClHzi5NhxEjd6Pbp6tCDRm.JEY6IQz3XHf33T8EF8N0Vgj98WOaaZHUvfYhHjWI4LXe9Xtdlz9c9IdX3dz.3D9XKqeRmdLonqLTlfXopaSRDkcN8L3PpwrJtDmOa2.tVpFnoZHl3rx1xfICFI+EQl8uhGyOMDLKZQFfaTl38jgAFDajR5NhGFzuHliIDG29yx.Uyx.q5d.OfOU9rLwCSU3MyC67gSkaCdsrgWyxCOGK3sRF7dj6.lhGomowfsG31SnA0PJdEXCqLaIN+taWIZfPu4X54vdJbwTG7ebyla30tYy02ZXhfo4RgmTbnTCGI7Wu9k0qU+p5dWW0vgKTm4XTxvPPsP0lac0s4nuHY7ofZCuKngIvTCwve97q66N+Ze8yxhZKCkhdBt9nHP7tx5j7TkI+miJzTcZ1+Kxy9amn0RAgiI4ZtYKZQRgrcG.4k81gpoEaDtm34DAJM2DBN6.WfcHYWq0v1r3y0xnTaGGIEFD3buRbruc1QdRmISW7aurSTQT0Cc3dYMxXikB6ov69dysKZ3s5YFQtYgGV9KCRBo546ILDA4JvKx4J9LUXhXtdhMQwGjFkxB2G41mqYiVLdqr.7hWcenwaNsSC2cGNDX5YfcE2894+a3XpmWtgmuAHEEEKfXoxVUbaTG6xh0XGqxiIUf2O5sO+TEUgU4aFJoA9qYDu15a0ntssAlMEM1nbSlBvfJ8hA7WKU0MbHuTEcofL6LPOsYwesb8490nNWDxEfMIStEEbMrBeKnaZT+xF083C87KV6geWl8GyWJv1LFz8K5h7y3NQxSTclgWk8G72PXLTx8XAaP1lbUZz7dhXy1kGUcoggmhOd5e8vsHsX9YZNIRAHg.bhrOBJ+X53nP3X7lXCuSCkryGv+U3lr047JaarvmMhJDXftLj5tyWPWsbj5Kne5XYhlKN6.pVwQ9P2CSFO.GkfAcyQGJyohgaOacSyZS68.PDjt3uwubksLqcxU1pP4GSOKrx+tmE1x5YAxC6Xy9rZ147.2WSu.RG8Ksk+qRWOTpF68BP.JCMZqaY.v+nrC.FU5A.OhoQHbhhJhijwPK6c9Z5ZaqaGPmHl27LQyYkI71CCOK6temBgssE1mJlayv0ysSGvsxz+4y1UPwR1A.FMAGEyvf0j6reAreBxJ7ZdfdTKaGmItssXmpklz+Sl4du6l9nZ4f664YyZEXb.2vetq3BHDanSw3WhcvCoIg5Boy2FcfTHiFIEblcM0w.xic1Yvb0MKLfdtVib8yjrZmigPfFa0Z8Mc1GeFjpv7Drj4hVkOWba2WesaFb8L89deZL0X0+WN0X46PQ5wOBtouKlO3t3LFSYJ4aXYieXZ8tepDLtEo+iRp4dfYs2zoNbcatYSxXj.+MLlo53aw7yh8o8R3yiWBedxR3ySWBe9tkvmueI74GtUeLuc97DsbbV8OJn+toS+43jMpPZq.4e.z3VLMC
    


  • Any ideas please?



  • @Steve-Mohican use SNEX?



  • @Lindon The picture above is ScriptFX DSP core.
    I couldn't find sample delay in SNEX also



  • @Steve-Mohican You can achieve the sample delay with the Simple Gain unit. But we need to convert milliseconds to samples first.

    Let's look at the principles. For example if we have 2 milliseconds delay in 44.1 kHz, the sample delay would be:

    2 x 44.1 = 88.2 samples

    If the sample rate was 96 kHz, sample delay would be:

    2 x 96 = 192 samples


    Acording to this equation you need to get the sample rate with Engine.getSampleRate() and calculate the ms delay amount. In your case since you need 4 samples delay, your equation will be;

    4 / (Engine.getSampleRate())/1000

    So you need to use below loop in a Simple Gain unit.

       if Over sampling is active
         {
            SimpleGain.setAttribute(SimpleGain.Delay, 0);
         }
            
        if Over sampling is not active
         {
            SimpleGain.setAttribute(SimpleGain.Delay, (4 / ((Engine.getSampleRate())/1000)));
         }        
    
    

    NOTE: / 1000 is the conversion rate from Hz to kHz



  • @orange You might find these useful:
    98a4bf5d-95a6-4871-927f-01292a36ac33-image.png
    401a9f34-f810-47b0-a62c-d228a82ee8bd-image.png



  • @orange Wow! That's it. Thank you so much 🙂


Log in to reply
 

9
Online

1.1k
Users

3.8k
Topics

33.3k
Posts