HISE Logo Forum
    • Categories
    • Register
    • Login

    Communicate with an External Audio File slot?

    Scheduled Pinned Locked Moved ScriptNode
    18 Posts 2 Posters 600 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.
    • griffinboyG
      griffinboy @aaronventure
      last edited by griffinboy

      @aaronventure

      Yes, lots of kontakt experience.
      Just browsing through the Event. stuff in the docs now.
      This is looking very familiar. I think it's just a case of learning the Hise equivalents for everything.

      I am rather hoping that Hise might have everything I need for sending the data.

      Message.setFineDetune(int cents)

      ^ I noticed this which caught my eye.
      Detune per voice is essentially what I'm wanting to communicate.
      I'm looking for the communication of fine pitch bends from the UI script. Continuous control for each voice.

      A 1 Reply Last reply Reply Quote 0
      • griffinboyG
        griffinboy @aaronventure
        last edited by griffinboy

        @aaronventure

        const var outputBuffer = Synth.getDisplayBufferSource("ScriptFX1").getDisplayBuffer(0);
        

        ^ unfortuantely no, I don't think you can get a reference via this method.
        At least it doesn't work for my External Audio File Slot

        I'm not cut out for this sort of thing :face_with_tears_of_joy:
        Give me analog simulation any day, but this will stump me.

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

          @griffinboy said in How can you reference External Audio File slot?:

          Yes, lots of kontakt experience.
          Just browsing through the Event. stuff in the docs now.
          This is looking very familiar. I think it's just a case of learning the Hise equivellents for eveything.

          It's very similar. HISE differs in places where it needs to be more flexible to allow for all the extra features and event hierarchy.

          Link Preview Image
          Coming over from Kontakt? Read this!

          As pointed out a by Chris, here's a thread for everyone who came over from Kontakt and faced issues with HISE paradigms. This will not go into all the stuff ...

          favicon

          Forum (forum.hise.audio)

          The important thing is: events move through MIDI scripts within a processor in descending order, then propagate to child processors in parallel. They always share the same ID, so you can catch events created above down the line.

          Is it detune per voice or per note? Is it microtuning or will live voices pop up in your interface?

          If there's no formula for targeting the voices (i.e. notes of a scale for microtuning), you'll have to use globals. Declare a global object somewhere high up the chain, I do it before the interface script

          global Event = {};

          You cannot be dynamically creating properties in a MIDI callback, so create them up front, and call reserve() on any arrays you might be using in realtime callbacks as well.

          Maybe FixObjectStack is a good idea here, but I have not used it much.

          If you have a fixed number of playing notes (like a guitar), it's just an array that you're storing them to. If that array is in the global object (Event.nodeIds), you can now access it back up in your interface script. From the control callbacks, you can call GlobalRoutingManager.setEventData() to send new data there since you can now access the IDs of the notes that are currently playing (stored in your Event.nodeIds array).

          This data will then be picked up either in your realtime Synth timer down where you're doing the MIDI processing (with getEventData() and then doing whatever you want) or within scriptnode using event nodes.

          griffinboyG 1 Reply Last reply Reply Quote 1
          • griffinboyG
            griffinboy @aaronventure
            last edited by griffinboy

            @aaronventure

            mmm. Thanks for your explanation.

            Yes the detune is per voice. There are going to be situations where multiple of the same note are triggered and held at once.
            And each voice (despite them being the same note) needs it's own playback speed modulation.

            Sounds like this is unfortunately more complex than I anticipated. I think this shall take me some time, Kontakt is certainly nice when it comes to this kind of thing, I remember I scripted my entire end goal in an evening : /
            It shall certainly not be the case here.

            if I'm being specific, I am aiming to script a hierarchy of control.
            First I need to be able to collect all notes separately and control the pitch of each note.
            Then within that I need access to the pitches of the voices belonging to each note.

            Notes don't need to know about each other.
            But the main system needs create and set this pitch data for any note that starts playing. It's quite a procedural thing.

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

              @griffinboy

              1. create a global Event = {}; at the start of your interface script or in a separate script before.
              2. in your synth midi script, whenever you play a note, store it into the Event object. Decide on a data model and initialise the necessary properties and call reserve on any arrays that you create in the Event object
              3. Access your note ids in the interface script. You can use 2d arrays to keep a nice track of events played per note, just remember to call reserve on all of them.
              4. Write data to the manager using setEventData
              5. Use the data back down in the synth midi processor either in the timer callback or in scriptnode itself using event nodes to access the slot (when polyphonic, a stream of the network is created per voice so the polyphonic nodes will work independently. You cannot see this as you cannot see an individual voice's network stream and the values on node parameters per voice, you have to use your ears here. I.e. the network will always show the last voice to be played and what's happening with its nodes).
              griffinboyG 1 Reply Last reply Reply Quote 1
              • griffinboyG
                griffinboy @aaronventure
                last edited by griffinboy

                @aaronventure

                Thank you, you've been very helpful.

                I think I shall start by figuring out the Event and midi system.
                Something that perhaps makes this a 'little' easier is that I realised in this design I will be intercepting all of the midi data, and writing my own based on the input. It's 100% controlled, so I am going to start with figuring that out.

                4da4708e-09ff-4986-90ba-d505f7cb487b-image.png

                Success.

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

                  @griffinboy You can use Message.ignoreEvent(); That specific callback will still execute, but the input message will not go beyond that processor.

                  If you now spawn 5 events using Synth.play, The children synths (but not the midi scripts within the same processor / sibling midi scripts) will receive 5 messages. All of them will have a positive isArtificial() return.

                  They will share the same IDs that they returned when you played them in the parent's midi script, so you can query that within your global object and do individual processing down the line (in case you need delaying, ignoring etc.).

                  griffinboyG 2 Replies Last reply Reply Quote 1
                  • griffinboyG
                    griffinboy @aaronventure
                    last edited by

                    @aaronventure

                    Fantastic, thanks again for your help.

                    1 Reply Last reply Reply Quote 0
                    • griffinboyG
                      griffinboy @aaronventure
                      last edited by griffinboy

                      @aaronventure

                      One last thing: You wouldn't happen to know how to stop Hise from killing voices with duplicate notes? 😄
                      Unfortunately I am very foolish when it comes to Events and Hise. Completely new area for me.

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

                        For the sampler, check the settings on it, there's a voice handling dropdown.

                        griffinboyG 1 Reply Last reply Reply Quote 0
                        • griffinboyG
                          griffinboy @aaronventure
                          last edited by

                          @aaronventure

                          Ah, not in mine!
                          Custom sampler : (

                          Thanks though

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

                            @griffinboy Get a reference to your custom synth and call Synth.setShouldKillRetriggerredNote(false); This is on by default.

                            griffinboyG 1 Reply Last reply Reply Quote 0
                            • griffinboyG
                              griffinboy @aaronventure
                              last edited by

                              @aaronventure

                              96eeb703-7300-4d1c-b932-1aad36069b7b-image.png

                              It's not liking it

                              1 Reply Last reply Reply Quote 0
                              • griffinboyG griffinboy marked this topic as a question on
                              • griffinboyG griffinboy has marked this topic as solved on
                              • griffinboyG griffinboy marked this topic as a regular topic on
                              • First post
                                Last post

                              20

                              Online

                              1.7k

                              Users

                              11.8k

                              Topics

                              102.7k

                              Posts