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: clef change problem with grace notes
I thought so. I had tried that before but i think i tried /grace s8 s and now i see i didn't use curly brackets which is why it didn't work...doh! So that was an unnecessary email! Thank you for your help! -Molly On Sat, Oct 30, 2021, 09:49 Lukas-Fabian Moser wrote: > > Am 30.10.21 um 15:44 schrieb Molly Preston: > > When changing clefs in the left hand the treble clef is placed on the > > right side of the bar line. It seems to be related to the grace notes > > happening in the right hand. Does anyone have a fix for this? > > That's LilyPond's most famous bug, a bit annoying but fortunately easy > to avoid. > > Just make sure that the graces in one staff have corresponding graces of > the same length in the other staves (not in general, but in those cases > that cause objects at bar lines to be placed wrongly as in your example). > > So in your case, just add \grace s4 at the start of the bar in your left > hand staff. > > Lukas > >
Re: Start, end, gradient of Glissando
Am So., 24. Okt. 2021 um 18:19 Uhr schrieb Aaron Hill : > > On 2021-10-24 8:05 am, Thomas Morley wrote: > > Am So., 24. Okt. 2021 um 16:35 Uhr schrieb Aaron Hill > >> Let me take a stab at converting the print routine to Scheme. > > > > Would be great !! > > Sorry for the delay... took me some time to figure out why there was an > error with cross-staff right-side Y coordinate after porting the logic > from C++. I think it's all working as expected, and I have added a few > new test cases. (NOTE: I only have 2.22.0 here, so I had to fixup the > version statement.) The one thing I did not include was adjusting the > line ends for the arrows, but I assume the crosses would be best put at > the arrow points anyway. > > There is something to note in the original logic. If the padding is > large enough that the line spanner would disappear, then the stencil > returned is null. I am also likewise returning the empty list instead > of a point-pair, so the code that consumes the results would need to > check for this case. > > > -- Aaron Hill Hi Aaron, I now found the time to take a closer look. There is a problem with cross-staff Glissando and non-zero paddings, cause by taking relative coords in X/Y direction into account too late. Afaict, this needs to come first - changed. Furthermore, to avoid the "Pythagorean theorem" I changed (span-length (sqrt (+ (* span-dx span-dx) (* span-dy span-dy) to (span-length (ly:length span-dx span-dy))) Some other questions, (I attach the file with my comments and TODOs, etc as well): (1) You do (common-x (ly:grob-common-refpoint grob (ly:grob-common-refpoint (ly:spanner-bound grob LEFT) (ly:spanner-bound grob RIGHT) X) X)) Though, the inner ly:grob-common-refpoint returns already the System grob, why searching again? Furthermore, a bit later there's (system (ly:grob-system grob)) which again will return the System grob. Is there any case where those three are not equal? (2) There is (dy (if simple-y? 0 (ly:grob-relative-coordinate grob common-y Y))) Though if `grob' and `common-y' are equal it returns always zero, afaict. Is there any example where they are not equal? (3) Why take 'simple-Y into account? Well, it's true per default for Glissando, alas it makes no difference afaict. Btw, we don't have any regtest for it Many thanks again, Harm \version "2.22.0" % "2.23.3" %% rewritten by Aaron Hill, many thanks! %% https://lists.gnu.org/archive/html/lilypond-user/2021-10/msg00354.html %% Comments/TODOs by Harm \paper { indent = 0 ragged-right = ##f line-width = 120 } \layout { \context { \Voice \override Glissando.layer = 1000 \override Glissando.bound-details.left.padding = 5 \override Glissando.bound-details.right.padding = 5 \override Glissando.breakable = ##t } } %% cross stensil #(define* (make-cross-stencil coords #:optional (thick 0.1) (sz 0.2)) (ly:stencil-add (make-line-stencil thick (- (car coords) sz) (- (cdr coords) sz) (+ (car coords) sz) (+ (cdr coords) sz)) (make-line-stencil thick (- (car coords) sz) (+ (cdr coords) sz) (+ (car coords) sz) (- (cdr coords) sz %% glissando stencil #(define glissando-stencil-proc (lambda (grob) (ly:line-spanner::print grob))) %% get start/end points #(define gliss-data (lambda (grob) (let* ((simple-y? (and (ly:grob-property grob 'simple-Y) (not (ly:grob-property grob 'cross-staff (lbi (ly:grob-property grob 'left-bound-info)) (rbi (ly:grob-property grob 'right-bound-info)) ;;; ;; TODO (1) ;;; ;; Common refpoint of the spanner-bounds is already grob System ;; Why searching again, doesn't it will return grob System again? ;; Is there any ly-counter-example? ;; See the test-code below inside `pretty-print' (common-x (ly:grob-common-refpoint grob (ly:grob-common-refpoint (ly:spanner-bound grob LEFT) (ly:spanner-bound grob RIGHT) X) X)) (scaling (magstep (ly:grob-property grob 'font-size 0))) (left-padding (ly:assoc-get 'padding lbi 0)) (left-stencil (ly:assoc-get 'stencil lbi #f)) (left-common-y (ly:assoc-get 'common-y lbi grob)) (right-padding (ly:assoc-get 'padding rbi 0)) (right-stencil (ly:assoc-get 'stencil rbi #f)) (right-common-y (ly:assoc-get 'common-y rbi grob)) (common-y (ly:grob-common-refpoint left-common-y right-common-y Y)) (normalized-endpoints (ly:grob-property grob 'normalized-endpoints '(0 . 1))) (span-left-x (ly:assoc-get 'X lbi 0)) (span-left-y (ly:assoc-get 'Y lbi 0))
Re: clef change problem with grace notes
Am 30.10.21 um 15:44 schrieb Molly Preston: When changing clefs in the left hand the treble clef is placed on the right side of the bar line. It seems to be related to the grace notes happening in the right hand. Does anyone have a fix for this? That's LilyPond's most famous bug, a bit annoying but fortunately easy to avoid. Just make sure that the graces in one staff have corresponding graces of the same length in the other staves (not in general, but in those cases that cause objects at bar lines to be placed wrongly as in your example). So in your case, just add \grace s4 at the start of the bar in your left hand staff. Lukas
clef change problem with grace notes
When changing clefs in the left hand the treble clef is placed on the right side of the bar line. It seems to be related to the grace notes happening in the right hand. Does anyone have a fix for this? << \new Staff { \time 7/8 \clef bass ees8 ( d des d fis)-. d ( fis -. ) | \time 5/4 \clef treble \grace { b''8\( cis''' } dis'''2\) fis''' 4\( ais''2\) | } \new Staff { \clef bass ees,4. ees,8 ~ ees, ees,4 | \clef treble cis''2. ~ cis''2 | } >> -Molly
Re: Hide flat (or others) sign
It works. Thank you. Sent with ProtonMail Secure Email. ‐‐‐ Original Message ‐‐‐ Il venerdì 29 ottobre 2021 20:37, Knute Snortum ha scritto: > It's a known bug. I think you can shorten your solution to: > > \once \omit Accidental > > > > Knute Snortum > > On Fri, Oct 29, 2021 at 11:36 AM Valentin Petzel valen...@petzel.at wrote: > > > Hello Mahandihi, > > > > It is possible to do that, e.g. By > > > > \once\override Accidental.stencil = ##f > > > > But it would be better to fix the underlying problem. Can you send us a > > small > > > > example of when that happens? Are you perhaps using g! (thus forcing a > > natural > > > > accidental)? > > > > Cheers, > > > > Valentin > > > > Am Freitag, 29. Oktober 2021, 20:24:44 CEST schrieb Mahanidhi: > > > > > Hello everybody, > > > > > > in one song in \key gf I have four consecutive g notes that become natural > > > > > > but I don't know why the program puts again the natural sign in front of > > > > > > the second note. Is it possible to hide the natural sign? > > > > > > Thank you. > > > > > > Mahanidhi
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: Licensing and custom lines
Yes, engravings *can* be protected by ip protection laws. But does not really matter. Karstens point is that the GPL applies to Lilypond code because he claims that an engraved score can be considered as a program compiled from the source file. But that is mostly just an analogy. PDF isn't even a full general purpose language (though PS would be). But even more: Usually the "compiled" PDF and the code in the source differ in functionality. We can have a scheme code snippet of any functionality in our code, but the resulting PDF won't have that functionality. So it is quite far stretched to view the generated PDF as a "program compiled from the Lilypond source". Rather the Lilypond source should be seen as some sort of document description language combined with Makefile like control commands. The one exception of this is of course PS code, but not any piece of code falls unter protection laws. A simple PS draw command probably doesn't. So while it would technically possible to include PS commands that would fall under GPL terms there probably no reason for it. Also that code might still not even make it into the PDF in some equivalent way. And of course these things do not matter if you distribute a printed form. The only two problematic things I can see are: Some snippet might print something protected into the score, or missing permission to use the snippet (which only applies if the snippet is not licensed at all). But then probably one can argue that a piece of code posted on the internet implicitly permits you to use it internally. Cheers, Valentin
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