Add new comment to Maximize window = waveform expand

Video: https://github.com/G3N-es/shareMedia/raw/refs/heads/main/SelectElementByMIDI.mp4

Two things make working with DrumkV1 a hassle:

  1. Having to visually search the list every time you want to edit an element (it sounds trivial, but it’s irritating and wastes a lot of time when the process should be instantaneous, as I explain below).

  2. Thinking you’re working on a specific element when another one is actually selected, forcing you to undo your actions (loading a different preset, then reloading the one you were originally working on).

If this is implemented, the workflow becomes much faster, more intuitive, and more enjoyable—as shown in the video.

There’s no need to search for anything, and no risk of selecting the wrong preset.

The list essentially becomes unnecessary.

To-do:

  1. Naturally, this should be a configuration option—disabled by default—so no one is forced to work this way.

  2. Currently, the piano view displays the element selected via mouse click; it should simply show the currently selected element, regardless of how it was triggered.

And here is the code that works the magic:

pDrumkUi->setCurrentElement(key);

// drumkv1widget.cpp: line 1742

// Notification updater.
void drumkv1widget::updateSchedNotify ( int stype, int sid )
{
	drumkv1_ui *pDrumkUi = ui_instance();
	if (pDrumkUi == nullptr)
		return;

#ifdef CONFIG_DEBUG_0
	qDebug("drumkv1widget::updateSchedNotify(%d, 0x%04x)", stype, sid);
#endif

	switch (drumkv1_sched::Type(stype)) {
	case drumkv1_sched::MidiIn:
		if (sid >= 0) {
			const int key = (sid & 0x7f);
			const int vel = (sid >> 7) & 0x7f;
			m_ui.Elements->midiInLedNote(key, vel);
			m_ui.StatusBar->midiInNote(key, vel);

			pDrumkUi->setCurrentElement(key);   // <--- HERE!
		}
		else
		if (pDrumkUi->midiInCount() > 0) {
			m_ui.StatusBar->midiInLed(true);
			QTimer::singleShot(200, this, SLOT(midiInLedTimeout()));
		}
		break;

It’s that simple, and that powerful.

What do you think?

The content of this field is kept private and will not be shown publicly.

Markdown

  • Parses markdown and converts it to HTML.
  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type='1 A I'> <li> <dl> <dt> <dd> <h2 id='jump-*'> <h3 id> <h4 id> <h5 id> <h6 id> <img src alt height width> <strike> <pre> <p> <br>
  • Lines and paragraphs break automatically.

Filtered HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <b> <i> <pre> <img src alt height width> <strike>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
File attachments
Unlimited number of files can be uploaded to this field.
2 MB limit.
Allowed types: jpg jpeg gif png txt doc docx xls xlsx pdf ppt pps odt ods odp zip gz bz2 xz patch diff wav ogg flac ogv mp4 qtz.