Re: [Denemo-devel] ? d- Bravura/SMuFL

2018-04-16 Thread Richard Shann
On Sun, 2018-04-15 at 15:28 -0400, Freeman Gilmore wrote:
> I do have a question, would the d-'s in the 5 lines of code you sent
> to me have to be rewritten (not asking about the internal code) after
> the bug is fixed?   I would not want to do this twice for the large
> number of accidentals needed.

Certainly, do not write a lot of scripts before showing the prototype
here for discussion.

> 
> If possible it would be nice if all the accidentals could be interred
> the same way the b's and #'s.   Buttons are fine just other wise like
> entering the b's and #'s, same order.  Also some accidentals are
> interred with the b's and #'s, but they are writing in the same
> place in Denemo.    I am hoping that this can be done at the same
>  time as the bug fix and it may even simplify the fix by using the
> same code used for the b's and #'s.  

Denemo is the most flexible program I know for choosing the user
interface - it will be possible to insert the microtonal accidentals
via key-presses that are tailored for ease of use (as well as by many
other means - people have even customised the input so that they can
send all the "keypresses" they need via their MIDI keyboard!). Nothing
like that requires changes to Denemo, it is all ready-to-use.

Richard
By the way, please use the "Reply to All" or "Group Reply" buttons when
replying to a mailing list posting, as others will benefit from the
reply.

___
Denemo-devel mailing list
Denemo-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/denemo-devel


Re: [Denemo-devel] ? d- Bravura/SMuFL

2018-04-16 Thread Richard Shann
On Sun, 2018-04-15 at 15:28 -0400, Freeman Gilmore wrote:
> Thanks  I am just trying to understand some of how Denemo works as
> I go,
> I understand that I do not need to know this to write new glyphs in
> Denemo/Lilypond.
> I will stop asking how Denemo does thing.
> 
> So that you know that I know:
> 
> 1) It clear that with Denemo i can write the d-'s to send the
> needed syntax to Lilypond, with your help by given you the glyph.
> 
> 2) It is cleat that Lilypond has  the accidentals that I would ever
> need to do the command accidentals glyphs used by the microtonal
> people.   They are all in the SMuFL and Lilypond has the Bravura font
> which is used by SMuFL by default so they are there. 

You need to check not merely that LilyPond is able to access a
particular font for some purposes, but that it can use the glyphs in
the font for the specific purpose you want, namely to take the place of
"normal" accidentals.
The distinction you need to watch for is that LilyPond has a markup
language which can be used to place all sorts of text, drawings and
glyphs from its own emmentaler and feta fonts on the score. This does
not mean that it can access any font and any glyph in the font to be
typeset as an accidental - makam.ly is using some glyphs in that manner
and you will want to be sure that you can extend the range of glyphs
used in that code (or some other lilypond code) to do that.

So what you need to do, before committing a lot of effort is to take
the simplest example of the sort of thing you want, something like a
note with a special accidental, e.g.

\include "makam.ly"
{ ck''}

if you use the Turkish example as a starting point.

Run Lilypond on that syntax and check you get the output you expect. 

Then set about seeing if you can substitute other glyphs from other
fonts (using something other than "k" for the indication of the
accidental) by altering makam.ly
this is where you will probably need the lilypond-user list expertise.

Once you have LilyPond code that can do what you want then it will be a
case of creating scripts for Denemo to emit it, which I can help with.

Richard



___
Denemo-devel mailing list
Denemo-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/denemo-devel


Re: [Denemo-devel] ? d- Bravura/SMuFL

2018-04-15 Thread Richard Shann
On Sat, 2018-04-14 at 18:47 -0400, Freeman Gilmore wrote:
> It looks like all the accidentals are available because they are in
> the SMuFL Bravura font.   I have some ida how to use them by reading
> this, but I have to learn how to use Lilypond 

yes, absolutely.

> or is there a way to directly add script with Denemo? 

when you add a script to Denemo you put inside that script the LilyPond
syntax that you want to end up being read by the LilyPond program, so
the first thing to do is find out what syntax you need to get LilyPond
to typeset what you want.
There is a thread on the LilyPond mailing list right now that is
relevant to what you want to do - it started yesterday entitled
"Defining Custom Symbols"
http://lists.gnu.org/archive/html/lilypond-user/2018-04/msg00426.html

That case is somewhat simpler - essentially replacing things like tr or
turn symbols with other symbols. You are replacing accidentals which is
slightly more involved (e.g. repeated accidentals on the same note in
same bar are not the same as repeated trills on the same note in the
same bar).

Nevertheless, you *will* get help if you give them a picture of what
you want to do. Asking a question which cannot be easily answered
because it is based on a misunderstanding of what LilyPond does is
trickier - but still usually gets a response in that list. If instead
you post up that makam example and say that you want to typeset another
shape of accidental glyph as found in xxx font then you will
undoubtedly get help.

Richard


