示例#1
0
def test_export_pattern():
    import pygmidi
    g = pygmidi.Pygmidi("Viva_La_Vida.midi")

    g.to("pattern")

    new_midi_path = "new_midi_file.midi"
    g.to(new_midi_path)
    assert os.path.exists(new_midi_path)
    os.remove(new_midi_path)
示例#2
0
def test_manipulate_multitrack():
    import pygmidi
    g = pygmidi.Pygmidi("Viva_La_Vida.midi")

    g.to("multitrack")

    g.trim(0, 12 * g.resolution)
    g.binarize()
    g.plot()
    g.blend()
    g.count_downbeat()

    g.resolution
    g.tempo
    g.downbeat
    g.tracks
示例#3
0
def test_import_pattern():
    import pygmidi
    g = pygmidi.Pygmidi("Viva_La_Vida.midi")

    g.to("pattern")
示例#4
0
def test_import_midiarray():
    import pygmidi
    g = pygmidi.Pygmidi("Viva_La_Vida.midi")

    g.to("midiarray")
示例#5
0
def test_import_multitrack():
    import pygmidi
    g = pygmidi.Pygmidi("Viva_La_Vida.midi")

    g.to("multitrack")
示例#6
0
def test_import_prettymidi():
    import pygmidi
    g = pygmidi.Pygmidi("Viva_La_Vida.midi")

    g.to("prettymidi")