MegaCommand // MiniCommand Resurrection // MCLive

Daily Update:

Classic Read/Write modes now working again and allows for precision editing. Code re-written.
Controls are symmetrical between read and write pages.

In the original MCL firmware the encoder buttons were use to read/write tracks to and from the MD.
This functionality has been replicated again as an alternative to the trigger input for reasons explained below.

Using the MD Trigger exploit as an input mechanism provides you 1->1 track->slot or slot->track mapping. In other words, trig 0 corresponds to grid column 0, trig 1 corresponds to grid column 1 and so on. If you want to store tracks 0-3 from the MD in columns 0-3 on the MC grid, you enter the read page and press triggers 0 to 3 on the MD.

With classic mode, the mapping is dependant on the current selected track of the MD. This allows for precision storing/writing of tracks. You can store or write tracks to specific locations. For example, you might want to store a Snare Drum from MD Track 7, in Grid Column 2.
Select track 7 using the MD Track encoder, and then press encoder button 2 from the read page.

2 Likes

Daily Update:

Added track writing options to specific pattern, original pattern, original kit, original pattern + kit.
(I might add in read from specific pattern, instead of current pattern, yet to be decided)

Added 16th step counter to read, write and cue pages. The counter, counts up to 64 steps and is useful if you are going to time a track quantisation.

Current Track/Kit name displayed as scrolling text on main page (was previously limited to first 4 characters).
GUI is coming together nicely.

Squashed a few bugs and general improvements to the code.

Not long now.

3 Likes

Daily Update:

Added read from specific pattern. This was easier to implement than I thought and actually helped clean up the code.
Improved gui navigation.
Testing, testing and more testing.

The firmware is feeling sleek and stable and I dare say almost ready for release.
We are at 59.5kB. With 1kB to spare for bug fixes :slight_smile:

To Do:

Instructional video(s).
Basic Manual.

What’s everyone doing this weekend, should we release the beta?

5 Likes

Say Justin, at the risk of coming off like a guy who hasn’t read a line of the preceding thread: It might be helpful if you could knock out a quick overview video (not instructional, just a demo) that outlines the firmware’s basic functionality and how you think it might be helpful/useful in a live context. You’ve obviously put a ton of work into this and it would help us willing beta testers help you more effectively.

2 Likes

Hi Dub,

That’s the plan. As you would know, MCL version 1 was a mystery to many people, so I hope to clarify all this with a simple video.

Cheers,

  • Justin
6 Likes

Daily Update:

Added three new quantisation write modes (P, P+ and P-).
P: Write to a specific pattern then schedule a pattern change to that specified pattern.

P+ and P- (write pivot). If you’re in track B01 and P+ is activated, your tracks will be written to B02 and a pattern change will be scheduled to B02 and pivot mode changed to P-. If you’re in track B02 and P- is activated, your tracks will be written to B01 and a pattern change will be scheduled to B01 and pivot mode changed to P+.

This probably sounds confusing as hell, but basically tracks will always be written to the next or previous pattern and then a pattern changed scheduled.

All three modes allow for a seamless transition in certain situations. For example, if you’re using all 16 tracks and don’t want to mute any of them, you can write to a specific pattern and then schedule a pattern change so that the new tracks will only change on beat.

2 Likes

so if i’m understanding this correctly:

i’m jamming in front of an audience and have a bunch of new ideas that i’d like to keep, but i don’t want to alter the pattern/kit i’m using by saving over it. i could do it if i were willing to stop the sequencer, save it elsewhere and go back, but that would ruin the vibe.

with the new firmware, however, i can sidestep this longstanding problem?

Hey Dub,

Yes but also no.

You can store the current Pattern/Kit in to MC memory. But to achieve this the MC must tell the MD to save the current kit. This would overwrite your current work. You could however save your current kit to a new slot, then store the pattern + kit in the MC, for retrieval at a later time.

Or you could use MCLive to store all your patterns, writing them to the MD as needed, keeping them as a master copy, and using the MD as a live scratch pad.

3 Likes

Just a quick update here.

Spent a good amount of time testing the firmware today and yesterday. Mostly from the viewpoint of a user/performer and fine tuning the behaviour(s) as I go along.

It’s getting closer to becoming a usable musical tool, not just a technical marvel :wink:

Hope to have something to share shortly…

6 Likes

Weekly Update:

Seems like i’ve squashed most of the ‘deal breaker’ bugs.

I’ve improved the trigger exploit reliability to a point where it will only fail if you enter the mute or system menu when a trigger page is active.

