Commit Graph

21 Commits

Author SHA1 Message Date
5684185+vsariola@users.noreply.github.com
f72f29188b feat(vm/compiler): increase native synth delaylines to 128
Closes #155
2025-04-27 21:47:27 +03:00
5684185+vsariola@users.noreply.github.com
95af8da939 fix(vm)!: first modulate delay time, then notetracking
BREAKING CHANGE: the order of these operations was inconsistent
across the different VMs. Go VM was the only one to first modulate
and then apply note tracking multiplication. But that made most
sense. So now all different VM versions work in this same way.
2025-04-16 23:17:08 +03:00
5684185+vsariola@users.noreply.github.com
ce673578fd fix(amd64-386): crash with sample-based oscillator in 32-bit library 2024-09-22 09:30:42 +03:00
5684185+vsariola@users.noreply.github.com
0e10cd2ae8 fix(amd64-386): sample oscillator hard crash
The sample-based oscillators converted the samplepos to an integer
and did samplepos < loop_end comparison to check if we are past
looping. Unfortunately, the < comparison was done in signed math.
Normally, this should never happen, but if the x87 FPU stack
overflowed exactly at right position, we then got 0x80000000 in
samplepos, which is equal to -2147483648. Thus, we considered that
sample is not looping and read the sample table at position
-2147483648, well out of bound. TL;DR changing jl to jb makes sure
we always wrap within to sample table, no matter what.

Fixes #149.
2024-09-22 09:04:47 +03:00
5684185+vsariola@users.noreply.github.com
569958547e fix(amd64-386): do not optimize away phase modulations with unisons 2024-08-17 11:06:18 +03:00
5684185+vsariola@users.noreply.github.com
db2d9cac9d fix(vm): x87 native filter unit was denormalizing and eating up CPU
When voice was silent, the exponential decays in the filter unit
were causing the high pass component to eventually denormalize,
causing high CPU loads. The solution is the same as in the delay
unit: add and subtract a small number from the value, causing
essentially a flush to zero.
https://en.wikipedia.org/wiki/Subnormal_number

Fixes #68.
2024-06-19 18:58:20 +03:00
5684185+vsariola@users.noreply.github.com
84d90cf0f3 fix(vm/compiler): use more yasm-compatible syntax
Closes #134.
2024-05-05 11:34:47 +03:00
5684185+vsariola@users.noreply.github.com
10d20cd26f fix(vm/compiler): export as su_pow, instead of su_power
The export redefinition of label, even though the labels were on the
same line. This was an issue for yasm.

Related to #134.
2024-05-05 11:33:47 +03:00
5684185+vsariola@users.noreply.github.com
4a8d4c5a29 fix(vm/compiler/templates): modulating delaytime in wasm could crash
The modulated delay time was converted to int with i32.trunc_f32_u.
This throws runtime error if the modulations caused the delaytime
to become negative, because _u implied that it should be unsigned
integer and negative numbers were out of range. Using
i32.trunc_f32_s fixed this.
2024-04-08 20:06:20 +03:00
5684185+vsariola@users.noreply.github.com
6d4529971c feat(vm/compiler): export su_power function in case user needs it 2024-04-05 15:49:00 +03: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
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
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
e5691d670a feat(vm): add frequency modulation for oscillators
Closes #105
2023-10-07 21:48:03 +03:00
5684185+vsariola@users.noreply.github.com
00850c8001 code/text formatting and cleaning up whitespace 2023-09-24 10:47:54 +03:00
5684185+vsariola@users.noreply.github.com
f35f948118 fix(vm/compiler/templates/wasm): add support for mono out
Adds also a test case to make sure mono out also works.
2023-09-24 10:27:34 +03:00
5684185+vsariola@users.noreply.github.com
7df8103bf9 fix(vm): change crush resolution to bits (closes #79)
BREAKING CHANGE: The problem with crush was that it had very few usable values. This changes the crush to map the value nonlinearly, so the crush resolution is bits. Still the upper portion of the values is not very usable (bits 12-24 i.e. hardly any crushing), but at least the lower portion is usable. But now crush resolution has slightly different meaning.
2023-09-23 21:23:05 +03:00
5684185+vsariola@users.noreply.github.com
1ac2ad3c75 fix(vm/compiler): invert the logic of the release flag in the voices (closes #102)
This makes all envelopes released by default, instead of attacking. Add also test to demonstrate the buggy behaviour.
2023-09-23 15:56:46 +03:00
Alexander Kraus
607e5b5da0 Added x86 asm and C wav writer and player examples.
Specifically:
* Added win32, elf32 and elf64 asm player and wav writers using winmm.
* Added dsound player in C.
* Separated the ALL target and the examples; introduced a new examples target.
2023-08-31 14:15: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
5684185+vsariola@users.noreply.github.com
8ffe4a70dd feat(vm/compiler): embed templates to executable 2023-07-08 16:39:41 +03:00