27

Stack Overflow is a site about programming, a discipline that deals with code. To deal effectively with the code they implemented Markdown in their editor, an awesome software solution that allows typing crystal-clear reading content on the run, without effort, where code is easily distinguishable from regular words. Mathematics SE's site also needs a special software solution, MathJax, to make possible typing and rendering complex mathematical language on the go. You all know this, of course, but I wanted to bring it up to see how those assumed situations would apply to our music site.

We are dealing with music, a complex and many-sided subject that is dramatically different in it's nature to any other subjects from the other SE sites. The differences are mainly about the way our Q&A matter manifests in real life and about what kind of people is involved with it. Music is essentially sound, and a part of music is also usually written down with special notation. Music is also deeply involved with human nature itself, so as a discipline it will be necessarily related with people of all kinds, both aficionados and professionals. This is normal because many different people make music. That sets a difference with other SE sites that deal with maths, physics or programming. It's not common that some friends meet after work in a garage to do some rock out on partial derivative exercises. But making music just for fun, aside whatever other profession you work on, is common indeed. So it's natural that beginner questions and expert questions happen in this site in a way that differs from other sites.

I discovered this site short time ago and became really excited about what an awesome goldmine of music knowledge this could be. I'm also aware of the problems this site has got today. I've read and thought about many meta questions about those problems, linked below, that deal with different considerations about how to improve this site. And I came up with conclusions that really make sense to me, which can be summarized in this statement: in my opinion, the main problem this music site has is that it lacks the music itself.

This is what SE's Area 51 FAQ says about how we can solve our need more-users/more-expert-users/more-questions-per-day/more-expert-questions/more-in-depth-topics problems:

What makes good questions?

The questions on your site say a lot about the community. To attract experts, you need a site where people are asking very interesting and challenging questions, not the basic questions found on every other Q&A site.

Music experts love music, so they will probably stand by whatever place or site fulfilled with music, mainly in it's sound form and also, in those music traditions where it applies, in it's musical notation form. Both aren't frequently present in this site. There are musical notation images, many guitar tabs and graphs thanks to jTab integration, and links to audio. But that doesn't meet the awesome possibilities that SE's well thought format can open to music. Both audio and musical notation should be easily transformed and kneaded, so that music is organically treated by the users in both questions and answers. One user should be able to typeset music easily, so that the music he writes can be instantly reproduced by the other users, and so that the answerer can easily take the question's music and change just one note from it and put the answer example back and playable by all the other users, an answer that can also be further transformed by other users. I imagine lots of stimulating and challenging on-topic questions that not only can't be effectively treated with the site's current format, but also could be treated here in a unique, new and exclusive way. The statement that summarizes my solution proposal is: we need to work in an integrated software solution that rises this site's possibilities to the top by providing the specialized tools it needs to integrate the music itself into Stack Exchange's awesome way of conceiving Q&A mechanics.

Don't get me wrong. I'm not asking how to put audio or music notation in my answers, as other people did. I'm exhorting you to think about how exclusive and awesome this site could be for any musician if this features are developed so that audio and notation can be interactively treated. It's not just about being able to integrate isolated music media in the site. The experts, teachers, rock stars, composers, conductors, clarinetists and kazoo players waiting out there to be amazed by our site will be too busy in their affairs to ask or answer stuff containing music itself (that music they love and live for) if they have got to typeset their music notation examples manually, make a screen shot, cut it, upload it and post it; or going to the piano to figure out how a question's music does actually sound, and typesetting manually the asker's example to introduce whatever little changes are needed and doing after the whole uploading process mentioned above. I've often seen questions about scales and chords that use regular letters like Eb-G-Bb, which isn't as versatile and comfortable as working with the conventional notation.

