christofmuc / KnobKraft-orm

The KnobKraft Orm - The free modern cross-platform MIDI Sysex Librarian
GNU Affero General Public License v3.0
184 stars 23 forks source link

Tempest not being detected #291

Open xyplex3 opened 8 months ago

xyplex3 commented 8 months ago

The Tempest plugin does not detect the Tempest. I tried both Midi and USB for the Tempest using the latest os. Please message me for help in solving this.

markusschloesser commented 8 months ago

Have you tried manually assigning the correct port? Kris did the adaptation a while ago, I has asked him for it, but I haven't tested it yet (focus on other synths right now). So AFAIK you're the first to test it!

xyplex3 commented 8 months ago

Yes I tried manually setting it. FYI love this application! I will go through the Python libraries for it and see if I can access it and let you know how it responds.

christofmuc commented 7 months ago

@xyplex3 Thanks! The Tempest is a tough challenge, as it is not documented anywhere. Let us know how far you got!

xyplex3 commented 6 months ago

I have written a separate Python program to send direct Sysex to the Tempest and the Device Detect Sysex hex is not working. Where did you find that message at and what are you expecting in return?

christofmuc commented 6 months ago

Researching a bit... it seems the use of the generic detect message was based on pure hope and the fact that all other DSI synths support it. But the tempest has a different firmware code base, not related seemingly in any way to the other synths. So it might just not respond to the generic request.

What you could also do is instead of the device inquiry just fire an edit buffer request - wait, you can't.

So you might not be able to autodetect the Tempest and have to set it up manually, if we cannot find any request to which it responds.

Turning off autodetection is undocumented but done like this as glanced from the JX-8P docs:

def deviceDetectWaitMilliseconds():
    # Negative value means don't autodetect at all
    return -1

We had our original discussion on the Tempest here together with some info pointers, but a quick check did not reveal any insights right now: https://github.com/christofmuc/KnobKraft-orm/issues/164

xyplex3 commented 6 months ago

There seems to be a change from Firmware 1.4 to 1.5. Any sysex that has been created with 1.4 and below will load into KnobKraft. Anything created for 1.5 will not load. I have been trying to look at midi.link website to see how they do things but that site is also not working with 1.5 firmware from what I can tell. I am looking into it further but it seems we need a discussion with Sequential over it and they probably don't care enough to give us anything.

christofmuc commented 6 months ago

Hm, the addendum doesn't mention much:

https://www.davesmithinstruments.com/wp-content/uploads/2017/07/Tempest-1.41.5-Addendum.pdf?x72411

It says the internal format changed when going to 1.4, so that doesn't match.

Do you have a new sysex you could upload here? Sometimes its just little things like a new device ID. Or you can also attach the MIDI log from an (unsuccessful) manual dump operation?

xyplex3 commented 6 months ago

OK, I have some good news. The following needs to be set on the Tempest to properly send sysex without problems.

  1. Set to Master Clock.
  2. Midi Clock IN Cable to NONE
  3. Midi Clock OUT cable to NONE

Then you select Tempest and make sure the Midi it set correctly (for my case I am using USB). There is no autodetection like you said so I just assume it is connected.

Click on the sound library bank you want and go to the Midi menu. From there click RECEIVE MANUAL DUMP On the TEMPEST send the sound via SYSEX DUMP It will write the sound to the bank, You can then pick another drum pad and click on the sound to send it back to the Tempest.

Here is the problem. you cannot change the name or any parameters and it cannot identify the sound name. I believe we can do a simple sysex fix for 1.5 firmware and am looking at identifying if it is 1.4 or 1.5.

I will attach some sysex files shortly.

FYI I love this application!

xyplex3 commented 5 months ago

Here is a SYSEX file from 1.5 that is a kick sound. kick.zip

xyplex3 commented 5 months ago

I think the only thing that needs to be adjusted is how it reads the name of the sound, I will be scripting some custom Python to see if I can figure out the new location in the Sysex dump where the sound name is.

Andy2No commented 5 months ago

@xyplex3 Have you tried a hex editor?

Here's part of the dump of the kick.sys, shown in Frhed (a free hex editor.

kick-hex_dump

The zero bytes in the names suggest that it's converted from 8 bit data to 7 bit data, which is usually done in groups of seven bytes, with a byte containing the MSB (highest bit) of each of those seven. It could be before or after the group of seven, but it's usually before.

I haven't looked at the Tempest adaptations, but DSI synths usually (maybe all) do this, and the ones I've looked at have a function to handle the conversion back to 8 bit data. The DeepMind adaptation uses the same method.

That alters the addressing, of course - groups of 8 (7 bit) bytes in the sysex dump become groups of 7 bytes in the result, if you convert the whole thing, so the name in the converted (8 bit) data starts at about 7/8 of the place it starts in the sysex dump, once you skip the header section, which isn't encoded.

You can add print statements to your functions to show some of what they're seeing. The output appears in the console window at the bottom. Or, you can just take a stab at extracting the name and see how close the result looks, then keep making corrections til you get it right.

Andy2No commented 5 months ago

@xyplex3 Here's the second place a name appears. DSI/Sequential synths often use layered patches, which look like two entire patches (maybe more for some?), in the same sysex dump file:

kick-hex_dump2

Andy2No commented 5 months ago

Here's a third, and we're still only less than a quarter of the way through the file, so no doubt there are more:

kick-hex_dump3

xyplex3 commented 5 months ago

Thank you, I will see what I can come up with!

christofmuc commented 5 months ago

Uh, I myself had posted the code in the Sequential forums a way back. This is all we know about the sysex format:

https://forum.sequential.com/index.php/topic,5075.msg59906.html#new