sugarlabs / musicblocks

Music Blocks -- A musical microworld
https://musicblocks.sugarlabs.org/
GNU Affero General Public License v3.0
542 stars 734 forks source link

canon widget #1768

Open pikurasa opened 5 years ago

pikurasa commented 5 years ago

I tried the Bach AI thing on Google's Doodle. I think a more significant step pedagogically would be a widget to help a user do something such as create a successful canon.

The widget would basically be a more sophisticated version of the phrase maker (or in standard notation, if possible--either way).

The user would specify the interval type (4th, 5th, etc -- diatonic by default) and how many beats out the canon would be (whole note, half, double whole, etc)

The user would then input their desired notes to create a melodic line (in an active grid) and a second grid would automatically populate with the canonic line.

Where the two lines intersect contrapuntally, the intervals would be examined by specified rules (i.e. are they consonant?). Consonant intervals and dissonant intervals would be color coded.

For "very pure" 16th century counterpoint (such as Lassus) the user would be steered toward all consonant combinations of intervals and avoiding parallel octaves and fifths. Other sets of rules could be integrated, but this would be a good start.

walterbender commented 5 years ago

Why do you think we should have two separate grids? Why not put the canonic line in the same grid (in a different color)?

walterbender commented 5 years ago

If we use one grid, I think we could simply extend the phrase maker.

pikurasa commented 5 years ago

Sorry, I don't think we visually need two separate grids, just that the musical lines work differently--like a "master" and "slave".

Those two musical lines should occupy the same grid visually.

pikurasa commented 5 years ago

From what I read on section 9 of https://jaycoskey.github.io/MusicProgrammingLanguages/#/section_strasheela Strasheela is a language where one implements rules for their music (the presentation also links to http://strasheela.sourceforge.net/strasheela/doc/api/node6.html#entity378 )

I think that this would be worth looking into more.

walterbender commented 5 years ago

We might also want to add some options such as inversion and retrograde. Might be nice additions to the Phrase maker in general.

walterbender commented 5 years ago

https://musicblocks.sugarlabs.org/index.html?id=1560112479218661&run=True

walterbender commented 5 years ago

Screenshot from 2019-06-10 14-29-06