Realizing a full orchestral score with Musescore and LinuxSampler

• May 10, 2013 - 04:44

I've just completed another full orchestral score with Musescore, this time using LinuxSampler, and would like to share what I've learned. The score and audio are at http://youtu.be/ogqii9BuVw8 There's also a lyrics-only version at http://youtu.be/xiQlS4ScQCQ

I'm not sure if this is the right forum for this, but here goes.

Although the FluidGM bank is quite good, I've felt restricted by the inability to select individual soundfonts for individual parts, so I decided to go the sampler route and connect Musescore to LinuxSampler (Fantasia interface) and set up my own orchestra. LinuxSampler handles sf2, sfz, and gig files, and furthermore allows mixing and matching, such that a gig soundfont can be loaded on, say, channel 1, while an sf2 soundfont is loaded on channel 2. The JACK audio connection suite is required for this kind of setup.

I've been working with free/open source software for nearly 20 years, have never run Windows of any flavour, and furthermore haven't the budget for "professional" sampling suites like Garritan or Vienna. My choice of soundfonts, therefore, was deliberately limited to what's freely available on the Web.

It took weeks to find, download, and test what's out there. Far and away, the site with the largest collection is sf2midi, at http://www.sf2midi.com/soundfonts/ Unfortunately, they have a pre-paid/unpaid download setup, and the unpaid one a) has the slowest download speed I've seen since the days of 24Kbps modems, and b) prevents you from doing anything else at the site, even basic navigation, while you're downloading. Patience and perseverance required. Another large and useful collection is http://beats.codenamehippie.com/samples/SoundFrontz/

The most frustrating instrument section to get right proved to be the strings. Nothing out there is really satisfactory, and every choice is fraught with compromise: good sound but inappropriate attack (too aggressive or too sluggish), satisfactory attack but synthetic sound, excellent weight but lousy wet/dry mix, etc.

I eventually settled on KBH Ultima Strings, which, inexplicably, is one octave lower than it should be. This meant telling Musescore to transpose the part, a somewhat unintuitive 2-step process: first, instruct Musescore to "play transposition" in the Staff Properties dialogue (perfect unison + 1 octave up), which transposes the printed notes down 1 octave on the staff, followed by selecting the entire staff and moving the notes back to their original octave with Ctl-arrowup.

The logic of this escapes me. When I say "play transposition", I expect the notes on the staff to remain the same, but the pitch of the output to be transposed. Furthermore, when I move the notes back into position, I expect the transposition to move with them, but it does not. It took quite a while to straighten that one out.

Setting up my "orchestra" in LinuxSampler was a lengthy process. I created sampler channels for each instrument and methodically loaded and tested the soundfonts I had downloaded for that instrument. The testing took a lot of time, and was made even longer by virtue of the fact that if I wanted to try an instrument from a big GM soundbank, it took a couple of minutes for the bank to load. (This isn't a problem for single instrument soundfonts.)

Luckily, saving a complete orchestral setup to an lscp script, which functionality LinuxSampler provides, meant I could reload the whole orchestra without the delay once I had it the way I wanted it.

LinuxSampler only provides 16 channels per midi port (MIDI INPUT), which is less than needed for a full symphony orchestra. The solution to this is to create additional midi devices in Linuxsampler, giving each a different arbitrary name (eg LinuxSampler, LinuxSampler1, LinuxSampler2...) and to ensure that Musescore creates, at a minimum, the same number of midi ports in the Preferences->I/O dialogue. Then, when setting up Musescore and LinuxSampler with qjackctl (in the MIDI tab), connect mscore-midi-1 to LinuxSampler, mscore-midi-2 to LinuxSampler1, etc. Also, remember to disconnect "Mscore" from "system" in the qjackctl Audio tab, and to connect "LinuxSampler" to "system".

Lastly, again owing to the 16-channel limitation, I had to make sure the "MIDI INPUT" and "Channel <#>" of each instrument corresponded to the Musescore instrument channels. This got confusing, since after the first 16 instruments, I had to change the MIDI INPUT from 0 to 1 and remember that the Channel <#> was now n - 16. For example, if the double basses were on Musescore channel 18, MIDI INPUT had to be 1, and the Channel had to be 2 (18 - 16). Adding to potential screw-ups, Musescore automatically assigns 3 channels to stringed instruments, which means that if Violins1 is on Channel 1 in LinuxSampler, Violins2 is on Channel 4. Very easy to mess up.

Once the orchestra was set up in LinuxSampler, I left the output of each instrument set to maximum (the default) and created a test score in Musescore with slow 4/4 whole notes, one per instrument per bar. While playing the score, I used Musescore's Mixer to adjust the levels until each instrument was playing at an equal mezzo-forte.

I then attacked my orchestral score, using the Note Properties dialogue to adjust the velocity (volume), ontime, and offtime value of each note, as required, to achieve a properly phrased realization of the score, with all the dynamics in place, suitably balanced.

Lastly, because I connect everything with jack, I was able to pipe the sampled output of my score through an equalizer (jamin) and jack_rack, which I loaded with the freeverb module.

Voilà! One completed score with a satisfactory prototyped audio version.

It was an enormous amount of work, much of which, fortunately, I won't have to repeat. However, Musescore (1.3) itself has some issues that added significantly to the overall time it took to complete the project. I list them here, in the hopes that version 2 will benefit.

The score itself:

  1. Block selecting and copying sections of the score doesn't copy the associated dynamics, lines (like rit. extenders), or staff text. This was a real hassle, since the non-copied items required a lengthy duplication of work.
  2. There's no keyboard nudge available for dynamics, lines, or staff text as there is for notes, rests, stems, etc. It's very annoying having to align these objects using only the slippery mouse.
  3. There doesn't seem to be a "constrained move" function, ie holding down a modifier key and dragging an object vertically with the mouse means it doesn't alter the horizontal alignment (x-axis) and dragging it horizontally doesn't alter the vertical alignment (y-axis). It's incredibly time-consuming, having to use a screen ruler to verify the horizontal alignment of vertically moved objects and vice versa.
  4. Group selecting non-note objects, say a dynamic and a hairpin, then moving them, causes the moved objects, notably the dynamics, to snap into new vertical positions instead of keeping the relative positions already assigned to them.
  5. Changes made in the Text Style dialogue don't appear until the score is reloaded. Live updating, especially since there's an "Apply" button, is obviously essential.
  6. Changing the scaling of a score (in Layout->Page Settings) results in a scaling of text items, but without a corresponding update of the text's size in the Style->Edit Text Style entries, with the result that the latter may say "8 points" while the actual point size as reported in the Text Tools bar is, say, 7.6 points. Frankly, when I scale a score, nine times out of ten I don't want the text scaled. A radio button in Page Settings, "Scale text", would be highly appreciated.
  7. Hairpins ought to be treated like slurs, ie select the first note, select the last note, apply the hairpin. As things stand now, every hairpin ends automatically on the first note of the next bar and has to be adjusted manually. When you're doing a big score, that's a lot of hairpins.
  8. The copyright appears on every page. I've never seen a printed score where this was the convention, so I'm assuming a bug. The copyright needs only go on the first page.
  9. Setting the green staff spacers to Invisible only works while the score is open. Close and reload, and the damn things are back!
  10. For reasons I can't track down, the pdf output is properly antialiased in acroread, but is horribly jagged when I use either of the popular pdf viewers, okular (kde) or evince (gnome). Since Musescore's pdf output is the only pdf I have encountered in the past decade that has this oddity, I have to assume the problem is at Musescore's end, not okular's or evince's. PostScript output is fine, though, as is the printed output from the pdfs.

Midi:

  1. There needs to be an option to set the defaults for the Note Properties dialogue. For example, I never, ever want the velocity at "Auto". It is beyond annoying having to change the Velocity type to User for every note before changing the actual value.
  2. Related to the above, when group selecting notes and changing any item in Note Properties, only the changed value should be applied to each note in the selection. The way Note Properties works currently, the entirety of the dialogue is applied to all of the selected notes. For example, if all I want to do is change the velocity of a phrase that contains tweaked offtime and ontime values for each note, I most certainly do not want those ontimes and offtimes altered to the uniform value that happens to be current when I invoke Note Properties. I want them left alone, and only the velocity changed.
  3. When I change the length of a note from longer to shorter (say, a whole note to a half), the note's velocity and velocity type stay the same. This is as it should be. However, when I change from a shorter length to a longer one, the velocity type changes to Auto and the velocity changes to 80. Clearly, this is not what's desired. One expects a note, having been assigned a velocity, to keep it.
  4. When using the setup I described at the beginning (Musescore connected to LinuxSampler), I have to "touch" the volume of every single instrument in the Mixer every time I load a file in order for the volumes to be correct for where I've set them. ("Touch" means lowering then raising the volume knobs by one notch.) Talk about an annoyance!
  5. There needs to be a way of assigning an arbitrary number of channels to each Staff instrument. Strings currently get three--normal, pizz, trem.--but sometimes need more (say, for legato, détaché, marcato). Trumpets get 2--normal, muted--but sometimes there's a need for two or three different mute types. French horns only have one channel, which means there's no way to switch to stopped or muted. Given the impossibility of knowing in advance how many channels may be required for a given Staff instrument, giving the user the option to assign the desired number seems the way to go. This one item alone would move Musescore into a whole new ballpark when it comes to generating audio prototypes, without the need for massive recoding of the midi routines.

Musescore is an excellent piece of software, BTW. Thorough congratulations to the developers. You have actually inspiried me to compose again, for which you have my undying thanks.


Comments

Thank you Peter for the music and for this walkthrough, very instructive and one of the first I see about using Linux Sampler and MuseScore together. Readers might also want to check this: http://musescore.org/en/node/13319 and maybe you can add some insights in this tutorial too.

Regarding the feedback about MuseScore, I added numbers in your post to be able to reference them here.

The Score itself:

1/ This is fixed for the next version of MuseScore, 2.0 (no release date yet).

2/ Indeed. It's a popular feature request. The main issue is that double click a text already enter edit mode.

3/ Constrained dragging is possible. Pressing shift or ctrl will constrained the dragging vertically and horizontally.

5/ This is fixed for next version

6/ This would be worth another forum post to explain why you don't want text to be proportional to spatium.

7/ Hairpins do work like slurs. You can select the first note, shift click (or ctrl+click) the last note and press H or Shift + H. Can you explain what didn't work out for you?

9/ Line and page breaks are not supposed to be made invisible. They will not appear in print or any export.

10/ This is worth a separated report. Is the display bad in any zoom level?

MIDI
1/ The inspector feature in 2.0 will make this easier.
2/ Same here
3/ This is related to #19149: Changes in Note Properties and Inspector changed to defaults after increasing value and it has just been fixed of the next version.
4/ Looks like a bug. I can reproduce in MuseScore 1.3 but not in the current development version. So it's fixed :)
5/ This is interesting but would probably make the UI complicated for the majority of users, the one who don't know about Jack, LS or anything. Do you have any idea for a possible UI?

In reply to by [DELETED] 5

Thanks for the very thorough reply. Extremely encouraging, and I — like many others, I suspect :) — am really looking forward to version 2. Thanks, too, for setting me straight about hairpins. Somehow, I missed that they could be entered as "H" from the keyboard; I'd been using the palette.

SCORE:
3/ Constrained dragging: I can only say it doesn't function on my system, which seems peculiar. Neither modifier, Ctl or Shift, has any effect when I click-drag. The selected object, say a dynamic, wanders off the expected axis in response to my slightest mouse move, which is exactly what constrained dragging is supposed to prevent. I've tried "Modifier+click-drag" and "click-drag+Modifier" for both Ctl and Shift, and the drag is still not constrained.

9/ Setting spacers/breaks to invisible: I'm not quite sure why they're not supposed to be set invisible. Hiding formatting marks in an electronic document is generally considered desirable. I need them invisible when I'm screen-capturing a score to be used in a video. It does seem a little odd that I can, in fact, make them invisible when, as you say, they're not supposed to be.

10/ PDF output: I was slightly in error when I said that both okular and evince displayed Mscore documents un-antialiased. Only okular does. Some research shows that okular has an unaddressed bug concerning correct dpi, and is currently hardcoded for 72x72. I'm guessing this is the source of the problem. Very surprised it hasn't bitten me in the derrière before.

MIDI:
5/ Arbitrary number of channels per staff: Trying to imagine how the UI would work without giving any consideration to the coding involved, I envisage simple changes in three areas: the Staff Properties dialogue, the Mixer, and the Staff Text Properties dialogue.

