jmamma / MCL

MCL firmware for the MegaCommand MIDI Controller.
BSD 2-Clause "Simplified" License
53 stars 9 forks source link

MegaCom basic framework #128

Closed yatli closed 3 years ago

yatli commented 4 years ago

Work in progress. We can build a lot of things upon this:

enum comserver_id_t {
  COMSERVER_EXTUI, // button input, ext screen etc.
  COMSERVER_FILESERVER, // simple FTP-ish protocol
  COMSERVER_EXTMIDI, // note in, CV out etc.
  COMSERVER_MAX,
  COMSERVER_DRAIN_INVALID = 0xFF
};
jmamma commented 4 years ago

Cool. I had always wanted to replace Serial.print with something more robust. DisplayMirror mode will need to be implemented using this new protocol.

yatli commented 4 years ago

I've never used that mode. With the new GUI (cross platform, rest assured) in place I guess it's the time.

yatli commented 4 years ago

Thinking of putting a MC into this:

image

int MCDisplayServer::run() {
  // TODO external key, knobs etc. events handling
  return -1;
}
yatli commented 4 years ago
void MCUIServer::update() {
  megacom_task.tx_begin(COMCHANNEL_UART_USB, COMSERVER_EXTUI, 513);
  megacom_task.tx_data(COMCHANNEL_UART_USB, USC_DRAW);
  megacom_task.tx_vec(COMCHANNEL_UART_USB, (char*)oled_display.getBuffer(), 512);
  megacom_task.tx_end(COMCHANNEL_UART_USB);
}
yatli commented 4 years ago

Some progress on the UI. Decoupled the Camelotia stuff and add multiple tabs:

image

yatli commented 4 years ago

Debug view ready: image

yatli commented 4 years ago

Display mirror ready:

image

Too easy.

jmamma commented 4 years ago

😮 Great work.

Any chance for easy .png screenshot export, and support for inverse colour mode. That's how I generate screenshots for the manual.

yatli commented 4 years ago

Done.

image

yatli commented 4 years ago

The OLED emulation is actually an aliasing artifact. Don't know exactly how to repro that when rendering to a PNG 😅

jmamma commented 4 years ago

beautiful work. thankyou

yatli commented 4 years ago

The framework is ready now. @jmamma What about the UI? Do we want to add it to this repo?

jmamma commented 4 years ago

Which UI?

yatli commented 4 years ago

https://github.com/yatli/MegaCom.UI ignore the README.

jmamma commented 4 years ago

gotcha. keep repo separate is probably better.

yatli commented 4 years ago

Understood.

Currently it has the following functionalities:

yatli commented 4 years ago

You're on macOS? Let me build a package for you.

jmamma commented 4 years ago

either mac or pc.

yatli commented 4 years ago

PC: https://yadli.net/index.php/s/d7x3f7sBDtJNc2N mac: https://yadli.net/index.php/s/w7AFLEfrqQCPq9G

yatli commented 4 years ago

A nice little speed meter: image

albadort76 commented 4 years ago

Thinking of putting a MC into this:

image

int MCDisplayServer::run() {
  // TODO external key, knobs etc. events handling
  return -1;
}

i got one PT80 at home, would be so fun to have an MC inside! :)