mirror of
https://github.com/vsariola/sointu.git
synced 2025-05-28 03:10:24 -04:00
fix(vm/compiler/templates/wasm): add support for mono out
Adds also a test case to make sure mono out also works.
This commit is contained in:
parent
7df8103bf9
commit
f35f948118
@ -21,6 +21,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||||||
### Fixed
|
### Fixed
|
||||||
- In the WebAssembly core, $WRK was messed after stereo oscillators,
|
- In the WebAssembly core, $WRK was messed after stereo oscillators,
|
||||||
making modulations not work
|
making modulations not work
|
||||||
|
- The Webassembly implementation of mono version of "out" unit
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- The crush resolution is now in bits instead of linear range; this is a
|
- The crush resolution is now in bits instead of linear range; this is a
|
||||||
|
@ -65,6 +65,7 @@ endfunction(regression_test)
|
|||||||
|
|
||||||
regression_test(test_envelope "" ENVELOPE)
|
regression_test(test_envelope "" ENVELOPE)
|
||||||
regression_test(test_envelope_stereo ENVELOPE)
|
regression_test(test_envelope_stereo ENVELOPE)
|
||||||
|
regression_test(test_out ENVELOPE)
|
||||||
regression_test(test_loadval "" LOADVAL)
|
regression_test(test_loadval "" LOADVAL)
|
||||||
regression_test(test_loadval_stereo LOADVAL LOADVAL_STEREO)
|
regression_test(test_loadval_stereo LOADVAL LOADVAL_STEREO)
|
||||||
regression_test(test_gain LOADVAL GAIN)
|
regression_test(test_gain LOADVAL GAIN)
|
||||||
|
BIN
tests/expected_output/test_out.raw
Normal file
BIN
tests/expected_output/test_out.raw
Normal file
Binary file not shown.
16
tests/test_out.yml
Normal file
16
tests/test_out.yml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
bpm: 100
|
||||||
|
rowsperbeat: 4
|
||||||
|
score:
|
||||||
|
rowsperpattern: 16
|
||||||
|
length: 1
|
||||||
|
tracks:
|
||||||
|
- numvoices: 1
|
||||||
|
order: [0]
|
||||||
|
patterns: [[64, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0]]
|
||||||
|
patch:
|
||||||
|
- numvoices: 1
|
||||||
|
units:
|
||||||
|
- type: envelope
|
||||||
|
parameters: {attack: 64, decay: 64, gain: 64, release: 80, stereo: 0, sustain: 64}
|
||||||
|
- type: out
|
||||||
|
parameters: {gain: 128, stereo: 0}
|
@ -147,7 +147,11 @@
|
|||||||
(f32.load (local.get $ptr))
|
(f32.load (local.get $ptr))
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(local.set $ptr (i32.const {{add (index .Labels "su_globalports") 4}})) ;; synth.right, note that ATM does not seem to support mono ocpode at all
|
{{- if .StereoAndMono "out"}}
|
||||||
|
(if (local.get $stereo)(then
|
||||||
|
{{- end}}
|
||||||
|
{{- if .Stereo "out"}}
|
||||||
|
(local.set $ptr (i32.const {{add (index .Labels "su_globalports") 4}})) ;; synth.right
|
||||||
(f32.store (local.get $ptr)
|
(f32.store (local.get $ptr)
|
||||||
(f32.add
|
(f32.add
|
||||||
(f32.mul
|
(f32.mul
|
||||||
@ -157,6 +161,10 @@
|
|||||||
(f32.load (local.get $ptr))
|
(f32.load (local.get $ptr))
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
{{- end}}
|
||||||
|
{{- if .StereoAndMono "out"}}
|
||||||
|
))
|
||||||
|
{{- end}}
|
||||||
)
|
)
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user