from ui.app import AppUI
from project import Project, ProjectChannel, AudioChannelChunk
import librosa


if __name__ == "__main__":
    print("Loading project...")
    test_project = Project(channels=[
        ProjectChannel(chunks=[
            AudioChannelChunk(*librosa.load("120 bpm amen break.mp3", mono=False), position=0, name="120 bpm amen break.mp3"),
            AudioChannelChunk(*librosa.load("120 bpm amen break.mp3", mono=False), position=1, name="120 bpm amen break.mp3"),
            AudioChannelChunk(*librosa.load("120 bpm amen break.mp3", mono=False), position=2, name="120 bpm amen break.mp3")
        ], name="drums"),
        ProjectChannel(chunks=[
            AudioChannelChunk(*librosa.load("piano chords - Bmin 120BPM.wav", mono=False), name="piano chords - Bmin 120BPM.wav")
        ], name="piano")
    ])#.from_file("test_project.tdp")
    
    # start the ui
    print("Starting UI...")
    app = AppUI(test_project)
    app.run()