denemo-devel
[Top][All Lists]
Advanced

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

Re: [Denemo-devel] Scheme book


From: Richard Shann
Subject: Re: [Denemo-devel] Scheme book
Date: Wed, 27 Aug 2008 15:48:10 +0100

On Wed, 2008-08-27 at 08:12 -0500, Jeremiah Benham wrote:
> Created a chord object of a specified duration. 
> Assigning the value mid_c_offset to the note structure. 
> Then inserting the chord object into the score.   
> 
> This would insert into the score in the cursor_x position and
> currentmeasnum. The function could just auto advance cursor_x and
> currentmeasnum as needed.  
> 
> Is allowing users to directly create objects too low level?

It is not so much that. There is a menuitem which directly inserts a
DenemoObject of type chord with  a note in it. The schemer will use it.

What we don't want is to introduce a new model against which the schemer
is programming: we don't want to say here is a function to create an
abstract entity Chord which contains nothing until you populate it with
a note or a rest, and which has no duration until you give it one. Not
that such a thing might not be nice, but we have no mechanisms to
support it, and we would have to explain it, and so on.
Instead, the schemer can program against the program that is actually
there doing everything they could do by hand but with a little bit of
feedback so that they can create loops and so on. This is a programming
model that needs almost no design, no documentation, no additional
functions. And yet, I suspect, it is powerful beyond our dreams.

I say "almost no additional functions"
Almost no functions except for the matter of feedback 
        - the script will want feedback (do I have a note, what pitch is it
etc) which the user gets by looking at the screen
        - the script will want better navigation (go to the next note in a
chord...) which the user does again by looking at the screen.
        
and also things that throw up dialogs (insert a fakechord): these we
will want to take a string input, so that the function has no need to
throw up a dialog to get the input.
(Luckily, we can do this with ease - the menuitem callbacks are passing
NULL as user data (used to pass in gui), so the Schemer can pass in the
string to avoid a dialog popping up. And the menuitem callbacks are
ignoring the return value, so we can use it to return feedback on the
success of the operation to the Schemer.)

Do you see where I am heading?

Richard








reply via email to

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