[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Denemo-devel] splitting up (d-GetNotes)
From: |
Richard Shann |
Subject: |
Re: [Denemo-devel] splitting up (d-GetNotes) |
Date: |
Sat, 25 Jul 2009 09:10:26 +0100 |
On Fri, 2009-07-24 at 21:29 -0500, Jeremiah Benham wrote:
> On Fri, 24 Jul 2009 16:57:57 +0100
> Richard Shann <address@hidden> wrote:
>
> > HOWEVER:
> > I think you should be returning a space separated set of notes - that
> > would be the LilyPond notation (i.e. the contents of < >). It is
> > going in the other direction that we have a \0 separator convention -
> > passing data to C, so that we can pass strings with any characters in
> > them. Richard
> >
>
> So would someone writing a script be expected to do something like
> (d-ChangeChordNotes "c'\0e'\0g'")?
No, "c' e' g'" is fine, it is when we want to pass multiple strings (in
the C-sense) into C that we have to resort to NULL separators, as NULL
is the only thing that cannot be in a C string.
It was in the case of allowing the built-in commands to take optional
parameters that I adopted the convention of passing in NULL separated
strings, but it looks ugly. We could re-visit that - pass in SCM list of
strings. The C-code that handles this is all in one place (GET_PARAM* in
utils.c I think), so that it could be quite a painless improvement. On
the C-side that is. I am not sure how much scripting has been done to
that convention ... not a lot I fancy. Well worth thinking about - I
never liked the look of those NULL separators.
Richard