diff --git a/CMakeLists.txt b/CMakeLists.txt
index b06b3b7..c275b43 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,7 +22,7 @@ cmake_minimum_required(VERSION 3.13)
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "" FORCE)
set(CMAKE_CONFIGURATION_TYPES ${CMAKE_BUILD_TYPE} CACHE STRING "" FORCE)
-project(SEQ64 VERSION 2.2.1)
+project(SEQ64 VERSION 2.3.0)
if(NOT EXISTS "${CMAKE_SOURCE_DIR}/juce/CMakeLists.txt")
message(FATAL_ERROR "You forgot to get the Git submodules, please run git submodule update --init")
diff --git a/Source/SeqABIEditor.cpp b/Source/SeqABIEditor.cpp
index 98333ef..e97bd3e 100644
--- a/Source/SeqABIEditor.cpp
+++ b/Source/SeqABIEditor.cpp
@@ -7,7 +7,7 @@
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
and re-saved.
- Created with Projucer version: 6.0.1
+ Created with Projucer version: 6.0.7
------------------------------------------------------------------------------
@@ -62,7 +62,7 @@ SeqABIEditor::SeqABIEditor (String abi_name)
TRANS("Audioseq / Nintendo 64 Music Macro Language\n"
"ABI definition file: /foo/bar.xml")));
addAndMakeVisible (lblTitle.get());
- lblTitle->setFont (juce::Font (15.00f, juce::Font::plain));
+ lblTitle->setFont (juce::Font (15.00f, juce::Font::plain).withTypefaceStyle ("Regular"));
lblTitle->setJustificationType (juce::Justification::centredLeft);
lblTitle->setEditable (false, false, false);
lblTitle->setColour (juce::TextEditor::textColourId, juce::Colours::black);
@@ -111,7 +111,7 @@ SeqABIEditor::SeqABIEditor (String abi_name)
lblCmdNameCmm.reset (new juce::Label ("lblCmdNameCmm",
TRANS("Community:")));
addAndMakeVisible (lblCmdNameCmm.get());
- lblCmdNameCmm->setFont (juce::Font (15.00f, juce::Font::plain));
+ lblCmdNameCmm->setFont (juce::Font (15.00f, juce::Font::plain).withTypefaceStyle ("Regular"));
lblCmdNameCmm->setJustificationType (juce::Justification::centredLeft);
lblCmdNameCmm->setEditable (false, false, false);
lblCmdNameCmm->setColour (juce::TextEditor::textColourId, juce::Colours::black);
@@ -128,7 +128,7 @@ SeqABIEditor::SeqABIEditor (String abi_name)
lblCmdNameCanon.reset (new juce::Label ("lblCmdNameCanon",
TRANS("Canon:")));
addAndMakeVisible (lblCmdNameCanon.get());
- lblCmdNameCanon->setFont (juce::Font (15.00f, juce::Font::plain));
+ lblCmdNameCanon->setFont (juce::Font (15.00f, juce::Font::plain).withTypefaceStyle ("Regular"));
lblCmdNameCanon->setJustificationType (juce::Justification::centredLeft);
lblCmdNameCanon->setEditable (false, false, false);
lblCmdNameCanon->setColour (juce::TextEditor::textColourId, juce::Colours::black);
@@ -139,7 +139,7 @@ SeqABIEditor::SeqABIEditor (String abi_name)
lblCmdNameOld.reset (new juce::Label ("lblCmdNameOld",
TRANS("Canon (Old):")));
addAndMakeVisible (lblCmdNameOld.get());
- lblCmdNameOld->setFont (juce::Font (15.00f, juce::Font::plain));
+ lblCmdNameOld->setFont (juce::Font (15.00f, juce::Font::plain).withTypefaceStyle ("Regular"));
lblCmdNameOld->setJustificationType (juce::Justification::centredLeft);
lblCmdNameOld->setEditable (false, false, false);
lblCmdNameOld->setColour (juce::TextEditor::textColourId, juce::Colours::black);
@@ -186,7 +186,7 @@ SeqABIEditor::SeqABIEditor (String abi_name)
lblCmd.reset (new juce::Label ("lblCmd",
TRANS("Cmd:")));
addAndMakeVisible (lblCmd.get());
- lblCmd->setFont (juce::Font (15.00f, juce::Font::plain));
+ lblCmd->setFont (juce::Font (15.00f, juce::Font::plain).withTypefaceStyle ("Regular"));
lblCmd->setJustificationType (juce::Justification::centredLeft);
lblCmd->setEditable (false, false, false);
lblCmd->setColour (juce::TextEditor::textColourId, juce::Colours::black);
@@ -209,7 +209,7 @@ SeqABIEditor::SeqABIEditor (String abi_name)
lblTo.reset (new juce::Label ("lblTo",
TRANS("to")));
addAndMakeVisible (lblTo.get());
- lblTo->setFont (juce::Font (15.00f, juce::Font::plain));
+ lblTo->setFont (juce::Font (15.00f, juce::Font::plain).withTypefaceStyle ("Regular"));
lblTo->setJustificationType (juce::Justification::centredLeft);
lblTo->setEditable (false, false, false);
lblTo->setColour (juce::TextEditor::textColourId, juce::Colours::black);
@@ -300,7 +300,7 @@ SeqABIEditor::SeqABIEditor (String abi_name)
lblAction.reset (new juce::Label ("lblAction",
TRANS("Action:")));
addAndMakeVisible (lblAction.get());
- lblAction->setFont (juce::Font (15.00f, juce::Font::plain));
+ lblAction->setFont (juce::Font (15.00f, juce::Font::plain).withTypefaceStyle ("Regular"));
lblAction->setJustificationType (juce::Justification::centredLeft);
lblAction->setEditable (false, false, false);
lblAction->setColour (juce::TextEditor::textColourId, juce::Colours::black);
@@ -323,7 +323,7 @@ SeqABIEditor::SeqABIEditor (String abi_name)
lblComments.reset (new juce::Label ("lblComments",
TRANS("Comments:")));
addAndMakeVisible (lblComments.get());
- lblComments->setFont (juce::Font (15.00f, juce::Font::plain));
+ lblComments->setFont (juce::Font (15.00f, juce::Font::plain).withTypefaceStyle ("Regular"));
lblComments->setJustificationType (juce::Justification::centredLeft);
lblComments->setEditable (false, false, false);
lblComments->setColour (juce::TextEditor::textColourId, juce::Colours::black);
@@ -334,7 +334,7 @@ SeqABIEditor::SeqABIEditor (String abi_name)
lblParams.reset (new juce::Label ("lblParams",
TRANS("Params:")));
addAndMakeVisible (lblParams.get());
- lblParams->setFont (juce::Font (15.00f, juce::Font::plain));
+ lblParams->setFont (juce::Font (15.00f, juce::Font::plain).withTypefaceStyle ("Regular"));
lblParams->setJustificationType (juce::Justification::centredLeft);
lblParams->setEditable (false, false, false);
lblParams->setColour (juce::TextEditor::textColourId, juce::Colours::black);
@@ -351,7 +351,7 @@ SeqABIEditor::SeqABIEditor (String abi_name)
lblParamName.reset (new juce::Label ("lblParamName",
TRANS("Name:")));
addAndMakeVisible (lblParamName.get());
- lblParamName->setFont (juce::Font (15.00f, juce::Font::plain));
+ lblParamName->setFont (juce::Font (15.00f, juce::Font::plain).withTypefaceStyle ("Regular"));
lblParamName->setJustificationType (juce::Justification::centredLeft);
lblParamName->setEditable (false, false, false);
lblParamName->setColour (juce::TextEditor::textColourId, juce::Colours::black);
@@ -362,7 +362,7 @@ SeqABIEditor::SeqABIEditor (String abi_name)
lblParamMeaning.reset (new juce::Label ("lblParamMeaning",
TRANS("Meaning:")));
addAndMakeVisible (lblParamMeaning.get());
- lblParamMeaning->setFont (juce::Font (15.00f, juce::Font::plain));
+ lblParamMeaning->setFont (juce::Font (15.00f, juce::Font::plain).withTypefaceStyle ("Regular"));
lblParamMeaning->setJustificationType (juce::Justification::centredLeft);
lblParamMeaning->setEditable (false, false, false);
lblParamMeaning->setColour (juce::TextEditor::textColourId, juce::Colours::black);
@@ -459,13 +459,13 @@ SeqABIEditor::SeqABIEditor (String abi_name)
lblDataLen.reset (new juce::Label ("lblDataLen",
TRANS("(none)")));
addAndMakeVisible (lblDataLen.get());
- lblDataLen->setFont (juce::Font (15.00f, juce::Font::plain));
+ lblDataLen->setFont (juce::Font (15.00f, juce::Font::plain).withTypefaceStyle ("Regular"));
lblDataLen->setJustificationType (juce::Justification::centredLeft);
lblDataLen->setEditable (false, false, false);
lblDataLen->setColour (juce::TextEditor::textColourId, juce::Colours::black);
lblDataLen->setColour (juce::TextEditor::backgroundColourId, juce::Colour (0x00000000));
- lblDataLen->setBounds (360, 588, 64, 24);
+ lblDataLen->setBounds (360, 576, 64, 24);
txtDataLen.reset (new juce::TextEditor ("txtDataLen"));
addAndMakeVisible (txtDataLen.get());
@@ -477,7 +477,7 @@ SeqABIEditor::SeqABIEditor (String abi_name)
txtDataLen->setPopupMenuEnabled (true);
txtDataLen->setText (juce::String());
- txtDataLen->setBounds (424, 588, 32, 24);
+ txtDataLen->setBounds (424, 576, 32, 24);
btnSave.reset (new juce::TextButton ("btnSave"));
addAndMakeVisible (btnSave.get());
@@ -501,7 +501,7 @@ SeqABIEditor::SeqABIEditor (String abi_name)
lblCC.reset (new juce::Label ("lblCC",
TRANS("CC:")));
addAndMakeVisible (lblCC.get());
- lblCC->setFont (juce::Font (15.00f, juce::Font::plain));
+ lblCC->setFont (juce::Font (15.00f, juce::Font::plain).withTypefaceStyle ("Regular"));
lblCC->setJustificationType (juce::Justification::centredLeft);
lblCC->setEditable (false, false, false);
lblCC->setColour (juce::TextEditor::textColourId, juce::Colours::black);
@@ -517,6 +517,14 @@ SeqABIEditor::SeqABIEditor (String abi_name)
btnCCHelp->setBounds (448, 552, 22, 24);
+ chkx2.reset (new juce::ToggleButton ("chkx2"));
+ addAndMakeVisible (chkx2.get());
+ chkx2->setTooltip (TRANS("CC value is multiplied by 2 to get MML value, because MIDI is 0-127 whereas MML is 0-255."));
+ chkx2->setButtonText (TRANS("x2"));
+ chkx2->addListener (this);
+
+ chkx2->setBounds (400, 600, 72, 24);
+
//[UserPreSize]
@@ -631,6 +639,7 @@ SeqABIEditor::~SeqABIEditor()
txtCC = nullptr;
lblCC = nullptr;
btnCCHelp = nullptr;
+ chkx2 = nullptr;
//[Destructor]. You can add your own custom destruction code here..
@@ -932,6 +941,14 @@ void SeqABIEditor::buttonClicked (juce::Button* buttonThatWasClicked)
);
//[/UserButtonCode_btnCCHelp]
}
+ else if (buttonThatWasClicked == chkx2.get())
+ {
+ //[UserButtonCode_chkx2] -- add your button handler code here..
+ if(!selparam.isValid()) return;
+ selparam.setProperty("x2", chkx2->getToggleState(), nullptr);
+ needssaving = true;
+ //[/UserButtonCode_chkx2]
+ }
//[UserbuttonClicked_Post]
//[/UserbuttonClicked_Post]
@@ -1131,6 +1148,7 @@ void SeqABIEditor::fillParamInfo(){
lblDataLen->setText("(none)", dontSendNotification);
txtDataLen->setText("", false);
txtCC->setText("", false);
+ chkx2->setToggleState(false, dontSendNotification);
return;
}
txtParamName->setText(selparam.getProperty("name", ""), false);
@@ -1150,6 +1168,7 @@ void SeqABIEditor::fillParamInfo(){
txtDataLen->setText(datasrc == "offset" || datasrc == "variable" ? ""
: selparam.getProperty("datalen", "").toString(), false);
txtDataLen->setEnabled(datasrc == "fixed" || datasrc == "constant");
+ chkx2->setToggleState((bool)selparam.getProperty("x2", false), dontSendNotification);
}
void SeqABIEditor::fillMeaningsBox(String action){
@@ -1390,12 +1409,12 @@ BEGIN_JUCER_METADATA
virtualName="" explicitFocusOrder="0" pos="96 608 48 24" buttonText="Dn"
connectedEdges="5" needsCallback="1" radioGroupId="0"/>
+
END_JUCER_METADATA
diff --git a/Source/SeqABIEditor.hpp b/Source/SeqABIEditor.hpp
index 5307f37..ec3ec22 100644
--- a/Source/SeqABIEditor.hpp
+++ b/Source/SeqABIEditor.hpp
@@ -7,7 +7,7 @@
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
and re-saved.
- Created with Projucer version: 6.0.1
+ Created with Projucer version: 6.0.7
------------------------------------------------------------------------------
@@ -145,6 +145,7 @@ class SeqABIEditor : public Component,
std::unique_ptr txtCC;
std::unique_ptr lblCC;
std::unique_ptr btnCCHelp;
+ std::unique_ptr chkx2;
//==============================================================================
@@ -153,3 +154,4 @@ class SeqABIEditor : public Component,
//[EndFile] You can add extra defines here...
//[/EndFile]
+
diff --git a/Source/SeqFile.cpp b/Source/SeqFile.cpp
index 6509f17..d133209 100644
--- a/Source/SeqFile.cpp
+++ b/Source/SeqFile.cpp
@@ -49,6 +49,7 @@ Identifier SeqFile::idSType("stype");
Identifier SeqFile::idValidInSeq("validinseq");
Identifier SeqFile::idValidInChn("validinchn");
Identifier SeqFile::idValidInTrk("validintrk");
+Identifier SeqFile::idx2("x2");
Identifier SeqFile::idChannel("channel");
Identifier SeqFile::idLayer("layer");
Identifier SeqFile::idShortMode("shortmode");
@@ -174,6 +175,7 @@ ValueTree SeqFile::loadABI(String name){
std::cout << "Error parsing XML of " + abifile.getFullPathName() + "!\n";
return ValueTree();
}
+ std::cout << "Loading ABI " + abifile.getFullPathName() + "\n";
return ValueTree::fromXml(*xml);
}
bool SeqFile::saveABI(String name, ValueTree abi_){
@@ -398,11 +400,10 @@ ValueTree SeqFile::createCommand(ValueTree want, bool warnIfImpossible){
for(int j=0; jlastvalue = value2;
ccstates[paramcc]->lasttime = timestamp;
ccstates[paramcc]->lastcmd = cccmd;
+ if((bool)tmpparam.getProperty(idx2, false)) value2 *= 2;
tmpparam.setProperty(idValue, value2, nullptr);
trk->deleteEvent(i, false);
if(i == m) --m;
@@ -1589,11 +1591,12 @@ int SeqFile::importMIDI(File midifile, ValueTree midiopts){
transpose += 12 * (((note - 0x40) / 12) + 1);
}
note = msg.getNoteNumber() - transpose - midi_basenote;
+ int transpose_unsigned = transpose < 0 ? (0x100 + transpose) : transpose;
if(transposecmd.isValid()){
- transposecmd.getChildWithProperty(idMeaning, "Value").setProperty(idValue, transpose, nullptr);
+ transposecmd.getChildWithProperty(idMeaning, "Value").setProperty(idValue, transpose_unsigned, nullptr);
}else{
want2 = wantAction("Layer Transpose", 2);
- wantProperty(want2, "Value", transpose);
+ wantProperty(want2, "Value", transpose_unsigned);
section.addChild(createCommand(want2), cmd, nullptr);
cmd++;
}
@@ -1601,7 +1604,10 @@ int SeqFile::importMIDI(File midifile, ValueTree midiopts){
wantProperty(want, "Note", note);
//Delay
delay = timestamp3 - timestamp;
- if(delay >= 48*2 && ((timestamp2 - timestamp) * 0x100 / delay) < 0x08){
+ //Want to make sure there is sufficient resolution to encode the note off
+ //time of any note using gate time.
+ const int minDelayResolution = 8; //Sixteenth note triplet; 48 ppqn
+ if(delay >= minDelayResolution * 0x100){ //10 2/3 measures at 4/4
//Full note and then timestamp
wantProperty(want, "Delay", timestamp2 - timestamp);
wantProperty(want, "Gate Time", 0);
@@ -2528,6 +2534,7 @@ int SeqFile::exportMIDI(File midifile, ValueTree midiopts){
continue;
}
int value = param.getProperty(idValue);
+ if((bool)param.getProperty(idx2, false)) value /= 2;
if(cc != 128 && (value < 0 || value > 0x7F)){
dbgmsg("CC " + String(cc) + " event with invalid value = " + String(value) + "!");
importresult |= 1;
diff --git a/Source/SeqFile.hpp b/Source/SeqFile.hpp
index 8e1995d..7c6e3b7 100644
--- a/Source/SeqFile.hpp
+++ b/Source/SeqFile.hpp
@@ -291,6 +291,7 @@ class SeqFile{
static Identifier idValidInSeq;
static Identifier idValidInChn;
static Identifier idValidInTrk;
+ static Identifier idx2;
static Identifier idChannel;
static Identifier idLayer;
static Identifier idShortMode;
diff --git a/abi/1 - SM64.xml b/abi/1 - SM64.xml
index 4d24feb..c963603 100644
--- a/abi/1 - SM64.xml
+++ b/abi/1 - SM64.xml
@@ -228,7 +228,8 @@
-
+
diff --git a/abi/2 - SM64 EU.xml b/abi/2 - SM64 EU.xml
index 34aeed7..89951c5 100644
--- a/abi/2 - SM64 EU.xml
+++ b/abi/2 - SM64 EU.xml
@@ -233,7 +233,8 @@
-
+
diff --git a/abi/3 - SF64.xml b/abi/3 - SF64.xml
index 5a3254f..84abfb9 100644
--- a/abi/3 - SF64.xml
+++ b/abi/3 - SF64.xml
@@ -246,7 +246,8 @@
-
+
diff --git a/abi/4 - Zelda.xml b/abi/4 - Zelda.xml
index 9c4964d..61c147d 100644
--- a/abi/4 - Zelda.xml
+++ b/abi/4 - Zelda.xml
@@ -301,7 +301,8 @@
-
+
diff --git a/abi/4b - Zelda community only.xml b/abi/4b - Zelda community only.xml
index 502fc79..8dcc46f 100644
--- a/abi/4b - Zelda community only.xml
+++ b/abi/4b - Zelda community only.xml
@@ -274,8 +274,8 @@
validinchn="1">
-
+
-
+