Roland MC-505

Fantastic. Happy it works and curious what you’ll find in there! :slight_smile:

Here’s the tweaked version. Yours was extremely close and there’s a quirk/bug in the list control that you’d have no way of knowing about ahead of time that also came into play and is why often you’d see 1 and 2 both go to 1.

tweaked 505

Two things to look at – the list definition for the Part Select control and the LUA script to see how I changed it.

I left the debug print in so you can see the list quirk/bug. When you are using the web UI, go to the “bug” symbol or just watch the bottom of the LUA edit window to see what happens as you twist the select control around. When you’re satisfied, that line can be deleted.

The other subtle thing was using == for an assignment. == is only for logical comparisons if (x == y) kind of thing. Single = for assigning a value to a variable.

3 Likes

Now that I had a bit of time to check the tweaked preset, I have to say, this is tremendously helpful.

The LUA script is very valuable to see as it gives me a better understanding of the structure and some details that I didn’t seem to understand before.
I did watch some tutorials on LUA, (where they also talked about the ==), but it was confusing to apply the tutorials to the E1. Now, this might be due to my lack of familiarity with coding, or I just watched the wrong tutorials.
The print-line is indeed super helpful to understand the list definitions better and see what’s actually going on with the list definitions.

So, my next question, (I tried to formulate it in a previous post) is regarding my next steps. Is it possible at all to ‘collect’ the CC-values from the MC-505, so they show up on the E1 even before the parameter gets changed? Or is that a feature only possible with Sysex? There is also a possibility that there’s a proper term for this, that I don’t know.
And how difficult would it be to make the E1 remember the values for each part/channel? What I mean is, if I switch, let’s say from Part 1 to Part 2 and change values of some parameters and switch back to Part 1, it would be great if the E1 shows the values for Part 1, not what I’ve changed for Part 2 before.

I’m glad my version was helpful in your understanding.
One thing to keep in mind – we’ve all been there, starting at ground zero and we’ve all made these mistakes and many many more. :slight_smile:

One huge benefit of this particular forum is that folks here are not mean or nasty. Everyone is here to help others learn and improve. That is why I posted my reply publicly.

Now - to your questions. The short answer is yes, you can pull all the current values and you can set the controls to the correct state every time you change parts.

How to do it is a much longer answer. If you’re willing to experiment and do some research, folks here can help.
Martin usually has a nice way to read and parse a sysex block of data and the Roland documentation is fairly complete (though a bit complex). To start, let’s quickly discuss what needs to be done.

  1. When your preset first starts up, you need some way to talk to the MC-505 and start collecting the values.
  2. after you collect the values for a part, you need to store that data and keep it separate from the other parts.
  3. when you switch parts you need to replace the current data with the data from the new part and update the controls.

Things to decide

  • you can choose to not store each parts data. Instead, you can query the MC-505 every time you switch to a new part. If you are working live and need the fastest response, this might introduce a bit of a delay.
  • If you ever wanted to have a single control adjust multiple parts at the same time or to have the same control (like level) on the screen for multiple parts, it would be better to have all that information stored in the E1 instead of querying the MC-505.

It is helpful when starting to play with sysex to set up some basic testing environment outside the Electra One so you can observe what happens with the MC-505 receives and sends various kinds of messages.

1 Like

If you have access to MIDI-Ox on a Windows box or Sysex Librarian on the Mac, or can use the Electra One on-line docs to get to the MIDI command section, it would be good to test sending system exclusive messages to the MC-505 and seeing if you can get back something that makes sense.

Trying to do it all at once inside the Electra One can be frustrating because you’re learning/debugging many different things all at once.

Looking over the MC-505 MIDI spec, there’s some work needed to compose the “give me your data” message. Starting on page 236, we find the following:
Send a RQ1 message and you will get back an DT1 response.
The RQ1 message needs a lot of info. Fortunately, most of it can be hard-coded.

Section 3 - Parameter Address Map (p 239) is the meat of it all.
I started with: part info start address: 01 00 00 00
Then table 1-2 Part Info. Part 1 address is: – – 10 00 (-- is not used/don’t care)
Adding these together gives me the part 1 address of 01 00 10 00 and
Then Table 1-2-2 Part Info Part total size is 00 00 00 1A

Putting these into the sysex message looks like this:
I think this is a request to pull back the data for part 1:

F0h 41h 7Fh 00h 0Bh 11h 01h 00h 10h 00h 00h 00h 00h 1Ah 55h F7h  where -
                        |--address---|   |--size req--| chksum

This might cause the MC-505 to send back the data for part 1. You can check the resulting data sent back by looking at the DT1 return message structure and finding something you know (like level).

So: (note the 3rd byte - 7F is a generic device ID. The MC may return something else and you can use that for all future communications)

The DT1 response is: F0h 41h 7Fh 00h 0Bh 12h addr1 addr2 addr3 addr4 DATA checksum F7
Everything up to the DATA can be ignored and is just here for counting for now.

Starting with F0 = 1, the first data byte in the response is byte 11.
Looking at table 1-2-2, the Level value is byte 6 (Starting at 0!)

byte 11 (0) is Receive Switch,
byte 12 (1) is reserved
byte 13 (2) is Patch Group Type
byte 14 (3) is Patch Group ID
byte 15 (4) and 16 (5) is Patch Number
byte 16 (6) is Part Level

So look at this byte and look at the setting for Part 1 level and see if they match.