Skip to content

Commit

Permalink
fix DLS articulators AGAIN
Browse files Browse the repository at this point in the history
  • Loading branch information
spessasus committed Nov 11, 2024
1 parent 3e66754 commit ebd9159
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 61 deletions.
9 changes: 5 additions & 4 deletions src/spessasynth_lib/soundfont/dls/articulator_converter.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,11 +317,12 @@ export function getSF2ModulatorFromArticulator(
// value,
// transform
// );
// invert only if the actual transform value is not negative.
// if it is, it's already inverted
if (value > 0)
// if the value is negative, the source shall be negative!
// why?
// Idk, it makes it work with ROCK.RMI and NOKIA_S30.dls
if (value < 0)
{
sourceIsNegative = !sourceIsNegative;
sourceIsNegative = 1;
}
}
sourceEnumFinal = getModSourceEnum(
Expand Down
23 changes: 14 additions & 9 deletions src/spessasynth_lib/synthetizer/worklet_processor.min.js

Large diffs are not rendered by default.

19 changes: 12 additions & 7 deletions src/website/js/synthesizer_ui/methods/set_event_listeners.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,44 +33,49 @@ export function setEventListeners()
const controller = e.controllerNumber;
const channel = e.channel;
const value = e.controllerValue;
const con = this.controllers[channel];
if (con === undefined)
{
return;
}
switch (controller)
{
default:
break;

case midiControllers.expressionController:
// expression
this.controllers[channel].expression.update(value);
con.expression.update(value);
break;

case midiControllers.mainVolume:
// volume
this.controllers[channel].volume.update(value);
con.volume.update(value);
break;

case midiControllers.pan:
// pan
this.controllers[channel].pan.update(value);
con.pan.update(value);
break;

case midiControllers.modulationWheel:
// mod wheel
this.controllers[channel].mod.update(value);
con.mod.update(value);
break;

case midiControllers.chorusDepth:
// chorus
this.controllers[channel].chorus.update(value);
con.chorus.update(value);
break;

case midiControllers.reverbDepth:
// reverb
this.controllers[channel].reverb.update(value);
con.reverb.update(value);
break;

case midiControllers.brightness:
// brightness
this.controllers[channel].brightness.update(value);
con.brightness.update(value);
}
});

Expand Down
2 changes: 1 addition & 1 deletion src/website/local_edition_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,6 @@ <h1 id='title' translate-path='locale.titleMessage'>SpessaSynth: SoundFont2 Java
<div class='notification_field'></div>
</div>
<script src='website/minified/local_main.min.js' type='module'></script> <!-- Here the magic happens ;) -->
<!-- <script src='website/js/main/local_main.js' type="module"></script>-->
<script src='website/js/main/local_main.js' type='module'></script>
</body>
</html>
45 changes: 25 additions & 20 deletions src/website/minified/demo_main.min.js

Large diffs are not rendered by default.

45 changes: 25 additions & 20 deletions src/website/minified/local_main.min.js

Large diffs are not rendered by default.

0 comments on commit ebd9159

Please sign in to comment.