Forum
    • Categories
    • Register
    • Login

    Custom reactive audio animation

    Scheduled Pinned Locked Moved Scripting
    17 Posts 5 Posters 695 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.
    • B
      bwoogie
      last edited by

      Hi, I'm new and creating my first plugin in hise.

      I'm trying to create an animation that reacts to the playing sample of my plugin. I'm able to draw the animation, but getting the audio has been a chore. Essentially I'm trying to make a custom audio analyzer panel. In my interface script i'm drawing on a panel, but how do i get the audio coming from my sampler?

      Some direction would be appreciated, thanks.

      Oli UllmannO 1 Reply Last reply Reply Quote 0
      • Oli UllmannO
        Oli Ullmann @bwoogie
        last edited by Oli Ullmann

        @bwoogie

        You can put a simple gain in your signal chain and then use .getCurrentLevel for your animation.

        https://docs.hise.audio/scripting/scripting-api/effect/index.html#getcurrentlevel

        Update the animation with the panel's timer. 40ms are 25 fps what should be enough.

        If you want to draw an analyser it is also possible to get this data with scriptnode. I can post some demo code when I'm back on my computer.

        From the simple gain you'll only get volume data. No frequency data. For this you'll need the scriptnode analyser demo code.

        B 1 Reply Last reply Reply Quote 0
        • B
          bwoogie @Oli Ullmann
          last edited by

          @Oli-Ullmann Ok i get it!
          I looked at the Scriptnode Visualisation 101 snippet. It shows how to use global cables. So for my animation, i'd like to split the signal maybe 6 ways, then bandpass each signal into a peak and then it's own global cable.

          I was looking through the filters and didn't see what i needed. I might need to use a highpass and a lowpass for each band?

          The most important thing is, if i bandpass these how can i just "throw the signal away" when i'm done with it? I don't want to affect the signal since this is purely for visuals only.

          ustkU 1 Reply Last reply Reply Quote 0
          • ustkU
            ustk @bwoogie
            last edited by ustk

            @bwoogie Use a split node with two chains inside that will be your dry chain and your bands chain. In the band chain, insert another split with as many chains as you want bands inside. End that bands chain with a clear node so it’s not adding to the original dry chain signal of the outer split.
            In all "chain bands" place a filter and a global cable

            Hise made me an F5 dude, browser just suffers...

            1 Reply Last reply Reply Quote 1
            • B
              bwoogie
              last edited by

              Well I got it working but my project got overwritten by the snippet.. 👏👏👏

              i absolutely hate hise's project management.

              ChazroxC 1 Reply Last reply Reply Quote 0
              • ChazroxC
                Chazrox @bwoogie
                last edited by

                @bwoogie bruhhhh. You definitely did it wrong, but thats not totally your fault because nobody explained to you. I've done this before, thankfully not far into my build so it wasnt so devastating but It did suck.

                @Christoph-Hart I think there should be a warning of some sort of 'where' or 'what' is happening to the snippet if the user tries to import. Options could be 'interface' or 'user-defined script editor' would be a cool choice option window.

                David HealeyD 1 Reply Last reply Reply Quote 0
                • David HealeyD
                  David Healey @Chazrox
                  last edited by

                  @Chazrox said in Custom reactive audio animation:

                  I think there should be a warning of some sort of 'where' or 'what' is happening to the snippet if the user tries to import.

                  It shows this when you attempt to load a snippet and you already have a project open.

                  fd0c9c2c-4b5f-4290-bb54-67c9e75f56c9-image.png

                  Free HISE Bootcamp Full Course for beginners.
                  YouTube Channel - Public HISE tutorials
                  My Patreon - HISE tutorials

                  ChazroxC 1 Reply Last reply Reply Quote 0
                  • ChazroxC
                    Chazrox @David Healey
                    last edited by

                    @d-healey I know that now, but to a new user that didnt mean "clear the project" because it took time to learn what 'preset' meant in HISE ide.

                    David HealeyD 1 Reply Last reply Reply Quote 1
                    • David HealeyD
                      David Healey @Chazrox
                      last edited by

                      @Chazrox It doesn't clear the project, it clears the preset. But yeah the wording is confusing since there are two different things called presets in HISE.

                      Free HISE Bootcamp Full Course for beginners.
                      YouTube Channel - Public HISE tutorials
                      My Patreon - HISE tutorials

                      ChazroxC 1 Reply Last reply Reply Quote 0
                      • ChazroxC
                        Chazrox @David Healey
                        last edited by

                        @d-healey Yeah pretty much just a scary thing unless you know. haha.

                        1 Reply Last reply Reply Quote 0
                        • B
                          bwoogie
                          last edited by

                          i opened it in a new instance of hise, not in my project... but the auto saves even saved in my project. i don't know if it was still using my projects folder, apparently it was. i've turned auto save off now.

                          David HealeyD 1 Reply Last reply Reply Quote 0
                          • David HealeyD
                            David Healey @bwoogie
                            last edited by

                            @bwoogie said in Custom reactive audio animation:

                            i opened it in a new instance of hise, not in my project.

                            A new instance of HISE automatically opens the last project - but doesn't open a preset. The autosave will write to that project, but it won't save over the xml file unless you manually save it.

                            Free HISE Bootcamp Full Course for beginners.
                            YouTube Channel - Public HISE tutorials
                            My Patreon - HISE tutorials

                            B ustkU 2 Replies Last reply Reply Quote 0
                            • B
                              bwoogie @David Healey
                              last edited by

                              @d-healey i guess that explains it. my project crashed before i saved it. anyways, it wont be too hard to restart. just annoying.

                              1 Reply Last reply Reply Quote 0
                              • ustkU
                                ustk @David Healey
                                last edited by

                                @d-healey said in Custom reactive audio animation:

                                ...The autosave will write to that project...

                                That's where things are going bad sometimes, remember that old directory issue not updating when switching the project. So the autosave writes to the previous directory unless you specifically close and restart Hise. There's been an attempt to fix that issue I am raising for so long (by someone who I don't know the name on the forum...) https://github.com/christophhart/HISE/issues/795

                                The same goes when using the preset browser. About two weeks ago again, got a crash, restarted Hise, reopened the last autosave, and baaamm it was one of a previous project. So now I know this well, I just go to the previously opened project and bring back the good autosaved file to the current project 😉

                                There's a thing I systematically (well apparently it's not that systematic) do when switching between projects, it's close and restart!

                                Anyway that's preset overwriting, not project XML.

                                Hise made me an F5 dude, browser just suffers...

                                B 1 Reply Last reply Reply Quote 1
                                • B
                                  bwoogie @ustk
                                  last edited by

                                  @ustk said in Custom reactive audio animation:

                                  Anyway that's preset overwriting, not project XML.

                                  Screenshot 2025-12-01 202436.png

                                  That's the issue.. How do you save the project? I don't understand how any of it works. There's Load Project, but no Save Project (I understand the "Project" is stored in directories.)
                                  Under File Management there are Open and Save XML options, but I don't know what those are actually referring to.
                                  And then Open and Save Archive which seems to be autosaves and presets...
                                  I don't understand why it needs to be so non-intuitive. I'm not new to computers or programming by any means, and it's probably just because i'm new to hise, but...........

                                  ustkU David HealeyD 2 Replies Last reply Reply Quote 0
                                  • ustkU
                                    ustk @bwoogie
                                    last edited by ustk

                                    @bwoogie I agree, it’s not intuitive and we all have habits that are adding to the confusion because by « save project » only people who know… are knowing… lol…

                                    The project is the whole directory
                                    By save project we mean save XML.
                                    It’s not a good terminology though, because there is no file saved that are holding the project entirely. The XML is only the constitution of the module tree and the interface of your project. Files likes images, samples, etc… are not saved, they are just permanently lying in the project directory and there is no "global project file" holding them.

                                    And you’re right, archives are "project’s presets", being autosaved or manually saved.

                                    I don’t know if people out there are using manual preset (archive) save. Except for quickly sketching something, I personally don’t get the point.

                                    The things you should then focus on are saving the project XML, and set the autosave just in case something bad happens. You shouldn’t need to save an archive manually (cmd/ctrl+s) but instead just use cmd/ctrl+Shift+s and you’ll be good.

                                    Everyone has been confused by all those strange naming at one time, and as @d-healey said, the concept of project preset (archive) vs user preset adds another layer of confusion…

                                    Something worth adding, no matter how cautious you are handling your project, nothing will be safer than using git

                                    Hise made me an F5 dude, browser just suffers...

                                    1 Reply Last reply Reply Quote 0
                                    • David HealeyD
                                      David Healey @bwoogie
                                      last edited by

                                      @bwoogie adding to what @ustk said, it's good practice to only have one xml per project. If you need to manage different versions, use git

                                      Free HISE Bootcamp Full Course for beginners.
                                      YouTube Channel - Public HISE tutorials
                                      My Patreon - HISE tutorials

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

                                      13

                                      Online

                                      2.1k

                                      Users

                                      13.1k

                                      Topics

                                      113.4k

                                      Posts