Skip to content

Commit

Permalink
devsync 547958c
Browse files Browse the repository at this point in the history
  • Loading branch information
eh2k committed Dec 3, 2023
1 parent 18116f2 commit 794b568
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
<summary><b>ChangeLog</b></summary>

````
== 2023-12-03 ==
* Bugfix: DxFM custom syx didnt work
* DevSync: DSM0 perf+wdt
== 2023-11-19 ==
* Refactoring CV-Engines (based on modulations)
- CV-Output Scope-View
Expand Down
2 changes: 1 addition & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

[env]
extra_scripts = pre:.pre_build.py
lib_machine = 8c402be
lib_machine = 547958c

;upload_protocol = teensy-cli

Expand Down
5 changes: 3 additions & 2 deletions src/dxfm.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,6 @@ struct DxFMEngine : public MidiEngine
if (_bnkNum < 0)
{
sysexData = machine::flash_read(DXFM_PATCH);
if (sysexData)
sysexData -= 128; // start with index 1
}
else
{
Expand All @@ -202,6 +200,9 @@ struct DxFMEngine : public MidiEngine

if (valid)
{
if (_bnkNum < 0)
sysexData -= 128;

memcpy(patch, (const char *)sysexData + (prog * 128), sizeof(patch));
UnpackPatch(patch, (char *)data);
sprintf(patch_name, "%.10s", NAME());
Expand Down
14 changes: 13 additions & 1 deletion src/main.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
//

#include "machine.h"
#include "plaits/resources.h"

void init_engines();

void init_engines2()
{
Expand All @@ -32,6 +35,15 @@ void init_engines2()
void init_fun() __attribute__((weak)); \
init_fun();

static uint32_t p[5];
p[0] = (uint32_t)plaits::fm_patches_table[0];
p[1] = (uint32_t)plaits::fm_patches_table[1];
p[2] = (uint32_t)plaits::fm_patches_table[2];
p[3] = (uint32_t)machine::flash_read("DXFMSYX0");
p[4] = 0;

machine::register_symbol("fm_patches_table", p);

MACHINE_INIT(init_modulations);
MACHINE_INIT(init_quantizer);

Expand Down Expand Up @@ -62,7 +74,7 @@ void init_engines2()
MACHINE_INIT(init_aux);
MACHINE_INIT(init_juno60_chorus);
MACHINE_INIT(init_plaits2);

init_engines();
}

int main()
Expand Down

0 comments on commit 794b568

Please sign in to comment.