New Tool (2.8): Guru

Cool!

Yup, add type=“cc” for the parameter.

See the link in the first post, how to edit.

  
Parameter {  
 number = 55,  
 type = "cc"  
}  
  

Yo!

New version; When using it I discovered that midi channel actually was not implemented for sysex, but now it is. I got myself a Juno, so now I’m controlling two synths at once and it works great.

This had to force a change in the synth definitions. Instead of sysex_message_start you specify sysex_message_template. sysex_message_template contains the entire sysex message, and where the number, value and midi channel is to be place you enter “nn” for parameter number, “vv” for value and “cc” for channel, where 0 = midi channel 0 (won’t work with all synths, not the DW for example… but that is on the todo list).

So for example for the JX-8P:

sysex_message_start = {0x41, 0x36, 0x00, 0x21, 0x20, 0x01},  

should now be:

sysex_message_template = {0xF0, 0x41, 0x36, "cc", 0x21, 0x20, 0x01, "nn", "vv", 0xF7},  

This is updated in the manual as well.

Now I think I will take a shot at saving everything “with” the song.

Later
CB

I am working on a DX7 definition.

At a certain point adding parameters I hit this error…

std::logic_error: ‘ViewBuilder: expecting a ‘height > 0’ for every view.’
stack traceback:
[C]: in function ‘space’
.\class_section.lua:125: in function ‘create_ui’
.\class_synthdefinition.lua:260: in function ‘create_ui’
.\class_synthdefinition.lua:105: in function ‘launch’
.\class_guru.lua:119: in function ‘launch_synth’
.\class_guru.lua:76: in function <.\class_guru.lua:75>

I suppose it is out of space to add more parameters and I should add a group. But I just wanted to let you know.\

edit: to be more specific. It returns this error after adding the 20th parameter in a group. I will add a different group for the detuning of the operators.

Could you also help me with the Function parameters, I’ve attached a screenshot. It tells me that g=2 for function parameters. How should I set this up in the sysex_message_template for the Function section?

Thanks!

Yeah, I guess the group becomes higher than the available height. Have you tried increasing the height of the win:

SynthDefinition{  
 content_height = 800  
}  

Haha, shit, don’t you just love midi specs?

Hmm, don’t know, lets try to decipher this together…

0gggggpp

This is a byte. A byte is made up of 8 bits. A bit can be 0 or 1. Together they form number. Form right to left each bit:s value is 1 2 4 8 16 32 64 128, and the number is the sum of all bits that are 1. Example;

  
128 64 32 16 8 4 2 1   
 0 0 0 0 0 0 0 1 = 1  
  
128 64 32 16 8 4 2 1   
 0 0 0 0 0 0 1 0 = 2  
  
128 64 32 16 8 4 2 1   
 0 1 0 0 0 0 0 0 = 64  
  
128 64 32 16 8 4 2 1   
 0 1 0 0 0 0 0 1 = 65   
  

So, the pp part of the byte can be 0, 1, 2 or 3.
The ggggg part can be 0, 4, 8, 12, 16, 20, up to 124.
Or maybe they mean that ggggg is a binary number alone…
The spec says g = 2 = function section.
So, I see two options, you send 2, or you send 8, for function parameter

So try

sysex_message_template = {0xF0, 0x43, 0x00, 0x02, "nn", "vv", 0xF7},  

or

sysex_message_template = {0xF0, 0x43, 0x00, 0x08, "nn", "vv", 0xF7},  

Let me know how it turns out!

CB

Thanks, I did add the 800 content height, but it didn’t matter.

I will try to send g=2 for functions, this makes the most sense and i’ll let you know.

I managed to add Section_heigth = 800…I think I got that from some example def? (0.16 version) ;()
It is bigger now, and I can add more rows.

Would it be possible to replace the sliders by valueboxes “renoise.Views.ValueBox”?
That way I would be able to fit all the parameters in 1 section.

I was also thinking if there could be a graphical representation of envelopes, but I only found the XY pad in viewbuilder.

Thanks

Hmm, I want the sliders. But maybe we could invent some way(s) of customizing things a bit more with settings.

I have gui_type=“dropdown” for the Parameters. I could add “valuebox”.

But then the problem is now every parameter is on a separate line, and the title is to to left, which makes it work and look nice. I’m not sure how to handle the layout if there is to be more on each line…

CB

Yeah ofcourse the sliders are awesome, I think it would not let you layout the text for the valueboxers in the same way.
I noticed there is a mini slider as well.

