11 Commits

Author SHA1 Message Date
Matias Lahti
7a434f69fd fix(go/audio): fix audio.Player interface to have erroring Close()
not sure if this is actually required, though? shouldn't we just try to close and disregard errors?
2020-11-08 02:41:42 +02:00
Matias Lahti
9b6249a1a7 feat(tracker): implement basic tracker keys 2020-11-08 02:36:24 +02:00
Matias Lahti
77949bdc17 feat(tracker): implement basic track display 2020-11-08 02:24:27 +02:00
Matias Lahti
90c3536f3e feat(tracker): implement some basic styled ui building blocks 2020-11-08 01:20:53 +02:00
Matias Lahti
64fe28a240 feat(tracker): create initial tracker skeleton using Gio 2020-11-07 19:50:37 +02:00
Matias Lahti
5eb7cef889 style(go/audio/oto): change error messages to be consistent 2020-11-07 19:38:58 +02:00
Matias Lahti
6e141f36c7 fix(go/audio/oto): clean up forgotten debug prints 2020-11-07 19:37:33 +02:00
Matias Lahti
551a7cb6c0 feat(sointu-player): implement a basic commandline tool to play songs 2020-11-07 19:34:46 +02:00
Matias Lahti
fa772ddd77 feat(go/audio): implement basic audio output with oto
splitting implementation into a separate package to potentially allow for other sorts of output, too.
2020-11-07 19:33:39 +02:00
Matias Lahti
9544a130ab feat(song): add basic JSON marshaling/unmarshaling tests to make sure everything gets marshalled properly
TBD: should the various []bytes be marshaled in a different way? Go defaults to base64-encoded strings but creating just plain JSON arrays with bytes could be more friendly to both humans and computers.
2020-11-02 16:36:54 +02:00
Veikko Sariola
e0a793ea6d Reorganize the project folder structure and how go packages are organized.
Sointu.asm / lib stuff lives at the root folder. There is a folder called "go4k", which is where
all go stuff lives. Following the ideas from https://medium.com/@benbjohnson/standard-package-layout-7cdbc8391fc1
the go4k folder is the "domain-model" of the go side, and should have no dependencies.
It contains Unit, Instrument, Synth interface etc. Putting go4k under a sub-folder is actually
in the spirit of Ben, as go4k adds dependency to the go language.

Bridge ties the domain-model to the sointulib through cgo. It returns C.Synth, but
makes sure the C.Synth implements the Synth interface, so others are able to use the
Synth no matter how it actually is done. MockSynth and WebProxy synth are good
prospects for other implementations of Synth.

It is a bit fuzzy where methods like "Play" that have no dependencies other than domain
model structs should go. They probably should live in the go4k package as well.

The file-organization on the Go-side is not at all finalized. But how packages are broken
into files is mostly a documentation issue; it does not affect the users of the packages at
all.

BTW: The name go4k was chosen because Ben advocated naming the subpackages
according to the dependency they introduce AND because the prototype of 4klang was
called go4k (there are still some defines in the 4klang source revealing this). go4k thus
honors our roots but is also not so bad name: it's the main package of a 4k synth tracker,
written in go.
2020-10-31 22:05:47 +02:00