How to use the birdears.sequence.Sequence function in birdears

To help you get started, we’ve selected a few birdears examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github iacchus / birdears / tests / test_basic.py View on Github external
def test_sequenceclass_append():

    sequence = Sequence([Pitch('C', 3)])
    sequence.append(Chord([Pitch('C', 4), Pitch('D', 4), Pitch('E', 4)]))

    assert(sequence)
github iacchus / birdears / tests / test_basic.py View on Github external
def test_sequenceclass_extend():
    sequence = Sequence([Pitch('C', 3)])
    sequence.extend(Chord([Pitch('C', 4), Pitch('D', 4), Pitch('E', 4)]))

    assert(sequence)
github iacchus / birdears / birdears / questions / melodicinterval.py View on Github external
def make_question(self):

        question = Sequence([self.random_pitch], **self.durations['quest'])

        return question
github iacchus / birdears / birdears / questions / melodicdictation.py View on Github external
def make_question(self):
        return Sequence(self.random_pitches, **self.durations['quest'])
github iacchus / birdears / birdears / questions / instrumentaldictation.py View on Github external
def make_question(self):
        return Sequence(self.random_pitches, **self.durations['quest'])
github iacchus / birdears / birdears / resolution.py View on Github external
if random_pitch not in scale_random_pitch:
        resolution.insert(0, random_pitch)

    if len(resolution) == 1:
        resolution.append(tonic_pitch)

    if question.is_harmonic:
        resolution_harmonic = []

        for item in resolution:
            resolution_harmonic.append(Chord([tonic_pitch, item]))

        resolution = resolution_harmonic

    # resolution
    return Sequence(elements=resolution, duration=duration, delay=delay,
                    pos_delay=pos_delay)
github iacchus / birdears / birdears / questions / notename.py View on Github external
def make_question(self):

        question = Sequence([self.random_pitch], **self.durations['quest'])

        return question