Skip to content
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

D-50 Adaptation No Connect - wrong device ID sent #407

Open
summersetter opened this issue Feb 2, 2025 · 21 comments
Open

D-50 Adaptation No Connect - wrong device ID sent #407

summersetter opened this issue Feb 2, 2025 · 21 comments

Comments

@summersetter
Copy link

Running Orm version 2.5.1
Connecting to Roland D-50 original version (S/N 827746)
Using Focusrite Scarlett 4i4 interface

  • D-50 adaptation selected. On detection, the program is sending out query sysex messages to device ID range 0x10 to 0x1f (these are also the MIDI channels of course).
  • The sysex documentation for this synth indicates a valid device ID range of 0x00 to 0x0f.
  • The D-50 does not respond to the incorrect device ID messages.
  • When I manually edit the sysex message to send device ID = 0x00, the D-50 responds normally.

Image

  • Although the function 'buildRolandMessage()' in the RolandD50.py file appears correct (masks the channel correctly), it seems like this function is not actually used in the detection of the D-50.
  • Was not able to find a way to modify RolandD50.py to correct the sysex message format.

Image

One anomaly noted is that the Scarlett 4i4 seems to have two logical MIDI interfaces. In Studio One I can select either of these interfaces, but in Orm only the second one appears "2- Focusrite USB MIDI ". Sending and receiving MIDI to the D-50 using Studio One works fine with either interface selected, but perhaps this is an issue for Orm?

Thanks for any help with this issue. Not ready to try digging into the main source.

@christofmuc
Copy link
Owner

Thanks for reporting back! I am motivated to finish the D-50 adaptation, it has been sitting around for a long time now and I remember there was a peculiar problem with data addresses, but we can figure that out.

You are correct the correct message is not used, what is used is the code in the GenericRoland class:

 @knobkraft_api
    def createDeviceDetectMessage(self, channel: int) -> List[int]:
        if self.device_family is not None:
            # Detecting the Roland via an Identity Request message
            # This is a sysex generic device detect message
            return [0xf0, 0x7e, channel, 0x06, 0x01, 0xf7]
        elif self.device_detect_message is not None:
            # Might be an older (pre XV-3080) Roland, try to query for the system common first data block and see if it answers
            address, size = self.device_detect_message.address_and_size_for_sub_request(0, 0)
            return self.buildRolandMessage((channel + 0x10) & 0x1f, command_rq1, address, size)
        else:
            print(f"{self._name} adaptation: No auto detection implemented. Specify either device family for identity reply, or data block")
            return []

It seems though the D-50 is old enough that it doesn't play along with all other Rolands. Seems I need to extend the Generic Roland module (or copy the stuff over into the D-50 module first to get it working and later standardize. I think we'll do that).

On the MIDI device thing - I am using the JUCE library which is using the OS functions for MIDI devices. Bypassing that is not feasible, we'd need to find out why JUCE is seeing only one of the interfaces. Which OS are you on?

@summersetter
Copy link
Author

Thanks for the detailed response. I am using Windows 10 Enterprise 22H2 build 19045.5371.
I would be interested in testing out any updated code on the D-50.

@christofmuc
Copy link
Owner

@summersetter There you go, this passes all internal tests, but as I don't have a device, suprises are likely:

RolandD50.zip

This should work with the current release, I copied all fixed code from the Generic Roland module into this file so it is standalone.

@summersetter
Copy link
Author

Sorry, the submodule knobkraft_api can't be found, and after looking around on git, I couldn't find it either.

Image

Regards.

@christofmuc
Copy link
Owner

Ah bummer, it was still in the Roland file. Try this:

RolandD50_V2.zip

@summersetter
Copy link
Author

That fixed it.

  • Confirmed device detection (auto-detect all MIDI channels),
  • import edit buffer from D-50 works fine
  • send to edit buffer in D-50 working correctly

I understand that a number of other functions are not yet implemented.

  • Attempted to load a D50 sysex file, failed with errors - see log. Not sure if that was supposed to be working or not.

d50 sysex file import debug log 2.zip

@summersetter
Copy link
Author

Oops, didn't mean to close this item.

@summersetter summersetter reopened this Feb 4, 2025
@christofmuc
Copy link
Owner

Ok, great! Rename should also work, and does bank sync work?

The D-50 has a data format for full banks somehow, there is already an implementation but it might not be enabled. Also, adaptations currently can not create bank dumps other than list of program dumps/edit buffers, there is an open ticket somewhere for the DX7 who needs this as well.

@christofmuc
Copy link
Owner

Uh, that log looks weird. Can you share the file so I can have a look? Did you open it via the Import from disk..menu?

@summersetter
Copy link
Author

RobsColl.zip
Grabbed this from a website that has a pile of D50 patches.

I tried about 5 different sysex files and they all had similar errors.

Opened via 'Patches/Import from files into database'.

I''ll try rename and bank sync next.

@summersetter
Copy link
Author

Patch Rename details:

  • imported edit buffer patch from D50 called "Vibraphone".
  • in the right hand pane, under 'Current Patch' tab, clicked on the 'Patch name' and changed it to "Vibraphone 2" then hit ENTER.
  • resulting error log file attached.
  • A new patch was created in the database, called 'Invalid'.
  • Then changed the 'Patch name' of this 'Invalid' patch to "TESTNAME" and hit Enter.
  • The name of the patch in the database changed to "TESTNAME".
  • Clicking on this patch sent it to the D50, and the patch name updated to 'TESTNAME'. The remainder of the patch sounded the same as the original "Vibraphone" patch.

patch rename log.zip