___
Denemo-devel mailing list
Denemo-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/denemo-devel


Re: [Denemo-devel] ? d-

2018-04-14 Thread Richard Shann
On Sat, 2018-04-14 at 11:47 -0400, Freeman Gilmore wrote:
> Richard:
> 
> This is confusing is the d- the same thing as described in the
> help 28.1 The Directive Fields?   And is there directions on how to
> use them?   I know what gx and gy pertain to but that is it.

No d-xxx are built-in Scheme procedures. For example d-DirectivePut-
chord-postfix is a procedure that sets the postfix field of a Denemo
Directive attached to the chord at the cursor (creating the Denemo
Directive if it does not yet exist).

gx and gy are fields in a structure called a Denemo Directive which
Denemo attaches to all sorts of places in a score. So a score will have
a DenemoDirective which specifies a Title to be put at the top of the
score. The Denemo Directive contains many fields, in this case
including one to emit the LilyPond syntax to set a score title.
The example Scheme I sent you created and attached a Denemo Directive
to the note at the cursor and, amongst other things, specified the
graphic to use in the display and where in the display, relative to the
note, to put it.

HTH

Richard


> Thank you, ƒg
> 
> On Sat, Apr 14, 2018 at 11:25 AM, Richard Shann  com> wrote:
> > On Fri, 2018-04-13 at 16:08 -0400, Freeman Gilmore wrote:
> > > Richard:
> > > 
> > > Were are the d- files and, how do I see what is in the file?   
> > 
> > The Denemo procedures starting d- are the built-in ones (ie
> > primitives
> > written in C). You can get the documentation string for them with
> > the
> > d-GetHelp procedure, so the Scheme script
> > 
> > (d-InfoDialog (d-GetHelp "ToggleBeginSlur"))
> > 
> > pops up an informational dialog with the Help text for the command 
> > d-ToggleBeginSlur
> > 
> > and so on.
> > 
> > Richard
> > 
> > 
> 
> 

___
Denemo-devel mailing list
Denemo-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/denemo-devel


Re: [Denemo-devel] ? d-

2018-04-14 Thread Freeman Gilmore
Richard:

This is confusing is the d- the same thing as described in the help 28.1
The Directive Fields?​   And is there directions on how to use them?   I
know what gx and gy pertain to but that is it.
Thank you, ƒg

On Sat, Apr 14, 2018 at 11:25 AM, Richard Shann 
wrote:

> On Fri, 2018-04-13 at 16:08 -0400, Freeman Gilmore wrote:
> > Richard:
> >
> > Were are the d- files and, how do I see what is in the file?
>
> The Denemo procedures starting d- are the built-in ones (ie primitives
> written in C). You can get the documentation string for them with the
> d-GetHelp procedure, so the Scheme script
>
> (d-InfoDialog (d-GetHelp "ToggleBeginSlur"))
>
> pops up an informational dialog with the Help text for the command
> d-ToggleBeginSlur
>
> and so on.
>
> Richard
>
>
___
Denemo-devel mailing list
Denemo-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/denemo-devel


Re: [Denemo-devel] ? d-

2018-04-14 Thread Richard Shann
On Fri, 2018-04-13 at 16:08 -0400, Freeman Gilmore wrote:
> Richard:
> 
> Were are the d- files and, how do I see what is in the file?   

The Denemo procedures starting d- are the built-in ones (ie primitives
written in C). You can get the documentation string for them with the
d-GetHelp procedure, so the Scheme script

(d-InfoDialog (d-GetHelp "ToggleBeginSlur"))

pops up an informational dialog with the Help text for the command 
d-ToggleBeginSlur

and so on.

Richard


___
Denemo-devel mailing list
Denemo-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/denemo-devel


Re: [Denemo-devel] d-GetMidi

2011-01-31 Thread Nils Gey
> But I don't know of any functions that use d-GetMidi. 
But I don't know of any functions OF MINE that use d-GetMidi and I was to lazy 
to type "find" in my commandline.

___
Denemo-devel mailing list
Denemo-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/denemo-devel


Re: [Denemo-devel] d-GetMidi

2011-01-31 Thread Nils Gey
I don't remember the exact names of the functions, but I noticed a confusion 
there quite some time ago. One function returns the midi note of the cursor 
position and it took some time until I figured that out.

But I don't know of any functions that use d-GetMidi. 

Nils

On Mon, 31 Jan 2011 09:03:58 -0600
Jeremiah Benham  wrote:

> I am going to retire GetMidi unless anyone has an objection. It does  
> not do what the documentation says it does. The documentation is very  
> unclear as to what it's supposed to be doing anyway.
> 
> Jeremiah
> 
> ___
> Denemo-devel mailing list
> Denemo-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/denemo-devel
> 

___
Denemo-devel mailing list
Denemo-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/denemo-devel


Re: [Denemo-devel] d-GetMidi

