Layering Samples



  • @Lindon Yes it is. It's compiled OK. How should I go about getting some actual values inside of the ComboBox? As it's empty now



  • @D-Williams23 look at the api for a combobox - there you will see "set"

    so you can say

    myComboBox.set("Attribute name", value);

    look at the json for comboboxes and you will see:

    {
    "type": "ScriptComboBox",
    "id": "OscilatorShapeA1",
    "x": -6.0,
    "y": -3.0,
    "max": 9,
    "parentComponent": "HolderPanel1",
    "width": 94.0,
    "height": 24.0,
    "itemColour2": "3355443",
    "textColour": "4290756543",
    "itemColour": "3355443",
    "bgColour": "16777215",
    "items": "Sine\nTriangle\nSaw\nSquare\nNoise\nTriangle2\nSquare2\nTrapezoid1\nTrapezoid2\n",
    "fontSize": 12.0
    }

    so there's an attribute called "items", which contains a string, and the string is separated by newline characters ("\n") - so build a string with the values you want separated by newline characters and apply it to your combo box using set.



  • @Lindon That's cool! Gonna be using this a lot. Alright so, Now that I have these items inside of the ComboBox, how do i get that 2nd list to display?



  • @D-Williams23 what second list ?

    if you mean you've used this to get a combo box with a list of categories,(lets call it categoryCombo) then you just repeat the exercise for the second list building a string based upon the value selected in categoryCombo



  • @Lindon Alright I understand exactly what you mean, but I just don't know how to write it in the Editor Lol. I'm still learning that part but I do understand the "why". Could you give me an example of this? I have both lists filled. I want to use this method for switching SampleMaps & also Switching the different Lfo Destinations.



  • @D-Williams23 said in Layering Samples:

    @Lindon Alright I understand exactly what you mean, but I just don't know how to write it in the Editor Lol. I'm still learning that part but I do understand the "why". Could you give me an example of this? I have both lists filled. I want to use this method for switching SampleMaps & also Switching the different Lfo Destinations.

    the old post here on the forum is an example of this.



  • @Lindon Okay. Now that we have all of that. I think the last thing is that I want to separate the Categories of SampleMaps into Instrument Types. But the Samples I have recorded and mapped are all in Alphabetical Order. So as of now if I click a Bell name, it will play a Flute.



  • @D-Williams23 then re-oredr your list - your in charge.



  • @Lindon Right So I reordered the list . So the SampleMapsList order is ABCDE. I want A & D to get selected under the 1st Category so I have those names in the ComboBox. But when I select the "D" in the ComboBox it selects "B" from the SampleMaps. How do I reorder that?



  • @D-Williams23 post a snippet


Log in to reply
 

9
Online

703
Users

2.8k
Topics

23.8k
Posts