Forum
    • Categories
    • Register
    • Login
    1. Home
    2. Lindon
    3. Posts
    • Profile
    • Following 0
    • Followers 10
    • Topics 603
    • Posts 6,554
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: Multiple Styles for Controls?

      @dannytaurus said in Multiple Styles for Controls?:

      @Lindon You could simplify the control text a bit:

      // Simplify this:
      var ffText = obj.text;
      var fftextStart = ffText.indexOf(":");
      ffText = ffText.substring(fftextStart+1,ffText.length);
      g.drawAlignedText(ffText, [a[0],a[1],a[2],a[3]], "centred");
      
      // to this:
      g.drawAlignedText(ojb.text.split(":")[1], [a[0],a[1],a[2],a[3]], "centred");
      

      This assumes you'll always have the ":" in the obj.text. If not, the short version blows up.

      Sadly, no the LAF processing is considerably more sophisticated than just dealing with styling buttons dependent upon some value in the text attribute, so sometimes its there, sometimes not..

      posted in Scripting
      LindonL
      Lindon
    • RE: Multiple Styles for Controls?

      @dannytaurus said in Multiple Styles for Controls?:

      @Lindon Nice.

      Incidentally, radio group 51? What the hell are you building?! 😂

      yes its very very big...

      posted in Scripting
      LindonL
      Lindon
    • RE: Multiple Styles for Controls?

      @dannytaurus said in Multiple Styles for Controls?:

      Create multiple LAFs, one for each control style, then apply them to different controls based on their ID. If you stick to a convention of IDs it's very quick and easy.

      ..this works but I do something a bit more flexible, for buttons at least - I use the text area to define the style...

      so the json for a button I want to have the "Flat style" looks like this:

      [
        {
          "type": "ScriptButton",
          "id": "PadEditSelector",
          "x": 170.0,
          "y": 30.0,
          "parentComponent": "EditPanel",
          "radioGroup": 51.0,
          "text": "FLAT:Edit Pad"
        }
      ]
      

      ..and in the interface looks like this

      11714093-c128-42ef-b199-d85704a925f5-image.png

      There's a giant loop thru all components in theLAF.js and the relevant bit is:

      
      	
      const var allComponents = Content.getAllComponents("");	
      
      
      for (c in allComponents)
      {	
      
      	if(c.get("text").contains("FLAT"))
      	{
      			c.setLocalLookAndFeel(flatButtonLAF);
      			continue;
      	};
      
      }	
      

      and the LAF itself looks like this:

      const var flatButtonLAF = Content.createLocalLookAndFeel();
      
      flatButtonLAF.registerFunction("drawToggleButton", function(g, obj)
      {  
      	var a = obj.area;
      	g.setFont(SkinSpace.skin.stdFont, 16);
      	// get the text out..
      	var ffText = obj.text;
      	var fftextStart = ffText.indexOf(":");
      	ffText = ffText.substring(fftextStart+1,ffText.length);
      	
      	//Console.print("drawing flat:" + ffText);
      	var fillColour = SkinSpace.skin.highlight;
      	var TextOnColour = SkinSpace.skin.outline;
      	var hoverOnColour;
      	
      	//var cThisColour;
      	if(obj.value)
      	{
      		g.setColour(fillColour);
      		g.fillRoundedRectangle(a, 0);
      		g.setColour(SkinSpace.skin.highlightContrast);
      	}else{
      		g.setColour(SkinSpace.skin.stdText);
      	}
      	
      	if(obj.over)
      	{
      		g.setColour(SkinSpace.skin.Over);
      		g.fillRoundedRectangle(a, 0);	
      		g.setColour(SkinSpace.skin.highlightContrast);
      	};
      	//g.setColour(SkinSpace.skin.stdText);
      	g.drawAlignedText(ffText, [a[0],a[1],a[2],a[3]], "centred");
      
      });
      

      ..it uses a skin file to set the colours...

      posted in Scripting
      LindonL
      Lindon
    • RE: Beginner at Hise Plugins and Mackie MCU Protocol

      @JimmyJ well this seems to be the relevant bit:

      Rec 1 C-1 Dec: 0, hex: 0
      Rec 2 C#-1 Dec: 1, hex: 1
      Rec 3 D-1 Dec: 2, hex: 2
      Rec 4 D#-1 Dec: 3, hex: 3
      Rec 5 E-1 Dec: 4, hex: 4
      Rec 6 F-1 Dec: 5, hex: 5
      Rec 7 F#-1 Dec: 6, hex: 6
      Rec 8 G-1 Dec: 7, hex: 7

      so there are 8 record commands, all on channel 1, with velocity 127 = on 0 = 0ff

      So this (if this is correct) would be trivial in HISE...

      posted in General Questions
      LindonL
      Lindon
    • RE: ADMIN Button??

      ..oh I so dont need that button......

      posted in General Questions
      LindonL
      Lindon
    • RE: itemText instead of value

      @resonant well my solution is to LAF the Combo box such that the selected value display is always blank, and then just put it over the top of thelabel, so then labels value is showing you the selected text...

      posted in General Questions
      LindonL
      Lindon
    • RE: Triggering Midi Player when pressing notes

      @lijas90

      you've obtained the player as a MidiProcessor wiht this:

      const var midi1 = Synth.getMidiProcessor("midi1");
      

      but you need a MIDIPlayer object to start and stop it, so you need to do this:

      	if (c.contains(n))
      	    midi1.asMidiPlayer().play(0);
      
      posted in General Questions
      LindonL
      Lindon
    • RE: Multichannel state of things

      @Christoph-Hart said in Multichannel state of things:

      It wasn't exactly an afternoon, more like 18 months...

      Thank God they decided not to go with me....

      posted in General Questions
      LindonL
      Lindon
    • RE: itemText instead of value

      @resonant theres a number of posts about this backwards compatability of combobox issues in the forum , try searching, but essentially:

      HiseSnippet 964.3ocsV0saaaCElx1bqQcEnEnO.B9lorEDXYmebVwv7hS7lwZRMlyB1UqflhJhHRjBTzownnuq8QnuAcGJIaI633VXr4KLv42uOd34bnFojTVZpTgrruZVBCY8c3wyD5v9gDt.M7LPO90jIrnSk2iNcVBIMk4irrp+aF6V6z.k86S+xojHhfxJUgPWK4T1q4wbco1Q89CdTz.hO6JdbEuOn2PpTzWFImBboNtEJgPukbC6RhwsZXzuSRCQV+.tcvDZ6fi6z06DuSN9fS77Nr6jCZ0l5e3Ic5bTG+f1cIG0EB5aN2mqkpwZhlkhrZbpze13P46D4.bMOkOIhYD7PiAjyUOPF4aNhFsn9g7H+QyKRoHHKiJKY0yKYuDeA2muPeYo64YFbJinZAzp1xzq9RzyqJ8ZUgdqgRVUnTibJ8B7XphmnKsX3ySwCEZlJf.2SUoRtunZSqg6KAOD58iI2xFn.gEQ3dTqV64.+s6qrsg6pTsycDkSVygmyO6LOxaX59x3Do.DbalatoIFatHhKXNASETMWJbjhbqlHUxHW57v1CxbzT1t1u2dGvXpLhsehhaxmuzIUFyzgbwMNuiqCczgrb2+olN+XQfux9C.falQ6mZTmgbeRTzDncycEFkw50waHcSjvDwloddtL331TytW2bOmE9YH0PMK9JPu6t.Py8lFRD2v7c23YXA9O1wXUBBYqB8uTpYuQ3lQR6OX6rpoff0ZqHWQL0ZMaFnUaJPWwz3ILU0RjwQnoc4IA7iOITcPklWZp3nTLTv0uIgIdrwWTQ8zL0TvJvUc1LyyJlYxtHPbXx3I4q97PYD13wUgbkuy0Yhn+Z3YDMYdpfrBHkvTZt4PXcF6NX8W933N3yXo2pkIvlrEWivBpuHv2uXC4GS5Mqbc4k8RI2wFJFoXv8OfVMSC1CXXEr91brddAVyaPxf6o3E8KUPzQUEw+oWLArgspCBq.dcNzICm4uGOfqf8BYnaOlA2PETwtBsrgWAdvBKXUozeZDQu79SyqLEFfVokVZYVLIR45YUeEZ0kpM95Vpt4c9esz8E3QbMMb87s1Z3Kz57+MeKdh5Y3yCBXTcIYafG72a78n+anxeJmpgU0WPzJto84xowigm3oLfIBAKxLtaUyLXlK2xHapLiYB+LgOC+JL5YjsJL5M2HJlPUx2RyGmMOH9jLM.mDYe7vN3KLxNKliKq+wv6yukRWNUOHv1aafc11.OXaC7vsMvi11.OdaCr6WNPymO8qS0x37wID5hQmmsy0x5bAA5Fy5bQ+KrOkBoB
      
      posted in General Questions
      LindonL
      Lindon
    • RE: Globals, arrays and objects....

      @Lindon nope that aint it...something else is broken...

      and its a line in my code..so that is the solution... just need to refer to Globals explicitly

      posted in General Questions
      LindonL
      Lindon
    • RE: Globals, arrays and objects....

      @Lindon well............

      I was sure I didn't need to refer to a Global variable in this way but apparently you do:

      Globals.padProfiles = [{
      "PadNumber": i+1,
      "TriggerNote": 36,
      "ChokeGroup": 0,
      "ChokeCC": 0,
      "ChokeTime":1200,
      "MIDIPlayerTrigger": -1,
      "PadNoteOffChokes" : true	
      }]; 
      Globals.padProfiles[0].TriggerNote = 60;
      
      posted in General Questions
      LindonL
      Lindon
    • RE: can we make delay node in script fx?

      @NISHI_MUSIC split the audio into dry and wet using the relevant containers....then add a gain to each and put a xfer over the the top to get dry wet mix...

      posted in General Questions
      LindonL
      Lindon
    • RE: Globals, arrays and objects....

      @d-healey in the first example line 14 is:

      padProfiles[0].TriggerNote = 60;
      

      in the second example line 6 is:

      Console.print(padProfiles[0].Note);
      
      posted in General Questions
      LindonL
      Lindon
    • RE: Globals, arrays and objects....

      @Lindon and this:

      
      Globals.padProfiles = [{"Note" :36}]; 
      Console.print(padProfiles[0].Note);
      

      tells me:

      Interface:! Line 6, column 34: API call with undefined parameter 0
      Interface:! Line 6, column 34: API call with undefined parameter 0

      posted in General Questions
      LindonL
      Lindon
    • Globals, arrays and objects....

      Er what am I doing wrong here?

      
      
      Globals.padProfiles = [{
      "PadNumber": i+1,
      "TriggerNote": 36,
      "ChokeGroup": 0,
      "ChokeCC": 0,
      "ChokeTime":1200,
      "MIDIPlayerTrigger": -1,
      "PadNoteOffChokes" : true	
      }]; 
      padProfiles[0].TriggerNote = 60;
      

      On start up this tells me..

      Interface:! Line 14, column 28: Cannot assign to this expression!
      Master Chain:! Line 14, column 28: Cannot assign to this expression!

      Have I never understood the limitation of the Globals namespace? (possible as I hardly ever use it..)

      posted in General Questions
      LindonL
      Lindon
    • RE: Splitting incoming signal

      @pcs800 well 95 samples would make hardly any difference at all... whats the measured latency of your plugin?

      oh hang on youve already said:

      95.9ms, that's great. But how do I get the plugin to report that to the daw?

      Go read what @ustk said above.....

      posted in General Questions
      LindonL
      Lindon
    • RE: Using Bang and Blend nodes

      @HaizalD3 bot.

      posted in ScriptNode
      LindonL
      Lindon
    • RE: HELP! A lot of errors

      @13murderer said in HELP! A lot of errors:

      @d-healey no im not

      then start right there, down load the develop branch and build that.

      posted in General Questions
      LindonL
      Lindon
    • RE: Need Help Exporting Mac Version of a VST3

      @Orvillain said in Need Help Exporting Mac Version of a VST3:

      Use projucer to create an Xcode project.

      I think they mean they dont have a mac....

      @duma - you will need a mac or a virtual machine that runs a MacOS...

      posted in General Questions
      LindonL
      Lindon