electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Articles  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links  |  Store
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » Discussion » Composition
Accidentals and embedding domain knowledge
Post new topic   Reply to topic Moderators: elektro80
Page 1 of 1 [3 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
bachus



Joined: Feb 29, 2004
Posts: 2906
Location: Up in that tree over there.
Audio files: 5

PostPosted: Sun Jan 10, 2010 6:33 am    Post subject: Accidentals and embedding domain knowledge
Subject description: in the representation of a Key
Reply with quote  Mark this post and the followings unread

Accidentals and embedding domain knowledge in the representation of a Key.

I have constructed a mapping between midi values in the context of a given mode and key and the first order significance of the accidentals, sharps and flats, that may be applied to the scale degrees of the key.

The C# code below is an untested (un-executed) first draft. Here it is shown as a method of some class. It will be abstracted out very differently when fully defined. As is it should give a good idea of what I mean first order significance.

Posted Image, might have been reduced in size. Click Image to view fullscreen.

To be useful a symbol such as, Symbol.AppliedDominantLeadingTone, must be embedded in other code, such as chord progression generators. And we would expect this symbol to be semantically linked to one or more flavors of tonality.

This is another reason that Modes were not made extensible. I have yet to decide on how I am going to handle high level extensibility that will allow such things as dynamically loadable/definable objects. But clearly one would like to be able to add new modes and modal "flavors" with out resorting to the low level extensibility feature i.e. writing and compiling (the OpenSource) C#

Any thoughts on any of this?

Edit:

I should explain that _sharpAttribute/_flatAttribute means a ScaleDegree raised or lowered by a semitone. Depending on the key the actual accidental might be a double sharp or double flat.

_________________
The question is not whether they can talk or reason, but whether they can suffer. -- Jeremy Bentham
Back to top
View user's profile Send private message Visit poster's website
plagal



Joined: Dec 28, 2007
Posts: 18
Location: South Carolina

PostPosted: Sun Jan 10, 2010 10:50 pm    Post subject: Reply with quote  Mark this post and the followings unread

I may not be understanding, and I'm not much into the C language, but are you basically mapping the midi values to the 12 tone values (1..12) they belong to, and also the sharps or flats needed to represent scales and modes, which has scale numbering (1..7) which is like every-other for 12 tone numbering(1..12), hence the need to figure out the sharps or flats - if we stick to 12 tone numbering, its no problem.

Scale modes are basically these numbers floating to any scale degree, and can be used to harmonize the scale with chords - like Bm or Bm7 comes from the 2nd (dorian) mode of C Major scale. If any major scale has the formula 1 2 3 4 5 6 7, we can convert that to the 12 tone format: 1 3 5 6 8 10 12. So now we can do some math on it without dealing with sharps and flats. To get dorian out of that, 3 becomes 1, and 1 becomes 11, and so on… a simple algorithm should cover all the modes. The same thing can be done for chords formulas. This way we ultimately can generate lists of chords given a selected scale from just a data base of chord and scale formulas, for example, or get midi values out of chords and scales.

To use letter notation(sharps vs flats) in these lists, instead of numbers, is the problem. You can an array of strings that are indexed 1..12. Two arrays are needed: one that lists the sharps(C‘,‘C#’,…), and the other the flats(’C’,’Db’,….). But knowing when to use which is a problem that only gets bigger as you get into the altered scales (some even have both sharps and flats). Some programs just use sharps as the defalt notation, with flats as the other option. If there was a means of calculating the ‘sharp verses flat’ notation problem, I‘d like to know myself. What does your data base consist of? Will your project arrange midi values without much user intervention?
Back to top
View user's profile Send private message
bachus



Joined: Feb 29, 2004
Posts: 2906
Location: Up in that tree over there.
Audio files: 5

PostPosted: Mon Jan 11, 2010 6:50 am    Post subject: Reply with quote  Mark this post and the followings unread

plagal wrote:
What does your data base consist of? Will your project arrange midi values without much user intervention?


I am not sure what you mean by "arrange midi values." My system is notation centric rather than midi centric. It is to create music as score, But the pitch object class includes the midi value and makes use of it. Sharps and flats in the various flavors of tonality are generally used by composers to indicate key center and harmonic function. The reverse process, deriving key and sharps and flats from midi, seems to have become part of modern functional analysis.

Here is an interesting approach. Though personally I don't have a lot of enthusiasm for heavily statistical approaches to music for either analysis or generation I wouldn't deny that it has some utility. But I find current functional analysis too reductive for my needs and plan to pursue the creation of a multidimensional model of key center and harmonic function.

The code above creates a table that suggests how an accidental in the context of the major mode should fit into a particular flavor of tonality and as such cannot be used for analysis unless one knows before hand that the music is in, or should be in, that particular flavor.

_________________
The question is not whether they can talk or reason, but whether they can suffer. -- Jeremy Bentham
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic Moderators: elektro80
Page 1 of 1 [3 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » Discussion » Composition
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
Niio1

Please support our site. If you click through and buy from
our affiliate partners, we earn a small commission.


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use