Commit Graph

18 Commits

Author SHA1 Message Date
5684185+vsariola@users.noreply.github.com
a14e21dff6 ci: macos-latest is now arm64 and breaks, use macos-12 for now 2024-05-05 13:19:25 +03:00
5684185+vsariola@users.noreply.github.com
b028fea59a build: make targets properly rebuild when templates or compiler changed 2023-09-02 20:14:52 +03:00
Alexander Kraus
d0efcc3001 Added usage examples in C; Added asm include file with track info to sointu-compile. 2023-08-29 09:09:02 +03:00
Veikko Sariola
e4490faa2e feat(compiler): Add support for targeting WebAssembly.
The working principle is similar as before with x86, but instead of outputting .asm, it outputs .wat. This can be compiled into .wasm by using the wat2wasm assembler.
2020-12-26 23:16:18 +02:00
Veikko Sariola
7f049acf88 feat(cli): Re-engineer CLIs, split play & compile
Play depends on bridge and compile on compiler package. Before, the compiler depended on bridge, but we could not use the compiler to build the library, as the bridge depends on the library. Also, play can now start having slightly more options e.g. wav out etc.
2020-12-18 20:25:49 +02:00
Veikko Sariola
e6feed1e26 fix(go): Remove remaining references to go4k. 2020-12-16 21:39:23 +02:00
Veikko Sariola
224b8dcb70 refactor(go): Move everything from go4k to root package sointu 2020-12-16 21:35:53 +02:00
Veikko Sariola
d0bd877b3f feat(asm&go4k): Rewrote both library & player to use text/template compiler
There is no more plain .asms, both library & player are created from the templates using go text/template package.
2020-12-16 17:23:50 +02:00
Veikko Sariola
335d2af05b feat(asm&CI): Add support for macho-formats to header.inc and run tests also on MacOS.
Mac was giving errors about position dependent code, so had to add linker flag -Wl,-no_pie to ld & cgo.
2020-11-16 23:59:13 +02:00
Veikko Sariola
68f97d301d feat(CI): Run ctests in the cloud during push. 2020-11-12 12:59:14 +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
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
33d83d29a5 Update project description & version. 2020-05-25 13:58:29 +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
Veikko Sariola
35b2df2a2f Require CMake version 3.15, as the Visual Studio statically linking runtime policy was introduced in it. 2020-04-14 21:44:45 +03:00
Veikko Sariola
8d984cbc38 Implement ctest unit test, first test simply testing that envelope works as it used to. 2020-04-12 22:05:39 +03:00
Veikko Sariola
e180694d9e Switch to CMake for builds and reorganize the source directories. 2020-04-12 22:05:38 +03:00