markphilpot / gcpeditor

Ground Control Pro Editor
6 stars 0 forks source link

Preset Layout for Bank of 4 Program Access Mode #10

Closed sbmechanics closed 7 years ago

sbmechanics commented 7 years ago

When in Bank of 4 mode (Configuration > Utility > Program Access Mode > Bank of 4), the presets section should be limited to 144 presets, in 26 banks (0-10, A-Z) with four presets each.

markphilpot commented 7 years ago

Hmm good point. I'm assuming this is more tweak the UI for clarity rather than the .syx being ill formatted, since I believe it's an addressing issue only... The preset slots are the same. I'll see if I can tweak the rendering to render the right tabs on change.

sbmechanics commented 7 years ago

Does appear to be a UI tweak only based on which Program Access Mode (10 or 4) is active. .syx is OK.

markphilpot commented 7 years ago

The "right" thing to do here is rip out my bad UI code and build it up with React components that will correctly manage the state change between modes... The gcp.js file would stay intact (thankfully) and this would involve refactoring main.js

sbmechanics commented 7 years ago

Is there a fire-breathing dragon label? UI is aesthetically good - works well with Chrome (no good with MS Edge, but what is, so OK). Drag and drop (for the non-CSV crowd) is likely a higher priority but would hook in.

markphilpot commented 7 years ago

A nice byproduct of moving to React would be that Drag-Drop would actually be easier to implement. It's probably a two birds one stone sort of change. I'll take a shot at this refactor in the next few weeks.

sbmechanics commented 7 years ago

Sounds like a good reason to merge the issues. Thanks.

sbmechanics commented 7 years ago

Attempting temporary fix. First steps: main.js line 327 expanded bankLabels from 0-J to 0-Z main.js line 343 changed from i/10 to i/NUM_PRESETS_PER_BANK

sbmechanics commented 7 years ago

Can render mode of 4 or mode of 10. When mode is changed in config section, unable to re-render presets section without clearing data.

markphilpot commented 7 years ago

@sbmechanics Can you try out the the PR branch above and see if that hits all the edge cases? I think it does based on my testing, but a second opinion would be welcome.

sbmechanics commented 7 years ago

Looks really good, I believe it covers the bases. SYX and CSV files, when in Bank of 4 mode, still have 200 presets, but I believe said approach is correct. If I understand the device correctly, even when using Bank of 4 mode, 200 presets are still "in the device", but the last 56 are inaccessible on the pedal board, by design.