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

119
Visualizações
How to look for patterns in numbers in javascript?

Given any array of numbers, similar in nature to the following:

[48, 60, 64, 67, 72]

I want to be able to evaluate this(or any) series of numbers and look for musically meaningful patterns, and I'm not sure how to start going about it.

For example, if I subtract 48 from every number I would get this:

[0, 12, 16, 19, 24]

...one will notice that the 1st, 2nd and 5th numbers are 12 apart from each other, which is a meaningful pattern in music, as 12 steps is one octave. This is one of the things I would want to be able to figure out by just looking at the numbers.

Now, if I take the middle three numbers and subtract 12 from each one I get:

[0, 4, 7]

...which is the numerical pattern of steps on a keyboard that would create a Major Triad, which is another example of something I would want to be able to evaluate from a series of numbers.

So, in the end, the original series of numbers:

[48, 60, 64, 67, 72]

...represents the following musical notes:

[`C2`, `C3`, `E3`, `G3`, `C4`]

...which is a C Major Triad C3, E3, G3 with the root doubled down one octave C2 and doubled up one octave C4 as well.

What I want to do is write some code that takes in any series of midi message numbers, like the example above, evaluates them, then tells the user what musical entity they have played, including inversions, doublings, other possible interpretations, etc...

There would be a database/dictionary/object/array/data-thing of some type that contains many different patterns, then the code would compare the incoming numbers to this set of patterns to find the correct one(s)...

Not looking for code answers as much as an idea as to how to go about even getting started with such a thing in javascript, as this would be for the web...

I just don't really have any idea how to start going about this, but any thoughts or examples or resources that could point me in the right direction would be most appreciated.

Thanks! XD

about 4 years ago · Juan Pablo Isaza
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