[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Scheme Interface (was Re: [Denemo-devel] Staff menu transpose)
From: |
Richard Shann |
Subject: |
Re: Scheme Interface (was Re: [Denemo-devel] Staff menu transpose) |
Date: |
Wed, 24 Sep 2008 16:45:34 +0100 |
On Wed, 2008-09-24 at 09:44 -0500, Jeremiah Benham wrote:
> > On Tue, 2008-09-23 at 12:11 -0500, Jeremiah Benham wrote:
> > > I wrote a little diatonic transposition script but I don't know
> how to
> > > deal with split strings so it does not deal with chords yet.
> > In fact the diatonic_shift() function in C calls modify_note() which
> is
> > no use for changing chords. For our first implementation we can
> delete
> > the chord and replace it with a new one. But to preserve things like
> > guitar fingerings attached to notes we will probably need to write
> > something that replaces all the notes of a chord in single C
> function
> > call that takes a list of notes.
>
> Couldn't we just add this somewhere in either modify_note or before:
>
> for (curobj = (objnode *) curmeasure->data; curobj;
> curobj = curobj->next)
> {
> mudelaitem = (DenemoObject *) curobj->data;
> note *newnote = NULL;
> if (mudelaitem->type == CHORD)
> {
> node = ((chord *) mudelaitem->object)->notes;
> g_list_foreach(node, (GFunc )change_note, (int *) amount);
>
> }
> }
>
> The function change_note can be replaced with modify_note() or
> something.
No, for reasons that ultimately stem from what I keep going on about,
namely Denemo wasn't written with that in mind. There is more than one
nast gotcha in there - e.g. until recently changing one note to be the
same as another in a chord would have reduced the number of notes in the
chord. However, don't worry about this end of the task, I am confident
that I can achieve what we want, albeit with a little grunt work.
Richard
- Re: Scheme Interface (was Re: [Denemo-devel] Staff menu transpose), (continued)
- Re: Scheme Interface (was Re: [Denemo-devel] Staff menu transpose), Jeremiah Benham, 2008/09/23
- Re: Scheme Interface (was Re: [Denemo-devel] Staff menu transpose), Richard Shann, 2008/09/23
- Re: Scheme Interface (was Re: [Denemo-devel] Staff menu transpose), Richard Shann, 2008/09/24
- Re: Scheme Interface (was Re: [Denemo-devel] Staff menu transpose), Jeremiah Benham, 2008/09/25
- Re: Scheme Interface (was Re: [Denemo-devel] Staff menu transpose), Richard Shann, 2008/09/25
- Re: Scheme Interface (was Re: [Denemo-devel] Staff menu transpose), Richard Shann, 2008/09/23
- Re: Scheme Interface (was Re: [Denemo-devel] Staff menu transpose), Jeremiah Benham, 2008/09/24
- Re: Scheme Interface (was Re: [Denemo-devel] Staff menu transpose),
Richard Shann <=
- Re: Scheme Interface (was Re: [Denemo-devel] Staff menu transpose), Richard Shann, 2008/09/22