modulatorValue vs modulatorMappedValue

Home Forums General Using Ctrlr modulatorValue vs modulatorMappedValue

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #35594
    m.tarenskeen
    Participant
    • Topics: 30
    • Replies: 113
    • Total: 143
    • ★★

    Hi,

    In http://ctrlr.org/expressions-in-ctrlr-2/

    I read below 3.Expression functions and constants:

    modulatorValue : The current linear value of the modulator, this is the index of the array of values, it’s always positive.

    modulatorMappedValue : The current mapped value in case of components that have mappings. This might be negative

    How should I read this? I’m using negative modulatorValues all the time and it works fine. And on the very same page I can read below 2.Expressions overview how to convert such negative modulatorValues to valid midiValues.

    • This topic was modified 7 years, 5 months ago by m.tarenskeen.
    • This topic was modified 7 years, 5 months ago by m.tarenskeen.
    #35604
    atom
    Keymaster
    • Topics: 159
    • Replies: 2945
    • Total: 3104
    • ★★★★★

    All midi is always positive (there is no such thing as negative values in MIDI, you can simulate them but this depends on the manufacturers implementation, it never was part of the MIDI standard)

    So you need to map negative values to positive ones somehow. For example:

    – you want to send a controller message that controls stereo pan, the range would be -64 +63
    – in the midi world the values of a CC message will be 0 – 127
    – you need to map 0 – 127 > -64 – +63
    – so the modulator value is for example 23 but the mapped value is -64 + 23 = -41

    Very often both those values will be the same if no mapping occurs in the modulator.

    #35605
    dasfaker
    Keymaster
    • Topics: 80
    • Replies: 793
    • Total: 873
    • ★★★

    Use modulatorValue when the list of values is linear (0,1,2,3,4,5…)

    Use modulatorMapped Value when the list of values in not linear (Env Attack = 2, Env Decay = 5, Env Sustain = 20…)

    There are to kind of sliders, normal and fixed. Fixed ones have a field to store a linear or non linear list of values.

    In a normal slider you can set negative values in fields minimum and maximum value (for instance, your panorama knob could be -64 +63), but if you look at the midi monitor, the minimum midi value sent is 0.

    #35606
    dasfaker
    Keymaster
    • Topics: 80
    • Replies: 793
    • Total: 873
    • ★★★

    A bit late

    #35609
    m.tarenskeen
    Participant
    • Topics: 30
    • Replies: 113
    • Total: 143
    • ★★

    Aha I didn’t know about these fixed sliders. I will try that. it’s exactly what I was looking for I think.

    #72142
    loziniak
    Participant
    • Topics: 0
    • Replies: 3
    • Total: 3


    – you need to map 0 – 127 > -64 – +63
    ….

    So basically modulatorMappedValue is modulatorValue with Expression applied, yes? If not, where exactly the mapping is done? Or maybe modulatorMappedValue is valid only in uiFixedSlider?

    #72156
    human fly
    Participant
    • Topics: 124
    • Replies: 1070
    • Total: 1194
    • ★★★★

    yes i think with expression applied.
    or if you have a combo list sending specific values in
    non-consecutive order that relate to midi values.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘Using Ctrlr’ is closed to new topics and replies.
There is currently 0 users and 40 guests online
No users are currently active
Forum Statistics
Threads: 2,495, Posts: 17,374, Members: 77,605
Most users ever online was 12 on January 22, 2019 3:47 pm
Ctrlr