Jump to content

SCRIPTER: MIDI pitch-name slider instead of drop-down


t-ride

Recommended Posts

Hey guys :D, is there a way to view MIDI pitch-names in slider format rather than drop-down menu? The slider format only shows you the midi-numbers and not the pitch-names. This makes it hard to use it for me. Does anyone know how to make a slider of MIDI pitch-names?

 

This is how it looks for me as of now: 

1239114295_ScreenShot2017-07-14at14_05_10.png.3a1320a71313d5fd865f94b4c97fcefc.png

Pitch Number works great because I can increment values just by pressing the up/down arrow keys but it is very hard to know which note that I am looking at.

On the other hand, Pitch Name is great because I can see which note I am "using" but I have to click and open up the menu every time I want to change the note.

Link to comment
Share on other sites

Pretty much the same thing, but this time updating a label with the note name...

 

PluginParameters = [
    {
        /* an empty label */
        name: "Pitch Name:"
    ,   type: "text"
    }
,   {
        /* slider for selecting pitch */
        name: "Pitch Number"
    ,   type: "lin"
        /* middle C */
    ,   defaultValue: 60
        /* Lowest note: C-2 */
    ,   minValue: 0
        /* Highest note: G8 */
    ,   maxValue: 127
    ,   numberOfSteps: 127
    }
]

function ParameterChanged (index, value) {
    /* the value reported is the position of the slider */
    /* this corresponds to an index in the list of note names */
    var noteName = MIDI._noteNames[value]
    /* access the first label and modify its 'name' property */
    PluginParameters[0].name = "Pitch Name: " + noteName
    /* refresh the GUI */
    UpdatePluginParameters()
}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...