|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.softsynth.jmsl.util.HarmonicComplexity
public class HarmonicComplexity
Some tools for handling intervals ordered by their "harmonic complexity."
From least to most complex, I'm suggesting:
{0, 7, 5, 4, 9, 3, 10, 6, 2, 8, 11, 1 }
I came up with my ranking with a simple model: examine partials one by one up from the root. Every time you add a new partial, examine the resulting intervals between it and all lower partials. So if the partials begin C C G C E, etc ... then a Perfect 5th comes from the interval from C to G. Perfect 4th comes from the interval from the 3rd partial G to the 4th partial, C. The 5th partial, E, gives you the maj3rd above C. But it also gives you 9 semitones above G. etc etc etc
Field Summary | |
---|---|
static int[] |
harmComplexArr
An array of increasingly complex intervals. |
Constructor Summary | |
---|---|
HarmonicComplexity()
|
Method Summary | |
---|---|
static int |
calcHCM(double[] chord)
Returns the harmonic complexity of a chord. |
static int |
calcHCM(MusicShape chord)
Returns the harmonic complexity of a chord. |
static int |
calcHCR(double[] chord)
Returns how wide an intervallic range the chord spans, in octaves. |
static int |
calcHCR(MusicShape chord)
Returns how wide an intervallic range the chord spans, in octaves. |
static int |
gimmeRandomHarmonicComplexity(double center,
double gaussianWidth)
Returns some interval from {0, 7, 5, 4, 9, 3, 10, 6, 2, 8, 11, 1 } Arguments passed to Gaussian distribution |
static int |
gimmeRandomHarmonicComplexity(int ceiling)
Returns some interval from {0, 7, 5, 4, 9, 3, 10, 6, 2, 8, 11, 1 } Ceiling argument limits upper range of complexity 0..11 |
static void |
main(java.lang.String[] args)
|
static void |
print()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int[] harmComplexArr
Constructor Detail |
---|
public HarmonicComplexity()
Method Detail |
---|
public static void print()
public static int gimmeRandomHarmonicComplexity(double center, double gaussianWidth)
public static int gimmeRandomHarmonicComplexity(int ceiling)
public static int calcHCM(double[] chord)
public static int calcHCM(MusicShape chord)
public static int calcHCR(double[] chord)
public static int calcHCR(MusicShape chord)
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |