midi note from midi keyboard modulator

Home Forums General Using Ctrlr midi note from midi keyboard modulator

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #36289
    sm_jamieson
    Participant
      • Topics: 8
      • Replies: 6
      • Total: 14

      I am trying to extract the midi note from the midi keyboard component. The modulator value is the velocity (I can understand why, cf. continuous controllers). So in the modulator change Lua function I tried to extract the midi message from the modulator. Several posts suggest modulator:getMidiMessage(), but this does not work, it produces the error:
      Name: getMidiMessage
      Error message: No matching overload found, candidates:
      CtrlrMidiMessage* getMidiMessage(CtrlrModulator&,custom [enum CtrlrMIDIDeviceType])
      But I can also not find any Lua bindings for this enum. Is it possible to use mod:getMidiMessage() from Lua ?

      If not is there any other way to extract the midi note when the midi keyboard component keys are pressed ?

      #36513
      atom
      Keymaster
        • Topics: 159
        • Replies: 2945
        • Total: 3104
        • ★★★★★

        You should pass 0, the argument is for specyfing what midi message to get from the modulator, this has changes there are now 2 midi messages for each modulator (one for midi in/out and one for midi controller)

        so:
        `m = mod:getMidiMessage(0)
        console (string.format (“midi %d/%d”, m:getNumber(), m:getValue()))`

        Luabind doesn’t handle default values for parameters so i can’t make it transparent.

      Viewing 2 posts - 1 through 2 (of 2 total)
      • The forum ‘Using Ctrlr’ is closed to new topics and replies.
      There is currently 0 users and 74 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