robbielyman / seamstress

seamstress is an art engine
GNU General Public License v3.0
129 stars 12 forks source link

feat: add MIDI map editing #63

Closed dndrks closed 1 year ago

dndrks commented 1 year ago

(hihiiii! a lot of small tweaks among the large tweaks, will try to cover everything but please lmk if anything remains opaque!!)

this PR adds:

MIDI map UI

while in mapping mode, press ENTER on any mapped parameter to open the mapping for editing:

image

here, you can manually modify:

key nav:

allow_pmap flag

by default, every action-based parameter (except text) is MIDI mappable. this can be changed via the allow_pmap flag, eg:

params:add {
    type = "number",
    id = "unmappable_number",
    name = "you cannot map this!",
    min = 0,
    max = 10,
    default = 0,
    allow_pmap = false,
  }

or

params:add_number('unmappable_number', 'you cannot map this!', 0, 10, 0, nil, false)

this flag prohibits mapping in both the map mode:

image

and the mapping editor, if TAB'd over:

image

MIDI echo

as part of the MIDI mapping editor, you can specify whether the parameter's current value should push back to the mapped device. this is useful for devices like the MIDI Fighter Twister which have CC-addressable LED's on each encoder. when a PMAP is loaded, any echo-enabled parameter will redraw to the mapped device.

support binary-type parameters in UX/UI

previously, the binary parameter type wouldn't register in the UI and keypresses wouldn't register state changes. this has been addressed (w/ the same qt lil' squares as norns)!

image

hello_pmaps.lua

it's in there!

image
p3r7 commented 1 year ago

that's a big one!