Json file question

Hi there,

I’ve been editing my json file. It works fine following pianoleo’s tutorial but I would like to know if somebody managed to create shortcuts for the following:

  • artificial harmonics in 4th
  • natural harmonics
  • piano sus pedal
  • suppress from playback
  • setting opacity to zero

I’m not sure if it’s possible to do it, but if you found a way:
Help!
Cheers,
Québ

You certainly can’t set a key command directly for changing the opacity of an item, because Dorico can’t access the data inside the colour picker directly. For some of the others, I wonder whether you might use a macro recording program, e.g. to automate Shift+P ped Return for the sustain pedal.

For activating the ‘Suppress playback’ property, try adding an entry for the following:

UI.InvokePropertyChangeValue?Type=kEventMuted&Value=true

This will only set the property, of course; it won’t unset it again.

To do it indirectly, setting the opacity to 0 could be done using Keyboard Maestro mouse movements and image recognition. In this case I’d suggest using the image of the “Opacity” text in the Colors box to enable the mouse to have a point from which it can go to and then drag the slider back to 0.

What tutorial is that?

It’s a thread in this forum if you look fro json it’s a post by pianoleo. I think he changed is username back to its real name Leo Nicholson, I believe

I don’t think my username’s changed…
The post was probably this one, but I’m sure a search for JSON will reveal other similar posts.

Well here’s the guy!:grin:

Actually, it is possible to set opacity via Macro. It is true that you can’t control the settings in the colour picker – however, you can simply emulate the ultimate result from all those settings, which is a single combined colour value. Here’s the command string for basic opacity:

UI.InvokePropertyChangeValue?Type=kEventColour&Value=#00000000

Update: you can use the string above directly in the json file and it seems to work properly.

{
	"UI.InvokePropertyChangeValue?Type=kEventColour&Value=#00000000" : [ "Alt+Shift+C" ]
},

I feel a bit stupid for never trying this before…