print("=== TerminalDAW - Version 0.0.1 ===\n")

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


if __name__ == "__main__":
    """print("Loading project...")
    test_project = Project(song_length=64,bpm=120,sample_rate=24000)
    
    screams = ProjectChannel(
        test_project,
        name="Drums",
    )
    sample = AudioChannelChunk(
        screams,
        *librosa.load("120 bpm amen break.mp3", sr=None, mono=False),
        name="120 bpm amen break.mp3"
    )
    screams.chunks.append(sample)
    
    test_project.channels.append(screams)
    
    test_project.write_to_file("test_project.tdp")"""
    #test_project = Project.from_file("test_project.tdp")
    
    # start the ui
    print("Starting UI...")
    app = AppUI(Project())
    app.run()