Next tried "Edit / Bulk rename patches", and changed the name of 2 patches in the database.

  • the name of the "Vibraphone" patch did not change.
  • the name of the "TESTNAME" patch changed to "TESTNAME2"
  • the log file indicated errors:

bulk rename log.zip

Bank Sync

I may be blind, but I can't find a specific 'bank sync' feature. If you mean load a bank from the D50 to database ('import patches from synth'), that function doesn't seem to be enabled - just get a 0% importing message, and no debug logging is created.

Also tried "MIDI / Receive manual dump" - get one message from the D50 when I initiated a bulk dump but nothing back from Orm.
Image
This function doesn't seem to be enabled either?

Let me know if there is some other function I should test.

Regards.

@christofmuc
Copy link
Owner

I was correct, I needed to implement a special bank dump import function. Attached a new version.

Due to a curious bug in KnobKraft you will need to set the environment variable

ORM_MAX_MSG_PER_PATCH=200

before launching the Orm. I will make a new version with a bug fix, but for now that should get the 2.5.1 to load the D50 bank dumps when using this adaptation:

RolandD50_V3.zip

The synth sync is just the expansion in the tree, when you open the "In Synth" node and click the bank. it does largely the same as the Import from synth menu item. The manual dump wouldn't work I think because of the bug above, you could give it a try.

@christofmuc
Copy link
Owner

Oh, and I might have broken the edit buffers. Can you supply me the Vibraphone edit buffer you got from the synth? You can export it into a syx file or just copy it from the hex dump view in the patch view to the right.

@summersetter
Copy link
Author

Here's the edit buffer you requested.

vibraphone edit buffer.zip

Will try out the updated code shortly.

Regards.

@summersetter
Copy link
Author

Good news! The bank dump (sync) works now.
Image

And the sysex file import works as well. Was able to import several D50 patch collections and play patches via the edit buffer send. All the patches seem to transfer and play properly.

  • Edit buffer send/receive appears to work fine.
  • 'Receive manual dump' is not working, same as before.
  • 'Edit / bulk rename patches' not working, see error log.

patch rename log (v3).zip

What other functions should I test out?

Regards.

@christofmuc
Copy link
Owner

Great! That's some very solid progress.

Manual dump -> this is really just a window which will collect all messages you manage to trigger, and then run the same logic on it as if you open it as a file. But you only need that for Synths that have no way to respond to messages.

I will look at the bulk rename.

Else, this looks slay! I will need some time to integrate the changes I made into the release, but you're all set up. Thanks for the patience!

@christofmuc
Copy link
Owner

I tested bulk rename and it now works. Could it be you still have old/incompletely imported data in the database? If yes, you probably should try to delete it. You can delete whole imports by selecting an import list in the tree, and then use the Edit menu. Delete Patches.. to delete all patches currently in the grid.

@summersetter
Copy link
Author

Bulk rename test:
Steps taken:

  • Start Orm
  • File / New database -----> the grid is empty
  • From the left hand tree, select All Patches / Roland D-50 / In synth / User Patches ------> 64 patches load into grid from synth
  • Select Edit / Bulk rename patches -----> the list of patches is displayed
  • I updated the names of about 8 different random patches by appending ' 2' to the current name, then hit 'Ok'
  • One patch name changed correctly: 'PCM E-Piano' to 'PCM E-Piano 2' (the last patch). It just happened that this was the patch the D-50 was set to.
  • No other patch names changed, and an 'invalid' patch appears in the grid.

Image

Error log attached. Perhaps I don't quite understand how bulk rename is supposed to work.

clean bulk rename log.zip

I will do some more testing with the D-50, it is certainly a key milestone to be able to load, audition and then write new patches into the machine. Let me know if there is anything else I should test. Really appreciate your responsiveness on this (amazed actually, given my years of dealing with software dev teams and bug fix stacks).

Regards.

@christofmuc
Copy link
Owner

Interesting! It seems there might be a few D50 messages slipping into the database that are recognized as D50 messages, but not as proper part of edit buffer or program dumps, and those cannot be renamed and throw the rename dialog off (they shouldn't be in the database). You can clean the database by doing text search for Invalid and then using Edit menu delete.

Can you give me the full MIDI log of the bank download? It will be in the MIDI log tab, and there is a save button... so you put it into a text file to upload here.

There might also still be an error when converting edit buffers to programs and vice versa, but I have tests covering that, so that's a bit of a surprise.

Happy to be of help, and happy to see the D-50 finally getting somewhere. The device is right at the border between the old school synths (MKS-80, MKS-70) and the new world of modern Roland data formats, which makes it a bit special and more complex than necessary. It has way more functions we haven't tapped into and hopefully don't need to given how far we are already, I just want to make sure we're not missing something strange.

Also, I am suprised that it brings the "200 message" warning during the bulk download. That should not be happening when downloading 64 patches, in my tests 136 MIDI messages were all it took and I thought we're on the safe side with 200... Strange.

@christofmuc
Copy link
Owner

Additionally you could also upload the database (or mail it to me if it has private patches in it), I can look and see what might be causing the rename errors.

@summersetter
Copy link
Author

MIDI log of synth banks import:

D50 bank import from synth - MIDI.zip

I always start with a new empty database, so I imported all the banks from the synth, then used "Edit/Bulk rename patches". I modified a handful of names (appended a '2' to them), including the second and last patch. The result was similar: the first edited patch displayed as 'Invalid' and the last patch changed the name correctly. The synth was not set to the last patch this time.

Image

Log file attached.

bulk rename log 8Feb.zip

The updated database (after attempting the rename) is attached.

Clean database 8Feb post rename.zip

Regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants