MIDI keyboard and Linux

To get your MIDI keyboard working in Linux, you should do something like the following steps:

1) install Rosegarden, which automatically install jack and the related software in particular Qjackqtl (jack GUI). Maybe you could install directly Qjackqtl…

2) add your user to the audio group

sudo usermod -a -G audio <your_user_name>

3) install Qsynth,
4) do the following terminal command

sudo apt update; sudo apt full-upgrade -y; sudo apt install -y pipewire-audio-client-libraries libspa-0.2-bluetooth libspa-0.2-jack wireplumber pipewire-media-session-; sudo cp /usr/share/doc/pipewire/examples/alsa.conf.d/99-pipewire-default.conf /etc/alsa/conf.d/; sudo cp /usr/share/doc/pipewire/examples/ld.so.conf.d/pipewire-jack-*.conf /etc/ld.so.conf.d/; sudo ldconfig; sudo apt remove -y pulseaudio-module-bluetooth; systemctl --user --now enable wireplumber.service

Musescore and a MIDI keyboard

To get Musescore able to record from a MIDI keyboard I had to use the 4 release, so far with an appimage from their website.

Pop-up footnotes (at the window bottom)

A good starting point is the Hugo footnotes

But I have done some improvements (according to my needs), as the following:

  1. link (at the end of a html page) the file footnotes.js, with this content:
function getFootnoteContent(index) {
  const id = "fn:" + index;
  const fn = document.getElementById(id);
  return fn.innerHTML.trim();
}

function footnotePopup(showIndex, showCloseBtn) {
  const popupWrapper = document.querySelector("#popup-wrapper");

  // Set whether to display index and/or close button. Default is true for both
  if (showIndex === undefined) {
    showIndex = true;
  }

  if (showCloseBtn === undefined) {
    showCloseBtn = false;
  }

  // Create main container that will hold footnote content
  const popupContent = popupWrapper.appendChild(document.createElement("div"));
  popupContent.id = "popup-content";

  let popupIndex = null;
  if (showIndex) {
    popupIndex = popupWrapper.insertBefore(
      document.createElement("div"),
      popupContent
    );
    popupIndex.id = "popup-index";
  }

  let popupCloseButton = null;
  if (showCloseBtn) {
    popupCloseButton = popupWrapper.appendChild(document.createElement("div"));
    popupCloseButton.innerHTML = "[x]";
    popupCloseButton.id = "popup-close";
  }

  // Remove redundant [return] links from footnote list (optional)
  const fnReturns = document.querySelectorAll("a.footnote-return");
  fnReturns.forEach(function (fnReturn) {
    const parent = fnReturn.parentNode;
    parent.removeChild(fnReturn);
  });

  const fnRefs = document.querySelectorAll("a[id^='fnref:']");
  fnRefs.forEach(function (fnRef) {
    fnRef.addEventListener("click", handler("refs", fnRef));
  });

  //window.addEventListener("scroll", handler("close"));
  
  document.addEventListener(
    "click",
    function (event) {
      if (
        event.target.matches("a[id^='fnref']") ||
        event.target.matches("#popup-content")
      ) {
        return;
      }
      popupWrapper.style.display = "none";
    },
    false
  );

  if (showCloseBtn) {
    popupCloseButton.addEventListener("click", handler("close"));
  }

  function handler(type, node) {
    console.log("test");
    return function (event) {
      if (type === "close") {
        popupWrapper.style.display = "none";
      }

      if (type === "refs") {
        event.preventDefault();

        const index = node.id.substring(6);

        if (showIndex) {
          popupIndex.innerHTML = index + ".";
        }

        popupContent.innerHTML = getFootnoteContent(index);
        popupWrapper.style.display = "flex";
      }
    };
  }
}

footnotePopup(false, true);
 

2) Put, before that link, the div where the note will be shown

<div class=\"bottom-panel\" id=\"bottom-panel\">
 <div class=\"popup-wrapper\" id=\"popup-wrapper\"></div>
</div> 

3) Modify the anchor tag (within your main text), with something like

<a href="#n1" id="fnref:1">[1]</a> 

4) and the footnote should be like the following:

<p id="fn:1"><a href="#fnref:1">[1]</a> your footnote here.</p>