Commit Graph

12 Commits

Author SHA1 Message Date
5684185+vsariola@users.noreply.github.com
2aa0aaee0c refactor: AudioSource is a func instead of single function interface
This avoids defining Processor altogether.
2024-11-02 19:50:20 +02:00
5684185+vsariola@users.noreply.github.com
81a6d1acea feat: upgrade oto and output float audio 2024-10-06 18:58:08 +03: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
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
ccd283d2ea docs: update comments 2023-10-18 18:34:14 +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
38e9007bf8 refactor: use [][2] as audio buffers, instead of []float32
Throughout sointu, we assume stereo audiobuffers, but were passing
around []float32. This had several issues, including len(buf)/2 and
numSamples*2 type of length conversion in many places. Also, it
caused one bug in a test case, causing it to succeed when it should
have not (the test had +-1 when it should have had +-2). This
refactoring makes it impossible to have odd length buffer issues.
2023-10-18 13:51:02 +03:00
vsariola
1a5251dbf6 refactor(sointu): change the name of AudioSink into AudioOutput
The interface is never used as anything else as Output so trying to generalize as something more vague like Sink made no sense.
2021-08-30 23:11:33 +03:00
vsariola
a9b90c4db8 style: add comments to the public methods and members in the root package. 2021-08-30 20:34:56 +03:00
vsariola
adcf3ebce8 feat(sointu, tracker,...): restructure domain & tracker models
send targets are now by ID and Song has "Score" part, which is the notes for it. also, moved the model part separate of the actual gioui dependend stuff.

sorry to my future self about the code bomb; ended up too far and did not find an easy way to rewrite the history to make the steps smaller, so in the end, just squashed everything.
2021-02-28 14:24:54 +02:00