Example #1
0
#! /usr/bin/env python3
from music42 import music42
from music21 import *
import time

sheet = music42.buildSheet('4/4', 'Progressão I - VI - II - V',
                           time.strftime("%d/%m/%Y"))

for n in music42.circleOfFifths('C', 6):
    data = music42.getHarmonyForMajorScale(n.strip('#'), True)
    music42.appendChords(sheet, data, '|I - VI - II - V|')

music42.show(sheet)
Example #2
0
#! /usr/bin/env python3
from music42 import music42
from music21 import *

sheet = music42.buildSheet('4/4', 'Chords Lib')

for mainNote in music42.dict['chromaticNotes']:
    for tp in ['', 'm', 'm(b5)', '7M', '7', 'm(b5)7']:
        sheet['p'].append(music42.buildChord(mainNote, tp))

music42.show(sheet)
Example #3
0
#! /usr/bin/env python3
from music42 import music42
from music21 import *

sheet = music42.buildSheet('4/4', 'Progression VI – IV – I – V')

for n in music42.dict['commonNotes']:
    data = music42.getHarmonyForMajorScale(n)
    i = 0
    for g in 'VI IV I V'.split(" "):
        cho = data[g]
        i += 1
        m = stream.Measure()
        if i == 1:
            m.leftBarline = 'light-heavy'

        m.append(cho)
        sheet['p'].append(m)

music42.show(sheet)
Example #4
0
#! /usr/bin/env python3
from music42 import music42
from music21 import *
import random

sheet = music42.buildSheet('4/4', 'Deus Está Aqui', 'Canção Popular')
colors = ['#212F3C', '#AF601A', '#4A235A', '#9A7D0A']
i = 1
tons = 'DEFGABC'
for n in tons:
    data = music42.getHarmonyForMajorScale(n)
    music42.appendChords(
        sheet, data,
        '|I V - VI - IV V - I pIV - IV V - III VI - II V - I V ..|')
    music42.custom['color'] = random.choice(colors)
    if i < len(tons):
        m = music42.builMeasure()
        nk = key.Key('C')
        m.insert(0, nk)
        pd = music42.buildPrepareForChord(data['pitches']['II'])
        pd['II'].color = '#16A085'
        pd['V'].color = '#7DCEA0'
        m.append(pd['II'])
        m.append(pd['V'])
        sheet['p'].append(m)

    i += 1

music42.show(sheet)
Example #5
0
#! /usr/bin/env python3
from music42 import music42
from music21 import *
import time

sheet = music42.buildSheet('4/4', 'Campo harmônico Maior e Menor',
                           time.strftime("%d/%m/%Y"))

for n in 'EFGABCD':
    for data in [
            music42.getHarmonyForMajorScale(n, True),
            music42.getHarmonyForMinorScale(n, True)
    ]:
        music42.appendChords(sheet, data, '|I - II - III - IV - V - VI - VII|')

music42.show(sheet)
Example #6
0
#! /usr/bin/env python3
from music42 import music42
from music21 import *

sheet = music42.buildSheet('4/4', 'Major Scale Harmony')

for n in music42.dict['commonNotes']:
    for data in [
            music42.getHarmonyForMajorScale(n),
            music42.getHarmonyForMajorScale(n, True)
    ]:
        i = 0
        for g in music42.dict['graus']:
            cho = data[g]
            i += 1
            m = stream.Measure()
            if i == 1:
                m.leftBarline = 'light-heavy'

            m.append(cho)
            sheet['p'].append(m)

music42.show(sheet)