[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Denemo-devel] Documentation of Scheme interface
From: |
Jeremiah Benham |
Subject: |
Re: [Denemo-devel] Documentation of Scheme interface |
Date: |
Fri, 03 Oct 2008 10:21:07 -0500 |
On Fri, 2008-10-03 at 08:30 +0100, Richard Shann wrote:
> On Thu, 2008-10-02 at 14:16 -0500, Jeremiah Benham wrote:
> > On Thu, 2008-10-02 at 16:47 +0100, Richard Shann wrote:
> > > I've pushed a first cut of some documentation for the scripting
> > > interface.
> >
> > Thanks very much for doing this. Is it simple to add more scheme
> > commands? I was going to add d-GetClef that would return the clef name.
>
> You can clone the code for d-GetType. Starting in view.c you find
>
> install_scm_function (DENEMO_SCHEME_PREFIX"GetType", scheme_get_type);
>
> and
>
> SCM scheme_get_type (SCM optional) { clone the code to return a string
> for the clef }
>
> which are all you need to clone.
>
> The problems will arise in understanding what Denemo stores for clefs -
> there is the leftmost clef and, I think, something for the initial clef:
> I think there may well be a serious bug in there - if the leftmost clef
> is not the prevailing one or if the prevailing one is not the initial
> one or something - I am waiting for a user to nail it down, or at least
> report it. As it is, I don't know if you can tell what the clef is at
> the current cursor position. (I've been overly pessimistic before, just
> because I didn't understand what all the fields mean, so I may be
> wrong).
In the structure DenemoScore we have:
gint cursorclef; /**< The clef used at the current cursor location */
and
gint curmeasureclef; /**< This is value used for the creation of a new
measure */
cursorclef stores the value of the clef at the current position.
curmeasureclef is only used on the creation of a new measure. When a new
measure is created denemo copies cursorclef into curmeasureclef for the
initialization of the measure.
In the structure DenemoStaff we have:
gint sclef; /**< The initial clef see denemo_objects.h clefs */
and
gint leftmost_clefcontext; /**< The clef for the leftmost measure
visible in the window*/
sclef is the actual initial clef. leftmost_clefcontext is actually just
for the display window and what keysig to display on the leftmost
measure in the display.
I commented the code to make this a little clearer. I will push the
comments to git once I finish cloning this.
Jeremiah
> Richard
>
>
>
>
> _______________________________________________
> Denemo-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/denemo-devel
- [Denemo-devel] Documentation of Scheme interface, Richard Shann, 2008/10/02
- Re: [Denemo-devel] Documentation of Scheme interface, Jeremiah Benham, 2008/10/03
- Re: [Denemo-devel] Documentation of Scheme interface, Richard Shann, 2008/10/03
- Re: [Denemo-devel] Documentation of Scheme interface, Jeremiah Benham, 2008/10/04
- Re: [Denemo-devel] Documentation of Scheme interface, Richard Shann, 2008/10/04
- Re: [Denemo-devel] Documentation of Scheme interface, Jeremiah Benham, 2008/10/04
- Re: [Denemo-devel] Documentation of Scheme interface, Richard Shann, 2008/10/04