Re: MIDI tick resolution

2018-03-19 Thread David Wright
On Mon 19 Mar 2018 at 21:04:47 (-0500), Karlin High wrote:
> On 3/19/2018 8:49 PM, Ivan Kuznetsov wrote:
> >So what if four notes are of length 77 and one note is length 76?
> >No one can hear the difference.
> 
> I'd say so, too. But human-listening is only one use case for a MIDI
> file, and in this area I don't know what others would surprise me.
> 
> Example: Humdrum
> 
> 
> I looked at that, and found it sort of staggering. I'd probably have
> to study for several years to do any good with it.

Well, I've only glanced at the reference given above, but it looks
as though it can quantise note lengths in two different ways.
The Record command handles input from a MIDI instrument with the
-q option. The Recode command processes information already in
files: its description calls note lengths that have been quantised
“rhythmically justified”.

> Or maybe the proper response to certain such use cases would be, "If
> you're going to be so technical, go further yet and develop an AI of
> some sort that can pattern-recognize the format limitations and
> determine what to do with them."

Cheers,
David.

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: MIDI tick resolution

2018-03-19 Thread Karlin High

On 3/19/2018 8:49 PM, Ivan Kuznetsov wrote:

So what if four notes are of length 77 and one note is length 76?
No one can hear the difference.


I'd say so, too. But human-listening is only one use case for a MIDI 
file, and in this area I don't know what others would surprise me.


Example: Humdrum


I looked at that, and found it sort of staggering. I'd probably have to 
study for several years to do any good with it.


Or maybe the proper response to certain such use cases would be, "If 
you're going to be so technical, go further yet and develop an AI of 
some sort that can pattern-recognize the format limitations and 
determine what to do with them."

--
Karlin High
Missouri, USA

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: MIDI tick resolution

2018-03-19 Thread Ivan Kuznetsov
Gilberto Agostinho  wrote:
>
> Does anyone know if it possible to change the tick resolution of LilyPond's
> MIDI output to a value other than the default 384? One reason for wanting
> this change is due to the fact that 384 cannot be divided by 5 and so
> quintuplets on a crotchet are not precise.

No, they would not be precise but they would perceptually be
exact enough.  Without knowing precisely how these midi clock
values work, I would imagine that the five notes of a quintuplet
in a MIDI file would have the following clock durations: 77 77 77 77 76.

So what if four notes are of length 77 and one note is length 76?
No one can hear the difference.

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: trillspann without trill

2018-03-19 Thread Susan Buckingham
If you set the TrillSpanner.bound-details.left.text = ##f this gets rid of
the "tr"

On Mar 19, 2018 2:06 PM, "Malte Meyn"  wrote:

>
>
> Am 19.03.2018 um 18:11 schrieb Ali Cuota:
>
>> Hi again,
>>
>> for Bach BWV 528, 2nd mvt,  meas. 38-39, I need a trillspann without
>> trill (see not-so-tiny pic).
>>
>> How can I achieve this?
>>
>
> Try one of the following:
>
> \version "2.19.81"
>
> {
>   \override TrillSpanner.bound-details.left.text = #'()
>   b1\startTrillSpan b\stopTrillSpan
>   b\prall
>   b\prallprall
> }
>
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: score beginning at end of first page of a bookpart

2018-03-19 Thread Karlin High

On 3/19/2018 12:03 PM, Ali Cuota wrote:

I need to start a score at the end of page (in one case one system,
other case 3 systems), but I don't know how to fix it.


To get good help, provide a tiny example.


This notation manual page might have the information you need.


And the Joram Berger LilyPond spacing map often clarifies things for me:

--
Karlin High
Missouri, USA

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: trillspann without trill

2018-03-19 Thread Malte Meyn



Am 19.03.2018 um 18:11 schrieb Ali Cuota:

Hi again,

for Bach BWV 528, 2nd mvt,  meas. 38-39, I need a trillspann without
trill (see not-so-tiny pic).

How can I achieve this?


Try one of the following:

\version "2.19.81"

{
  \override TrillSpanner.bound-details.left.text = #'()
  b1\startTrillSpan b\stopTrillSpan
  b\prall
  b\prallprall
}

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


score beginning at end of first page of a bookpart

2018-03-19 Thread Ali Cuota
Hello Lilyponders,

I have a (I suppose simple) question about layout/paper.

I need ta start a score at the end of page (in one case one system,
other cas 3 systems), but I dont know how to fix it.

