[ADDED] Bulk editing capabilites in Kilowhat

Hello,

After editing the properties for 16 encoders, it would be really nice to be able to select multiple encoders and change a setting on all of the selected encoders. E.g.: select all and change the switch type. Or select 4 and change a color. etc.

Thanks!

1 Like

@qbrd, yep absolutely.
Itā€™s on the to-do list.

Thanks for the patience.

I would say of all the feature requests, at least for me, this would be top of the list.

I discovered last night Iā€™m going to have to go through all my encoders again just to change one valueā€¦ And Iā€™m loving the controller! But wouldnā€™t use the same adjectives to describe programming itā€¦ :wink:

1 Like

Hi @qbrd!

We know, and we even hate it ourselves, so we get the feeling.

A tip that @mike got to make this faster:

Use a JSON editor to edit the properties you want to set for your encoders. Maybe set one encoder as you want it, and the find and replace.

You can the load the modified file to Kilowhat and send it to your device!

@francoytx haha, I actually did a bit of that yesterday. But the JSON file is so big I was having trouble groking itā€¦ (thatā€™s why I was asking if the structure was documented anywhere :wink: )

Basically from what I can gather, each button has basically the same structure? And then depending on what values are set the firmware knows ā€œthis is a knobā€, ā€œthis is a buttonā€? And each switch can have multiple ā€œsectionsā€, e.g.: (From memory) the encoder and pads had a switch stanza, and the encoder and knobs had aā€¦ ā€œknobā€ (it wasnā€™t called that) stanza.

So for the ā€œvelocity to colorā€ option it was something like flipping the 0 to 1 in allow_velocity_to_color: 0,ā€¦ (I know thatā€™s not exactly the attribute, for the sake of discussion) but if I just did a global perl -pei 's/allow_velocity_to_color: 0/allow_velocity_to_color: 1/g QBRDS1.ytx` that would do it for every buttonā€¦ so wouldnā€™t that change the setting on the encoders as well?

Anyway, you guys rock and have been super responsive (I didnā€™t expect replies over the weekend!) so no big deal, weā€™ll work out the kinks! :smiley:

@scanner_darkly suggested using Prettify JSON, which I think lets you edit, I didnā€™t know that one but Iā€™ve been using this site to view the JSON structure and find the fields that I need to edit, then I find and replace only for the components I want.

I use VSCode and the Prettify JSON plugin.

Works alright, but I only have so much vertical real estate! :smiley:

Oh it was you who used Prettify JSON and mentioned it in a previous post! ahaha sorry for that

Please be patient and weā€™ll come up with something to address this soon.

My buddy helped me come up with a bit of JavaScript to edit the JSON. It uses traverse which walks the tree recursively. We got lucky because only the encoders have a switch_config. It SEEMS like it did what I wantedā€¦ :slight_smile:

const fs = require('fs')
const traverse = require('traverse')

const inputFile = 'QBRDS1.ytx'
const outputFile = 'QBRDS1-out.ytx'

const qbrds1 = JSON.parse(fs.readFileSync(inputFile).toString())

traverse(qbrds1).forEach(function (value) {
  if (this.key === 'switch_config') {
    value.channel = 1
  }
})

fs.writeFileSync(outputFile, JSON.stringify(qbrds1, null, 2))
3 Likes

This feature is now available on kilowhat!

With CTRL/CMD you can select multiple non-adjacent cards, and with SHIFT you can select adjacent cards.

Give it a try!

3 Likes

Thanks, this feature is life changing!

Can be displayed a symbol ā€˜*ā€™ in the fields where at least one card has a different value would make it possible to visualize more simply the general configuration without having to click on each card to verify that all the fields are correct.

2 Likes

Hey @Hiys
Good idea, added to the ā€œto-do listā€

1 Like