Scriptnode LFO shape
-
@Matt_SF I like the simplicity! But your snippet is giving me this:
-
@d-healey That's odd, it's working here :
Maybe having a parameter to reset the oscillators' gate once in a while is worth having after all... ?
And the oscs do seem to stay synced when changing their phases btw
Edit : and which osc's phase you choose to change doesn't matter, the end result is the same -
@d-healey About this case : just inverting one osc's phase gives you the rounded rect wave.
-
Here's another approach using a
math.expr
node with theMath.smoothstep()
function and a single triangle oscillator that is being rectified:HiseSnippet 1249.3ocsW80aiTCD2aabNRtxo6j3QdvpBDohdQIG8NNIDpkl1TUQaunlRg254tqShU10dOudaa.AeY3q.R7FhG4Mj3i.R798M.Fudyta9S+CQWyCs1imY7OOyuYr2NJoKKJRpPNUNYTHC4rBt6HgdPqATt.s+NHmGgOjFoYJhUz1iBoQQLOjiyx6YD3ToDJ42a2bapOU3xxEgPmJ4trC3AbctzNa80be+1TO1I7fBZuwV66JEsj9xX.OKiafBotCo8YGQMpsDF4TdWOtVp5poZVDxoz1RuQcGHuTX0+TdD+belYRSTWvQVwsk9dFDajhZMf660Y74NBAdoSdTXYaT3CvGx83YxyiFONYARtEEiGNKMI7VdB30rH7ZT.dyARNEfTIKjdBtqqhGpyWwfmGh2W.ImdTHrWDJVcQN+NtkDTPnqGPGxZqfIYFT6EMZrNA9yZeQuXgqlKEDo3Hol8JQs0p9CUqT8GqRldod8l6ZlsQI88Yp4trISqtICqIhCNmoVmbA0OlkoHb7mLlhu9XZwTtq8TWPQoXeAW+pPl35HBnzPEL5a1eGplZRDox.8BYJM2.AmcXW.rZaZoBdGVzPsLD30yjy.1hzK1mpmjBYpaRW.hASj2LIGQDWOpXc08CuBaw3GlxqLYnSoJNUny.cBdIoJPLZPRUgjoSyaG+iIi+MNOwGpXgTE6DYGe5nZQzfPe1wvwachcbTGlZaeo6vY4Lg1yPxp0NOtWOl5ZYquyIx2FcEemSUMuwTUAx3QL8kR0vj7W5XXjM0DkDZOSColytvlZNKHO0.FH8L6VapKHXTGpdfoUho7.HgLUc2Ld4s5rIa0YbbR2S6NTx3hUvxHWn2dB2YlsTwpWX4Vxf.y4y4mveK6S78IwQLBknMaaeeXnvinXPXu2HBWStjqGPzCXjn.oTO.tQJLOsTquTZrY08Nn6AEzXUBomTAthvtJDtaJodi.YiDOZhoqM0oBPEP9tZb0+N7HvtQamPxhlQhIMH7XWAocm+E9g5PUvcUZqtkylAqeHWbpgpT7xwCoWMkrGuUW.1c4eOqX8iIzV1zJggl1GagJrIktaaxGsk8li1J1ahYB2Q4d8u94vur5u9OahtYn+1Mm0qMtVnuRxNQN1D8Qy3Iz++nDzQ4ZiR6A0c27lT5ttIFG9.bmAznYi6nE1ikSZ+OGHlVoZzoBNh2+YPo2jEQOBG.+u930lf45LA0yYwOuVwyddKTlWFCkSSUf+PK1RVHqztM9Dnh80I8HeMICSUgpYnf2yLN.5BkTWupRFK7DP+uUIxd1R82DCWQTcpRzBWEixlA22rjEZsJTlrA71US.KqgPMtHLVuNoQ8m2i7Tay6zYeZZq7j6wK5xG.2vedb+w9zYYz8Tn9k+xebwu8w+4DLgx3PFc3zg5jdoIKbu08ZxI2muG5I3Nbs6f4+fnklyCJLo82QOHBM6S+ee7tPvwUmCvR31e28y67QGKi0bQefkp3l7vQwAcgu9wkA6tPv7MO30YIyqAryaXlah.cYBuFiSboK1zL2IcwlYY0.pqRdlq8cKFVv6kHAvjH46pp.EIvbRSzEVlHF2ndCT.7cNm45ZN9OEds77s4YKfMe1BXyFKfMOeAr4EKfMe9BXyKuQaLeh4WEqkA1xAPPmcSp+bb1UPAlUBKD8e.Su9RO.
-
@Matt_SF @Christoph-Hart Thanks! How did you add those annotations?
-
Rightclick on a node, then enter it in the
comment field
. It supports markdown syntax -
Here's how I do it
HiseSnippet 1222.3oc0XszaiTDDtGa2NXmrqVj1e.iVwgrRKV1KKOjPnDxCGYANxJNDs2V0omNws7LSOzSOIwf3B7yfCbiy7OfKHARH9OfDm3DQhSbB5Z5YxzSrSbhIKO7E6t5tp5q9pG8LdfTPYwwBIxow9ShXHmUvCm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Om+syjeJUOUcQ5fsqmd+DkPWYmggoBB8klWeE6rAowCCoDe1c0TGqgoviCX7vNjf.RgG94e4d+1e7U+Po94kvTe1ky5qX5lM67eydYSUSIT2zfZP97JRuZjhuc4vaZURIjGj3OSjCxWbj+2ii+5u76b+F4uVp1nY9r9N+ObXe8zg8K9r96xmI6RKjhHlTwY4uuCrR+VdULOQRu3Cfc0CGxCPmpkMvG0KGTYOzskE0vhcBmxLu5TC7Vr3wJQz+LuCP.gJEuH6FCH5dkTI5QRgo+8EMv8g0tcPmXhLLtcq1n.tG+ETJ7Nlut9kBmsNOcAz4MV.cd1Bnyat.57VKfNu8Bny6bs5.+SNYSuf++AsfAamVb43Tb4aUzeAUld97A
using a math expression is less convoluted...
But the cool thing is that you can go linearly from sine to rectangle just by using the Gamma parameter ;) -
I've built up Christoph's example into a larger module. I'd now like to include a fade in time to the LFO. I've added an envelope and tried it in various places in the chain but it doesn't work as I want.
Any ideas?
HiseSnippet 998.3oc4W80iZaDDeMvVUtzVkTEU0G5CtR8Ahz0HHIMMR8gvcbPDp4tCcPt12P6YObrB6ccVulTTU+t0OB8yP+DjuAsy50fM47Qnz6hpT4Aj24O3eyL+lYGFnjdPbrTQbpOZQDPb9D5vEB8zNSYbAo+QDmOhpgXM4vEQr3Xvm33T8EFcN0qQR+71meHKfI7fbQDx4RtG7RdHWmKcP6ejGDzi4Ci3gEr9Is66IEcjAxDDGUoMIQLuYrKgSXFypPQPz0mqkpgZFBFhSsCk9KFNU9Fg09y4w7KB.ygVjg3OjUbOYfuAwFojNS4A9CVFuwDhCcPdzW0F82mdL2muRddV3toJby8nX9vox5vq5ZvqUQ30r.7JARNEfTMKjtGcnmhGoy0Xvycn8EZPMggo8hPwZKw42ocjnAB8CCYyfdJ7vJGZ7zlM22E+5A+vjDgmlKEtRwIRMbpnwC16W2q9d+1dtuqpISJUm40njAAfpT0lJsZSN1PjDdAn12cNKHAVYHF9qmSoWeNsXI2yF0ELTJ5K35Si.w0QDHYoJ7oW0+HllYJDYxP6h.klaffyQvbjUaKK0oGAwyzxHjWekZFxVj9IAL85THSeSlBLGrVcyTbDwb8hh8UuKup11wq1Lseag68nC3Zuoki2JkfWLqcai2rtzOk1cxDvSmC1Zzd+7FaIuwgxmYgxcnC4BHcjYJP9hzyt+DaN39BP.JSRs00M8r8W24O11omQa8zyS8z3qejhIhijwq8CODB4ijBSFIW3qhwADvqOyTkKJuijoJU0aedOLHK0mgLchJktbPnLQnWidTcqqIEaoWuqof8kL+r1s0H8Onsd+6mTr62.UYvUVI3tHmNLJ.5JlCA33vTL9437uIrj.8RoqSxOVJjQSkBtWQFvYfVwu7RPUD6kFPGn03N.4Rte6yf.fUjM+MseIxBYJLOA6Xtn0+3aiKsd8kTKbcMclt+mZBO0B6uJaIBC.Omo3LgdUbjFBtYFXCgLSbWYyid+gxxMO9SZ9s7QJHhofQxAArEMhYFVDNx.1209b7.PcXfza1UWPHxFCoZabQBNuWcsqlbiu0x6a2D5MDCqvlGm.52HUyRocYOiOYKMwoo1wZrzLdtszLNbYoo0s6VKabMfp++bMfyjIZt3xiY3zreAYCmjDNDu80CPjHDPfYcUmJlxq8bSyY60uB+zC+E9ISYKyYmLksVp7Cx6Hj4oji8rjcCy6iSkfwsH8edUmdr4raKRZC.5Gs4CaRBwqMG64YR2eKleJ2mGsC973cvmmrC97c6fOOcG7462Aed1F8wrwxAIZYnsUDELnaZuuiSWACYxordxe2XsKAI
Also, how could I add some random variation to the frequency value? (another math node? or could I feed my noise osc back into the freq of my triangle osc?)
-
@d-healey Are you using new_layout? Because the snippet crashes on develop...
-
-
Also, is there a way to get the Math.expr node with the smoothstep to be bidirectional? Currently it always goes from 0.0 - 1.0 but I'd like it to go from -1.0 - 1.0
Actually I think I can work around this by editing the modulation table.
-
Also also is there a way to get LFO to restart on keypress, so every note in a chord stays in sync?
-
@d-healey Built new_layout but it crashes too with your snippet...
-
@ustk Yep, my snippet crashes here too :p I'll post a new one when I'm back
-
@d.healey Your snippet contains a network that was saved to a file, so it can't find it (crashing is not the smartest hint though).
However I still need to think about a good solution to share scriptnode examples (including SNEX files)
-
@Christoph-Hart Got an idea => SnippeX
-
Ok well here's my network file.
-
Or Snippnode...
-
Alright, here is an example snippet that might answer a few of your LFO questions and the network was saved to a file before so we can test that one too :)
HiseSnippet 2016.3oc2Y07baabEGPTqrEsqqShmL4POrGxA4YT3P574jNSsr9fd3TSYNhJJ4l7JfkhXHvtHXWHJzN4dtjomysdr+Kza8OgNSO1a8u.+eP66s.f.fjhVhgVoI7fD1291cee768wBzKR5vUJYjk8lGmDxsruOoehPObugLOgUm8sre.oKSo4QzTR6lDxTJtqkscsmiDr2bcKyuW+zcY9LgCufjk0IROG9K7B7zET6syezy2uMykerWPIt+jc53HE6I8kwf7TizzJj4LhcN+PFx1ZDK6MNv0SKi5qYZtxxd8cktI8GJGKR4+DOk2Y9bbPKq9vFkRtsz2EkXjp0dC87c6kq2JKKaRuBqPsTqviHc8b8lPuvZ7PyDzhUT1dXuVUwqVEwqUYwqYIwaNhjcIQZ8TQ5cH8ch7B0Eyfxy8HcDfyY.CL6kEkTdsr+Gj8j.CBci.1Hd6HXvjEr0m0r41T3OO92OHV3n8jBpTbnTyeoXqGW+OWey5eWc5zSMXvbmCOlHouOOZtSid5nEsvsDwAmwi1ldAyOlOgQP8qZSIWsMsrK2IUqKwnTzQ3oeYHWbU.AqLSE7zW0YellgNhLZ.eg7HsGJB16yu.P0otkMI6yUizxP.WOiOCPKR2XeltJDBiaxl.rAU7anyQn7zIkiqVY3pqqH9NjddZmgyWFWaNxHXodaHiYQi+FxACFvczEB35j1eysWnW8rPO3LwC+9YCos+lVyMn66IE.7vHdHKherrmOKYKEKHzmeDHiaSOyW5Lpu2ehOaTQXpHrKxwVNCYBA2WsLAOabssJsVrS4HYr1SbdWlNx6RHJ7v3f9PZZG9dYRGPydMLFJcbSbLhK5yEtlA+W3W1jsvw1YS1JexRgeGx0ikQiLtirmAmAZ6uCAz9QIVOy2WNdOYPnWF.EL+FZ8j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