HISE Logo Forum
    • Categories
    • Register
    • Login

    Fast / Safe Scriptnode Usage

    Scheduled Pinned Locked Moved General Questions
    12 Posts 4 Posters 434 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ?
      A Former User
      last edited by

      I need to (slightly) randomize the PitchRatio of a bunch (up to 30 or even more) Sine Oscillators every time a key is pressed, the trickier part is that they also need the pitch to decay over time (with an AHDSR).

      What's the safest way to do this in ScriptNode? I assume changing the values of 30-something Parameters in the NoteOn function wouldn't be the play here ๐Ÿ˜Š

      Maybe the PMA node?

      A 1 Reply Last reply Reply Quote 0
      • A
        aaronventure @A Former User
        last edited by

        @iamlamprey expr node where you call Math.random(input)? That way you dial in the "slightliness" via a parameter in on note only once instead of 30 times.

        ? 1 Reply Last reply Reply Quote 0
        • ?
          A Former User @aaronventure
          last edited by

          @aaronventure pretty sure the core.expr node continues to output after the note has started so the ratios will keep changing

          A 1 Reply Last reply Reply Quote 0
          • A
            aaronventure @A Former User
            last edited by aaronventure

            @iamlamprey Take the cable_expr, plug it into voice_bang which will capture the value on note, then plug that wherever. Don't forget to wrap it all nicely into a large block ๐Ÿ˜„

            ? 1 Reply Last reply Reply Quote 0
            • ?
              A Former User @aaronventure
              last edited by

              @aaronventure nice! i'll give it a try, cheers ๐Ÿ˜…

              Christoph HartC 1 Reply Last reply Reply Quote 0
              • Christoph HartC
                Christoph Hart @A Former User
                last edited by

                I've added a random mode to the midi cc node, this way you don't need to use a expr node, randomizing stuff on a note on is a pretty useful function to have.

                Another neat trick is to use the FM synthesiser node - it's basically just a sine wave generator that will use the audio signal as pitch modulation, so if you create an envelope signal there and feed it to the node, you'll get pitch modulation without having to use cables & containers.

                HiseSnippet 1651.3oc4X8zaaTDEe1DOI0osPKTthlCHHHhhhKgBRfTbhSLMh5DSrIp2BS2cb7f2clkclMIFDmPH0KHN2a7o.Am.INwANUwc9.vg9M.d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0yC0jFACS.M.MaMONkeF+AjVdRVMebaJjTXP8s74drnlvTHlUqG6wk04oGA+G3h4oM4pPH2diXnFUZArAxvrvxmlpA4boKfCf+urY+KPDaFaI.ErFrBrnFbQlOZX6ietA8jw2aMi9Lv7KbXKMKzTXxt9dqdriSUcaJWOVKAKHsu.xNJaa3yioc8TQ4M8afYhiX9vMVN8zK.dBmCO4LFV4EMUmrbQY1WZ9Mp0wlVaiPKyXuQdziZLxKdZdfiy3Pgw1wneBO1ICp3sETz1ClLM45ond6.aYq.6bECr.3e7.6C+0piE699G8neZsBwtp6z32Rf.WAutVCvaTAdirDN9bI7LT00yX48XPzEYCPls.8nKeKbN7cgo+Oa66RRzyCiF5R6aK6cmG8AeaUaYW5h3aKigdRlZ8+mXOkw6w7YTUgJFqN8Vz.zRs3niJv2+bsoBEVr7UprtJn+v3KGdHvsmM38SSRyAi3qYSPHSnckcgxR3NA4qRVF54FwVF1dhkG+Ab6tLR8FDk4M1YJthEQ3JxmAvDBknfoBHGSOhQNjAyGXFxmn6R0DM7xfJ3QFgKbkAvjc.sGJn9DphDZp3QBFppKQTRReYLwSJdCMQvXdDsj3Fw.iDjx3zShUFFRIcLdTxvwSHuNwMsy5DJomumVoyFMuZ0hn4GeNQyecvumgFpGw97XXvt9OCwyWczqSMhq+0G+iu527V+wSCM+j0Jx0EqdZXrajn+Mh807PedQH8SV64.j1HjSooOL8K2zb7.ZTk7X5aMpy+PRtHi+7+it+ktvEzq9cmuTfO8k27wmY2+WqJ5xW3mZ2j7R+xqV7kRKqSoFetWI3LguWCusZeyotT+ALGftVIVWGGHExaq.twj4yrdoztE1mOsuVQ975+05+FRYu.ZxqzOcebsmGe.h.paj7frWx0XbWIYG3UjEIeA5x3Fl0jJniFOpadi3CbcyypBW71S6Ee6o8hqNsW7cl1Kdmo8hu6zdw26oeQyGsO6UQLeU.HIs4Vo0cc1RXlIII+.8O.aAtodB
                
                ? 1 Reply Last reply Reply Quote 0
                • ?
                  A Former User @Christoph Hart
                  last edited by

                  @Christoph-Hart very nice! btw is there a way to auto-collapse nodes within the XML doc? i'm at 1% cpu usage but all these open nodes are lagging my screen like crazy:

                  bd1479e0-0f12-4a89-bffe-cb0a270fffa3-image.png

                  d.healeyD Christoph HartC 2 Replies Last reply Reply Quote 0
                  • d.healeyD
                    d.healey @A Former User
                    last edited by

                    @iamlamprey are you using a clone pack ( whatever it's called) ?

                    Libre Wave - Freedom respecting instruments and effects
                    My Patreon - HISE tutorials
                    YouTube Channel - Public HISE tutorials

                    ? 1 Reply Last reply Reply Quote 0
                    • ?
                      A Former User @d.healey
                      last edited by

                      @d-healey nope just a split with a bunch of chains, i need a lot of different things being controlled at once so im not sure if clone will work the way i need it to

                      1 Reply Last reply Reply Quote 0
                      • Christoph HartC
                        Christoph Hart @A Former User
                        last edited by

                        @iamlamprey said in Fast / Safe Scriptnode Usage:

                        @Christoph-Hart very nice! btw is there a way to auto-collapse nodes within the XML doc? i'm at 1% cpu usage but all these open nodes are lagging my screen like crazy:

                        You can click on any node in the list on the left and it will fold the others and zoom in to show it (I use this for โ€žnavigationโ€œ for complex networks).

                        ? 1 Reply Last reply Reply Quote 0
                        • ?
                          A Former User @Christoph Hart
                          last edited by

                          @Christoph-Hart yeah i mean do the nodes keep the "collapsed" tag somewhere in their XML? im using a python script to generate the network, it's not a big deal but id like to cover that base if possible since i don't need the network open ever

                          Christoph HartC 1 Reply Last reply Reply Quote 0
                          • Christoph HartC
                            Christoph Hart @A Former User
                            last edited by

                            @iamlamprey try it and find out :)

                            Spoiler alert: Folded is an attribute :)

                            1 Reply Last reply Reply Quote 1
                            • First post
                              Last post

                            19

                            Online

                            1.7k

                            Users

                            11.8k

                            Topics

                            102.6k

                            Posts