Dexed (DX7 emulator) integration

Ok… I thought some hours about the problem and than I found that maybe a cast from float to char while setting parameters was the problem. I changed this and optimized the method a little bit. Until now it seems to work for me - what makes me currently not very happy (maybe tomorrow it won’t work anymore). But if you can confirm that dexed runs also for you, I think I maybe get a little bit happy :smile:

(Pitchbend and mod wheel are currently not working)

Regards, Holger

Hi Mr @C0d3man!!

I just complied and tried the last changes in the dexed LV2 plugin. I can’t only say that … it works!!! Yesss!!!
The problem seems to be fixed! Congratulations!! You are my hero, Mr @Codeman!!!

Huge Hug!

Hi @Codeman,

I can hear “clicks” while playing some presets. For instance, “E.Piano 1”, or “Marimba” …
Can you confirm the issue? Do you have some idea of how to fix it? :wink:

Regards!

Hmmm… I just made a fix - but cannot test it currently. Hope it helps. What does your CPU usage say? about 5-10% or more?

When it works, than I have found the problem: There was code for handling the pitchbend-wheel, but it was not fully implemented (for use with LV2) and was unitialized. Deeeep-deeeep in MSFA I found the problem and commentet the pitch- and modulation-wheel handling out. Will fix this soon, but for now I hope it will run without problems.

Regards, Holger

Hi @C0d3man!

I’ve compiled the plugin with the last changes, but almost all the presets doesn’t work. The only one that works is “E.ORGAN 1”. The rest produce audible clicks and “dry” sounds, but not a “musical” sound.

Regards!

:cry:

I will take a look at this…

Hi @jofemodo

Many thanks for this hint - I found the problem: it’s direct before the screen :wink:
A problem in the shutdown code for avoiding calculations of silient voices (a part which I added to Dexed - very new code).

I fixed several errors also. Now it seems to work - I found some sounds which don’t shutdown their voices when no sound is produced, so CPU cycles are wasted. But this is not so complicated to fix - but not today anymore.

Pitch-wheel and mod-wheel seem to be a bigger problem - I will try to fix them next year.

Regards, Holger

Hi @C0d3man!

Great! Now it sound quite well! You are really close! Congrats!!

I can hear some “clicks” when playing hard. I’m not sure if it’s in the attack or in the release … probably your ear are finer than mine :wink:

Anyway, i’m really happy with this!! Finally we have a working dexed into zynthian and it will be in the next release.

I’ve added a “recipes.update” directory. When updating from the admin menu, the scripts in this directory are executed. Currently there is only one update recipe for dexed :wink:

Best Regards

Ahhh - I changed the clipping code while searching for the no-sound problem. I placed back the original clipping code hopefully this avoids “clicks”. You can decide at compile time which code to use. Default is the (better) Dexed code from now on. If you want to go back to my “easy” code, just comment out the line

#CFLAGS_OPTIONS+=-DNON_DEXED_CLIP # enable for non-dexed-cliping code

and make install.

Regards, Holger

Aahhh! Very nice and simple solution. maybe we can pack more of the recipes for updates there.

BTW: Have you tried to compile all software with the optimized CFLAGS/CXXFLAGS?

Regards, Holger

Hi @C0d3man!

I’ve applied your changes but the “clicks” persist ;-(

I’m trying just now i fresh generated image using the optimizations flags. It seems to work, but it doesn’t work in RBPi2 (i’ve compiled in a RBPi3. So i will generate images optimized for RBPi2 and RBPi3 :wink:

Regards!

Thanks for testing.I have adjusted the output amplifier by -0.25 and now I think it does not click anymore. Can you test this (perhaps you have the better ears - I am making to much rock music :smile: ).

Regards, Holger

Hi @C0d3man!

Much better! I can hear some clicking yet, but don’t worry about by now … perhaps it’s my ear, that is too damaged by playing too much drums!! ;-DD

I’m uploading the new images … yesssss! :notes:

Regards!

Your ears are right. I am a fool in math :wink: Simple game: guess what is wrong in this line, if you want to make audio more quietly:

fx.uiGain=f_gain-0.25;

Argh!!! I think the following is better:

fx.uiGain=f_gain*0.8;

So - please pull the fixed version. DeeAxe7 is not really necessary for the new image. It’s like Dexed and only the MSFA engine. I also have not optimized the run loop…

Regards, Holger

Ohhh @C0d3man!

The clicks are still there … i think that is during the attack, more audible with high “velocities”. In “E.PIANO 1” is very clear to me. Don’t you hear it? Are you using monitors?

Perhaps my ears are completely broken!!! ;-DD

@jofemodo

Hmmm… I have simple monitor speakers (Roland/Edirol). I am playing at living-room-loudness. After reducing the internal output power before sending to the LV2-host I can hear that the distortion is reduced.

Can you try to put a Gain1x1 after Dexed and reduce the output and listen?

This is my favorite solution for MDA-EPiano. For me this plugin has also a too high output power and I get distortion.

Regards, Holger

Hi @jofemodo

Ok - I think I know what do you mean :slight_smile: I have took my good Beyerdynamics ™ earphones home from studio and now I can hear also some kind of aliasing effect when using some sounds.

I compared this against the original dexed VST engine and found the following:

  • This problem exists also for the original engine.
  • Using the engines OPL and Mark I seems to peoduce such effect.
  • Using the Modern engine (24bit) does not produce such problems.

So I changed the default towards the Modern engine and I cannot hear any aliasing effects anymore. Can you checkout and confirm this?

Regards, Holger

Hi Holger!

When you say “modern” is the same than “MSFA”? I suposse yes.
I that case, you are right! Using MSFA engine i can’t hear any clicks. With OPL and Mark I the clicks are audible, specially with OPL. So, if you change the default engine to MSFA, i think the “clicks” issue is solved! Great!!! :wink:

Anyway, what engine is supossed to be the “more accurate” to the original DX7?

Regards!

You are right. Sorry for confusing - on the screen it is called MSFA and internaly MODERN (or vice versa? I am very confused…).

Hm - good question. I own a DX7II but it is currently located at our rehearsal room (I am not playing it - I play guitar… our keyboarder can play much better than I). I think I will take the DX home for a week to download my favorite sounds and check which engine seems to be the best.

Without direct comparison I would say that MSFA is my favorite engine which sounds like the original (which much more precission in the high bands and less noise). But if you choose some special sounds, other engines are sounding better (for my ears).

Regards, Holger

Hi @ll,

I think I am ready with porting Dexed to LV2 and it is ready for running with MOD-UI. Currently you have to install/update it by yourself:

cd /zynthian/zynthian-sw/plugins/dexed/src
git pull
make install
reboot

The mod-wheel may not work on all preinstalled sounds. There are some problems in the engine for getting it full working.

If you have own SYSEX files you want to use with Dexed you can do the following:
/zynthian/zynthian-sw/plugins/dexed/bin/dx7sysex2lv2 <SYSEX1> [<SYSEX2> ...]

After installing new SYSEX data you have to restart MOD-UI (Change to another engine and change back to MOD-UI). Perhaps you want to try to change the engine (with one of the knobs on the pedal). Default is MSFA (fully 24bit engine). The MarkI should be sounding more like a real DX7 and OPL is the simulation of the OPL chip.

One big difference to the original is, that I have compiled Dexed with 32 available voices (instead of 16). You can change MAX_ACTIVE_NOTES in dexed.h to “whateveryoulike” :wink:

Happy playing!

Holger

2 Likes