Actually, the page with one system is vertically overstrectched (but
how to fix systemspace only for one / the first system?

And in both case, how to get a ragged-first-top = ##f ?

Thanks in advance,

Francois

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: MIDI tick resolution

2018-03-19 Thread David Kastrup
k...@aspodata.se writes:

> David:
>> k...@aspodata.se writes:
> ...
>> > You could try the attached rudimentary patch and recompile your
> ...
>> The patch is pretty awful.
>
> Please, don't be rude, I did write it was rudimentary, you don't need
> to restate that.

Hm, though my proposals seem to cut at best half-way either.  It would
likely make more sense if scorification bothered to figure out the
proper value to use here.  There is no real point to having this
manually specifiable except for rather special applications.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: MIDI tick resolution

2018-03-19 Thread karl
David:
> k...@aspodata.se writes:
...
> > You could try the attached rudimentary patch and recompile your
...
> The patch is pretty awful.

Please, don't be rude, I did write it was rudimentary, you don't need
to restate that.

Regards,
/Karl Hammar

---
Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
Sweden
+46 173 140 57



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: MIDI tick resolution

2018-03-19 Thread Malte Meyn



Am 19.03.2018 um 14:59 schrieb David Kastrup:

I think we'd rather want this value to be
read from some \midi layout block variable when Midi is getting
initialized.


That would be better than reading from a context property of course.

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: MIDI tick resolution

2018-03-19 Thread David Kastrup
Malte Meyn  writes:

> Am 19.03.2018 um 14:47 schrieb k...@aspodata.se:
>> You could try the attached rudimentary patch and recompile your
>> lilypond source, see if that solves your problem, and report back.
>
> Would it be possible to make a patch that reads this from a context
> property so that the user could input something like
>
>   \set Score.midiTickResolution = 960
>
> ?

I think it belongs in the \midi block since you cannot change it in
mid-file.  Well, you probably can, but LilyPond is even less prepared to
do that.

Someone™ really needs to check where this can occur and then decide how
to implement it as how variable.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: MIDI tick resolution

2018-03-19 Thread David Kastrup
k...@aspodata.se writes:

> Giberto:
>> Does anyone know if it possible to change the tick resolution of LilyPond's
>> MIDI output to a value other than the default 384? One reason for wanting
>> this change is due to the fact that 384 cannot be divided by 5 and so
>> quintuplets on a crotchet are not precise. For instance, the default
>> settings in my DAW of choice is 960.
>
> It seems pretty hardcoded:
> ===
> In lily/audio-item.cc:
>
> int
> moment_to_ticks (Moment m)
> {
>   return int (moment_to_real (m) * 384 * 4);
> }
> ===
> In lily/midi-walker.cc:
>
> void
> Midi_walker::do_start_note (Midi_note *note)
> {
>   Audio_item *ptr = items_[index_];
>   assert (note->audio_ == ptr);
>   int now_ticks = ptr->audio_column_->ticks ();
>   int stop_ticks = int (moment_to_real (note->audio_->length_mom_) *
> Real (384 * 4)) + now_ticks;
> ===
>
> You could try the attached rudimentary patch and recompile your
> lilypond source, see if that solves your problem, and report back.
>
> BTW,
>  384 = 128 * 3
>  960 =  64 * 3 * 5

The patch is pretty awful.  I think we'd rather want this value to be
read from some \midi layout block variable when Midi is getting
initialized.

By the way, that value is also written out in the SMF file header (which
you don't appear to do).  This is initialized in

lily/performance.cc:  midi_stream.write (Midi_header (1, tracks_, 384));

and changing MIDI_CLOCK elsewhere but not here is going to wreak serious
havoc.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: MIDI tick resolution

2018-03-19 Thread Malte Meyn



Am 19.03.2018 um 14:47 schrieb k...@aspodata.se:

You could try the attached rudimentary patch and recompile your
lilypond source, see if that solves your problem, and report back.


Would it be possible to make a patch that reads this from a context 
property so that the user could input something like


\set Score.midiTickResolution = 960

?

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: MIDI tick resolution

2018-03-19 Thread karl
Giberto:
> Does anyone know if it possible to change the tick resolution of LilyPond's
> MIDI output to a value other than the default 384? One reason for wanting
> this change is due to the fact that 384 cannot be divided by 5 and so
> quintuplets on a crotchet are not precise. For instance, the default
> settings in my DAW of choice is 960.

It seems pretty hardcoded:
===
In lily/audio-item.cc:

int
moment_to_ticks (Moment m)
{
  return int (moment_to_real (m) * 384 * 4);
}
===
In lily/midi-walker.cc:

void
Midi_walker::do_start_note (Midi_note *note)
{
  Audio_item *ptr = items_[index_];
  assert (note->audio_ == ptr);
  int now_ticks = ptr->audio_column_->ticks ();
  int stop_ticks = int (moment_to_real (note->audio_->length_mom_) *
Real (384 * 4)) + now_ticks;
===

You could try the attached rudimentary patch and recompile your
lilypond source, see if that solves your problem, and report back.

BTW,
 384 = 128 * 3
 960 =  64 * 3 * 5

Regards,
/Karl Hammar

---
Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
Sweden
+46 173 140 57

diff --git a/lily/audio-item.cc b/lily/audio-item.cc
index a8a78199c7..cf5b827899 100644
--- a/lily/audio-item.cc
+++ b/lily/audio-item.cc
@@ -129,7 +129,7 @@ moment_to_real (Moment m)
 int
 moment_to_ticks (Moment m)
 {
-  return int (moment_to_real (m) * 384 * 4);
+  return int (moment_to_real (m) * MIDI_TICKS * 4);
 }
 
 void Audio_span_dynamic::set_end_moment (Moment mom)
diff --git a/lily/include/midi-item.hh b/lily/include/midi-item.hh
index 57bb2d4da2..a843abb855 100644
--- a/lily/include/midi-item.hh
+++ b/lily/include/midi-item.hh
@@ -23,6 +23,8 @@
 #include "audio-item.hh"
 #include "std-vector.hh"
 
+#define MIDI_TICKS 960
+
 string int2midi_varint_string (int i);
 
 /**
diff --git a/lily/midi-walker.cc b/lily/midi-walker.cc
index d9765c6814..1d1b3196f7 100644
--- a/lily/midi-walker.cc
+++ b/lily/midi-walker.cc
@@ -86,7 +86,7 @@ Midi_walker::do_start_note (Midi_note *note)
   assert (note->audio_ == ptr);
   int now_ticks = ptr->audio_column_->ticks ();
   int stop_ticks = int (moment_to_real (note->audio_->length_mom_) *
-Real (384 * 4)) + now_ticks;
+Real (MIDI_TICKS * 4)) + now_ticks;
   for (vsize i = 0; i < stop_note_queue.size (); i++)
 {
   /* if this pitch already in queue, and is not already ignored */___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Nesting parallelMusic voices

2018-03-19 Thread Aleksey Alekseev
Thank you for your answer! I just tested version 2.19.80. It works without
warnings.
I place more code below. Idea is to write a long complex part once and use
it several times (and all in \parallelMusic).
\version "2.18.2"\parallelMusic #'(upperLongComplexPart
lowerLongComplexPart) {d''1 |d'1  |}\parallelMusic #'(upper lower) {   
c''1 |c'1  |\upperLongComplexPart |\lowerLongComplexPart |   
e''1 |e'1  |\upperLongComplexPart |\lowerLongComplexPart
|}\score {\new PianoStaff <<\new Staff {\upper   
}\new Staff {\lower}>>\layout { }}

SoundsFromSound wrote
> On 3/18/2018 1:26 PM, Алексей Алексеев wrote:> This code:>> ```>> \version
> "2.18.2">> \parallelMusic #'(upperNest lowerNest) {>> d''1 |>> d'1 |>> }>>
> \parallelMusic #'(upper lower) {>> \upperNest |>> \lowerNest |>> }>> ```>>
> produce "Bars in parallel music don't have the same length" warnings.>>
> Why? Is it bug in lilypond?>>>Can you share some more code that shows us
> more context and/or tags etc. - so we see what you're working with? It
> probably will help others figure it out
> :)___lilypond-user mailing
> list

> lilypond-user@

> https://lists.gnu.org/mailman/listinfo/lilypond-user





--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


MIDI tick resolution

2018-03-19 Thread Gilberto Agostinho
Hi all,

Does anyone know if it possible to change the tick resolution of LilyPond's
MIDI output to a value other than the default 384? One reason for wanting
this change is due to the fact that 384 cannot be divided by 5 and so
quintuplets on a crotchet are not precise. For instance, the default
settings in my DAW of choice is 960.

This has been asked before but the OP got no solution to this:
lilypond.1069038.n5.nabble.com/MIDI-output-Possible-to-change-PPQ-td156345.html

Cheers,
Gilberto



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: frescobaldi png output

2018-03-19 Thread Urs Liska



Am 19.03.2018 um 10:55 schrieb Gianmaria Lari:

Hello,

Using lilypond-book-preamble.ly  
like in the following example


\include "lilypond-book-preamble.ly
"
\version "2.19.81"
{
  c' d' a2
}


I have been to make Frescobaldi output a score that just fit the size 
of what is written (and not an entire a4 paper).


I know Frescobaldi has a nice feature to select with the mouse part of 
the score and save it to a png file (or copy it to the clipboard). But 
I wonder if it can automatically generate a pgn of the score.


It's LilyPond that can produce scores in PNG format.
But Frescobaldi also provides access to that feature. When you use 
"Compile (custom)" to compile first a dialog is opened where you can 
(among many other options) select the "Output Format".


HTH
Urs



Thank you, g.


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


frescobaldi png output

2018-03-19 Thread Gianmaria Lari
Hello,

Using  lilypond-book-preamble.ly like in the following example

\include "lilypond-book-preamble.ly"
\version "2.19.81"
{
  c' d' a2
}


I have been to make Frescobaldi output a score that just fit the size of
what is written (and not an entire a4 paper).

I know Frescobaldi has a nice feature to select with the mouse part of the
score and save it to a png file (or copy it to the clipboard). But I wonder
if it can automatically generate a pgn of the score.

Thank you, g.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user