[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Pasting notes to create chords
From: |
Richard Shann |
Subject: |
Re: Pasting notes to create chords |
Date: |
Mon, 07 Jun 2021 11:36:05 +0100 |
On Sun, 2021-06-06 at 10:40 -0700, Erik Andersen wrote:
> Is there a way to copy/paste notes from one staff to another that
> already have notes to create chords on the destination staff?
I think there is nothing already packaged as a command to do this,
however the following script:
(let ((staff (1- (d-GetStaff))))
(define (get-note-and-pos)
(cons (d-GetNote) (GetPosition)))
(define (test)
(Note?))
(define thelist (MapToSelection get-note-and-pos test))
(define (make-chord data)
(define pos (cdr data))
(disp "postion " pos "\n\n")
(d-GoToPosition #f staff (list-ref pos 2) (list-ref pos 3))
(d-InsertNoteInChord (car data)))
(disp "The list is " thelist "\n\n")
(map make-chord thelist))
illustrates how you might do it. If you create a selection of notes in
a staff and execute this script (*) then it will insert the notes in
the selection as chord notes in the staff above. (TheĀ
(1- (d-GetStaff))
that you see in the script is the thing that is selecting the staff
above the current staff - you could get the staff number from the user
instead)
That said, there are lots of possible wrinkles - if you need help with
smoothing them out please ask.
Richard
(*) To execute the Scheme script paste it into the Scheme window and
the click Execute button (you could create a command or a palette
button for it ...)
> I commonly try to separate out as many parts of a melody as I can to
> separate staffs/voices. Then later I try to create custom parts for
> various instruments, and in some cases I would like to quickly bring
> parts togetherĀ into "chords" for some instruments that do well with
> those (piano for example.)
>
> --
> Erik Andersen