Open Kaamir opened 3 years ago
Hi @Kaamir -- sorry to miss this. To answer your Q:
(1) Dynamics don't work using the expressions.dynamics module, but I believe it does work if you set .volume
on the notes. (See music21-python's docs on how to do that)
(2) Are you creating one giant stream or using substreams (Measures, etc.)? With the latter I can get to hundreds--maybe 1000 notes with decent speed. The other approach is to try using the canvas backend, which is much less memory intensive, which is the big problem with SVGs.
(3) Exporting isn't yet supported natively in music21j,
Hello. I am currently involved in a project where we wish to produce ‘live’ music notation in the browser. The app will be a javascript program that composes music based on an algorithm. Our goal is that as the composition program is running, the music notation will generate note by note in the browser. And one of the reasons for this, is that we would like to eventually use it for live performance – music that is being generated right before the eyes of the person performing it and that can change compositional direction depending on various variables during the performance.
However I’ve been having problems with music21j, and I’m no longer even sure if what we are attempting is even possible with the library. Here are our current biggest questions:
Do dynamics currently work with music21j? I can’t get them to render and I couldn’t find any examples of dynamics being used in the code from Github.
The generation of notes gradually gets slower and slower with every new note that is added to the piece (stream). I’m using ‘replaceDOM()’ after each beat or bar that has been composed. I assume that it gets slower and slower because it has to regenerate an ever growing svg file. What would be the best way to avoid this?
Is it possible to export an xml or midi file the way the python version does? Once a piece has been composed, we would love to save it somehow.
Many, many, thanks in advance!