2011-01-31 Thread Richard Shann
On Mon, 2011-01-31 at 09:03 -0600, Jeremiah Benham wrote:
> I am going to retire GetMidi unless anyone has an objection.
I do!
Firstly, we cannot retire commands, only invent new ones. This is
because we don't know who out there has scripts depending on them. (I
know, at present very few).

Secondly, this command is very busy at work in most Midi filters.

>  It does  
> not do what the documentation says it does. 
The documentation is:

Intercepts a MIDI event and returns it as a 4 byte number

Not very loquacious, but that class of MIDI events that are 4 bytes are
returned as the value of this procedure. In
actions/menus/MainMenu/InputMenu/MIDI/AngryDelete you get to see how the
4 bytes are decoded

 (set! midi (d-GetMidi))
 (set! velocity (bit-extract midi 16 24))
 (set! command (bit-extract midi 0 8))

Not pleasant, but I suspect I knew that there would not be time to make
separate calls from scheme to get all the parts of the MIDI event -
these Midi filters are working live as you play in.

Richard


> The documentation is very  
> unclear as to what it's supposed to be doing anyway.
> 
> Jeremiah
> 
> ___
> Denemo-devel mailing list
> Denemo-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/denemo-devel


___
Denemo-devel mailing list
Denemo-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/denemo-devel


Re: [Denemo-devel] d-GetCursorX wrong

2011-01-02 Thread Richard Shann
On Sat, 2011-01-01 at 22:40 +0100, Nils Gey wrote:
> (d-GoToPosition (d-GetMovement) (d-GetStaff)
> (d-GetMeasure)(d-GetCursorX))
now works. It always puts the cursor on an object if one is there, and
puts the cursor in the empty measure or on the first object if the last
parameter is 0. (I think).
Richard



___
Denemo-devel mailing list
Denemo-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/denemo-devel


Re: [Denemo-devel] d-PlayMidiKey

2010-11-05 Thread Richard Shann
On Fri, 2010-11-05 at 11:32 +, Richard Shann wrote:
> The code for d-PlayMidiKey had a sleep in it, it looks wrong, I have
> looked through at the uses of the command in git and I think I can take
> it out.
> It may worsen a problem with filters like CheckPitches, where if you
> play too quickly it starts editing. It could be that this sleep was a
> kludge to slow you down. I will make a better fix.
The scripts for CheckPitches and AngryDelete needed tweaking to take
advantage of the fix for this problem (which was already in the MIDI
filter I personally make use of, viz. the figured bass entering filter).
Now in git.
Richard



___
Denemo-devel mailing list
Denemo-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/denemo-devel


Re: [Denemo-devel] (d-GetDurationInTicks) bug

2010-10-27 Thread Richard Shann
Denemo has 384 hard-wired in and stores ticks only as an integer.
d-GetDurationInTicks is just returning a value that Denemo has stored.
The value 384 was chosen (I think orginally by MIDI people) to allow a
practical range of dots and tuplets, I don't think there is any prospect
of changing it.
Hmm, maybe I am sliding over something here ... d-GetDurationInTicks is
the duration after taking into account tupleting and dotting. I think we
could also have d-GetBaseDurationInTicks which would be the duration
before taking these into account. What use that might be I am uncertain,
but the bottom line is: if you try to generate a note with a duration
which has a component less than 1/384 of a quarter note that bit of the
duration will compute as zero.

Richard

On Wed, 2010-10-27 at 01:05 +0200, Nils Gey wrote:
> Hello list,
> 
> (d-GetDurationInTicks) has a bug. Backstory: I wrote a function that can 
> calculate the Ticks if given a base duration (in ticks) and the number of 
> dots (0 is valid, too). More important: I wrote a function that knows only 
> from the ticks alone which note it is and how many dots it has. (to be honest 
> I did not test it with tuplets yet, maybe this will break things).
> 
> But more important: d-GetDurationInTicks only returns integers but should 
> return fractions, too.
> It happens if you add too many dots (each dot adds baseticks/2^dots to the 
> tick-count) the added value gets too small so you get float numbers.
> 
> Longer durations do not suffer from this (except dotted tuplets may) until 
> they get around 8 or 9 dots, which I  have never seen. But the lower 
> durations cannot stand even one dot and the GetDurationInTicks goes off. 
> Well, to be honest again its not a real problem since even for 1/128 notes 
> you need three dots to make it break.
> 
> But still its a theoretical bug. We offer unlimited dots, even for 1/128 and 
> 1/256 (which needs only 2 dots to break :)) so it should work. And I have the 
> feeling it will get less theoretical once I look into tuplet values.
> 
> Can you make GetDurationInTicks let return floats (Scheme displays them as 
> 21/2 and not as float, don't know how the internals work).
> 
> Nils
> 
> ___
> Denemo-devel mailing list
> Denemo-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/denemo-devel


___
Denemo-devel mailing list
Denemo-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/denemo-devel