Page 1 of 1

Getting Lemur to 'learn' sysex

Posted: 23 Feb 2014 18:14
by ianobrien
I'm a noob to lemur, but not really new to computers and synths. My goal is to build a project to control my kurzweil k2000r via Lemur. Can't find any previous user templates so I think I'll have to do it myself!

First simple question: i can get another app (sound quest Midiquest 10 osx - not a good app) to successfully transmit the relevant sysex string for a given function - is it possible for Lemur to read and learn the specific sysex command, for assignment to slider/fader etc. with a view towards constructing a complete editor?

Is this generally how others go about making their own editors? The synth itself will not transmit the sysex string, but the mac osx app Midiquest will - so I can transmit the data....

I hope this is so. If this is a case of RTFM could someone please point me to the relevant pages thank you!!!! I have no problem reading manuals, actually I rather enjoy it, but there just aren't enough hours in the day :/

Re: Getting Lemur to 'learn' sysex

Posted: 24 Feb 2014 17:14
by midimockup
I was just looking into this for someone. If I'm wrong about this I'm sure someone will chime in, however what you want is not something built into Lemur. You will need to design a script for it. There are a number of problems, however, related to the fact that sysex messages are not of a standard length.

Honestly the easiest way to go about this is just to set up a MIDI monitor and see what comes into Lemur, and then plug that data manually into a simple script using midiout(). However, you will need to make sure the variable value is in the right byte position and that it is, indeed, variable. i.e. for a Fader, you will need to make sure the variable value is Fader.x*127.

For example, say your variable value is always the 5th byte. As you turn the knob, in your MIDI monitor you would see the 5th byte changing while all the rest stay the same. That 5th byte would have to become Fader.x, since you want to be able to control the 5th byte value with the Fader position.

If you wanted to make a script that would automate this process, things get a bit more complicated. If the sysex message is, say, 64 bytes long, you would need 64 possible variables to auto-populate. Then, your script would have to ask which of these is the variable value, and replace it with the appropriate control (i.e. Fader.x) in the appropriate position.

It's not impossible to do, just difficult.

Re: Getting Lemur to 'learn' sysex

Posted: 25 Feb 2014 00:34
by Macciza
Hi
A number of ways to achieve what you are after....

Find the sysex info you need to send from the manual or other sources online . ...
Look at the data in midiquest, or sysex librarian, and copy data over as needed ....

Often getting the data together is the most difficult phase, once you have it all it becomes easier....
Remember that asking for data from the k2000 is a different command to sending data to it ....

There are a few different ways that you can get the days out of Lemur, standard mapping, custom midi mapping or via scripting. Each has individual pros and cons, standard mapping is most basic with least options thru to scripting that can be quite complex ...

I would suggest looking through some projects that use sysex for editing devices to see how they have done it, looking out for those various possibilities of implementation ....

Also from memory the K2000 has a fairly complex architecture which may cause some issues in terms of modality of interface, so designing it in advance might help. Also really consider what you want to do and what is the best way to achieve it. A full editor may be very complex and perhaps better handled by a computer whilst a cutdown performance assistant focussing on particular parameters may be all you really need . .

Just a few thoughts
Cheers

Re: Getting Lemur to 'learn' sysex

Posted: 25 Feb 2014 13:09
by oldgearguy
In short, there is no 'learn' method for acquiring sysex/CC information in Lemur. That would be an interesting project to write...

Anyway - I think Macciza has the best approach - capture and work on one bit at a time and keep your scope manageable. Given that Kurzweil never published a full sysex implementation document, capturing a string at a time in a tool like MIDI-Ox for a PC, or MIDI Toolbox for the iPad, while tedious, will at least get you the correct syntax.

Remember that the current implementation of Lemur on iOS has a limit of 256 bytes of sysex data, so if you were hoping to dump the current patch to the Lemur and then editing the values, you may be out of luck. That's why a number of edtors for this platform have you edit values starting with a blank slate instead of the current parameter values in the synth's edit buffer.

I'm in the middle of an editor for an older synth, and even with a system exclusive document, I still run into weirdness and undocumented changes. You will also find that you'll be spending time designing the Lemur interface and controls in addition to the MIDI communication coding.

My suggestion is to capture a single string, then create a slider and a button in Lemur. Have the slider change the value from 0 through to the max and have the button send out the resulting string. As a bonus, create a Monitor and have it display the value of the slider. If you can get that one thing working, you'll have the core to do lots more. That simple exercise will introduce you to scaling the slider output, modifying a vector (array), sending MIDI, and scripting.

Re: Getting Lemur to 'learn' sysex

Posted: 27 Feb 2014 01:16
by Macciza
Hi
Did a search on K2000 sysex and it seems there are a few sites with quite a bit of info to look through...
You may actually be able to find all the info you need with extended net searching
Or by getting an editor and spying on its output for the various functions...
Then you could at least send the data needed even if you can't request and receive it back.....

I actually have looked into a 'learn' system for CCs , will post something soon when I get my computer back....
Will also look into what might be able to be done for sysex, though there are additional issues compared to CCs...

Cheers