bachus
Joined: Feb 29, 2004 Posts: 2922 Location: Up in that tree over there.
Audio files: 5
|
Posted: Thu Dec 16, 2010 9:13 pm Post subject:
Microtonality and inheritance |
|
|
The recent discussion on micro-tonality made me think of how it would be implemented in Zylaphon, and how a discussion of this would use inheritance might be of use to people who are just getting into object oriented programming. Below is an inheritance diagram for Zylaphon's ChannelBar base class.
The black boxes represent classes that have actually been defined, while the green ones indicated classes that I will eventually define, and the blue boxes are classes that might be defined – though not by me.
The ChannelBar class is virtual and never actually instantiated. It represents one bar of one channel and is implemented as a linked list of ChannelElements which is itself a virtual class. A ChannelBar is also associated with a Meter. Though not yet tested multiple commensurate meters in the same measure should be functional (¾ & 6/8 etc). Non commensurate meters are possible but will require nontrivial effort to implement.
The virtual ChBarMetered inherits from ChannelBar. It possesses all the methods needed to manipulate and format standard metric events including beaming. ChBarDiatonic contains those methods relating to the diatonic staff and the display of diatonic Notes and Chords. If one wanted to extend Zylaphon to handle some micro-tonal system not suited to notation on the five line diatonic staff, one would create a new Class and have it descend from ChBarMetered and in one fell swoop (one line of code) all the methods needed to manipulate and format metric events would be bestowed on that class. Though it occurs to me that I did not make stem lengths a parameter and if standard diatonic stem lengths were not acceptable a bit of reworking to ChBarMetered would be required.
This is very powerful stuff. By the simple act of inheritance one acquires thousands of lines of very difficult code perfectly suited to the needs of micro-tonal notation in terms of its metric notational aspects. Though, of course, much work would have to be put into the ChBarMicrotonal class to make it functional.
I have also shown a decimal time channel bar. This touches on one of the few fundamental limitations on Zylaphon's extensibility. While decimal time classes would not be difficult to implement and include with metered classes, doing so would, for technical reasons, preclude any variation of tempo. ( It would be possible, however, to create a decimal time class that was no more than real time markers for metric events and calculated after the fact and which could have no deep-structure links. )
Description: |
|
Filesize: |
67.04 KB |
Viewed: |
468 Time(s) |
This image has been reduced to fit the page. Click on it to enlarge. |
|
_________________ The question is not whether they can talk or reason, but whether they can suffer. -- Jeremy Bentham |
|
Acoustic Interloper
Joined: Jul 07, 2007 Posts: 2067 Location: Berks County, PA
Audio files: 89
|
Posted: Thu Dec 16, 2010 11:26 pm Post subject:
|
|
|
Let a hundred flowers blossom _________________ When the stream is deep
my wild little dog frolics,
when shallow, she drinks. |
|