HISE Logo Forum
    • Categories
    • Register
    • Login

    Need help, displaying selected waveform inside FloatingTile

    Scheduled Pinned Locked Moved Solved Scripting
    7 Posts 3 Posters 227 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.
    • M
      Mighty23
      last edited by

      I managed to populate and use the callback of the combo box to choose the waveform of my Waveform Generator1. Now I would like some help on displaying the selected waveform inside the FloatingTile.

      // Synth
      const var WaveformGenerator1 = Synth.getChildSynth("Waveform Generator1");
      // combo box
      const var cmbWaveform1 = Content.getComponent("cmbWaveform1");
      const var cmbWaveform2 = Content.getComponent("cmbWaveform2");
      // audio waveform tile
      const var OSC1Waveform = Content.getComponent("OSC1Waveform");
      const var OSC2Waveform = Content.getComponent("OSC2Waveform");
      
      inline function oncmbWaveform1Control(component, value)
      {
      	WaveformGenerator1.setAttribute(WaveformGenerator1.WaveForm1, value);
      	// ?? OSC1Waveform.set(WaveformGenerator1.WaveForm1, value);
      };
      
      Content.getComponent("cmbWaveform1").setControlCallback(oncmbWaveform1Control);
      
      inline function oncmbWaveform2Control(component, value)
      {
      	WaveformGenerator1.setAttribute(WaveformGenerator1.WaveForm2, value);
      	// ?? OSC2Waveform.set(WaveformGenerator1.WaveForm2, value);
      };
      
      Content.getComponent("cmbWaveform2").setControlCallback(oncmbWaveform2Control);
      
      [
        {
          "type": "ScriptFloatingTile",
          "id": "OSC1Waveform",
          "x": 310.0,
          "y": 110.0,
          "width": 80,
          "height": 80,
          "ContentType": "Waveform",
          "bgColour": 0,
          "itemColour": 4294967295,
          "itemColour2": 2164260863,
          "textColour": 0,
          "Data": "{\n  \"ProcessorId\": \"\",\n  \"Index\": -1,\n  \"FollowWorkspace\": false\n}"
        }
      ]
      

      Free Party, Free Tekno & Free Software too

      LindonL 1 Reply Last reply Reply Quote 0
      • LindonL
        Lindon @Mighty23
        last edited by Lindon

        @Mighty23 - what do you mean "displaying the selected waveform inside the FloatingTile" - do you mean the shape? Sine? Square etc.? If so theres no way to dynamically do this - just use a png for each shape...

        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 Need help, displaying selected waveform inside FloatingTile:

          If so theres no way to dynamically do this - just use a png for each shape...

          You could also draw it in a panel

          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 Lindon

            @d-healey oh hang on I think I know what he means....

            so create a Floating Tile and in the tile data..put the name of your Waveform generator in "Processor Id": ....put it here...

            index = 0 is the first Osc, index = 1 is the 2nd.

            HISE Development for hire.
            www.channelrobot.com

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

              @Lindon said in Need help, displaying selected waveform inside FloatingTile:

              so create a Floating Tile and in the tile data..put the name of your Waveform generator in "Processor Id": ....put it here...

              What floating tile type? I tried a few and it doesn't show up.

              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 waveform

                HISE Development for hire.
                www.channelrobot.com

                1 Reply Last reply Reply Quote 1
                • M
                  Mighty23
                  last edited by

                  Index 1 & Index 0, that solved. Thank you, it's amazing how simple it was and how much time I've wasted. Thank you for getting me to the next step.

                  {
                    "ProcessorId": "Waveform Generator1",
                    "Index": 1,
                    "FollowWorkspace": false
                  }
                  

                  Free Party, Free Tekno & Free Software too

                  1 Reply Last reply Reply Quote 0
                  • M Mighty23 marked this topic as a question on
                  • M Mighty23 has marked this topic as solved on
                  • First post
                    Last post

                  13

                  Online

                  1.8k

                  Users

                  12.0k

                  Topics

                  104.8k

                  Posts