I am relatively new in music programming and I am looking for suggestions on what tools/programming languages to use regarding the following scenarios about feature extraction and visualization:

  1. identify and group notes in a score (from different voices/instruments) that sound concurrently (even if they are attacked in different time offsets, though sound at some point together due to different duration lengths); then connect them graphically (e.g. on a score representation, with a line connecting them)

  2. identify melodic and accompanying parts (assigned to different voices/instruments, perhaps interchangeably within the same voice/instrument)

  3. extract initial tonality and following modulations; then map all extracted tonalities on a scale based on the circle of 5ths (where 0 is the initial tonality, -1 is one 5th lower, +1 one 5th higher, etc.)

I have been thinking of using music21 (the works I am interested in are anyway part of its corpus), but I am not sure if this is the right way to go.. Are there also other tools (e.g. jSymbolic2??) that could help?

And what about visualization? Could the above scenarios be visually "solved" within music21 or would I need an additional tool, like D3.js?

If you would have an advice on any of the above scenarios, that would help me a lot! Thanks, Ilias

closed as off-topic by Dom May 26 '18 at 17:38

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions seeking recommendations for specific equipment are off-topic, because they are primarily opinion based. Instead, describe the required function and setting in which the equipment will be used, and ask what you should look for to achieve that." – Dom
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    Hi Ilias. Unfortunately, asking for software recommendations is off-topic here. You may be able to ask on the Software Recs SE if you can format your question to their standards. To find out more about this site take the tour and read the FAQ. – Dom May 26 '18 at 17:40

If you're talking about analyzing a .wav/mp3 file then that's pretty hard and you get into the realm of fourier transforms and pretty low level programming.

If you're talking about analyzing a midi file or music that has been transcribed to some kind of computer format (I think music21 uses .MXL format) then that's alot easier because you're just parsing information.

If you're a beginner you probably want to stick to a scripting language in the backend like python or node.js (javascript). node.js currently has the largest library (npm) in the world and there's a ton of music based libraries. python's pypi is about 1/4 as big. but regardless they both have a ton of libraries for music. search github for what you're looking for. I like node.js because I like to just use one language (javascript) in both front and back end development.

as far as if you should use music21, that depends. music21 solves a specific purpose. also music21 is in python. does it suit your needs? if you're trying to create custom graphs and visualizations which it sounds like you are, you'll probably need to roll alot of your own code.

regardless if you use python or node.js back-end you'll probably use javascript in your front-end. You don't necessarily have to use d3. you can do a ton of visualization from just using straight html/css, or if you need more than that you can mess around with SVG, and the lowest level would be using canvas. but stick to html/css and svg first. you could use d3 (which sits on top of svg and canvas). but if you're new to programming learn the basics first. search on codepen.io for examples of visualizations.

if you have alot of programming questions, you might want to check out stackoverflow.

  • Dear foreyez, thanks for your thoughtful comment! I think I will stay with python, since I would like to try music21 (I am indeed parsing symbolic data, in musicxml format). Re: visualization, I will take your advice on consideration (I have used some d3.js before, but I will see if I can achieve the same results in a simpler way). – Ilias Kyriazis May 26 '18 at 19:41

well, i'm a guy who has gone down that path. but i don't really have any easy answers for you. i have answers, but they're my answers and your's will probably be different.

  • the programming language and framework don't matter. start with anything and if you find something better swap to that. rewriting code is easy. the logic isn't.
  • start simple. just displaying any notes at all is going to be difficult enough.
  • a computer just can't do some things. music is an art. how hard you hit each key within the melody is however hard you FEEL they should be hit. A computer can not calculate that.
  • learn to play piano. if you don't, there's a real good possibility you'll go off on a tangent writing code that is useless.
  • don't be afraid to reinvent the wheel. it'll help you out A LOT in the long run

good luck !

  • 1
    Stephen, thanks for your comment. It is helpful, however if you have a concrete tool to suggest as starting point, I would appreciate it. I have already some basic experience with programming and I have studied music, both in theory and as a pianist. – Ilias Kyriazis May 26 '18 at 16:51
  • 1
    sorry i don't have any to suggest. i just use c++. there are lots of tools around. but i don't use them so can't recommend any. – Stephen Hazel May 26 '18 at 20:23

Not the answer you're looking for? Browse other questions tagged or ask your own question.