Jump to content

MidiBox SID v2 Lemur Editor


normen

Recommended Posts

Hey folks,

as indicated in I started working on a patch for Lemur to edit my MidiBox SID v2.

Few panels are working yet, the main work went into working around some serious limitations in Lemur, like a max size of 255 for arrays, max sizes for execution time, stack size and general method size and other niceties. As the Lemur is incapable of receiving big SysEx dumps, you need to have at least MidiBox SID V2.042 installed.

ESUb9.png

Currently working panels:

- Lead Oscillator + Filter

- Bass Oscillator + Filter

- Bass Sequencer

- Bass LFO/ENV (ENV doesn't send data yet)

- Knob assignment

Known Issues / TODO

- Implement all functions :smile:

- Selecting an engine doesn't change the engine yet, you have to load a patch with that engine

- Storing patches does not work (Is there no way to store memory->bank directly? I have to send a whole dump to store??)

- Sequencer editing currently causes a dump and thus dropouts when switching the edited sequence due to workaround

- Sequencer copy/paste/nudge doesn't work yet

- Sequencer octave labels are wrong on all but one button row :smile: I intend to do it like its written on most but that requires some more work

- When linking, values that change due to inertia are not synched due to a workaround

- Possibly could optimize data sent and send less parameters at once (e.g. left filter params are always sent at once)

- Fail to create proper checksum atm..

Sooo.. Currently some of the code is a bit messy still but its already becoming cleaner so it should be easy to extend, I'll write up some more documentation in addition to the existing code comments and README in the project. As the editor isn't really an IDE or code editor at all some things might not be obvious directly. As I guess it'll take me a lot of time until I really add all of the panels I don't use etc, maybe somebody wants to extend this further on his own when I added all I need ;)

Download link to the current version

Let me know if you have some issues with the current functions or see any strangeness. Especially look out for "entangled" parameters that cause changes in each other by reloading the memory after changing a setting (use the "apply local values to faders" button in the info panel for that). This is because I don't always math.floor() the bytes I send (imagine me with a beer in my hand) to save resources and sometimes I forgot values that can actually leak.

Cheers,

Normen

Edited by normen
  • Like 1
Link to comment
Share on other sites

Hi,

It is very nice :smile:

 

Now a little ask:

As I am thinking to buy a tablet

Lemur works with Android too , or only Apple?

The little googling I made seems that it works with Android but to be sure better ask to more experienced with this application.

 

Thanks

Link to comment
Share on other sites

@All: Thanks, I'll update the file in dropbox every now and then, when theres big changes I'll post here.

 

@Antix: Yes, iOS. I guess you should regard it the "windows of the post-PC-era" in terms of market leader. Makes much more sense to have the closed but proper and working system as reference and the open systems as options anyway ;)

 

@TK: Cool, you will make the best tester I can get :)

 

Also @TK, some questions to work on issues I have:

- Can I save the current SID memory to a bank directly or do I have to send a complete dump? I guess I'd have to send it as single PolyPressure messages then too but I didn't try that yet, maybe Lemur manages to sink the whole buffer in the iPads MIDI stack..

- I have problems calculating the checkSum, it happens in PatchDump.receivePoly(MIDI_ARGS), maybe you can take a look. It outputs the various tries in the debug window accessible with the "I" button on top.

- Unrelated: Can the SID *output* a MIDI Sync signal somehow?

 

Cheers,

Normen

Link to comment
Share on other sites

I just released V2.042 which provides the first special SysEx commands for the Lemur Editor: 

 

 

Following SysEx command has to be sent to enable the Lemur Editor mode:

 

  0C/d) F0 00 00 7E 4B <device-number> 0C 10 <enable> F7
        With <enable> = 1: enables special SysEx transmission mode for Lemur - the patch is sent as Poly Pressure events
        With <enable> = 0: disables special SysEx transmission mode for Lemur

 

 

 

I tested this with your panel, e.g. requestPatchDump() has to be changed the following way:

 

 

/* Internally used method to execute dump request for selected bank and patch */
if(requestedDump) return;               //don't request a new dump if we requested one already
decl outDevice = MidiDevice.selection;  //get MIDI device number (lemur, not ID)
decl midiDevice = DeviceID.selection;   //get MIDI device ID
decl bank = Bank.selection;             //get Bank #
decl patch = PatchSelect.val;           //get selected patch
decl lemur_mode_msg = {0xf0, 0x00, 0x00, 0x7e, 0x4b, midiDevice, 0x0c, 0x10, 0x01, 0xf7};
decl dump_req_msg   = {0xf0, 0x00, 0x00, 0x7e, 0x4b, midiDevice, 0x01, 0x00, bank, patch, 0xf7};
dumpType = 0;                           //bank dump
stateDumpReceive = 0;                   //stop receiving other dumps
requestedDump = 1;                      //we requested a new dump, look for sysex
setPatchName('');                       //set patch name to empty so user has feedback
midiout(outDevice, lemur_mode_msg);     //enter lemur mode
midiout(outDevice, dump_req_msg);       //send dump request

 

 

 

