denemo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Denemo-devel] ReadingNoteNames Varaitions


From: Richard Shann
Subject: Re: [Denemo-devel] ReadingNoteNames Varaitions
Date: Tue, 07 Jul 2009 17:36:17 +0100

On Tue, 2009-07-07 at 09:10 -0500, Jeremiah Benham wrote:
> On Sun, Jun 28, 2009 at 09:17:45AM +0100, Richard Shann wrote:
> > On Sat, 2009-06-27 at 23:38 -0500, Jeremiah Benham wrote:
>  > 
> > > 
> > > Would you recommend that in games like ReadingNoteNames each note have
> > > a standalone directive and then use (d-FindDirective-standalone tag)
> > >  to find each note?
> > No, much better attach a directive to the chord and search for that.
> 
> I think I am a bit confused here. Are you talking about games other than 
> ReadingNoteNames?
I think it would apply to that game
>  If so, when you speak of chords are you talking about more then one note at 
> once
No, I meant chord in the Denemo sense, a DenemoObject of type CHORD -
something that you can do a d-DirectivePut-chord-graphic to.
>  or are you talking about chord symbols and figured bass? There can be a game 
> made that user is expected to analyze the chord or something like that. In 
> reverse a user may be required to fill in chord tone that match a chord 
> symbol. 
> 
> > I have done (master in git) the 
> > 
> > (d-DirectiveGetTag-field)
> > 
> > (d-Directive-field?)
> > (d-Directive-field? tag)
> 
> This makes me wonder how we are going to deal with versioning. If I write 
> something that uses the above, people who are using 0.8.6 will have 
> non-functioning scripts if they "Update commands from the internet"
> 

Funny you should mention that - I have been thinking about it - it is
very easy. We break the current Denemo version up into
DENEMO_VERSION_MAJOR and minor and micro and construct the string from
those & then we put them into the toplevel guild environment at startup.
Then scripts can do
(if (and (< DENEMO_VERSION_MAJOR 1) (< DENEMO_VERSION_MINOR 8) (<
DENEMO_VERSION_MICRO 7))
        (d-WarningDialog "Newer version required")
...
The syntax and logic will be wrong, but I hope the intention is obvious.

>  
> > for all the fields (standalone, chord, etc etc). The first returns the
> > tag of the directive found (or #f if none), the d-Directive-field tests
> > for the presence of the sort of directive, restricted to tag if given.
> > These are all in actions/denemo.scm so you can see what they do.
> > So you can write a loop to find a particular chord directive placing the
> > cursor on it.
> 
> This sounds clear as to what it is. 
> 
> > This is much better than having standalones which can get moved away
> > from the note they refer to. However if you put a big tick for correct
> > into the score that could be a standalone (it could be put on a staff
> > below), 
> 
> Ok. So you recommend checkmarks and graphics
what you place on the chord could have a graphic, if a note was done
correctly you could give it a tick, attached to the chord. But some sort
of things (e.g. a score) could be done on another staff, standalone
(perhaps - we have to experiment).
>  to be standalone but when notes are inserted you recomend placing a note 
> directive
chord directive, unless there is more than one note and you are
particularly trying to refer to it in some way.
> on them so that the cursor does not thrown off and make everythig off track.  
> 
> >Also the score could be put in using two standalones, one tagged
> > "tens" the other "units", where you just change the digits by finding
> > the "units" and getting and then incrementing and putting the value,
> > carrying over into the "tens" if need be. Then the score displays in big
> > numbers, as I did for the conductor (IIRC) but that was before the
> > ability to find and edit specific directives, so I was moving the cursor
> > by dead reckoning.
> 
> I read through the Conductor example and have implemented displaying the 
> score in big numbers into the games. I am not using directives to keep track 
> of "units" and "tens" though.
That's a shame, I am sure it would be much easier that way. You could
just find the standalone directive that had tag "tens" and change it
when the number overflowed the units. And so on. What I did was a bit
complicated and would fall over if the cursor got moved IIRC.
Richard


>  I am not sure if I understand your usage of them. What I ended up doing was 
> to create a procedure that converts the score number into a string and then 
> performs an operation to each character of the string. The string is then 
> converted to an integer and then the corresponding graphic is placed on the 
> screen. 
> 
> 
> > Hope this is clear enough - I have to rush. 
> > 
> > The C implementations are in lilydirectives.c and the definitions of the
> > scheme interface to them in view.c, if you need to check on the
> > syntax/return values etc.
> 
> Thanks, I will keep my eye on them.
> 
> Jeremiah 
> 
>  
> > Richard
> > 
> > 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]