The optimal way to input the music directly in the answer editor would be LilyPond, as concluded in another question. The main reason is that it's code is so simple that you can actually sing the music as you write it, in real time. It's also focused on generating very well readable output, it generates midi files and it's documentation is a goldmine. It also supports guitar and bass tabs, accordion diagrams, wind instrument fingering graphs, and notation styles including even gregorian chant or mensural notation, just to mention some of the possibilities it's got. So every single music freak will find resources to express himself with his habitual notation tools by just integrating this awesome piece of software. It's got many useful defaults that require minimal syntax knowing for any scales/chords-related stuff people might want to talk about. The needed syntax is so minimum like the Markdown commands we all use in the editor. Most of what the users would need can be summarized in two lines of code. c d e f g a b for notes, adding is and es to the notes for sharp and flat, \relative c { notes-go-here } to print always the nearer octave note so you don't have to specify absolute octave note values every time, grouping notes in chords by putting them between < >s, and adding a ' or a , to the notes to go an octave up or down respectively in the cases you need to modify the handy \relative c behavior.

Here is an example with it's output:

\relative c' { c cis d e f' e ges a b c, <g b d> <c, e g> }

LilyPond example

As you see, pentagram, key, time signature, bar lines and rhythms are automatically generated by default, so with minimum input you get a full featured output. We could tune our software solution defaults to print whole notes as a default, as they are usually used in chord and scales examples. The rhythm is however easily modified with numbers attached to the notes, as they appear in time signatures (1 for whole note, 4 for quarter note, etc...) Adding a Music tab to our music.SE's editor explaining this few things would be enough. And we could adapt a useful default behavior to be invoked with a command inspired in the other Markdown commands we use, something like !music[ c cis d e f' e ges a b c, <g b d> <c, e g> ] for the example above. It could be really KISS, quick typing and time saving. Being able to right click on music example -> copy lilypond code to clipboard would be the key to make possible to deal with the music without limitations, as math.SE users can access the question examples' LaTeX code easily with MathJax and edit it in their answers.

A play button with a time slider should be created by default on the site, next to each written music example. It'd make sense to use an on-line midi player for the LilyPond .mid generated files, so that SE's servers store lightweight midi files instead of heavy audio files. TiMidity++ is a lightweight FLOSS midi player we could integrate for this. And a priority should be to have tools to deal with the audio, with the ability to comment at a certain time point of the audio, as in SoundCloud, or by being able to type YouTube-like 00:48 or 05:23 links in whatever answer, so that you can hear that point of the music just by clicking the time mark. This last one method would make more sense, but we'd have to figure out a way to distinguish time links from possible multiple audio files in one single question, to allow comparisons, etc... Dealing with recorded audio is more resource-consuming. But just imagine a direct mic-to-SE button in the editor, as SoundCloud features, so that whatever you record goes directly uploaded and included in a player widget, with all the time linking capabilities. That would be just the most awesome thing ever.

All this may sound a little utopian and I'm conscious that it wouldn't be an easy task and that there are all kinds of technical issues to think about. But I know this is possible with today's technology. Just imagine how at-home will every musician feel in a site where you can discuss music even easily as face to face, given these proper tools and infrastructure to be able to really treat in-depth topics about music. The final result is exclusiveness, which is the reason people end often in other SE sites when they search for stuff related with their matters. For my computing issues I ended often by chance in a Stack Overflow or a Super User answer, because those questions and answers where so interesting and challenging that they generated exclusive content, only present in those sites. One of the worse things of today's music.SE is that a significant part of it's actual content is also written, explained and easily found in other sites and books.

So, does this specific software solution make sense to you? Do you think it's possible? Unfortunately, my today's programming knowledge is limited, so I could collaborate with brainstorming or lilypond templates, but not with the software writing itself. Are there programmers who agree with the usefulness of this software and that would agree to commit in a developing team to make this real? Is there anybody with experience in developing or leading open source software projects? Both LilyPond and TiMidity++ are free and open source software, as other tools that could be helpful at dealing with sound, like Pure Data or Csound. I'm sure that if we come up with something serious and consistent, it would be possible to include the software in the SE infrastructure, in the same way special software solutions were added to other sites, along with SE editor custom commands.

