Re: Windows Media Player alternatives for midi playing?
Am 31.10.2021 um 02:02 schrieb Wol: On 30/10/2021 08:42, Pablo Cordal wrote: The problem: WMP blocks the midi file while (and after) it's playing, so if I modify something in lilypond and I want to hear it, I have to close WMP, then compile, go to the folder and reproduce again.. and I'm composing so I do it a LOT of times. Except that's NOT the problem. The problem is that WINDOWS locks the file against writing if anything else has it open. You need to get WMP to drop the file. Please don't mix up Windows operating sytem and Windows applications. The OS provides the apps the capabiliies to lock or to share files. There's no reason to blame Microsoft for choosing Adobe the option to lock the file. I have exactly the same problem with Acrobat Reader - if I'm viewing a score I can't run lilypond until I close Acrobat, otherwise it just fails on me because it can't overwrite the pdf. Yes, Adobe probably doesn't read the entire file and needs to re-read some chunks from the file. So Adobe choosed to lock the file. Question: anybody knows a mid player with does not block the file, so it loads the file each time for playing it? Switch to linux? Because linux doesn't tie the file name to the file, it can delete the old file without messing up any program that's got the file open, and create a new file with the same name. So if I ask for a tire, you offer an entire car? There are good reason to choose an operating system. If one tool in the tool set doesn't fit, it's not necessary to switch to a new OS. Regards, Helge
Re: Windows Media Player alternatives for midi playing?
Am 30.10.2021 um 09:42 schrieb Pablo Cordal: Question: anybody knows a mid player with does not block the file, so it loads the file each time for playing it? You can try the DesktopMidiPlayer. (http://breakoutbox.de/software/desktopmidi/desktopmidi.htm). This /app/ doesn't lock the file. But I don't have experience with sound files. So you will have to check if it meets your needs. Regards, Helge
Re: Windows Media Player alternatives for midi playing?
> Am 31.10.2021 um 03:12 schrieb Aaron Hill : > I run SumatraPDF which is able to display a PDF without causing Lilypond to > fail to write to the file at a later time. In fact, it is also able to > detect such changes and redisplay its contents. None of this is special to > Sumatra though, so there could be other PDF viewers that are similarly > well-behaved. I recently did a survey on PDF viewers in relation to TeX. Sumatra is exceptionally well-behaved and thus a favorite of TeX developers on Windows. I don’t run Windows myself (and my Linux is 64 bit only, so I can’t run Wine either) and would welcome more hints about PDF viewers on Windows. Most open source PDF viewers are in a sad state of supporting only basic features or subsets of features like annotations and forms; most can’t even display extended properties (LuaTeX sets a few), and don’t ask for XMP. That doesn’t mean commercial PDF viewers/editors would be generally better. Foxit Reader crashes nearly as often as Adobe Reader when I work with annotations (on MacOS). I found only two commercial apps than can change TrimBox/BleedBox in a visual way: Acrobat Pro and PDF Studio Pro, and the latter reliably crashes on PDFs created with TeX. Sorry, OT. As a MIDI player I’m using FluidSynth/QSynth with one the recommended soundfonts. Hraban
Re: Windows Media Player alternatives for midi playing?
On 2021-10-30 5:02 pm, Wol wrote: On 30/10/2021 08:42, Pablo Cordal wrote: The problem: WMP blocks the midi file while (and after) it's playing, so if I modify something in lilypond and I want to hear it, I have to close WMP, then compile, go to the folder and reproduce again.. and I'm composing so I do it a LOT of times. Except that's NOT the problem. The problem is that WINDOWS locks the file against writing if anything else has it open. You need to get WMP to drop the file. Only if you instruct Windows to do so. See [1] where you may call CreateFile with GENERIC_READ and FILE_SHARE_WRITE. (In practice, you probably want the trifecta of FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE to be most permissive.) [1]: https://docs.microsoft.com/en-us/windows/win32/fileio/creating-and-opening-files I have exactly the same problem with Acrobat Reader - if I'm viewing a score I can't run lilypond until I close Acrobat, otherwise it just fails on me because it can't overwrite the pdf. I run SumatraPDF which is able to display a PDF without causing Lilypond to fail to write to the file at a later time. In fact, it is also able to detect such changes and redisplay its contents. None of this is special to Sumatra though, so there could be other PDF viewers that are similarly well-behaved. One of the main issues with proprietary software is that we cannot review or audit Adobe's programming decisions. They very well may have a good reason to hold onto file handles that block writing, but such a reason will be a mystery. NOTE: I just discovered that WMP no longer blocks file I/O like it used to. Not sure when the behavior changed, but it seems that I can keep WMP open and regenerate the MIDI file. I am running 20H2/19042.1288 for reference. -- Aaron Hill
Re: Windows Media Player alternatives for midi playing?
On 30/10/2021 08:42, Pablo Cordal wrote: Hi, Until now, I use WMP to play the midi compiled in lilypond. I have coolsoft virtualmidisynth installed with a sf2 of my taste and no problem, everything works fine. The problem: WMP blocks the midi file while (and after) it's playing, so if I modify something in lilypond and I want to hear it, I have to close WMP, then compile, go to the folder and reproduce again.. and I'm composing so I do it a LOT of times. Except that's NOT the problem. The problem is that WINDOWS locks the file against writing if anything else has it open. You need to get WMP to drop the file. I have exactly the same problem with Acrobat Reader - if I'm viewing a score I can't run lilypond until I close Acrobat, otherwise it just fails on me because it can't overwrite the pdf. Question: anybody knows a mid player with does not block the file, so it loads the file each time for playing it? Switch to linux? Because linux doesn't tie the file name to the file, it can delete the old file without messing up any program that's got the file open, and create a new file with the same name. Many programs will then recognise the file has changed underneath it and re-read it. But basically, if you're using Windows, you're stuffed. Sorry. Cheers, Wol
Re: Windows Media Player alternatives for midi playing?
Erika, there are threads on this list about configuring timidity to use an alternate sound font like the FluidR3 (which is a fairly decent GM soundfont). Can also goggle configuring timidity to use alternative soundfont. Regards. On Sat, Oct 30, 2021, 1:52 PM Erika Pirnes wrote: > I have used Timidity++. (I use Linux but apparently you can get the > program for Windows as well.) The sound quality is not too great but > otherwise it does what it's supposed to do: namely plays the most recent > version of the file without the need to close the program or open the file > again. > > Erika >
Re: Windows Media Player alternatives for midi playing?
Timidity is OK, but by itself does not have any "soundquality". That depends on the soundfont/patchset it is configured for to use.MTVerzonden vanaf mijn Huawei mobiele telefoon Oorspronkelijk bericht Onderwerp: Re: Windows Media Player alternatives for midi playing?Van: Erika Pirnes Aan: pablocor...@gmail.com,lilypond-user@gnu.orgCc: I have used Timidity++. (I use Linux but apparently you can get the program for Windows as well.) The sound quality is not too great but otherwise it does what it's supposed to do: namely plays the most recent version of the file without the need to close the program or open the file again. Erika
Re: Windows Media Player alternatives for midi playing?
I have used Timidity++. (I use Linux but apparently you can get the program for Windows as well.) The sound quality is not too great but otherwise it does what it's supposed to do: namely plays the most recent version of the file without the need to close the program or open the file again. Erika
Re: Windows Media Player alternatives for midi playing?
One perhaps quick alternative is to use CoolSoft Virtual Midi midi2mp3 convertor. Then you're simply playing an mp3 file, not a midi file. Another is to use VLC. It can 'play' midi after you configure it for a sound font (this is what I do). Regards. On Sat, Oct 30, 2021, 2:39 AM Pablo Cordal wrote: > Hi, > > Until now, I use WMP to play the midi compiled in lilypond. I have > coolsoft virtualmidisynth installed with a sf2 of my taste and no problem, > everything works fine. > > The problem: WMP blocks the midi file while (and after) it's playing, so > if I modify something in lilypond and I want to hear it, I have to close > WMP, then compile, go to the folder and reproduce again.. and I'm composing > so I do it a LOT of times. > > Question: anybody knows a mid player with does not block the file, so it > loads the file each time for playing it? > > Best regards, > Pablo >
Re: Windows Media Player alternatives for midi playing?
Hello- I use Synthfont- choose a default font and then after typesetting (if that's the word) my music click the .ly file for the latest update to the music and it does compile the midi and on I go. All of this is more complicated than it used to be in 2.18 but still works and is very very fast. Kenneth Rundt is the creator of this software and is really responsive to issues or questions you might have. jay On 2021-10-30 02:46, lilypond-user-requ...@gnu.org wrote: Send lilypond-user mailing list submissions to lilypond-user@gnu.org To subscribe or unsubscribe via the World Wide Web, visit https://lists.gnu.org/mailman/listinfo/lilypond-user or, via email, send a message with subject or body 'help' to lilypond-user-requ...@gnu.org You can reach the person managing the list at lilypond-user-ow...@gnu.org When replying, please edit your Subject line so it is more specific than "Re: Contents of lilypond-user digest..." Today's Topics: 1. Re: Trying to get the hang of "Polyphony with Shared Lyrics" section of the manual. (Guy Stalnaker) 2. Re: Trying to get the hang of "Polyphony with Shared Lyrics" section of the manual. (Kevin Cole) 3. Windows Media Player alternatives for midi playing? (Pablo Cordal) 4. Re: Windows Media Player alternatives for midi playing? (Martín Rincón Botero) ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Windows Media Player alternatives for midi playing?
On 2021-10-30 12:42 am, Pablo Cordal wrote: Hi, Until now, I use WMP to play the midi compiled in lilypond. I have coolsoft virtualmidisynth installed with a sf2 of my taste and no problem, everything works fine. The problem: WMP blocks the midi file while (and after) it's playing, so if I modify something in lilypond and I want to hear it, I have to close WMP, then compile, go to the folder and reproduce again.. and I'm composing so I do it a LOT of times. Question: anybody knows a mid player with does not block the file, so it loads the file each time for playing it? I ran into the same issue as you and found the easiest option was to simply force Windows to kill any open WMP instances within my build script so I would not have to remember to manually close it first. Below is what I use with Visual Studio Code as my IDE of choice and Lilypond running within WSL. The main part you'll be interested in is right near the beginning of build.sh. .vscode/build.sh #!/usr/bin/env bash close_wmplayer=1 format=pdf crop=0 function build { # NOTE: Windows Media Player locks files it has opened. # This prevents LilyPond from generating a new MIDI file. # The workaround is to forcefully close all instances of # the player to ensure the build process works reliably. if (( $close_wmplayer == 1)); then taskkill //im wmplayer.exe 2>/dev/null close_wmplayer=0 fi for file in $1; do args=( -dno-point-and-click ) (( $crop == 1 )) && args+=( -dcrop -dno-print-pages ) case $format in ps) args+=( --ps ) ;; pdf) args+=( --pdf ) ;; png) args+=( -dresolution=300 --png ) ;; svg) args+=( -dbackend=svg ) ;; esac args+=( "$file" ) echo "# wsl lilypond ${args[@]}" wsl lilypond ${args[@]} done } while :; do case $1 in --ps|--ps-crop) format=ps; [[ "$1" =~ -crop$ ]] && crop=1 || crop=0 ;; --pdf|--pdf-crop) format=pdf; [[ "$1" =~ -crop$ ]] && crop=1 || crop=0 ;; --png|--png-crop) format=png; [[ "$1" =~ -crop$ ]] && crop=1 || crop=0 ;; --svg|--svg-crop) format=svg; [[ "$1" =~ -crop$ ]] && crop=1 || crop=0 ;; -?*) printf 'WARN: Unknown option (ignored): %s\n' "$1" >&2 ;; ?*) build $1 ;; *) break esac shift done .vscode/tasks.json { // See https://go.microsoft.com/fwlink/?LinkId=733558 // for the documentation about the tasks.json format "version": "2.0.0", "tasks": [ { "label": "LilyPond (PS)", "type": "shell", "command": ".vscode/build.sh", "args": [ "--ps", "${relativeFile}" ], "group": "build", "presentation": { "echo": true, "reveal": "never", "focus": false, "panel": "shared", "showReuseMessage": false, "clear": true }, "problemMatcher": "$gcc" }, { "label": "LilyPond (PS, cropped)", "type": "shell", "command": ".vscode/build.sh", "args": [ "--ps-crop", "${relativeFile}" ], "group": "build", "presentation": { "echo": true, "reveal": "never", "focus": false, "panel": "shared", "showReuseMessage": false, "clear": true }, "problemMatcher": "$gcc" }, { "label": "LilyPond (PDF)", "type": "shell", "command": ".vscode/build.sh", "args": [ "--pdf", "${relativeFile}" ], "group": "build", "presentation": { "echo": true, "reveal": "never", "focus": false, "panel": "shared", "showReuseMessage": false, "clear": true }, "problemMatcher": "$gcc" }, { "label": "LilyPond (PDF, cropped)", "type": "shell", "command": ".vscode/build.sh", "args": [ "--pdf-crop", "${relativeFile}" ], "group": "build", "presentation": { "echo": true, "reveal": "never", "focus": false, "panel": "shared", "showReuseMessage": false, "clear": true }, "problemMatcher": "$gcc" }, { "label": "LilyPond (PNG)", "type": "shell", "command": ".vscode/build.sh", "args": [ "--png", "${relativeFile}" ], "group": "build", "presentation": { "echo": true, "reveal": "never", "focus": false, "panel": "shared", "showReuseMessage": false, "clear": true }, "problemMatcher": "$gcc" }, { "label": "LilyPond (PNG, cropped)", "type": "shell", "command": ".vscode/build.sh", "args": [ "--png-crop", "${relativeFile}" ], "group": "build", "presentation": { "echo": true, "reveal": "never", "focus": false, "panel": "shared", "showReuseMessage": false, "clear": true }, "problemMatcher": "$gcc"
Re: Windows Media Player alternatives for midi playing?
Hola Pablo, I assume you don't use Frescobaldi. For playing back midis I use that (even though I don't compose there). In all my composing projects I have a midi.ly file with a score block that only produces midi (only a midi block with no layout block), and uses also the articulate script. You just need to have include files for everything you do and recompile the midi.ly file in Frescobaldi everytime you want to hear the changes (and this recompilation takes a matter of miliseconds!). The midi.ly file can look as simple as \include "articulate.ly" \score { \new StaffGroup \unfoldRepeats \articulate << \include "staff1.ily" \include "staff2.ily >> \midi {} } I hope it helps! —Martín. www.martinrinconbotero.com (http://www.martinrinconbotero.com) > > On Oct 30, 2021 at 9:40 AM, mailto:pablocor...@gmail.com)> > wrote: > > > > Hi, > > > Until now, I use WMP to play the midi compiled in lilypond. I have coolsoft > virtualmidisynth installed with a sf2 of my taste and no problem, everything > works fine. > > > > The problem: WMP blocks the midi file while (and after) it's playing, so if I > modify something in lilypond and I want to hear it, I have to close WMP, then > compile, go to the folder and reproduce again.. and I'm composing so I do it > a LOT of times. > > > > Question: anybody knows a mid player with does not block the file, so it > loads the file each time for playing it? > > > > Best regards, > > Pablo > > >
Windows Media Player alternatives for midi playing?
Hi, Until now, I use WMP to play the midi compiled in lilypond. I have coolsoft virtualmidisynth installed with a sf2 of my taste and no problem, everything works fine. The problem: WMP blocks the midi file while (and after) it's playing, so if I modify something in lilypond and I want to hear it, I have to close WMP, then compile, go to the folder and reproduce again.. and I'm composing so I do it a LOT of times. Question: anybody knows a mid player with does not block the file, so it loads the file each time for playing it? Best regards, Pablo