feat(sointu-track): accept filename as command line parameter

Closes #122.
This commit is contained in:
5684185+vsariola@users.noreply.github.com
2024-02-17 19:17:47 +02:00
parent ca4a98eb50
commit aec756f921
2 changed files with 8 additions and 0 deletions

View File

@ -55,6 +55,13 @@ func main() {
recoveryFile = filepath.Join(configDir, "Sointu", "sointu-track-recovery")
}
model, player := tracker.NewModelPlayer(cmd.MainSynther, recoveryFile)
if a := flag.Args(); len(a) > 0 {
f, err := os.Open(a[0])
if err == nil {
model.ReadSong(f)
}
f.Close()
}
tracker := gioui.NewTracker(model)
output := audioContext.Output()
defer output.Close()