On Sat, Apr 7, 2018 at 3:37 PM, Richard Shann <[email protected]>
wrote:

> On Sat, 2018-04-07 at 08:32 -0400, Freeman Gilmore wrote:
> >
> >
> > On Sat, Apr 7, 2018 at 5:04 AM, Richard Shann <[email protected]
> > m> wrote:
> > > On Fri, 2018-04-06 at 17:48 -0400, Freeman Gilmore wrote:
> > > >
> > > >
> > > > On Fri, Apr 6, 2018 at 12:37 PM, Richard Shann <[email protected]
> > > us.c
> > > > om> wrote:
> > > > > On Fri, 2018-04-06 at 10:21 -0400, Freeman Gilmore wrote:
> > > > > > I am trying to see how Denemo works with microtonal
> > > accidentals.
> > > > > I
> > > > > > can not find in the manuals how to do this.   Could someone
> > > > > please
> > > > > > direct me to the instructions on how to do this?
> > > > >
> > > > > No-one has made any special support within Denemo, it would be
> > > > > quite
> > > > > possible but you will need to exploit LilyPond's facilities to
> > > > > create
> > > > > such notation.  For example
> > > > >
> > > > > http://lsr.di.unimi.it/LSR/Item?id=585
> > > > >
> > > > > gives such notation for Turkish music by incorporating
> > > "makam.ly".
> > > > > This
> > > > > is something someone who was comfortable with the LilyPond
> > > syntax
> > > > > could
> > > > > script so that Denemo could let you enter the accidentals (and
> > > even
> > > > > display them in their typeset form in the Denemo Display) but
> > > you
> > > > > would
> > > > > need some help with the Denemo Scheme syntax to do that (the
> > > > > suffixes
> > > > > for the accidentals have to come between the note-name and any
> > > > > octave
> > > > > indicators).
> > > > >
> > > > > Let me know if you want to tackle that!
> > > > >
> > > > > Richard
> > > > >
> > > > >
> > > >
> > > >
> > > > Richard:
> > > >
> > > > Between the time I sent my email and receiving you reply I found
> > > and
> > > > read the same thing you sent to me.    I do have some questions
> > > about
> > > > this.   I do not know Schema and I do not know if I would live
> > > long
> > > > enough to learn all that would be needed to implement this.
> > >
> > > Fortunately, you do not need to learn the Scheme programming
> > > language
> > > to write scripts for Denemo to do simple things such as inserting
> > > bits
> > > of LilyPond syntax. Several users have created scripts to do
> > > various
> > > tasks, some of them are now shipped with Denemo
> > >
> > > >
> > > > Is schema the only part of the sores code that needs to be
> > > changing
> > > > to do this?
> > >
> > > Well, no part of the source code needs changing, you are able to
> > > have
> > > your own local commands that are stored in your own directory and
> > > have
> > > all the status of the commands shipped with Denemo (most of
> > > Denemo's
> > > menus comprise scripts which are interpreted when you invoke them).
> > >
> > > >
> > > > Is Scheme mostly an interpreted language?
> > >
> > > yes
> > >
> > > >
> > > >
> > > > Does Scheme supply data to the C part of the Denemo code; or does
> > > it
> > > > work independent for this?
> > >
> > > The Scheme script would invoke procedures that are part of the
> > > source
> > > code of the Denemo program, written in C.
> > >
> > > >
> > > > Do the glyphs come from Lilypond as needed, i.e. would ‘es’ sent
> > > from
> > > > Denemo find and print the ‘b’ as well as coped to the Denemo work
> > > > space?
> > >
> > > Yes, Denemo can pass the syntax that LilyPond needs and optionally
> > > display any glyph from the LilyPond (or any other) fonts as needed.
> > > All
> > > this can be done by the user themselves. But as there are several
> > > thousand Denemo commands that can be invoked you will probably need
> > > help to find your way around - I'm always happy to help, as this is
> > > the
> > > best fun, exploiting all the power under the bonnet.
> > >
> > >
> [...]
> >
> > Richard:
> >
> > Not sure about this.   I am not a programmer, so could you please
> > direct a source to learn Scheme.   Because I do not read well, would
> > you tell me which part of Scheme I should know to do this?
>
> Well, as I say, you wouldn't need to study the Scheme syntax to do this
> since nearly all of this sort of simple script is just a list of Denemo
> commands to be performed. For example this LilyPond syntax
>
> \include "makam.ly"
>  { a'4 bk'4 c'' r }
>
> creates the attached makam.pdf when run through LilyPond. Note that the
> second note has a "k" as the accidental, which is listed as being kücük
> mücenneb (sharp) in http://lilypond.org/doc/v2.18/Documentation/notatio
> n/turkish-classical-music
> and this causes the LilyPond glyph
> "accidentals.sharp.slashslashslash.stem" to be used as the accidental.
>
>
> I created this in Denemo by putting \include "makam.ly" into the Score-
> >LilyPond Header command (so that it is inserted at the top of the
> LilyPond output) and putting in the notes a b c and the 1/4 rest. Then
> I placed the cursor on the second note, b' and executed this script:
>
>
> (let ((tag "makam"))
>         (d-DirectivePut-note-postfix tag "k")
>         (d-DirectivePut-note-override tag DENEMO_OVERRIDE_AFFIX)
>         (d-DirectivePut-note-graphic tag "accidentals.sharp.
> slashslashslash.stem")
>         (d-DirectivePut-note-gx tag -10)
>         (d-SetSaved #f))
>
> (I put the script into the View->Scheme window to do that)
> The only bit of Scheme syntax in that is the first line
>
>  (let ...)
> which is just Scheme's way of making a block of code.
> All the rest of the lines are from Denemo's Scheme library - they all
> start "(d-"
> meaning it is a built-in Denemo procedure. The first one
>
> (d-DirectivePut-note-postfix tag "k")
>
> puts the "k" after the note by attaching a Denemo Directive to the note
>  which postfixes the note with "k". The "tag" is just to identify this
> type of Denemo Directive.
>
> The next line:
>
> (d-DirectivePut-note-override tag DENEMO_OVERRIDE_AFFIX)
>
> overrides  the usual placement (after the note) to be after the note
> name and before the octave indicator "'"
>
> With this much LilyPond will typeset the microtone, but the Denemo
> Display would not show anything, so ...
>
> The next line
>
> (d-DirectivePut-note-graphic tag "accidentals.sharp.slashslashslash.stem")
>
> puts the LilyPond glyph onto the Denemo Display at the note position.
>
> And the next
>
> (d-DirectivePut-note-gx tag -10)
>
> moves the glyph so it comes before the note head in the display, not on
> top of it.
>
> Finally this line
>
> (d-SetSaved #f)
>
> tells Denemo that the file has been changed (so it's "Saved" status is
> now FALSE, that is the modified score has not been saved). Actually
> that's the second bit of Scheme syntax, #f is the Scheme syntax for
> boolean FALSE.
>
> >
> > I would assume that there are libraries in Scheme.
>
> There are extensive Scheme libraries, but you wouldn't need them. What
> you would need to be shown is the Denemo library - that is the
> collection of (d-XXXX ...) procedures which Denemo provides. There is
> some documentation on these, but in practice you would just want
> examples (like the above script) which you could then modify to output
> other microtones. Each script you would save either as a command or as
> a palette button, and then assign keyboard shortcuts etc.
>
> >  One for placing # and b simples in the tool section of Denemo.  And
> > I am going to guess the #’’s and b’s come from Lilypond to a Scheme
> > library to place them in the work space.  Would you direct me to the
> > section of Scheme code that works with the accidentals?  I know there
> > are other dependent sections from what you said above.   This may be
> > far off base, but I would like to see some code.    I am using
> > windows, so is there a simple IDE that I would need?
>
> This is *way* simpler than anything you would need an IDE for. The main
> work is deciding what LilyPond syntax you want to emit,  and what you
> would like to see in the Denemo Display to correspond with it. If you
> can post up examples of the LilyPond syntax you would like then the
> rest is relatively easy...
>
> I hope the above gives you a flavor of what creating some new features
> would be like - it has been done by non-programmers before, so there is
> no cause to be daunted. I should note that the above script requires
> the latest version 2.2.7 which will be built tonight because testing it
> out revealed that placement of the "k" *before* the octave indicator
> was not being honored :( ...
> So if you download
>
> http://www.denemo.org/~jjbenham/mxe/denemo.zip
>
> tomorrow you can try it out.
>
> Richard
>

​
Richard:

That gave me a good overview, thanks.   You said "Well, as I say, you
wouldn't need to study the Scheme syntax to do this..."; but you did not
say what was a good source to study?

In the d- [procedures] is tag to get a input variable?    I.e.
(d-DirectivePut-note-postfix tag "k"), k is the input value of the
variable?    So does  (d-DirectivePut-note-postfix tag "*x*") contain all
the glyphs?

Thank you, ƒ ​
_______________________________________________
Denemo-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/denemo-devel

Reply via email to