HISE Logo Forum
    • Categories
    • Register
    • Login

    Namespace oddness

    Scheduled Pinned Locked Moved General Questions
    5 Posts 3 Posters 245 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.
    • LindonL
      Lindon
      last edited by

      So I have a modulator defined as:

      const var GlobalTremoloLFO = Synth.getModulator("GlobalTremoloLFO");
      

      and I have a series of callbacks like this:

      inline function onTremFadeInControl(component, value)
      {
      	GlobalTremoloLFO.setAttribute(GlobalTremoloLFO.FadeIn, value);
      };
      Content.getComponent("TremFadeIn").setControlCallback(onTremFadeInControl);
      

      I put the callback in a namespace declared in an include script: VibTremSpace.js

      If I put the modulator definition in the init then it compiles, if I put it in the namespace I get this:

      Interface:! VibTremSpace.js (162): Unknown function 'setAttribute'
      

      So for some reason the callback can not see the modulator when they are BOTH in the namespace....very odd...am I doing something silly?

      HISE Development for hire.
      www.channelrobot.com

      d.healeyD 1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey @Lindon
        last edited by

        @lindon said in Namespace oddness:

        am I doing something silly?

        Maybe... Can you make a minimal snippet that fails in this way?

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

        LindonL 1 Reply Last reply Reply Quote 0
        • LindonL
          Lindon @d.healey
          last edited by

          @d-healey I will give it a go...

          HISE Development for hire.
          www.channelrobot.com

          Dan KorneffD 1 Reply Last reply Reply Quote 1
          • Dan KorneffD
            Dan Korneff @Lindon
            last edited by

            @lindon Is it possible that the function is being called in a script that initializes before the modulator is defined?

            Dan Korneff - Producer / Mixer / Audio Nerd

            d.healeyD 1 Reply Last reply Reply Quote 0
            • d.healeyD
              d.healey @Dan Korneff
              last edited by

              @dustbro I think if that was the case the error wouldn't be on line in the script containing the namespace.

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

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

              24

              Online

              1.8k

              Users

              12.0k

              Topics

              104.1k

              Posts