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

@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## Unreleased
### Added
- Passing a file name on command line immediately tries loading that file (#122)
- Massive rewrite of the GUI, in particular allowing better copying, pasting and
scrolling of table-based data (order list and note data).
- Dbgain unit, which allows defining the gain in decibels (-40 dB to +40dB)

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()