the same has to be done for requestMemoryDump()

Please also update your README - people should just switch to v2.042

 

- Can I save the current SID memory to a bank directly or do I have to send a complete dump? I guess I'd have to send it as single PolyPressure messages then too but I didn't try that yet, maybe Lemur manages to sink the whole buffer in the iPads MIDI stack..

 

No Problem, I added following command:

  0C/e) F0 00 00 7E 4B <device-number> 0C 18 <type> F7
        With <type> = 0x08: stores the current edit buffer of SID1 in BankStick
        With <type> = 0x09: stores the current edit buffer of SID2 in BankStick
        With <type> = 0x0a: stores the current edit buffer of SID3 in BankStick
        With <type> = 0x0b: stores the current edit buffer of SID4 in BankStick
        With <type> = 0x70: stores the current ensemble in BankStick

 

 

 

- I have problems calculating the checkSum, it happens in PatchDump.receivePoly(MIDI_ARGS), maybe you can take a look. It outputs the various tries in the debug window accessible with the "I" button on top.

 

I found the bug in my coding proposal: the "SET_BSR SID_BASE" was missing after MIOS_MIDI_TxBufferPut, therefore the checksum wasn't correctly initialized anymore, and therefore wrong (one of the reasons why I normally don't program in assembler anymore - the maintenance of years old code is too error prone)

 

This is fixed.

 

I also found an error in your calculation routine.

The checksum has to be determined with:


decl finalCheckSum = -checkSum & 0x7f; // calculate checksum

 

 

 

 

And it has to be compared with the != operator:

if(midiSum != finalCheckSum ) {

 

Your previous comparison method (anding the values) was unusual, but not incorrect. On the other hand it seems that Lemur can't handle such a comparison correctly... I haven't debugged this further... (it could depend on the variable type)

 

After the change, I noticed that sometimes the dump is requested multiple times (like on a retry) for no reason.

It never stopped... although the checksum was always correct.

However, I think that you will now be able to debug this by yourself  :shifty:

 

 

 

- Unrelated: Can the SID *output* a MIDI Sync signal somehow?

 

possible with v2.042 (a new flag in the ensemble)

 

Best Regards, Thorsten.

 

Link to comment
Share on other sites

Just a short update so you don't think I've forgotten about this ;) I already implemented the changes for the latest MidiBox SID version when TK posted the update (see updated post above) but atm I don't have time to work on it further. In a few days I should have time again and I'll completely clean up the code first and then add some pages and panels I definitely still want for myself like the ensemble settings etc. Then I'll make it available in a more appropriate way than dropbox and write up some docs, e.g. on googlecode or so.

Edit: One issue I still have to solve is changing complete patches and/or copy-pasting patches. I can't even store an array as big as the preset arrays in the Ctrlr interface, let alone send a SysEx message that long (its an array) :(

Edit: d'oh, I guess I can just send single parameter commands.. Lets hope that many in succession won't confuse Lemur.. But I am getting good at workarounds for Lemur ;)

Edited by normen
Link to comment
Share on other sites

  • 2 weeks later...

So, I haven't completely added all new features I wanted yet and some are still half-implemented. Ensemble send isn't done yet, so it cannot be configured, but the Ensemble settings can now be loaded and viewed via the button top right. I thought some might appreciate a small update nonetheless, also as a small sign of life so nobody thinks this won't be finished ;)

I have added copy/paste for whole presets and added a way to send data in addition to the ensemble settings. Also the sequencer doesn't trigger a reload anymore so you can switch between patterns quickly. The local data is stored as well when it is sent to the MidiBox so it knows about the current settings of the midibox (not just the last dump). This caused some data corruption akin to the MidiSysEx send corruption that happened sometimes, mostly because of non-truncated data being converted to bytes. I fixed most of this but if you could test this by re-applying the local data to the faders (via the info window "i" button) every now and then I'd appreciate it :)

Also, if somebody with a iPad 1 cares to test if 50 SysEx messages per frame work there as well that'd be cool, I wasn't quite sure but I didn't want the uploads to take too long (they already are slower than normal due to the separate sysex messages).

Also theres been some severe code cleanups :)

I updated the main post and file on DropBox.

Cheers,

Normen

Edited by normen
Link to comment
Share on other sites

  • 1 year later...
Anything new on this front?

Hey. Sorry but I didn't extend this further yet. I do use it at times and funnily I just thought about finishing it the other day but I guess it will still take some time until I can allocate time to it again. However I did put many comments in the code and the basic UI layout is set so everybody is very welcome to extend it further. Most of the "hard" coding work and logic layout is done and new device panels can basically be copy&pasted from the existing ones, adding the UI elements and changing the code respectively. Should not be too hard really.

 

If somebody gets around to extend it just send me a mail with the Lemur file and I will upload it for everybody else and if needed finish it when I have time again.

Edited by normen
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...