denemo-devel
[Top][All Lists]
Advanced

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

Re: custom keymap


From: Richard Shann
Subject: Re: custom keymap
Date: Thu, 03 Sep 2020 18:17:01 +0100

On Thu, 2020-09-03 at 07:02 -0400, aaron mehl wrote:
> 
> 
> Sent from Mailspring, the best free email app for work
> On Sep 3 2020, at 4:43 am, Richard Shann <richard@rshann.plus.com>
> wrote:
> 
> 8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><
> 
> (define (InsertPitch pitch)
> (eval-string (string-append "(d-" (number->string (d-
> GetPrevailingDuration)) ")"))
> (d-StagedDelete)
> (d-CursorToNote pitch)
> (d-AddNoteToChord)
> (d-MoveCursorRight))
> 
> (if (equal? "Treble" (d-GetPrevailingClef))
> (InsertPitch "f'")
> (InsertPitch "f,"))
> 
> 8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><
> 
> would make a command which when invoked inserted f' if the prevailing
> clef was treble or f, otherwise. (It assumes that you are not using
> the
> Rhythm Entry for MIDI in option).
> So you could make a series of such commands for each note name and
> give
> them your shortcuts.
> ----------------------------------
> So I need to tell it what clef I am in

??? how would you do that? What is "it", you just execute this script,
the script finds out if your prevailing clef is a treble clef and if so
it puts in an f' otherwise it puts in an f,

>  and  I refer to the top section,
???
The first bit of the script defines a procedure, which to be elegant
should be placed once elsewhere rather than repeated in the script for
each note name. But the script is perfectly functional just as I sent
it.

>  and I must do this for every pitch I want.

with this approach you would need one scripted command for each note
name and octave(*) that you wanted to be inputting via a single key-
stroke.

Richard

(*) not strictly speaking "octave" as which octave it puts the note in
will depend on the prevailing clef.


> Would this be =-nine scripts for all the notes I want to hard code?
> would this script automatically appear in the list in the Input menu
> for me to manipulate it there? I guess I need to read the Scheme
> section of the manual in more detail.
> Thanks,
> So far,
> Aaron
> Richard
> (*) There may be neater ways to do this ...



reply via email to

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