Feedback levels + Dexed logo

pull/1/head
asb2m10 9 years ago
parent c5a0619bb3
commit e42dba049c
  1. BIN
      Builds/MacOSX/Dexed.xcodeproj/project.xcworkspace/xcuserdata/asb2m10.xcuserdatad/UserInterfaceState.xcuserstate
  2. 1509
      JuceLibraryCode/BinaryData.cpp
  3. 4
      JuceLibraryCode/BinaryData.h
  4. 3
      README.md
  5. BIN
      Resources/about.png
  6. BIN
      Resources/ui/GlobalEditor_864x144.png
  7. BIN
      Resources/ui/source/dexed-logo.xcf
  8. 36
      Source/AlgoDisplay.cpp
  9. 2
      Source/EngineMkI.cpp
  10. 48
      Source/GlobalEditor.cpp
  11. 1
      Source/GlobalEditor.h
  12. 44
      Source/ParamDialog.cpp
  13. 27
      Source/PluginEditor.cpp
  14. 7
      Source/PluginProcessor.cpp
  15. 2
      Source/PluginProcessor.h
  16. 8
      Source/msfa/dx7note.cc
  17. 4
      Source/msfa/dx7note.h

File diff suppressed because it is too large Load Diff

@ -43,10 +43,10 @@ namespace BinaryData
const int builtin_pgm_zipSize = 88890; const int builtin_pgm_zipSize = 88890;
extern const char* about_png; extern const char* about_png;
const int about_pngSize = 23143; const int about_pngSize = 24863;
extern const char* GlobalEditor_864x144_png; extern const char* GlobalEditor_864x144_png;
const int GlobalEditor_864x144_pngSize = 27571; const int GlobalEditor_864x144_pngSize = 30438;
extern const char* OperatorEditor_287x218_png; extern const char* OperatorEditor_287x218_png;
const int OperatorEditor_287x218_pngSize = 15614; const int OperatorEditor_287x218_pngSize = 15614;

@ -18,7 +18,10 @@ in the source folder) stays on the Apache 2.0 license to able to collaborate bet
Changelog Changelog
--------- ---------
#### Version 0.9.1 #### Version 0.9.1
* Mark I engine now uses 10-bit sine/exp tables. Still a work in progress but we are getting there
* More accurate FM feedback on the Mark I and OPL Series engine
* Wheel, Foot, Breath, Aftertouch modulation support * Wheel, Foot, Breath, Aftertouch modulation support
* Fixed the display of some more 'complex' algorithms
* Drop of .syx files in the cartridge manager * Drop of .syx files in the cartridge manager
* Dexed data directory can now optionally reside in the same location where the binary is installed * Dexed data directory can now optionally reside in the same location where the binary is installed
* 'Send current program to DX7' in Cartridge Manager works as designed * 'Send current program to DX7' in Cartridge Manager works as designed

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