Really, excuse me for the exaggeratedly and massively long post. I promise I tried to be as brief as possible. I just really want to construct towards a Q&A music site as good as Stack Exchange and today's technology and musicians deserve.

Questionbibliography :O

As I told at the beginning, most of what I consider and talk about here rests in what I red in many other meta questions. Note that most of them have got a significant up-vote and/or favorite rate.

  • 2
    I would find it very convenient to have an implementation for notation for sheet music. My experience with the site lacking the notation is that I took a screenshot of the sheet music, saved the image, uploaded it to the website, but then I saw I made a tiny mistake. I experienced it as cumbersome to re-capture the screen and re-upload the image again to the website. – MC Emperor Dec 5 '13 at 8:15
8

Despite what I said about LilyPond's code structure in my earlier answer, it seems that Wikipedia has a LilyPond extension which is open source and may be implementable on this web site. Having this functionality would enable more questions and answers, with better examples and higher quality, to be made on the site.

From the extension's page on MediaWiki:

This extension is being used on one or more Wikimedia projects. This probably means that the extension is stable and works well enough to be used by such high-traffic websites. Look for this extension's name in Wikimedia's CommonSettings.php and InitialiseSettings.php configuration files to see where it's installed. A full list of the extensions installed on a particular wiki can be seen on the wiki's Special:Version page.

The dependencies are Lilypond (which, recall, is updated on a frequent basis with major improvements and includes its own dependencies), and optionally ImageMagick for trimming images.

Seems promising...

  • Can you find out more about the model, whether it is open source, and what the dependencies are and post that here in this answer? That could help. – Doktor Mayhem Nov 28 '13 at 17:30
  • Done. I don't understand exactly how it works, after reading about it. But perhaps it would be possible for one of the higher-ups here to contact the MediaWiki developers about it. – Richard Nov 28 '13 at 19:38
  • According to the code examples here, that is written in PHP. Stack Exchange is written in C#. A much more serious porting of the code would need to be done, but it'd be nice to see something native to Lilypond that can be written inline. – user6164 Apr 7 '16 at 13:17
4

One of the significant questions that SE rely on when implementing any tools such as this is:

How many questions on the site will need this?

If it is essential then SE usually try to find an existing solution which can just be built in and served with the pages (eg jTab)

It is very unlikely that they would write an entirely new implementation though. It just isn't likely to be necessary. We already have the tools to let us display music notation when we need to. It may be slightly more complex than the solution you propose, but not by much,, and it already exists.

1

Lilypond has .jpeg output capabilities, which removes any need for a screenshot. Perhaps, until it can be implemented directly in the site, it can be a "recommended" tool for typesetting music for use in questions on the site. Anyone who has gone through the trouble to learn Lilypond will probably also have it installed on their system. We're not a forum and don't have sticky threads and the like; I'm not sure what the StackExchange equivalent of an "announcement thread" would be.

One of the main issues would hold up the permanent implication of Lilypond on this site is that every time a change is made in the music, the entire file needs to be recompiled. Questions, while being written, have a preview pane below with real-time updating of files, and that would be tricky to get around.

Also, Lilypond is not just Lilypond, either. As I understand it, several other programming languages and compilers are involved with processing the Lilypond syntax. So the developers would really have to implement several different major programs, if you know what I mean by that. It would be a considerable project to undertake.

On top of that, Lilypond is updated on a frequent basis, and there are always major changes made in each new version. With every new version of Lilypond, the implementation would have to be updated on a similar scale or even completely redone to fit the new version, because whenever a new version of Lilypond comes out, that's what the community of users will learn.

I have a hard time seeing it happen, however awesome it would be. I am a huge fan of Lilypond and use it whenever I need to typeset something and see no reason why it should not be the default program to be used for typeset music on this site (or indeed everywhere). Its capabilities are simply unparalleled.