Home › Forums › General › Using Ctrlr › Korg Prophecy sysex
- This topic has 15 replies, 3 voices, and was last updated 11 years, 1 month ago by ed_f.
-
AuthorPosts
-
February 27, 2013 at 2:36 pm #6719
Hello
I’m working on a panel for the Prophecy.
I am a beginner with Ctrlr, I have stumbled across a couple of issues that have managed to sort with the help of this forum, but right now i can’t really seem to find a solution for my current problem.
In the Prophecy there’s a KeyTracking parameter that has -99 and +99 as the lowest and highest values respectively. The corresponding sysex messages I get in the midi monitor from the prophecy for the respective messages are:
F0 42 30 41 41 01 6A 00 1D 01 F7 [for -99]
F0 42 30 41 41 01 6A 00 63 00 F7 [for +99]
Given this I have created a uiSlider, set to SySex under “MIDI message type”, with the following sysex message
F0 42 30 41 41 01 6A 00 LS MS F7
Have set “Maximum value the modulator can have” to 199
Have set “Minimum value the modulator can have” to 0
Have set “Minimum value” to -99
Have set “Maximum value” to +99
.If i have the uiSlider at +99 and drag it down to 0 all seems fine, i see the values descending from +99 to 0 on both Ctrlr and the Prophecy, but once I try to drag it below 0, in Ctrlr everything works fines and i see the values descending to -99 but in the Prophecy nothing happens, it stays at 0 whatever minus value is set in the slider. If I get back to 0 and go above it, then the Prophecy starts recognising the values again.
In the MIDI monitor I have noticed that if i turn the knob in the Prophecy from 0 to -99 I get the messages
F0 42 30 41 41 01 6A 00 00 00 F7 [0]
F0 42 30 41 41 01 6A 00 7E 01 F7 [-1]
F0 42 30 41 41 01 6A 00 7D 01 F7 [-2]
F0 42 30 41 41 01 6A 00 7C 01 F7 [-3]
…
F0 42 30 41 41 01 6A 00 1D 01 F7 [-99]while in Ctrlr if i turn the uiSlider down from 0 to -99 i get
F0 42 30 41 41 01 6A 00 00 00 F7 [0]
F0 42 30 41 41 01 6A 00 7E FF F7 [-1]
F0 42 30 41 41 01 6A 00 7D FF F7 [-2]
F0 42 30 41 41 01 6A 00 7C FF F7 [-3]
…
F0 42 30 41 41 01 6A 00 1D FF F7 [-99].
I have also tried to
set “Maximum value the modulator can have” to +99
and
set “Minimum value the modulator can have” to -99
and Ctrlr displays exactly the same values in the Monitor./end of report
Would anyone be so kind to drop me a line on whatever i may be doing wrong?
Thanks in advance for any given attention.
February 27, 2013 at 4:16 pm #6720You need to find out how Korg encodes negative values in SysEx messages, it’s not in the MIDI specs so every manufacturer/device does it differently, it’s usually some bit set or something is added/subtracted from the value so it always is positive. Find out how it’s done.
There is no standard way to send/receive NEGATIVE values in MIDI.
From what i can deduce just by looking at the HEX message for -99, it’s possiby a simple subtraction, for -99 you do: 127 – 99 = 29 [1D] and set the first bit of the MS part to 1 (indicating it’s a negative number), but i don’t know paste here some negative sysex numbers that you receive from the prophecy -99, -50, -30.
For you -99 – 99 i think the forward expression should be:
lt (modulatorValue, 0, 128 + (128 - abs(modulatorValue)), modulatorValue)
for a slider that has min set to -99 and max to 99 this should work (i can’t be sure). You need to figure out the reverse expression yourself.
February 27, 2013 at 5:20 pm #6721It works perfect!!
Thanks so much Atom.Would it be asking to much for you to explain the expression?
It’s fantastic it’s working but it would be cool to understand precisely what’s going on.
Thank you.
February 27, 2013 at 5:28 pm #6722Sure (one day i’ll write a manual i promise)
It’s all like calling functions with parameters the idea is function (param1, param2, param3) etc.
so, two functions are used:
lt(p1, p2, r1, r2) – less then, it takes 4 parameters, p1 and p2 are the compared values, r1 and r2 arw what the function returns depending on the comparison outcome, if p1 < p2 it returns r1, otherwise it returns r2 abs(p1) - return the absolute value of p1 so you get (i'll seperate parts of the expression with new lines)lt (modulatorValue, 0, // if modulator value is less then zero then 128 + (128 – abs(modulatorValue)), // return 128 + (128 – absolute value of modulator) modulatorValue) // otherwise just return the modulatorValue (anything higher then 0)
and that’s it, it’s like a calculator just a bit more complex
February 27, 2013 at 5:37 pm #6723Got it!
Very glad for you help Atom, cheers 🙂
March 9, 2013 at 12:09 pm #6971A Prophecy panel is almost finished, it should be up for sharing soon 🙂
March 10, 2013 at 4:42 pm #6993Hello,
Hoping you could help me out again Atom.
2 questions
I have a uiGroup and inside it I have a uiTabs component with several tabs configured.
Outside the uiGroup I have a uiCombo that is sending sysex messages to the Prophecy.I wanted to be able to change tabs with the uiCombo already in use.
So everytime the value changed in the uiCombo the respective tab in that other group would be displayed, see what i mean?I have seen something similar has already been done, but I don’t seem to find any like the one I have described. I.e. in the Virus, what seem to be tabs change to what seems to be uiTogglebuttons. There’s loads of Lua involved in the Virus panel, but i haven’t started digging Lua just yet, to really understand what is going on.
My other question is, how can I receive a sysex dump from the Prophecy, so all the parameters in Ctrlr are automatically configured to match the original Prophecy configuration for each patch?
Thanks for your time
March 10, 2013 at 7:45 pm #6995Found an example for changing tabs with the uiCombo, also from earlier posts, sysex dump seems to be an in development feature. Ignore previous post.
March 12, 2013 at 5:31 pm #7091I’m finished, yay!
I should say, almost… Still need to nail a workaround for sysex dumps.
Not the greatest UI as well, but everything’s there 🙂Attachments:
You must be logged in to view attached files.March 12, 2013 at 6:55 pm #7093That’s very … yellow 🙂
post it in the Panels section, here is how http://ctrlr.org/uploading-a-new-panel/
March 12, 2013 at 8:49 pm #7096will do, just need to tide a few little things.
March 13, 2013 at 3:32 pm #7140jms – Looks like nice project a lot there. I am looking through it now.
Just curious about something. When I started using Ctrlr I found that uiSliders didn’t seem to work. I was happy to use uiImageSliders instead to create the look I wanted. But, I am reminded of this when I open your panel.
If I change any of the list or dropdown menus I see the midi message I would expect, in both the built in midi window and and external one I am using. But from what I can tell, not a single uiSlider (knob) sends a signal. Don’t know what I could be missing. I am using the Mac 1315 build which looks to me to be the latest. I must assume you didn’t have this issue. Can you tell me which version and platform you are using?
Nice work on the panel it is impressive! Thanks!
March 13, 2013 at 4:45 pm #7149Hi ed, thanks 🙂
Im 99% sure i got your problem right… any interaction with any uiSliders gives you 0 entries in the internal and external midi monitors?
That’s quite odd, if you can get feedback alright from the lists and dropdowns!
Everything is working fine here.
I’m using the mac 1315 build as well.Sorry, I really can’t think of anything for helping you :/
March 13, 2013 at 4:50 pm #7150Thanks for the quick response. Wow very strange we are using the same build.
Yes you are correct. uiSlider no ouput. But lists and dropdowns send a nice complete midi event.
I even notice that in Ctrlr when I look at the Modulator Panel (and also at the xml) that if I have a uiImageSlider selected there is a field for “Current modulator value” that mirrors the value of the slider as I turn it. When I select a uiSlider that field disappears.
I will download and install again, it seems to be on my end.
But again, congrats on a great panel. Looks like you put a lot of work into it.
March 13, 2013 at 5:50 pm #7151You shouldn’t need installing Ctrlr again, just delete all files in your system associated with Ctrlr and you should be good to go.
EasyFind is a good tool for this, just type Ctrlr and delete everything that isn’t your panels.
http://www.devontechnologies.com/products/freeware.htmlMarch 13, 2013 at 9:01 pm #7154Well I went for the install just to be “sure” didn’t help.
Interestingly, I tried the same tests on the mac in my studio. Same results, I can quickly whip up a uiImageSlider and control things, but uiSlider … nothing.strange
-
AuthorPosts
- The forum ‘Using Ctrlr’ is closed to new topics and replies.