*Feature Request* Extra tempo synced speeds for modulation



  • Would it be possible to have a couple of extra speeds added to all of the tempo-synced LFOs? (and maybe the delay module)

    2 bars and 4 bars would be especially useful.

    Maybe even some cool polyrhythms like:

    3/8
    5/16
    3/16
    1.5 bars
    3 bars

    ...or even triplets could be good if you wanted to really go to town 🤣

    1/3
    1/6
    1/12
    1/24



  • @SteveRiggs it's possible to do that via scripting, if you have the LFO NOT set to "Tempo Sync" you can use this:

    LFOModulator1.setAttribute(0, Engine.getHostBpm()/60 / rhythm);
    

    where the variabel "rhythm" is what kind of rhythm you want, so for an eight note the rhythm variable will be half a quarter, ie rhythm = 1/2
    the

    Engine.getHostBpm()/60 
    

    will set the LFO freq to 1Hz if the global tempo is 60, that would be every quarter note, and if the global tempo is 120 the freq will be 2Hz and so on
    so I think it's possible to setup whatever complex rhythm you want



  • @SteveRiggs a small example

    HiseSnippet 1709.3oc4X80aaaCDWJIpH1concqXXORXrGbvbisSRy5VwPUhSRa1RZ7hb61PQWAiDsEQkH0jnSiWQA12f80ZOtOB6iPecOscThxh1w0wMqcHCSOHYd7Nxe2e3cGc6XtKIIgGaXVpyfHhg4GX4LfI7a4ioLi811vrrUPWNRPRDFaMHBmjP7LLMm+9x4MKsfQ5yqu2V3.LykTPxv3wbpKYeZHUTPss82PCB1E6Q5PC03dc68b4rV7.de.Kya0vHB69bbOxCwR1lyxv7J63QE7XGAF.ig4Baw8F33yeAKi+GSSnGGPjCZZ3.KTF4c4AdRDKoZzxmF30NWmSLLLsZWXAlOyBbSqCndzgzKrDWOcBTgD51Cy4lF7ZpCuFyN7L0f2BYv6FVNtwzHQwLRrcUq8XBRbWL3BzgUFuFy8mVVs3.GLwJg3mS1MFFLThpaznQMzsazX46tTYvMjHPmfiQ6u6gGv85GfA0pI5qPoAFqziHFRsZEfGTASUjKvRkqWGgb3gDTr+.geHhbJNLJfjrTY4xlQLYy3XXMeRy5qWC0r9cpgVS9510atg7mx2Mqul7U5uZtp78pq+zga.mEL.0kGi7nIQA3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cHgzNPzbhNwGk.89S9oijdYc5s333IN0qu2tfRNQYbvh9wogKaFx6yDiDdL++vaq0XRWGZgK02V6RQxg2Bq4bsOys+uNDRKufxNrSHAPAyT79gPExzxM4TGMF+.NiG4yYTW8.fiHPyp85Qh00iIpbPasPKYETto8Qj.BVOX9Ss2GBBwwfMiLM6x7ylcY1tn8D8cehUFbQxClnKUI3UYorrfKNnhyF814mOFkGy6SXt5Y5skog1qHKl8uZKy3AWoMT0.0Pw2mzC1HcJcHPAUHi4HgFNgbNbaXVuQStcS6847ncXXvJ3ouHs8gfAnqYnO9QRY0OQvCywR5+QjCzwQZeelOwZi0k2Ts6mIe+EsfWqc36lwFu6h5laFi59nTO4PWlzmdIuihLDOLd5+.Hdp8.M++O6A5HdeAbN8.LjKGZu15g8CcfVObI.RXLRf71jlyIOKlMtgbbVuGLuzA+E7nlrobroZxl4S9uxdDhci4OyM6JkxCdKlRAzaV5eubIqCjiQMyuIokUiUZHurB8YttRy8s.6yjkY0KfLqcAjY8KfL29BHyFW.Y97KfL2YpxH6cay9P98rih.g16jkY2bXEBy4M9a.hWOVJ
    


  • @ulrik said in *Feature Request* Extra tempo synced speeds for modulation:

    @SteveRiggs a small example

    HiseSnippet 1709.3oc4X80aaaCDWJIpH1concqXXORXrGbvbisSRy5VwPUhSRa1RZ7hb61PQWAiDsEQkH0jnSiWQA12f80ZOtOB6iPecOscThxh1w0wMqcHCSOHYd7Nxe2e3cGc6XtKIIgGaXVpyfHhg4GX4LfI7a4ioLi811vrrUPWNRPRDFaMHBmjP7LLMm+9x4MKsfQ5yqu2V3.LykTPxv3wbpKYeZHUTPss82PCB1E6Q5PC03dc68b4rV7.de.Kya0vHB69bbOxCwR1lyxv7J63QE7XGAF.ig4Baw8F33yeAKi+GSSnGGPjCZZ3.KTF4c4AdRDKoZzxmF30NWmSLLLsZWXAlOyBbSqCndzgzKrDWOcBTgD51Cy4lF7ZpCuFyN7L0f2BYv6FVNtwzHQwLRrcUq8XBRbWL3BzgUF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Xa6HbLrSZaYgQQlwBN0XA8M.8udl9wftByyRq2pnr+X0DREUumLYeWLv.LPu+42K8ONqv8FVsoBW+Ii24l.dkGveOiWU23KYsS2tDWQAXWvZ2u+8eq25P4ZYP4pVNPEvztfSAxGmNF8c3SHn6SXj3zJ0S4VR+9rdKonY9VRG5JfsuSLlkHa9UegcHgzNPzbhNwGk.89S9oijdYc5s333IN0qu2tfRNQYbvh9wogKaFx6yDiDdL++vaq0XRWGZgK02V6RQxg2Bq4bsOys+uNDRKufxNrSHAPAyT79gPExzxM4TGMF+.NiG4yYTW8.fiHPyp85Qh00iIpbPasPKYETto8Qj.BVOX9Ss2GBBwwfMiLM6x7ylcY1tn8D8cehUFbQxClnKUI3UYorrfKNnhyF814mOFkGy6SXt5Y5skog1qHKl8uZKy3AWoMT0.0Pw2mzC1HcJcHPAUHi4HgFNgbNbaXVuQStcS6847ncXXvJ3ouHs8gfAnqYnO9QRY0OQvCywR5+QjCzwQZeelOwZi0k2Ts6mIe+EsfWqc36lwFu6h5laFi59nTO4PWlzmdIuihLDOLd5+.Hdp8.M++O6A5HdeAbN8.LjKGZu15g8CcfVObI.RXLRf71jlyIOKlMtgbbVuGLuzA+E7nlrobroZxl4S9uxdDhci4OyM6JkxCdKlRAzaV5eubIqCjiQMyuIokUiUZHurB8YttRy8s.6yjkY0KfLqcAjY8KfL29BHyFW.Y97KfL2YpxH6cay9P98rih.g16jkY2bXEBy4M9a.hWOVJ
    

    great, I was wondering about that as well.



  • @clumsybear @SteveRiggs
    However maybe you need to get the hostBpm from the NoteOn CB or set a timerCallback, if you have tempo changes in the host



  • @ulrik Thanks, man. I thought there would be a way with arrays and halving the values.

    It would be a lot less time consuming if they were already in options though to just select. I have 1 project that I'm toying with which has 12 different LFOs, so that would be a lot of unnecessary code to link all of those.



  • Yeah the problem is that it there is a index to tempo sync value and I can't add new ones without breaking old projects. But triplets and duets are already included.

    The core.tempo_sync node in scriptnode has a multiplier value, which should get you to almost every imaginable sync value (eg. 3/8 can be done with selecting 1/8, then set the multiplier to 3).



  • @Christoph-Hart Ah no problem. That makes sense.

    I'll have a look at the scriptnode way. What is the LFO node called? I haven't spotted one so far.



  • @SteveRiggs You have to use the oscillator followed by a sig2mod node



  • @ustk Thanks man. I'll give that a try 🙂



  • @SteveRiggs If you're using a scriptnode synthesiser, you can also use the core.hise_mod, which is connected to the Pitch, Extra1 and Extra2 modulation tabs of the synth module



  • Hey @ulrik,

    Really nice snippet that you've put together here.

    HiseSnippet 1709.3oc4X80aaaCDWJIpH1concqXXORXrGbvbisSRy5VwPUhSRa1RZ7hb61PQWAiDsEQkH0jnSiWQA12f80ZOtOB6iPecOscThxh1w0wMqcHCSOHYd7Nxe2e3cGc6XtKIIgGaXVpyfHhg4GX4LfI7a4ioLi811vrrUPWNRPRDFaMHBmjP7LLMm+9x4MKsfQ5yqu2V3.LykTPxv3wbpKYeZHUTPss82PCB1E6Q5PC03dc68b4rV7.de.Kya0vHB69bbOxCwR1lyxv7J63QE7XGAF.ig4Baw8F33yeAKi+GSSnGGPjCZZ3.KTF4c4AdRDKoZzxmF30NWmSLLLsZWXAlOyBbSqCndzgzKrDWOcBTgD51Cy4lF7ZpCuFyN7L0f2BYv6FVNtwzHQwLRrcUq8XBRbWL3BzgUFuFy8mVVs3.GLwJg3mS1MFFLThpaznQMzsazX46tTYvMjHPmfiQ6u6gGv85GfA0pI5qPoAFqziHFRsZEfGTASUjKvRkqWGgb3gDTr+.geHhbJNLJfjrTY4xlQLYy3XXMeRy5qWC0r9cpgVS9510atg7mx2Mqul7U5uZtp78pq+zga.mEL.0kGi7nIQA3Ann9wQ7DBpZhHlx5s736liHcCq.6XkZH3ycjeVK6ibeyFl8E16rOpQMWM66pqWICBYfniOMAkDP8HwH3WBeBJgFJsFDOTkGvSDaEEVIElBIqJKgtUVwD.sbGDXgawCi3LXP0gKhzzlyQBQ59iHwBJIA7kgesygOrf0ZuboxH3oRHkU4KQq2nV9X7ov3UaLjPhfD4P+YBPsY4WU385.JRbp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nhyF814mOFkGy6SXt5Y5skog1qHKl8uZKy3AWoMT0.0Pw2mzC1HcJcHPAUHi4HgFNgbNbaXVuQStcS6847ncXXvJ3ouHs8gfAnqYnO9QRY0OQvCywR5+QjCzwQZeelOwZi0k2Ts6mIe+EsfWqc36lwFu6h5laFi59nTO4PWlzmdIuihLDOLd5+.Hdp8.M++O6A5HdeAbN8.LjKGZu15g8CcfVObI.RXLRf71jlyIOKlMtgbbVuGLuzA+E7nlrobroZxl4S9uxdDhci4OyM6JkxCdKlRAzaV5eubIqCjiQMyuIokUiUZHurB8YttRy8s.6yjkY0KfLqcAjY8KfL29BHyFW.Y97KfL2YpxH6cay9P98rih.g16jkY2bXEBy4M9a.hWOVJ
    
    

    It might actually be a good work around for the temposync issues that I'm currently facing using scriptnode ( https://forum.hise.audio/topic/2120/flanger-in-scriptnode/17)

    One quick question.
    How did you go about getting the actual hostBPM from the host in your example, instead of simulating the Host using a slider?

    Appreciate your insight ☺



  • @LeeC I haven't looked at the code, but I would guess Engine.getHostBmp();



  • @LeeC as David said "Engine.getHostBmp();"



  • Thanks @ulrik and @d-healey 😊

    More specifically, the question was how do we get a change in BPM within a DAW to trigger an action in HISE using code?

    I guess, I was expecting there to be some kind of call back function.

    Thanks again



  • @LeeC I guess you have to use a timer that continuous checks the host tempo



  • @ulrik ok thanks.

    Any thoughts on how frequently to call Engine.getHostBmp(); using a timer?

    Also, will this method eat up unnecessary CPU?

    Thanks again 😊



  • @LeeC I don't think the timer will eat up much cpu, but maybe some more qualified can answer that.
    I think you should try to set up a test plugin and run it in your host, you could even make button and a slider in your plugin, slider to change the timer freq and a button to restart it.

    I'm just speculating now but maybe the code
    "Engine.getHostBmp();"
    will check the host continuous already? or maybe when the host change tempo it spits out the information the plugin will respond immediately, I don't know?
    Maybe some with more knowledge can chime in?



  • I think the timer is the only option at the moment. If would be nice to see some host callbacks for bpm and transport states @Christoph-Hart 😉



  • @d-healey but what about all modulators "Tempo Sync", they follow if the host change tempo, so there must be some inbuilt function there?


Log in to reply
 

8
Online

702
Users

2.8k
Topics

23.7k
Posts