I will just cramp it all in the sections now, and we’ll see where to go after that. :D

I run into some other bitpicking…

It’s possible to turn an operator on or off by sysex, it is done through the same parameter which is 155.

The manual states that last 6 bits are used for this.

So I’ve got this byte of data, 00 d d d d d d. First D (0x32) is for operator 1, second D (0x16) is for operator 2 and so on. Every bit changes an operator to on or off.

Could you enlighten me on how I should change this in the Sysex_message_template, because I think it will reset the setting on operator 5 if I change it in operator 6, because it is the same parameter.

 Parameter {  
 id = "op6_mute",  
 name = "Operator On",  
 sysex_message_template = {0xF0, 0x41, 0x36, "cc", 0x21, 0x20, 0x01, "nn", "vv", 0xF7},  
 number = 155,  
 items = {"On","Off"},  
 },   

Ok, so you need o send 48 (32+16) to set op 1 and 2 to on (and the others off at the same time)?

If so, the only solution that works right now, though not ideal, is a dropdown, with values for all possible states.

But ideally I should invent something for this. One option that comes to mind: if 2 or more params have the same number, the sum of the values is sent. That’s simple and pretty neat.

That’s correct.

I will leave it out for now, selecting one from such a menu is not very clear.

All the operator on/off states are on the same parameter…see screenshot…

New version V0.19.

Added value_callback functions to Parameter. To do super special handling of the value before sending as midi.

See the last chapter in the doc:

CreateGuruSynthDefinition

This is for solving fluences problem and other stuff. Maybe I will write a reply with code for this…

CB

But is just realized one thing:

The value for switches and dropdowns is 1,2,3 internally and saved in the patch documents. It’s not until they are sent via midi that the get turned in to the value as specified by item_values.
16,32,64 or whatever.

Well, it’s now clear that this sucks, because then value_callback cannot solve your problem since you are dealing with switches…

So, I need to change this, no need to upgrade yet…

Ok this is fixed now. Same version and file, but Parameter.value is now actual value.

So fluence, this is untested and not correct, but something like this is what you’re after:

  
function operator_callback(parameter)  
 local synth_definition = parameter.synth_definition  
 return synth_definition.parameters["op6_mute"].value + synth_definition.parameters["op5_mute"].value  
 --32+16 is sent for both parameters if both are set to off  
end  
  
Parameter {  
 id = "op6_mute",  
 name = "Operator On",  
 sysex_message_template = {0xF0, 0x43, 0x00, 0x00, "nn", "vv", 0xF7},  
 number = 155,  
 items = {"On","Off"},  
 item_values {0,32},  
 value_callback = operator_callback  
},  
Parameter {  
 id = "op5_mute",  
 name = "Operator On",  
 sysex_message_template = {0xF0, 0x43, 0x00, 0x00, "nn", "vv", 0xF7},  
 number = 155,  
 items = {"On","Off"},  
 item_values {0,16},  
 value_callback = operator_callback  
},  
  

You are awesome, I will give this a shot. I was never closer to editing my DX7 flawlessly without an ATARI! :D
Thanks!

This looks like a very cool tool! I’ll have to give it a go with my DX9 and Juno106.

I have made an experimental super-untested version.

In this version: All the synth defs you launch, and all the changes you make to the patches/parameters are saved with the song, so when you open the song again, the synth defs with temporary patches are restored as you left them (hopefully). Kinda like with VSTI:s…

Right now (subject to change), Guru decides what synths to save by going trough the instruments in the song. All synth defs which midi channel matches an instrument in the song, and the instrument has a midi device selected, are saved with the song, the others are considered not used.

Use at your own risk!

com.cornbeast.Guru_V0.20.xrnx

Now this is getting useful! Also the code is getting a bit cluttry :slight_smile:

Btw, good to know: when you close a Guru synth def window the synth and the patch are still there, it’s only the dialog that isn’t shown, when you open that synth def again from the menu it is displayed again.

CB

Ah damn this requires programming knowledge and skills, something I just have no knack or time for. I’m out. I’ll keep an eye out if anyone does a patch for a DX9 or Juno106. :confused:

The programming is very simple. Just copy stuff and change parameter numbers. Not much harder than mapping the Instrument MIDI Control device, IMHO. Keeping track of number of brackets and commas is probably the trickiest part, or perhaps reading the synth manual to figure out which parameter numbers to use.