Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

90
Visualizações
Javascript Midi change track for individual notes one after another

So I want to change every individual midi note into a different midi track one after the other. Here is a jsfiddle of what I have so far: https://jsfiddle.net/alexybaddie/5ca7r9g0/84/

But the general code I want some help with lies in this section and goes as follows:

var twocolors = document.getElementById("twocolor");
  var threecolors = document.getElementById("threecolor");

  if (threecolors) {

    for (let i = 0; i < 3; i++) {
      // if "3 Colors" is selected, it will change first note, second note and then the third note to different tracks each. 
      // After that it will loop again and do the same thing but for the next notes.
    }
  } else if (twocolors) {

    for (let i = 0; i < 2; i++) {
      // if "2 Colors" is selected, it will change first note and then the second note to different tracks each. 
      // After that it will loop again and do the same thing but for the next notes.
    }
  }

Also, I have no idea if I imported the midi library correctly.

Hopefully someone could help me.

about 4 years ago · Santiago Gelvez
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda