Lubuntu graphic support
I use Musescore in an education setting. I create presentations using Libreoffice Impress and project them on a wall. I have been using Musescore to notate simple songs for my students to play on the recorder. I'm running Lubuntu on a half dead dog of a system that won't boot windows (or I would be using Powerpoint).
Exporting a score in .png format creates a bitmap with transparent background. This is a problem in a program like Impress because it significantly reduces the amount of "real estate" to grab to select and edit the image. Furthermore, it scales poorly, so blowing up small images creates fuzzy, unclear images. Sometimes, lines of the staff disappear.
I've tried exporting with vector graphics, but these images don't render correctly. They are all kinds of garbled with incorrect characters. I assume it is because the fonts aren't installed correctly.
So, the $10,000 question is... what can I do to improve this? How does one install the fonts for vector graphics to work? Can I make .png files have a background color?
Many thanks in advance.
Comments
I don't know the details, but I do know SVG export is problematic in 1.X.
You can control the resolution used to save PNG's, so resizing isn't necessary. You can do it globally using the "-r " command line option, or if you are using the Snippet Creator plugin (available from the plugin repository onthis site - see Plugins at right), you can edit the line in the javascript file that sets the resolution. Since you mention LibreOffice, you could also try my Musescore Example Manager extensiom for LibreOffice, available from the LibreOffice extensions site. I doubt it would work directly in Impress, but if you don't doing scratch pages in Writer then copying and pasting to Impress, that should work fine, and give you perfectly sized examples right off the bat. Another possibility if your examples are sufficiently simple to not tax a somewhat unstable program still in development: try a nightly build of MuseScore 2.0 (see downloads link in menu at right of this page), which allows you to set DPI of exported graphics in Edit / Preferences. It also has a nice "Foto mode" where you can select a region for export, and select the resolution and background transparency.
If you want the background to not be transparent, you could turn on the screen shot option in Edit / Preferences / Export - this will cause it to grab the paper texture, I think. But also other screen-only graphics like greyed-out invisible elements, system breaks, etc. If you're main reason for not liking transparent backgrounds is that you are constantly resizing too-small graphics, that problem will go away once you use one of the methods I mentioned to create more appropriately sized examples right off the bat.
In reply to I don't know the details, but by Marc Sabatella
Thank you for the many suggestions.
I'm trying to use your Musescore Example Manager extension, but I'm stumped. I do not know the musescore executable path. This wouldn't be a problem if I was in windows, but I'm still learning linux.
Is it worth trying the nightly build of 2.0 or do you think I should just figure out the resolution I need for the .png?
Thanks again
In reply to Many thanks by studley music
Open a terminal and type
which mscore
Press return. The computer should answer with the path of the musescore executable.
In reply to Open a terminal and by [DELETED] 5
Thank you. That worked.
The extension functioned somewhat, but the scores still have enormous amounts of blank space that I can't figure out how to crop. I think I'll have to try more with .png settings or Musescore 2.0
In reply to Thank you. That worked. The by studley music
There should be no blank space above and beyond what is contained *within* your score. So I'm guessing maybe you have a title, copyright notice, or other element in the margin somewhere so this is dutifully being include in the crop. Make sure you score contains nothing but the actual measures you want.
In reply to There should be no blank by Marc Sabatella
I don't know what I"m doing wrong. As far as I can tell, my score only includes the measures and the title. I've included a sample .mscz file and a .odf made using your extension.
In reply to Here's my files by studley music
Unfortunately for our purposes here, the extension adds examples as links only, so sending me the document itself didn't really help much. This is one of those few cases where seeing a screen shot would be better, so I can see what you are saying. Is it possible you originally started with a version of that example that was a full page (copyright message) and you removed the message but didn't resave it until after you tried adding it to your text document?
Where I tried adding your example to your document myself, it worked just fine. So perhaps save it under another name and try again?
In reply to Unfortunately for our by Marc Sabatella
Sorry for the delay between posts. Been crazy busy here (new father).
Here's a screen shot. You can see by the green boxes that the image contains a great deal of empty white space. It is zoomed out to 40% so you can see the entire writer document.
In reply to Sorry for the delay between by studley music
Cut from the bottom with LibreOffice?
In reply to Forgive me if it is obvious by Shoichi
Getting rid of the extra whitespace is easy enough, but I'm getting the impression that it should not be there. The images still scale poorly. I need to figure out how to configure musescore to export higher resolution .png
Or figure out musescore 2.0. I'm a little bit afraid to make the switch, and I don't have much available time to troubleshoot my poor old pc if it gets borked.
In reply to Sorry for the delay between by studley music
Here's my next guess: you might have the "screen shot function" option turned on in MuseScore (edit / preferences / export), which causes the graphic that ges generated to onclude the paper texture rather than being completely empty space. If that is the case, then that would explain why it is not being automatically cropped down to size.
If you *don't* have that option turned on, then then next thing I'd ask you to do is to look in the folder comtaining the example and see what files are present. Under normal circumstances, you would see the MSCZ file and a PNG file for each example. Perhaps also the backup "MSCZ," file. If something has gone wrong, you might also see a second PNG file, with "-1" (I think) appended to the filename. What is supposed to happen is that the extension forces MuseScore to generate a PNG, and then the extension gives that PNG to ImageMagick to trim the excess white space. If for some reason that operation is failing and the extension isn't properly detecting that, then I could imagine you would be left with an untrimmed PNG file. Like maybe there is an a previous version of the PNG file there but it is marked read only so the ImageMagick can't overwrite it. Or the PNG file is open in another process which would also prevent the write from succeeding.
So, what files exist for that example? Can you delete any PNG files and try again?
In reply to Here's my next guess: you by Marc Sabatella
I DO have that option turned on. I will try turning it off right now.
Edit- it did not work. I have to quit for today. I will look into this again tomorrow or Monday.
Thank you for your time.
In reply to I DO have that option turned by studley music
Be sure to resave your score after example after turning the option off, or the extension won't ask MuseScore to regenerate the PNG.
If that doesn't do it, then looking at the actual PNG's wild be the next step. Posting one could be interesting. Also the file where the extension saves its own settings. To be honest, I don't remember where that is on Linux. But I'm wondering if you perhaps didn't enter the command line correctly when you set it up, s it's not dong the trimmng it is supposed to.
In reply to Be sure to resave your score by Marc Sabatella
I'm getting nowhere, so I tried to experiment with Musescore 2. Unsurprisingly, I was not able to make it work. I extracted the tar.bz2 to its own directory, removed old musescore (sudo apt-get remove) and now I'm left with an executable file named mscore that refuses to execute. I'm all out of ideas here. Can you nudge me in the right direction.
Thank you for the time you have already invested in my problem.
In reply to Musescore2 by studley music
The nightly are only for 64bit systems.Maybe you have a 32bit?
In reply to The nightly are only for by [DELETED] 5
I do have 32 bit! I'm positive this dinosaur is so old there's no way it's running 64 bits. Curses!
In reply to GAH! by studley music
You can build it yourself if you feel adventurous. See http://musescore.org/en/developers-handbook/compilation/compile-instruc…
In reply to GAH! by studley music
There had been talks and attempts to have the nightly builds as 32bit, but so far to no avail...
Ah, found it: #20743: [Linux] Error when launching a nightly build: binary file
In reply to Musescore2 by studley music
I'm the maintainer of «trunk» «nightlies» 64 bits
That's in fact done by a script activated each hour, and then running if I say OK
I could send you the script, which you could easily adapt.
In reply to Automate compilation by robert leleu
When you say "easily adapt", do you mean "easily adapt for someone with a solid understanding of coding" or do you mean "easily adapt for someone who spent 3 days trying to get Dropbox to start at boot"? Because I'm definitely the second one.
That said, I'm not afraid to adventure into deep waters, just so long as I have half a clue what I'm trying to do. I dunno. Is this something that I could just jump into?
I'm running Lubuntu on old-ass hardware. I have minimal experience using GitHub and compiling via terminal. On a scale from 1 - 10, I would rate my GNU/Linux expertise at about 2.
In reply to Compiling by studley music
but perhaps it needs a first compilation
adaptation is using the name of your home etc…
The second file is the good one
In reply to have a look at the attached file by robert leleu
A couple questions:
1) I notice a bit of french. Do I have to translate into english for this to work on my system?
cd $MUSEPATH
#construction du nom du fichier à placer sur site
date=$(stat -c %y ./build.release/mscore/mscore)
jour=${date:0:10}
heure=${date:11:2}
minute=${date:14:2}
fin=$(<./mscore/revision.h)
nom="mscore-"$jour"-"$heure"-"$minute"-"$fin
2) I know very little about code, but is "fi" supposed to be "if" or is it correct?
else
zenity --info \
--text='Nouvelle version de MuseScore !'$REVISION_OLD' => '$REVISION --display=:0
fi
export CFLAGS="-m32"
make
echo mysystempassword | sudo -S make install
In reply to this doesn't seem too hard by studley music
"fi" is correct, it is Shell syntax for "endif", as is "esac" for "end case", while for some strange reason is not "od" for "end do", but "done", whole "od" stands for "octal dump" ;-)
And no, you don't need to translate that french, it is just comment and variable names
In reply to "fi" is correct, it is Shell by Jojo-Schmitz
Thanks Jojo
Code is code (and as such no longer a national language), «fi» is an exemple.
Caution that I'm not 100% sure that my code is able to upload. It's presently on test, waiting for the next revision (was not the case at 9pm my time)
In reply to "fi" is correct, it is Shell by Jojo-Schmitz
Thank you. :)
In reply to Thank you. :) by studley music
I post my script on
http://dev-list.musescore.org/Automated-compilation-of-nightlies-td7578…
In reply to Many thanks by studley music
The nighlies are definitely worth checking out. As long as you aren't trying to do anything too terribly complication, they should be stable enough, and besides, if it crashes in the middle of reating a four measure excerpt, how hard could it be to fire it up and try again?
My sense is if you are just doong a handful of these, the new Foto mode in 2.0 is the easiest way to go. If you are doing dozens of them and perhaps not just as throwaways but as part of an ongoing project, then the LibreOffice extension startsto really pay off.
good luck
it's hard to do a good job with few resources (half dead dog).
Technical comments have already arrived, perhaps read this conversation may suggest other ideas:
http://musescore.org/en/node/20728
Try this
In Layout...Page Settings, set the dimensions to a multiple of your slide size (e.g. 160 x 120) and set the margins to a low value (maybe 5).
Save As a .png file
From the command line do:
convert -flatten -density 200 file.png new_file.png
Now try importing new_file.png into Impress and size it as you need it.
convert will also convert .pdf to .png which you can then edit with any simple graphics program.