After vigorous testing it appears TurboMidi is not production ready :(. It’s only 90% reliable and when it fails you end up getting a corrupt pattern or kit which sounds awful. Failure mechanism is unknown at this point (MD sysex errors 1 & 2). Throttling the midi output has no effect and turbo 2x, 4x speed are failing at the same rate.
I don’t see this as a huge issue, the firmware is perfectly fine running at 1x midi speed. Unless I can come up with a fix, I’ll probably remove the feature as it will free up more program space.

I’ve been working on demo patterns during my testing. Over the next few days I’ll organise these in to a short set to demonstrate the usability of the firmware and features.

5 Likes

Daily Update:

Still working hard here.

So I think I have finally found the issue with TurboMidi and dare I say, we are back again.(How many times have I claimed that it is working now?). I need to work out why the fault is causing the problem, but basically Wesen coded in a midi timer that sends a SenseActive message every 300ms (midi version of a heartbeat signal). When turbo midi is engaged he decreased the timer to 150ms (as suggested in the MD manual) and this seems to be causing the flakey sysex behaviour. Not sure why though.

In other news I recoded the write page to be more user friendly as I was having trouble remembering some of the features I had added. It’s now fairly straight forward and I hope easy to understand and use.

Also I found a bug where writing to a pattern that is not the current pattern fails periodically. I need to investigate this as it is failing silently (no sysex error codes).

Due to the recent works my demo videos have been delayed some what.

5 Likes

Might be wrong here, but shouldn’t you stop sending any other message while SysEx is ongoing?

Yes, This ActiveSense message is not sysex though, which is why the problem seems strange.

I should give some background as to how the Minicommand handles MIDI. Basically there are interrupts listening on the input MIDI ports. Whenever a byte is received the currently executed code is paused, and MIDI interrupt code is executed. This is really light weight code that basically services the MidiClock (updating counters and handling start, stop and continue messages. song pointer etc), for all other messages such as SYSEX the MIDI bytes are stored in a Ring Buffer which is left sitting there waiting to be processed by the main program loop.

In normal operation the Minicommand falls into a main loop where it refreshes the GUI (handles the button presses and updates the LCD), it also handles midi by reading a byte off the Ring Buffer. Depending on what the midi message is this may cause the Minicommand to execute code which will cause the main loop to pause until the code is finished executing.

For MIDI Output the concept is similar. There are interrupts on the output ports. Data to be sent is stored in a Ring Buffer. The Ring buffer is processed one byte at a time. Whenever a byte has been transmitted on the MIDI port an interrupt is triggered which causes the next byte in the buffer to be sent. There are some edge cases where by if the buffer is full, the interrupts are skipped and the entire buffer is drained. For MIDI clock messages, (such as merging the midi clock from the 2nd input port) the buffer is skipped and the data is sent immediately (i.e. when the port is next free). (*The above applies to MIDI Ctrl 0018, 0017 and below incorrectly handled midi output transmission).

When you send big chunks of Midi data such as SYSEX dump, the main loop will actually be halted and all processing resources devoted to encoding and placing the data in the output Ring Buffer. Interrupts along the way will transmit this data, unless the buffer is full in which it will drain.

So getting back to ActiveSense. It’s a MIDI Status message that should be sent after 300ms of inactivity to signal to the connected device that the connection is still alive. In the Minicommand’s case there is a timer interrupt that is decreasing a 300ms counter until it = 0, and then sends out the status command if midi data has not been transmitted during this time. I suspect that the implementation here may be bugged. Why it’s causing the sysex data to be corrupt I have yet to work out.

2 Likes

And here in lies the problem:

“A device sends out an Active Sense message (at least once) every 300 milliseconds if there has been no other activity on the MIDI buss”

Midi ActiveSense

Wesen never resets the counter and Active Sense is sent regardless of Midi output activity.

1 Like

Is Active Sense even needed for anything in this context? Does the turbo protocol require it?

From the MD manual:

Active sensing:
Active sensing should be sent from any device supporting
Turbo MIDI whenever a higher speed is used
(TM-1 approx 150ms between).
If a Turbo MIDI device receives active sensing and
then active sensing is lost for more than 300ms the device
will revert to normal MIDI speed.

1 Like

Interesting, thanks. :slight_smile: It’s pretty much entirely optional for normal speed MIDI, as far as I know.

Yeah. Seems strange that it breaks SYSEX transfer though. It looks as though Wesen was just following the elektron’s advertised spec, i.e. keep transmitting the active sense every 300ms regardless of the midi throughput.

Might just be a bug in the MD’s MIDI handling. It is an edge case to get an active sense message in the middle of a sysex stream, so this was probably not tested or made very robust.