Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Harmonic rhythm and proportional tempo helper functions #7

Open
AFrancoB opened this issue Jul 16, 2018 · 0 comments
Open

Harmonic rhythm and proportional tempo helper functions #7

AFrancoB opened this issue Jul 16, 2018 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@AFrancoB
Copy link
Collaborator

AFrancoB commented Jul 16, 2018

One main feature of the work of Conlon Nancarrow is the use of proportional tempo based on the idea of harmonic rhythm described by Henry Cowell in the book New Musical Resources. It might be great to have a helper function that allows users to algorithmically design a tempo array that simultaneously produces transposition based in the proportional relationships formed by such tempos. We already have a function that might convert tempo into transposition values however it doesn´t perform the opposite operation and the transpositions are expressed in absolute values that will conflict with the values of the melody as it is presently designed. It also requires an octave / rhythm figure parameter to freely choose the register of its transposition/tempo.

(
~makeHarmRhythm= { | tempos, transp, proportions|
	var
	    propTempos= tempos*(proportions ? [1]),

		defaultProportions = if(proportions == nil,
			{tempos.cpsmidi},
			{propTempos.cpsmidi}
		),

		tempoToTransp= if(transp != nil,
			{transp},
			{defaultProportions},
		),

		resultingTempos = if(proportions == nil, {tempos}, {propTempos}),

		result = resultingTempos.size.collect({|i|
			(tempo: resultingTempos[i], transp: tempoToTransp[i])
		});

	//Post warnings on inconsistent data
	if(proportions != nil  && tempos.isArray, {"inconsistent tempos declared, tempos may be weird".warn});
	if( tempos.isArray && tempos.size == 1, {"inconsistent tempos declared, tempos may be weird".warn});

	result
}
)

// try me
~makeHarmRhythm.(tempos: [ 180, 240, 300, 360 ]);
// just arbitrary tempo, automatically generates transp with harmonic rhythm principle
~makeHarmRhythm.(tempos: 60, proportions: [3,4,5,6]);
// tempos generated proportionally, automatically generates transp with harmonic rhythm principle
~makeHarmRhythm.(tempos: 20, proportions: [3,4,5,6], transp: [12, 24, -12, -15]);
// tempos generated proportionally, transposition values generated arbitrarily
~makeHarmRhythm.(tempos: [ 180, 240, 300, 360 ], transp: [12, 24, -12, -15]);
// tempo and transposition generated arbitrarily

This function needs to work with the idea of transposition as function value proposed in issue #2 . It also requires an API that doesn´t 'convert' tempo to transposition but it is a new parameter that can be named and invoked in a new amazing and fantastic way.

@AFrancoB AFrancoB added enhancement New feature or request help wanted Extra attention is needed labels Jul 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant