-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Kawai K5000S/W/R #72
Comments
https://github.com/coniferprod/k5ktools |
And I'd suggest to focus on S and R, the extra W stuff is just rompling which nobody needs anyway 😇 W, S and R have Bank A |
Valid file sizes File Size Number Of Sources So if we only do the additive part, valid file sizes are: |
Patch management utility: |
ADD Singles (additive Presets) ONE SINGLE DUMP REQUEST (ADD A/D 1 -128) (Only for K5000S/R)
coming from the synth according to manual: ONE SINGLE DUMP (ADD, A1 - 128)
The Structure of ADD tone data: The structure of the Single Tone DATA: The structure of ADD Wave KIT DATA Combis/Multis Combis/Multis only reference the ADD You don't wanna bulk request things, looks nasty |
Acknowledge Format cc: Unit midi channel number: 0-f (ch. 1 - ch. 16) aa: Function Number |
ID Request(KAWAI) ID request reply |
I have device detection, bank descriptors working, program dumps never finish because of #423 |
@christofmuc how could I implement something that uses this? |
We have a handshake possibility - isPartOfSingleProgram() can return a Tuple instead of just True or False. When you want to send a message in reply to the message you just got you can return (True, [f0 .... ]), with the second item the next message to send to the synth. Then the Write complete would become part of the bank dump (they'd need to be removed before sending). But I agree, we need a new way to terminate the download. Currently. it always assumes the number of patches to be downloaded is known upfront. We can either add a way to flag that bank requests should stop, or we can use the isComplete type of call that inspects all messages and decides it has enough. Maybe the simplest thing that could work is to extend the return value of the isPartOfSingleProgramDump, allowing something like this:
I think the only thing missingis to allow the triple return value. And isBankDumpFinished() could be implemented empty (return False) because there is a different way to stop the loop. |
the handshake mentioned in #72 (comment) is about the synth sending a message to kk (not the other way around)
I haven't implemented the bank dump feature, mainly because the unpacking looks especially nasty. |
well, every message the synth sends will be presented to the isPartOf.ProgramDump(), so you will be able to inspect it.
That's nasty. We currently guarantee that hangs when the synth stops sending. I think we had a ticket with timeouts somewhere, but that was hard to implement. What is the logic? Can you just send all program requests in advance? |
this is when sending a patch to the synth ("K5000W/S/R transmit these data after receiving the dump data:"). it will reply with one of those messages
I'd suggest a timeout, wait 5 seconds and move on to the next number (until end of bank defined in bankdescriptors).
etc. |
Unfortunately I have to implement bank import as well, as quite a few sounds out there come in form of a bank. |
Why would this not work with variable size? Bank import comes in two forms:
|
I made a new issue for the missing handshake on upload/send to synth. This is still a gap, the C++ code can do it and the Python code not. |
Good to know that kk doesn't rely on a fixed patch size for patch separation in bank dumps! Tbh I have trouble understanding the functional difference between extractPatchesFromBank extractPachesFromAllMessages. Is extractPachesFromAllMessages only for synths that reply to a bank dump request with multiple messages? |
The algorithm is:
which is the more powerful way. The old way wasI think:
This needs to go into the adaptation programming guide. |
Any thoughts about the time out thing? |
That's a bigger thing. how about sending all requests at once? |
can't, don't know upfront which will be available. Or what do you mean? |
I meant sending all possibel requests upfront :-) How many are these? |
You mean send the synth 128 program dump request at the same time and see what happens? 🤨 |
I have trouble finding the delimitors, and thought I could just feed complete bank dumps to ChatGPT, but with 105kb for Bank A probably not 🙄 |
There is the function knobkraft.findSysexDelimiters you can do
|
Yes |
Notepad for later: |
how do I tell kk to wait after bank dump request? It currently sends the bank dump request 4 times with ": error Giving up retrying initiating bank dump" (while a bank dump is being sent from the synth, but there usually around 100kb and that takes a while over midi din) |
You can set the general message delay, but that is more inbetween the message it sends itself. How long does it take for the reply to be generated by the K5000? It seems we need the handshake protocol implemented... |
the reply comes in pretty quick, but it takes around 1-2min until it's done.
kk would wait until retrying? |
nope, got nothing to do with it. the handshake thing by the k5000 is only for when kk sends to synth, NOT the other way round |
Currently the retry is fired already after 500 ms of not a single message having been registered positively by isPartOfBankDump(). |
"registered positively" the start of the bank dump OR the completing? (EDIT typo) |
No, the first message having been accepted by isPartOfBankDump() - if after 500 ms the list of accepted messages is still empty, it will fire the retry. At least, this is how I read the C++ code. |
what comes from the synth and the function
|
Show me the MIDI log with timestamps, then we can see what happens before the retry kicks in? |
That's the thing, midi ox immediately shows the bank sysex coming in. Kk midi log shows 4 outgoing retries and then the first incoming bank after about 1-2 min. After that it also receives the answer to the other 3 requests. Will do video later. ![]() also you see from the screen shot, that the midi log takes around 33 seconds to register the incoming dump. Anyway, that's not my main problem, even with "receive manual dump" and then initiating ONE bank dump request from midi ox, it still imports nothing. Will write later where I am struggling with |
unfortunately cannot use it, as patches are not marked with 0xF0...0xF7. explanation of Tone Map: |
current error messages:
|
@christofmuc just pushed to main fa51671 |
I will have a look! The last error seems to indicate that the number format of the return value is wrong. Do you know how to switch a branch in git? We can then stage your changes in a separate view. I will create one! |
full bank dumps from Midi OX from my K5000r for testing |
Here is our pull request https://github.com/christofmuc/KnobKraft-orm/pull/433/files I moved your changes to a branch called "synths/k5000" so we can stage them and can see and comment on them in the pull request view. So best you checkout the branch to continue working on it. |
switched to it in pycharm! thanks for helping! :-) |
that website's owner/author here, reading this with interest, though probably not being able to help. |
Nice! Thanks for hosting this, as you can see, useful for some! I'm sure we'll figure the K5000 out - it might be the most ambitious so far, but that's why we have waited for 4 years before finally tackling it ;-) |
@christofmuc btw kk still does this (sends 4 requests), even with the new code. But manages to load the bank successfully. But also still shows giving up, which is confusing |
I think I understand the problem with the retries - what you see in MidiOX is the incoming Sysex continue messages - those can be displayed, but don't make KK register it doesn't need to retry. KK only gets to process the message once it is fully in, which takes longer than 4 seconds. I think this is fixable, if I recall correctly there is a sysex continue handler possibiltiy in JUCE, I need to check again. I hope the giving up/loading confusion comes from the fact and will go away when we fix the retries. |
does the opening the tree on the left side > "in synth" > "Bank A,...." do something differently than Menu/Midi/Import patches from synth/get Bank? because the latter works fine, while the former shows it does show the error for Bank A and E, but not for Bank D |
There is good documentation available, and generally there is nothing that should not work already in KnobKraft Orm.
https://www.cyborgstudio.com/wimpy/synthmp3s/kawai/k5000/manual/k5000midiimplementation.pdf
Just that the device is really complex, and you probably want to support different data types.
I'd say we wait for the multi data types implementation before trying.
The text was updated successfully, but these errors were encountered: