Commit Graph

608 Commits

Author SHA1 Message Date
5684185+vsariola@users.noreply.github.com
bb32403c78 build: require go 1.21 as it is needed by slices package 2024-02-17 18:22:31 +02:00
5684185+vsariola@users.noreply.github.com
d92426a100 feat!: rewrote the GUI and model for better testability
The Model was getting unmaintanable mess. This is an attempt to refactor/rewrite the Model so that data of certain type is exposed in standardized way, offering certain standard manipulations for that data type, and on the GUI side, certain standard widgets to tied to that data.

This rewrite closes #72, #106 and #120.
2024-02-17 18:16:06 +02:00
5684185+vsariola@users.noreply.github.com
6d3c65e11d fix(templates): avoid clobbering ebx in su_load_gmdls
Fixes #130
2024-02-16 20:09:20 +02:00
5684185+vsariola@users.noreply.github.com
c08a319eb7 docs: add link to NR4's tool 2023-11-20 08:55:22 +02:00
5684185+vsariola@users.noreply.github.com
8227691523 test: the filenames of test_gain and test_gain_stereo were flipped 2023-10-23 22:05:28 +03:00
5684185+vsariola@users.noreply.github.com
04fbc9f6a7 feat(vm): add dbgain unit, where gain is defined in decibels
Closes #78
2023-10-23 21:57:29 +03:00
5684185+vsariola@users.noreply.github.com
f698986718 docs: update CHANGELOG.md 2023-10-23 18:22:15 +03:00
5684185+vsariola@users.noreply.github.com
a38a0f4235 fix(tracker/gioui): text.Shaper should not be a global variable
text.Shaper is not thread safe, which caused crash when adding
multiple VSTI plugins to a DAW project. This change fixes that
crash. Further refactorings need to consider where that text.Shaper
should actually reside.
2023-10-22 19:10:24 +03:00
5684185+vsariola@users.noreply.github.com
3c85f1155c perf(cmd/sointu-vsti): avoid reallocations of events array
Always appending to the end and consuming from the front cause the
capacity of the slice regularly running out, resulting in new
allocation. With this change, we increment index when consuming
events and append to the end, and when we reset, we move index to 0
and empty slice. This way, we always reuse the allocated memory.
2023-10-21 10:47:26 +03:00
5684185+vsariola@users.noreply.github.com
1040eb585d build: require go 1.19; did not build on go 1.18 2023-10-21 00:11:58 +03:00
5684185+vsariola@users.noreply.github.com
6eb025d7ba refactor(tracker): remove unused variable RECOVERY_FILE 2023-10-20 18:41:21 +03:00
5684185+vsariola@users.noreply.github.com
9ec8f48f82 feat(tracker): move unnecessary members from modelData to Model 2023-10-20 17:59:27 +03:00
5684185+vsariola@users.noreply.github.com
391b14493c feat(tracker): undo entire modelData, not just Song
The modelData is moving towards clear meaning: it's the part of the
GUI state that is undone and also recovered from disk. This changes
the recovery data so that the undo and redo stacks are not undone,
but that is unlikely a good idea anyway, as it grows the recovery
data into unreasonable sizes.

This has also the nice benefit of undoing the cursor position, which
closes #64.
2023-10-20 17:59:26 +03:00
5684185+vsariola@users.noreply.github.com
486bab4185 style(tracker): rename NUM_RENDER_TRIES to numRenderTries 2023-10-20 16:38:44 +03:00
5684185+vsariola@users.noreply.github.com
1e47c5004c style(tracker): remove unused PlayerPlayingMessage type 2023-10-20 16:37:19 +03:00
5684185+vsariola@users.noreply.github.com
900f1611b1 docs(tracker): add go doc comments to GmDlsEntry/-Entries 2023-10-20 16:36:09 +03:00
5684185+vsariola@users.noreply.github.com
beb06727b0 refactor: move UnitNames to top level package 2023-10-20 01:59:30 +03:00
5684185+vsariola@users.noreply.github.com
b6ec5d1a04 style(tracker): group code into less number of files 2023-10-20 01:50:38 +03:00
5684185+vsariola@users.noreply.github.com
ff8e662857 refactor(tracker): move NoteStr and NoteAsValue to gioui package 2023-10-20 01:40:14 +03:00
5684185+vsariola@users.noreply.github.com
a60814bab7 refactor(tracker): make struct to hold all per voice data in Player 2023-10-20 01:26:41 +03:00
5684185+vsariola@users.noreply.github.com
0ce5ca3003 refactor(tracker): send Songs/Patches etc. from Model to Player 2023-10-20 00:54:03 +03:00
5684185+vsariola@users.noreply.github.com
14a0306064 docs(tracker): add go doc comments to Player 2023-10-19 23:28:57 +03:00
5684185+vsariola@users.noreply.github.com
d342fb860b refactor(tracker): put all recording data into struct Recording 2023-10-19 23:28:57 +03:00
5684185+vsariola@users.noreply.github.com
453f45c48a refactor(tracker): rename SongPoint to ScorePoint etc. 2023-10-19 22:28:44 +03:00
5684185+vsariola@users.noreply.github.com
50ccfe03da refactor(tracker): split Volume to PeakVolume and AverageVolume 2023-10-19 22:28:44 +03:00
5684185+vsariola@users.noreply.github.com
1a8a317464 docs(tracker): improve package go doc comments 2023-10-19 22:28:44 +03:00
5684185+vsariola@users.noreply.github.com
a9517f1511 docs: make the list of prods using sointu a markdown list 2023-10-19 14:30:01 +03:00
5684185+vsariola@users.noreply.github.com
9073adadb3 fix(tracker/gioui): scroll bars move in sync with the cursor 2023-10-19 14:25:03 +03:00
5684185+vsariola@users.noreply.github.com
b772940b1f fix(tracker/gioui): preset menu scrollbar fits on screen 2023-10-19 14:22:19 +03:00
5684185+vsariola@users.noreply.github.com
d6abb14b08 feat(tracker/gioui): add scrollbars to menus 2023-10-19 14:07:09 +03:00
5684185+vsariola@users.noreply.github.com
64270eaf68 refactor: rename FindSendTarget to FindUnit 2023-10-19 13:31:34 +03:00
5684185+vsariola@users.noreply.github.com
43707e5fd6 style(vm): group public/private member types; delete unused types 2023-10-19 13:07:24 +03:00
5684185+vsariola@users.noreply.github.com
fdad626279 style(vm): replace sointu.Unit{...} with {...} when allowed 2023-10-19 13:00:34 +03:00
5684185+vsariola@users.noreply.github.com
960bddfae0 refactor(vm): use vm.GoSynther{}.Synth instead of vm.Synth
vm.Synth was used only in a few places, reduce the number of
exported functions. Also, if we ever add some global configuration
to GoSynther e.g. samplerate, we have a mechanism to do so, instead
of the Synth function.
2023-10-19 12:52:05 +03:00
5684185+vsariola@users.noreply.github.com
7675121a78 style(vm): group public/private member types and rename privates 2023-10-19 12:47:38 +03:00
5684185+vsariola@users.noreply.github.com
e28891abd5 refactor: move ConstructPatterns into compiler package
ConstructPatterns was never used except during compilation, so it
makes sense to have it closer where it is used. We could consider
making it even private function, as the pattern table construction
is quite specific to how compiler compiles and probably not that
reusable elsewhere.
2023-10-19 12:38:18 +03:00
5684185+vsariola@users.noreply.github.com
e010b2da9d docs: improve go doc comments for vm package 2023-10-19 11:54:12 +03:00
5684185+vsariola@users.noreply.github.com
98a73795c7 style: move Play and Synth to audio.go
With this grouping, everything that deals with AudioBuffers is in
Audio. song.go and patch.go do not know anything about AudioBuffers
or Synths.
2023-10-19 11:32:30 +03:00
5684185+vsariola@users.noreply.github.com
5bbec75120 refactor: rename sointu.Render as AudioBuffer.Fill
The Render name misleading as it did not do the same thing as normal
Synth.Render, because it disregarded time limits. Conceptually, as
the function modifies the state of the synth, it would be better to
be synth.Fill(audioBuffer), but we cannot define methods on
interfaces; therefore, it is audioBuffer.Fill(synth) now.
2023-10-19 11:14:44 +03:00
5684185+vsariola@users.noreply.github.com
ff4155a08e fix(tracker): notify player when recovery file is loaded 2023-10-19 10:59:07 +03:00
5684185+vsariola@users.noreply.github.com
15a340317f docs: add go doc comments to 4klang conversion functions 2023-10-19 10:52:52 +03:00
5684185+vsariola@users.noreply.github.com
b6815f70cb feat: remove unreleased parameter from Play function
The VMs now release all envelopes by default, so this mechanism was
useless / did not actually start them as unreleased even when you
thought they did.
2023-10-19 10:42:20 +03:00
5684185+vsariola@users.noreply.github.com
9f7bbce761 refactor(vm): rename Encode to NewBytecode 2023-10-19 10:32:34 +03:00
5684185+vsariola@users.noreply.github.com
01bf409929 refactor(vm): rename Commands/Values to Opcodes/Operands
The commands and values were not very good names to what the
byte sequences actually are: opcodes and their operands. In
many other places, we were already calling the byte in the Command
stream as Opcode, so a logical name for a sequence of these is
Opcodes. Values is such a generic name that it's not immediately
clear that this sequence is related to the opcodes. Operands is not
perfect but clearly suggests that this sequence is related to
the Opcodes.
2023-10-18 19:53:47 +03:00
5684185+vsariola@users.noreply.github.com
87604dd92e refactor(vm): rename BytePatch to Bytecode 2023-10-18 19:12:34 +03:00
5684185+vsariola@users.noreply.github.com
ccd283d2ea docs: update comments 2023-10-18 18:34:14 +03:00
5684185+vsariola@users.noreply.github.com
0a67129a0c refactor!: rename SynthService to Synther and related types
The -er suffix is more idiomatic for single method interfaces, and
the interface is not doing much more than converting the patch to a
synth. Names were updated throughout the project to reflect this
change. In particular, the "Service" in SynthService was not telling
anything helpful.
2023-10-18 17:32:13 +03:00
5684185+vsariola@users.noreply.github.com
e4a2ed9f32 style: group types into fewer, logical files 2023-10-18 15:02:25 +03:00
5684185+vsariola@users.noreply.github.com
0187cc66ec refactor: move Wav and Raw methods as members of AudioBuffer 2023-10-18 14:40:16 +03:00
5684185+vsariola@users.noreply.github.com
33625c6f40 fix(vm): stereo delay flipped taps for right and left channel 2023-10-18 13:54:26 +03:00