feat(vm): add dbgain unit, where gain is defined in decibels

Closes #78
This commit is contained in:
5684185+vsariola@users.noreply.github.com
2023-10-23 18:16:31 +03:00
parent f698986718
commit 04fbc9f6a7
12 changed files with 146 additions and 25 deletions

View File

@ -72,6 +72,8 @@ regression_test(test_gain LOADVAL GAIN)
regression_test(test_gain_stereo GAIN)
regression_test(test_invgain LOADVAL INVGAIN)
regression_test(test_invgain_stereo INVGAIN)
regression_test(test_dbgain LOADVAL DBGAIN)
regression_test(test_dbgain_stereo DBGAIN)
regression_test(test_send LOADVAL SEND)
regression_test(test_send_stereo SEND)
regression_test(test_send_global SEND SEND_GLOBAL)

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

22
tests/test_dbgain.yml Normal file
View File

@ -0,0 +1,22 @@
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: loadval
parameters: {stereo: 0, value: 0}
- type: dbgain
parameters: {decibels: 32, stereo: 0}
- type: loadval
parameters: {stereo: 0, value: 128}
- type: dbgain
parameters: {decibels: 32, stereo: 0}
- type: out
parameters: {gain: 128, stereo: 1}

View File

@ -0,0 +1,20 @@
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: loadval
parameters: {stereo: 0, value: 0}
- type: loadval
parameters: {stereo: 0, value: 128}
- type: dbgain
parameters: {decibels: 32, stereo: 1}
- type: out
parameters: {gain: 128, stereo: 1}