Commit Graph

10 Commits

Author SHA1 Message Date
Veikko Sariola
f7017892a5 refactor(asm&go4k): Remove special treatment from stereo parameters; it's now just one parameter in the Unit map. 2020-11-10 20:45:41 +02:00
Veikko Sariola
01c39ffc15 format(tests): Autoformat all tests using the new asmfmt command. 2020-11-10 20:08:13 +02:00
Veikko Sariola
9209aa1cba Implement .asm parsing in go4k, and run succesfully almost all tests/ through the bridge.
Delays and samples are not implemented yet and thus the tests are skipped, as these require parsing the delay and sample tables also. Various macronames were changed to be more sensible and consistent i.e. ATTAC was changed to ATTACK. GatesLow and GatesHigh was removed for the time being and the tracker will just have to know they are the SHAPE and COLOR parameters. SU_SPEED was changed to take a parameter so the parser picks it up.
2020-11-07 21:05:55 +02:00
Veikko Sariola
dc88b885e9 Fix warnings when built using nasm.
Nasm gives warnings about labels without colons in the end; these were particularly prevalent in struc members: ".size" has be ".size:". Nasm also wasn't happy with extra trailing commas when calling macros.
2020-11-02 22:31:22 +02:00
Veikko Sariola
eb37d8123d Change include path in CMake file to point to include/ instead of include/sointu/ 2020-11-02 21:37:22 +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
Veikko Sariola
af14cd310b Change .asm files that are actually only ever included into .inc-files, and rename all files as _header.inc & _footer.inc, depending where they are included. 2020-10-21 11:01:09 +03:00
Veikko Sariola
91b8912015 Rename all SU_BEGIN_* macros into BEGIN_*; there's no real risk of nameclash and makes the code more readable. 2020-05-26 17:45:37 +03:00
Veikko Sariola
efc6db71ab Reverse the logic of USE_SECTIONS (it's now DISABLE_SECTIONS) and then remove unnecessary defines. 2020-05-26 17:30:50 +03:00
Veikko Sariola
87264c443c Add tests for opcode stereo variants, squashing several bugs in the process. Implement receive opcode to test stereo sending. 2020-05-16 21:23:41 +03:00