Staff Properties dialogue: An item for "Additional channels", or perhaps "Sampler channels" or "Additional sampler channels". The default would be "0". As with any dialogue item, users who don't know what it's for can or will ignore it.
Mixer: In the Mixer, additional channels would be labelled by the staff instrument name, with the suffix "-alternate(<n>)", eg "Violins 1-alternatel(1)". Since the additional channels are for use with a sampler, not the internal synthesizer, there's no need even to add the "Sound:" dropdown. For convenience, it would help if the Mixer channels were visibly numbered: shorten the label field slightly from the left and stick an unobtrusive numeral before it.
Staff Text Properties: radio buttons or checkboxes for the additional channels, identical to what's currently offered for stringed instruments (normal, pizzicato, tremolo) except the choices are numbered, eg "alternate 1". If no actual staff text is required, the text can be arbitrary and made invisible.
    I can't stress how useful this functionality would be. Say, for example, there's a single cantabile phrase for solo oboe in an orchestral score. The sound needs to be bright and have a good vibrato, quite a different sound from what's wanted when the oboe(s) are part of the whole orchestral fabric. With the UI as I've described it, one would simply select the first note of the phrase, add Staff Text ("solo"), then right-click "solo", choose Staff Text Properites, check Channel, and select whatever's appropriate from the number of additional channels allocated to the oboe staff. It's up to the user, of course, to map the channels correctly in LinuxSampler.
    As things stand now, the only way to get this functionality is the arduous business of assigning a stringed instrument to every staff in the score (which allocates three channels to the staff), then editing the instrument text for each staff so the instruments are correctly identified, and fixing any transpositions. One can then use, for example, the channel allotted to tremolo for a needed solo instrument soundfont, or a stopped horn, or col legno strings.

I checked out the tutorial on JACK and am thinking there needs to be something better, more Musescore-specific, after the experiences I've had. I'll start working on it.

In reply to by Peter Schaffter

Beautiful piece, and nicely rendered!

Indeed, 2.0 is something I am very much looking forward to as well. Your list of suggestions looks very much like mine, and I'm happy to see much of it is already implemented. A few more observations:

1) Most text items *can* be nudged - at least horizontally - once you double click them. Just move the cursor to either end of the text and keep moving. However, this feature is currently disabled in the 2.0 builds. Not sure if there are plans to bring it back in its current form, or hopefully extend it somehow to work vertically as well

3) The instructions on how to constrain dragging are for 2.0. One more thing to have to wait on.

8) 2.0 also has more flexible header/footer options, so I assume you can get the copyright on the first page only.

9) I think the point is, you are supposed to be *able* to set the formatting marking invisible, but it isn't something most people would ever need to do, since they are already invisible where it counts - in the print / PDF. So maybe it's more to the point to say, you aren't *normally* supposed to set them invisible", since they are only visible on screen, where they come in very handy. For the few unusual situations where you need to hide them - like making a screen video - you can. I suspect this is more a program option than a score setting, at least in principle, which might be why it doesn't "stick". BTW, I don't know if you've checked into the videoscore capability at musescore.com - might have been an easier way to create this (or not).

Regarding the playback transposition, you need to realize it wasn't designed to be a workaround for broken soundfonts, so that's why it seems "backwards". It's designed to handle the actual transposition of actual transposing instruments. And you normally would not need to ever set it yourself; each instrument "knows" its own transposition and sets this appropriately. If you change from one instrument to another with a different transposition, you normally want the sound to stay the same but the notation to change (at least while not in Concert Pitch mode). So I assume that's why it works as it does.

If you weren't aware, 2.0 will also allow for multiple soundfonts to be loaded, hopefully letting you use FluidR3 in conjunction with others and lessening your need to rely on LinuxSampler. There have been a number of improvements to playback for 2.0, including what to my ears seem like tweaks to note attack, that actually make any given soundfont sound better. But as we discussed before, there are still limitations to be sure.

Do you still have an unanswered question? Please log in first to post your question.