[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Denemo-devel] MIDI entry filters
From: |
Jeremiah Benham |
Subject: |
Re: [Denemo-devel] MIDI entry filters |
Date: |
Fri, 28 Nov 2008 10:53:55 -0600 |
On Tue, 2008-11-25 at 11:26 +0000, Richard Shann wrote:
> I've added some MIDI entry filters to the Entry Menu/MIDI. One is for
> edit mode where when you enter a note from the MIDI keyboard the cursor
> advances to the next note. The other is for entering figured basses from
> the MIDI keyboard. This last needs only a little work to enable you to
> enter the chords themselves (a much simpler task).
> Notice that they avoid creating global variables. Being filters they
> need to create one global, so that if re-entered they know that they are
> already active. This one global is prefixed with
> <nameOfCommand>::
> so that it will not conflict with any other command script.
I edited the transposition script so that it only uses functions within
itself defined by let. I modeled it after your Midifilter scripts. Can
this global prefix be passed an argument with this standard? Like
Transpose::Interval("c d"). If all the other functions are member
functions is it necessary to prefix these member functions with
Transpose::?
I am assuming the stuff that has it go through the entire staff and
reiteration should be removed from this script. So the users would have
to pass this as a command to what to apply to entire staff or what to
apply to range. So in the ApplyToSelection script:
replace:
(define command (d-GetCommand))
with
(define command "(Transpose::Interval("c d"))")
Does this all sound right?
Would each script be prefixed with something like:
(if (not (defined? Transpose::Active))
(define Transpose::Active #f))
(if Transpose::Active
(begin
(set! Transpose::Active #f)
Or would having it start with something like:
(define Transpose::Interval
(lambda (interval)
(begin
etc ....
Then if interval is not defined it could have the popup asking the
interval. Is that possible in guile to call a function that like this
with optional arguments? Sorry so many questions.
Thanks,
Jeremiah
> All other variables are local, which is done using let and let*
> constructs.
> We should insist on these standards for scripts that we distribute.
> Richard
>
>
>
>
> _______________________________________________
> Denemo-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/denemo-devel