@ -1,6 +1,6 @@
/** /**
* *
* Copyright (c) 2014 Pascal Gauthier. * Copyright (c) 2014, 2015 Pascal Gauthier.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -51,6 +51,18 @@ inline void displayOp(Graphics &g, char id, int x, int y, char link, char fb) {
case 2: // ARROW TO RIGHT JOIN case 2: // ARROW TO RIGHT JOIN
g.drawLine(x+8, y+12, x+8, y+19, LINE_SZ); g.drawLine(x+8, y+12, x+8, y+19, LINE_SZ);
break; break;
case 3: // ARROW TO RIGHT AND DOWN
g.drawLine(x+8, y+12, x+8, y+21, LINE_SZ);
g.drawLine(x+7, y+18, x+34, y+18, LINE_SZ);
g.drawLine(x+34, y+17, x+34, y+21, LINE_SZ);
break;
case 4: // ARROW TO RIGHT+LEFT AND DOWN
g.drawLine(x+8, y+12, x+8, y+21, LINE_SZ);
g.drawLine(x+7, y+18, x+34, y+18, LINE_SZ);
g.drawLine(x+34, y+17, x+34, y+21, LINE_SZ);
g.drawLine(x-17, y+18, x+8, y+18, LINE_SZ);
g.drawLine(x-17, y+17, x-17, y+21, LINE_SZ);
break;
case 6: case 6:
g.drawLine(x+8, y+12, x+8, y+18, LINE_SZ); g.drawLine(x+8, y+12, x+8, y+18, LINE_SZ);
g.drawLine(x+7, y+18, x+58, y+18, LINE_SZ); g.drawLine(x+7, y+18, x+58, y+18, LINE_SZ);
@ -66,9 +78,9 @@ inline void displayOp(Graphics &g, char id, int x, int y, char link, char fb) {
break; break;
case 1: case 1:
g.drawLine(x+7, y, x+8, y-5, LINE_SZ); g.drawLine(x+7, y, x+8, y-5, LINE_SZ);
g.drawLine(x+8, y-4, x+20, y-4, LINE_SZ); g.drawLine(x+8, y-4, x+21, y-4, LINE_SZ);
g.drawLine(x+19, y-4, x+19, y+15, LINE_SZ); g.drawLine(x+20, y-4, x+20, y+15, LINE_SZ);
g.drawLine(x+18, y+15, x+19, y+15, LINE_SZ); g.drawLine(x+19, y+15, x+20, y+16, LINE_SZ);
g.drawLine(x+8, y+15, x+20, y+15, LINE_SZ); g.drawLine(x+8, y+15, x+20, y+15, LINE_SZ);
break; break;
case 2: // ALGO 4 case 2: // ALGO 4
@ -249,7 +261,7 @@ void AlgoDisplay::paint(Graphics &g) {
displayOp(g, 1, 3, 3, 0, 0); displayOp(g, 1, 3, 3, 0, 0);
break; break;
case 18: case 18:
displayOp(g, 6, 3, 2, 0, 1); displayOp(g, 6, 3, 2, 3, 1);
displayOp(g, 5, 4, 3, 2, 0); displayOp(g, 5, 4, 3, 2, 0);
displayOp(g, 4, 3, 3, 1, 0); displayOp(g, 4, 3, 3, 1, 0);
displayOp(g, 3, 2, 1, 0, 0); displayOp(g, 3, 2, 1, 0, 0);
@ -260,20 +272,20 @@ void AlgoDisplay::paint(Graphics &g) {
displayOp(g, 6, 4, 2, 0, 0); displayOp(g, 6, 4, 2, 0, 0);
displayOp(g, 5, 3, 2, 1, 0); displayOp(g, 5, 3, 2, 1, 0);
displayOp(g, 4, 4, 3, 2, 0); displayOp(g, 4, 4, 3, 2, 0);
displayOp(g, 3, 1, 2, 0, 1); displayOp(g, 3, 1, 2, 3, 1);
displayOp(g, 2, 2, 3, 6, 0); displayOp(g, 2, 2, 3, 6, 0);
displayOp(g, 1, 1, 3, 1, 0); displayOp(g, 1, 1, 3, 1, 0);
break; break;
case 20: case 20:
displayOp(g, 6, 3, 2, 0, 0); displayOp(g, 6, 3, 2, 3, 0);
displayOp(g, 5, 4, 3, 2, 0); displayOp(g, 5, 4, 3, 2, 0);
displayOp(g, 4, 3, 3, 1, 0); displayOp(g, 4, 3, 3, 1, 0);
displayOp(g, 3, 1, 2, 0, 1); displayOp(g, 3, 1, 2, 3, 1);
displayOp(g, 2, 2, 3, 1, 0); displayOp(g, 2, 2, 3, 1, 0);
displayOp(g, 1, 1, 3, 1, 0); displayOp(g, 1, 1, 3, 1, 0);
break; break;
case 21: case 21:
displayOp(g, 6, 3, 2, 0, 1); displayOp(g, 6, 3, 2, 4, 1);
displayOp(g, 5, 4, 3, 2, 0); displayOp(g, 5, 4, 3, 2, 0);
displayOp(g, 4, 3, 3, 1, 0); displayOp(g, 4, 3, 3, 1, 0);
displayOp(g, 3, 2, 3, 1, 0); displayOp(g, 3, 2, 3, 1, 0);
@ -281,7 +293,7 @@ void AlgoDisplay::paint(Graphics &g) {
displayOp(g, 1, 1, 3, 1, 0); displayOp(g, 1, 1, 3, 1, 0);
break; break;
case 22: // CC case 22: // CC
displayOp(g, 6, 3, 2, 0, 1); displayOp(g, 6, 3, 2, 3, 1);
displayOp(g, 5, 4, 3, 2, 0); displayOp(g, 5, 4, 3, 2, 0);
displayOp(g, 4, 3, 3, 1, 0); displayOp(g, 4, 3, 3, 1, 0);
displayOp(g, 3, 2, 2, 0, 0); displayOp(g, 3, 2, 2, 0, 0);
@ -289,7 +301,7 @@ void AlgoDisplay::paint(Graphics &g) {
displayOp(g, 1, 1, 3, 1, 0); displayOp(g, 1, 1, 3, 1, 0);
break; break;
case 23: // CC case 23: // CC
displayOp(g, 6, 3, 2, 0, 1); displayOp(g, 6, 3, 2, 4, 1);
displayOp(g, 5, 4, 3, 2, 0); displayOp(g, 5, 4, 3, 2, 0);
displayOp(g, 4, 3, 3, 1, 0); displayOp(g, 4, 3, 3, 1, 0);
displayOp(g, 3, 2, 3, 1, 0); displayOp(g, 3, 2, 3, 1, 0);
@ -297,7 +309,7 @@ void AlgoDisplay::paint(Graphics &g) {
displayOp(g, 1, 0, 3, 1, 0); displayOp(g, 1, 0, 3, 1, 0);
break; break;
case 24: // CC case 24: // CC
displayOp(g, 6, 3, 2, 0, 1); displayOp(g, 6, 3, 2, 3, 1);
displayOp(g, 5, 4, 3, 2, 0); displayOp(g, 5, 4, 3, 2, 0);
displayOp(g, 4, 3, 3, 1, 0); displayOp(g, 4, 3, 3, 1, 0);
displayOp(g, 3, 2, 3, 1, 0); displayOp(g, 3, 2, 3, 1, 0);

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2015 Pascal Gauthier * Copyright (C) 2015 Pascal Gauthier.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -59,6 +59,31 @@ public:
} }
} }
}; };
class AboutBox : public DialogWindow {
public:
Image about_png;
AboutBox(Component *parent) : DialogWindow("About", Colour(0xFF000000), true) {
setUsingNativeTitleBar(false);
setAlwaysOnTop(true);
about_png = ImageCache::getFromMemory(BinaryData::about_png, BinaryData::about_pngSize);
setSize(about_png.getWidth(), about_png.getHeight());
centreAroundComponent (parent, getWidth(), getHeight());
}
void closeButtonPressed() {
setVisible (false);
}
void paint(Graphics &g) {
g.drawImage (about_png, 0, 0, about_png.getWidth(), about_png.getHeight(),
0, 0, about_png.getWidth(), about_png.getHeight());
g.setColour(Colour(0xFF000000));
String ver("Version " DEXED_VERSION " ; build date " __DATE__ );
g.drawSingleLineText(ver, 18, 130);
}
};
//[/MiscUserDefs] //[/MiscUserDefs]
//============================================================================== //==============================================================================
@ -227,6 +252,14 @@ GlobalEditor::GlobalEditor ()
addAndMakeVisible (programSelector = new ProgramSelector()); addAndMakeVisible (programSelector = new ProgramSelector());
programSelector->setName ("programSelector"); programSelector->setName ("programSelector");
addAndMakeVisible (aboutButton = new ImageButton ("aboutButton"));
aboutButton->setButtonText (String::empty);
aboutButton->addListener (this);
aboutButton->setImages (false, true, false,
Image(), 1.000f, Colour (0x00000000),
Image(), 1.000f, Colour (0x00000000),
Image(), 1.000f, Colour (0x00000000));
//[UserPreSize] //[UserPreSize]
//[/UserPreSize] //[/UserPreSize]
@ -287,6 +320,7 @@ GlobalEditor::~GlobalEditor()
monoMode = nullptr; monoMode = nullptr;
lfoType = nullptr; lfoType = nullptr;
programSelector = nullptr; programSelector = nullptr;
aboutButton = nullptr;
//[Destructor]. You can add your own custom destruction code here.. //[Destructor]. You can add your own custom destruction code here..
@ -344,6 +378,7 @@ void GlobalEditor::resized()
monoMode->setBounds (249, 65, 48, 26); monoMode->setBounds (249, 65, 48, 26);
lfoType->setBounds (583, 8, 36, 26); lfoType->setBounds (583, 8, 36, 26);
programSelector->setBounds (153, 115, 112, 18); programSelector->setBounds (153, 115, 112, 18);
aboutButton->setBounds (8, 11, 135, 46);
//[UserResized] Add your own custom resize handling here.. //[UserResized] Add your own custom resize handling here..
//[/UserResized] //[/UserResized]
} }
@ -509,6 +544,13 @@ void GlobalEditor::buttonClicked (Button* buttonThatWasClicked)
repaint(); repaint();
//[/UserButtonCode_monoMode] //[/UserButtonCode_monoMode]
} }
else if (buttonThatWasClicked == aboutButton)
{
//[UserButtonCode_aboutButton] -- add your button handler code here..
AboutBox about(this->getParentComponent());
about.runModalLoop();
//[/UserButtonCode_aboutButton]
}
//[UserbuttonClicked_Post] //[UserbuttonClicked_Post]
//[/UserbuttonClicked_Post] //[/UserbuttonClicked_Post]
@ -711,6 +753,12 @@ BEGIN_JUCER_METADATA
<GENERICCOMPONENT name="programSelector" id="990bbcccae72dbe6" memberName="programSelector" <GENERICCOMPONENT name="programSelector" id="990bbcccae72dbe6" memberName="programSelector"
virtualName="" explicitFocusOrder="0" pos="153 115 112 18" class="ProgramSelector" virtualName="" explicitFocusOrder="0" pos="153 115 112 18" class="ProgramSelector"
params=""/> params=""/>
<IMAGEBUTTON name="aboutButton" id="d195a60b29440aa1" memberName="aboutButton"
virtualName="" explicitFocusOrder="0" pos="8 11 135 46" buttonText=""
connectedEdges="0" needsCallback="1" radioGroupId="0" keepProportions="0"
resourceNormal="" opacityNormal="1" colourNormal="0" resourceOver=""
opacityOver="1" colourOver="0" resourceDown="" opacityDown="1"
colourDown="0"/>
</JUCER_COMPONENT> </JUCER_COMPONENT>
END_JUCER_METADATA END_JUCER_METADATA

@ -112,6 +112,7 @@ private:
ScopedPointer<ToggleButton> monoMode; ScopedPointer<ToggleButton> monoMode;
ScopedPointer<ComboBoxImage> lfoType; ScopedPointer<ComboBoxImage> lfoType;
ScopedPointer<ProgramSelector> programSelector; ScopedPointer<ProgramSelector> programSelector;
ScopedPointer<ImageButton> aboutButton;
//============================================================================== //==============================================================================

@ -154,7 +154,7 @@ ParamDialog::ParamDialog ()
//[UserPreSize] //[UserPreSize]
//[/UserPreSize] //[/UserPreSize]
setSize (700, 350); setSize (710, 350);
//[Constructor] You can add your own custom stuff here.. //[Constructor] You can add your own custom stuff here..
@ -269,44 +269,44 @@ void ParamDialog::paint (Graphics& g)
g.setColour (Colours::white); g.setColour (Colours::white);
g.setFont (Font (15.00f, Font::plain)); g.setFont (Font (15.00f, Font::plain));
g.drawText (TRANS("Wheel"), g.drawText (TRANS("Wheel"),
368, 19, 276, 23, 368, 16, 276, 23,
Justification::centredLeft, true); Justification::centredLeft, true);
g.setColour (Colours::white); g.setColour (Colours::white);
g.setFont (Font (15.00f, Font::plain)); g.setFont (Font (15.00f, Font::plain));
g.drawText (TRANS("Foot"), g.drawText (TRANS("Foot"),
368, 99, 276, 23, 368, 96, 276, 23,
Justification::centredLeft, true); Justification::centredLeft, true);
g.setColour (Colours::white); g.setColour (Colours::white);
g.setFont (Font (15.00f, Font::plain)); g.setFont (Font (15.00f, Font::plain));
g.drawText (TRANS("Breath"), g.drawText (TRANS("Breath"),
368, 59, 276, 23, 368, 56, 276, 23,
Justification::centredLeft, true); Justification::centredLeft, true);
g.setColour (Colours::white); g.setColour (Colours::white);
g.setFont (Font (15.00f, Font::plain)); g.setFont (Font (15.00f, Font::plain));
g.drawText (TRANS("After Touch"), g.drawText (TRANS("After Touch"),
368, 139, 276, 23, 368, 136, 276, 23,
Justification::centredLeft, true); Justification::centredLeft, true);
g.setColour (Colours::white); g.setColour (Colours::white);
g.setFont (Font (15.00f, Font::plain)); g.setFont (Font (15.00f, Font::plain));
g.drawText (TRANS("PITCH"), g.drawText (TRANS("PITCH"),
536, 163, 48, 23, 533, 163, 48, 23,
Justification::centred, true); Justification::centredLeft, true);
g.setColour (Colours::white); g.setColour (Colours::white);
g.setFont (Font (15.00f, Font::plain)); g.setFont (Font (15.00f, Font::plain));
g.drawText (TRANS("AMP"), g.drawText (TRANS("AMP"),
592, 163, 48, 21, 589, 163, 48, 23,
Justification::centred, true); Justification::centredLeft, true);
g.setColour (Colours::white); g.setColour (Colours::white);
g.setFont (Font (15.00f, Font::plain)); g.setFont (Font (15.00f, Font::plain));
g.drawText (TRANS("EG BIAS"), g.drawText (TRANS("EG BIAS"),
648, 163, 48, 23, 645, 163, 48, 23,
Justification::centred, true); Justification::centredLeft, true);
//[UserPaint] Add your own custom painting code here.. //[UserPaint] Add your own custom painting code here..
//[/UserPaint] //[/UserPaint]
@ -581,7 +581,7 @@ BEGIN_JUCER_METADATA
<JUCER_COMPONENT documentType="Component" className="ParamDialog" componentName="" <JUCER_COMPONENT documentType="Component" className="ParamDialog" componentName=""
parentClasses="public Component" constructorParams="" variableInitialisers="" parentClasses="public Component" constructorParams="" variableInitialisers=""
snapPixels="8" snapActive="1" snapShown="1" overlayOpacity="0.330" snapPixels="8" snapActive="1" snapShown="1" overlayOpacity="0.330"
fixedSize="1" initialWidth="700" initialHeight="350"> fixedSize="1" initialWidth="710" initialHeight="350">
<BACKGROUND backgroundColour="ff3c322f"> <BACKGROUND backgroundColour="ff3c322f">
<TEXT pos="20 16 276 23" fill="solid: ffffffff" hasStroke="0" text="Pitch Bend Range" <TEXT pos="20 16 276 23" fill="solid: ffffffff" hasStroke="0" text="Pitch Bend Range"
fontname="Default font" fontsize="15" bold="0" italic="0" justification="33"/> fontname="Default font" fontsize="15" bold="0" italic="0" justification="33"/>
@ -600,20 +600,20 @@ BEGIN_JUCER_METADATA
<TEXT pos="20 96 276 23" fill="solid: ffffffff" hasStroke="0" text="Show Keyboard" <TEXT pos="20 96 276 23" fill="solid: ffffffff" hasStroke="0" text="Show Keyboard"
fontname="Default font" fontsize="15" bold="0" italic="0" justification="33"/> fontname="Default font" fontsize="15" bold="0" italic="0" justification="33"/>
<RECT pos="352 11 1 325" fill="solid: ff000000" hasStroke="0"/> <RECT pos="352 11 1 325" fill="solid: ff000000" hasStroke="0"/>
<TEXT pos="368 19 276 23" fill="solid: ffffffff" hasStroke="0" text="Wheel" <TEXT pos="368 16 276 23" fill="solid: ffffffff" hasStroke="0" text="Wheel"
fontname="Default font" fontsize="15" bold="0" italic="0" justification="33"/>
<TEXT pos="368 96 276 23" fill="solid: ffffffff" hasStroke="0" text="Foot"
fontname="Default font" fontsize="15" bold="0" italic="0" justification="33"/>
<TEXT pos="368 56 276 23" fill="solid: ffffffff" hasStroke="0" text="Breath"
fontname="Default font" fontsize="15" bold="0" italic="0" justification="33"/>
<TEXT pos="368 136 276 23" fill="solid: ffffffff" hasStroke="0" text="After Touch"
fontname="Default font" fontsize="15" bold="0" italic="0" justification="33"/> fontname="Default font" fontsize="15" bold="0" italic="0" justification="33"/>
<TEXT pos="368 99 276 23" fill="solid: ffffffff" hasStroke="0" text="Foot" <TEXT pos="533 163 48 23" fill="solid: ffffffff" hasStroke="0" text="PITCH"
fontname="Default font" fontsize="15" bold="0" italic="0" justification="33"/> fontname="Default font" fontsize="15" bold="0" italic="0" justification="33"/>
<TEXT pos="368 59 276 23" fill="solid: ffffffff" hasStroke="0" text="Breath" <TEXT pos="589 163 48 23" fill="solid: ffffffff" hasStroke="0" text="AMP"
fontname="Default font" fontsize="15" bold="0" italic="0" justification="33"/> fontname="Default font" fontsize="15" bold="0" italic="0" justification="33"/>
<TEXT pos="368 139 276 23" fill="solid: ffffffff" hasStroke="0" text="After Touch" <TEXT pos="645 163 48 23" fill="solid: ffffffff" hasStroke="0" text="EG BIAS"
fontname="Default font" fontsize="15" bold="0" italic="0" justification="33"/> fontname="Default font" fontsize="15" bold="0" italic="0" justification="33"/>
<TEXT pos="536 163 48 23" fill="solid: ffffffff" hasStroke="0" text="PITCH"
fontname="Default font" fontsize="15" bold="0" italic="0" justification="36"/>
<TEXT pos="592 163 48 21" fill="solid: ffffffff" hasStroke="0" text="AMP"
fontname="Default font" fontsize="15" bold="0" italic="0" justification="36"/>
<TEXT pos="648 163 48 23" fill="solid: ffffffff" hasStroke="0" text="EG BIAS"
fontname="Default font" fontsize="15" bold="0" italic="0" justification="36"/>
</BACKGROUND> </BACKGROUND>
<SLIDER name="pitchRange" id="7409be5a8dfaa91" memberName="pitchRange" <SLIDER name="pitchRange" id="7409be5a8dfaa91" memberName="pitchRange"
virtualName="" explicitFocusOrder="0" pos="264 16 72 24" min="0" virtualName="" explicitFocusOrder="0" pos="264 16 72 24" min="0"

@ -30,33 +30,6 @@
#include "msfa/fm_op_kernel.h" #include "msfa/fm_op_kernel.h"
using namespace ::std;
class AboutBox : public DialogWindow {
public:
Image about_png;
AboutBox(Component *parent) : DialogWindow("About", Colour(0xFF000000), true) {
setUsingNativeTitleBar(false);
setAlwaysOnTop(true);
about_png = ImageCache::getFromMemory(BinaryData::about_png, BinaryData::about_pngSize);
setSize(about_png.getWidth(), about_png.getHeight());
centreAroundComponent (parent, getWidth(), getHeight());
}
void closeButtonPressed() {
setVisible (false);
}
void paint(Graphics &g) {
g.drawImage (about_png, 0, 0, about_png.getWidth(), about_png.getHeight(),
0, 0, about_png.getWidth(), about_png.getHeight());
g.setColour(Colour(0xFF000000));
String ver("Version " DEXED_VERSION " ; built date " __DATE__ );
g.drawSingleLineText(ver, 9, 118);
}
};
//============================================================================== //==============================================================================
DexedAudioProcessorEditor::DexedAudioProcessorEditor (DexedAudioProcessor* ownerFilter) DexedAudioProcessorEditor::DexedAudioProcessorEditor (DexedAudioProcessor* ownerFilter)
: AudioProcessorEditor (ownerFilter), : AudioProcessorEditor (ownerFilter),

@ -143,7 +143,7 @@ void DexedAudioProcessor::processBlock(AudioSampleBuffer& buffer, MidiBuffer& mi
if ( refreshVoice ) { if ( refreshVoice ) {
for(i=0;i < MAX_ACTIVE_NOTES;i++) { for(i=0;i < MAX_ACTIVE_NOTES;i++) {
if ( voices[i].live ) if ( voices[i].live )
voices[i].dx7_note->update(data, voices[i].midi_note); voices[i].dx7_note->update(data, voices[i].midi_note, feedback_bitdepth);
} }
lfo.reset(data + 137); lfo.reset(data + 137);
refreshVoice = false; refreshVoice = false;
@ -340,7 +340,7 @@ void DexedAudioProcessor::keydown(uint8_t pitch, uint8_t velo) {
voices[note].midi_note = pitch; voices[note].midi_note = pitch;
voices[note].sustained = sustain; voices[note].sustained = sustain;
voices[note].keydown = true; voices[note].keydown = true;
voices[note].dx7_note->init(data, pitch, velo); voices[note].dx7_note->init(data, pitch, velo, feedback_bitdepth);
if ( data[136] ) if ( data[136] )
voices[note].dx7_note->oscSync(); voices[note].dx7_note->oscSync();
break; break;
@ -479,12 +479,15 @@ void DexedAudioProcessor::setEngineType(int tp) {
switch (tp) { switch (tp) {
case DEXED_ENGINE_MODERN : case DEXED_ENGINE_MODERN :
controllers.core = &engineMsfa; controllers.core = &engineMsfa;
feedback_bitdepth = 8;
break; break;
case DEXED_ENGINE_MARKI: case DEXED_ENGINE_MARKI:
controllers.core = &engineMkI; controllers.core = &engineMkI;
feedback_bitdepth = 11;
break; break;
case DEXED_ENGINE_OPL: case DEXED_ENGINE_OPL:
controllers.core = &engineOpl; controllers.core = &engineOpl;
feedback_bitdepth = 11;
break; break;
} }
engineType = tp; engineType = tp;

@ -116,6 +116,8 @@ class DexedAudioProcessor : public AudioProcessor, public AsyncUpdater, public
void resolvAppDir(); void resolvAppDir();
int feedback_bitdepth = 0;
public : public :
// in MIDI units (0x4000 is neutral) // in MIDI units (0x4000 is neutral)
Controllers controllers; Controllers controllers;

@ -135,7 +135,7 @@ Dx7Note::Dx7Note() {
} }
} }
void Dx7Note::init(const uint8_t patch[156], int midinote, int velocity) { void Dx7Note::init(const uint8_t patch[156], int midinote, int velocity, int fb_depth) {
int rates[4]; int rates[4];
int levels[4]; int levels[4];
for (int op = 0; op < 6; op++) { for (int op = 0; op < 6; op++) {
@ -171,7 +171,7 @@ void Dx7Note::init(const uint8_t patch[156], int midinote, int velocity) {
pitchenv_.set(rates, levels); pitchenv_.set(rates, levels);
algorithm_ = patch[134]; algorithm_ = patch[134];
int feedback = patch[135]; int feedback = patch[135];
fb_shift_ = feedback != 0 ? 8 - feedback : 16; fb_shift_ = feedback != 0 ? fb_depth - feedback : 16;
pitchmoddepth_ = (patch[139] * 165) >> 6; pitchmoddepth_ = (patch[139] * 165) >> 6;
pitchmodsens_ = pitchmodsenstab[patch[143] & 7]; pitchmodsens_ = pitchmodsenstab[patch[143] & 7];
ampmoddepth_ = (patch[140] * 165) >> 6; ampmoddepth_ = (patch[140] * 165) >> 6;
@ -235,7 +235,7 @@ void Dx7Note::keyup() {
} }
} }
void Dx7Note::update(const uint8_t patch[156], int midinote) { void Dx7Note::update(const uint8_t patch[156], int midinote, int fb_depth) {
for (int op = 0; op < 6; op++) { for (int op = 0; op < 6; op++) {
int off = op * 21; int off = op * 21;
int mode = patch[off + 17]; int mode = patch[off + 17];
@ -247,7 +247,7 @@ void Dx7Note::update(const uint8_t patch[156], int midinote) {
} }
algorithm_ = patch[134]; algorithm_ = patch[134];
int feedback = patch[135]; int feedback = patch[135];
fb_shift_ = feedback != 0 ? 8 - feedback : 16; fb_shift_ = feedback != 0 ? 11 - feedback : 16;
pitchmoddepth_ = (patch[139] * 165) >> 6; pitchmoddepth_ = (patch[139] * 165) >> 6;
pitchmodsens_ = pitchmodsenstab[patch[143] & 7]; pitchmodsens_ = pitchmodsenstab[patch[143] & 7];
ampmoddepth_ = (patch[140] * 165) >> 6; ampmoddepth_ = (patch[140] * 165) >> 6;

@ -36,7 +36,7 @@ struct VoiceStatus {
class Dx7Note { class Dx7Note {
public: public:
Dx7Note(); Dx7Note();
void init(const uint8_t patch[156], int midinote, int velocity); void init(const uint8_t patch[156], int midinote, int velocity, int fb_depth);
// Note: this _adds_ to the buffer. Interesting question whether it's // Note: this _adds_ to the buffer. Interesting question whether it's
// worth it... // worth it...
@ -51,7 +51,7 @@ public:
// keyup, that won't work. // keyup, that won't work.
// PG:add the update // PG:add the update
void update(const uint8_t patch[156], int midinote); void update(const uint8_t patch[156], int midinote, int fb_depth);
void peekVoiceStatus(VoiceStatus &status); void peekVoiceStatus(VoiceStatus &status);
void transferState(Dx7Note& src); void transferState(Dx7Note& src);
void transferSignal(Dx7Note &src); void transferSignal(Dx7Note &src);

Loading…
Cancel
Save