Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Trueman authored and Daniel Trueman committed Jan 24, 2018
2 parents 28f3954 + 489dc67 commit 8d07fff
Show file tree
Hide file tree
Showing 88 changed files with 9,009 additions and 17,537 deletions.
8 changes: 4 additions & 4 deletions bk_JUCE/bitKlavier/JuceLibraryCode/AppConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -327,13 +327,13 @@
#define JucePlugin_EditorRequiresKeyboardFocus 1
#endif
#ifndef JucePlugin_Version
#define JucePlugin_Version 1.9
#define JucePlugin_Version 2
#endif
#ifndef JucePlugin_VersionCode
#define JucePlugin_VersionCode 0x10900
#define JucePlugin_VersionCode 0x20000
#endif
#ifndef JucePlugin_VersionString
#define JucePlugin_VersionString "1.9"
#define JucePlugin_VersionString "2"
#endif
#ifndef JucePlugin_VSTUniqueID
#define JucePlugin_VSTUniqueID JucePlugin_PluginCode
Expand All @@ -357,7 +357,7 @@
#define JucePlugin_AUManufacturerCode JucePlugin_ManufacturerCode
#endif
#ifndef JucePlugin_CFBundleIdentifier
#define JucePlugin_CFBundleIdentifier com.manyarrowsmusic.bitKlavier
#define JucePlugin_CFBundleIdentifier com.manyarrowsmusic.bitKlavier1
#endif
#ifndef JucePlugin_RTASCategory
#define JucePlugin_RTASCategory ePlugInCategory_SWGenerators
Expand Down
20,478 changes: 5,594 additions & 14,884 deletions bk_JUCE/bitKlavier/JuceLibraryCode/BinaryData.cpp

Large diffs are not rendered by default.

76 changes: 35 additions & 41 deletions bk_JUCE/bitKlavier/JuceLibraryCode/BinaryData.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,85 +9,85 @@
namespace BinaryData
{
extern const char* _1__Synchronic_1_xml;
const int _1__Synchronic_1_xmlSize = 23919;
const int _1__Synchronic_1_xmlSize = 25058;

extern const char* _2__Synchronic_2_xml;
const int _2__Synchronic_2_xmlSize = 23922;
const int _2__Synchronic_2_xmlSize = 24656;

extern const char* _3__Synchronic_3_xml;
const int _3__Synchronic_3_xmlSize = 23445;
const int _3__Synchronic_3_xmlSize = 24159;

extern const char* _4__Synchronic_4_xml;
const int _4__Synchronic_4_xmlSize = 24208;
const int _4__Synchronic_4_xmlSize = 24840;

extern const char* _5__Synchronic_5_xml;
const int _5__Synchronic_5_xmlSize = 23997;
const int _5__Synchronic_5_xmlSize = 24657;

extern const char* _6__Synchronic_6_xml;
const int _6__Synchronic_6_xmlSize = 24822;
const int _6__Synchronic_6_xmlSize = 25535;

extern const char* _7__Synchronic_7_xml;
const int _7__Synchronic_7_xmlSize = 24880;
const int _7__Synchronic_7_xmlSize = 25476;

extern const char* _8__Synchronic_8_xml;
const int _8__Synchronic_8_xmlSize = 24974;
const int _8__Synchronic_8_xmlSize = 25819;

extern const char* _9__Synchronic_9_xml;
const int _9__Synchronic_9_xmlSize = 24964;
const int _9__Synchronic_9_xmlSize = 25584;

extern const char* _10__Nostalgic_1_xml;
const int _10__Nostalgic_1_xmlSize = 37230;
const int _10__Nostalgic_1_xmlSize = 37994;

extern const char* _11__Nostalgic_2_xml;
const int _11__Nostalgic_2_xmlSize = 37230;
const int _11__Nostalgic_2_xmlSize = 37865;

extern const char* _12__Nostalgic_3_xml;
const int _12__Nostalgic_3_xmlSize = 37229;
const int _12__Nostalgic_3_xmlSize = 38217;

extern const char* _13__Nostalgic_4_xml;
const int _13__Nostalgic_4_xmlSize = 37993;
const int _13__Nostalgic_4_xmlSize = 40482;

extern const char* _14__Nostalgic_5_xml;
const int _14__Nostalgic_5_xmlSize = 37993;
const int _14__Nostalgic_5_xmlSize = 40110;

extern const char* _15__Nostalgic_6_xml;
const int _15__Nostalgic_6_xmlSize = 25282;
const int _15__Nostalgic_6_xmlSize = 40094;

extern const char* _16__Tuning_1_xml;
const int _16__Tuning_1_xmlSize = 24453;
const int _16__Tuning_1_xmlSize = 25428;

extern const char* _17__Tuning_2_xml;
const int _17__Tuning_2_xmlSize = 23682;
const int _17__Tuning_2_xmlSize = 24613;

extern const char* _18__Tuning_3_xml;
const int _18__Tuning_3_xmlSize = 23685;
const int _18__Tuning_3_xmlSize = 24398;

extern const char* _19__Tuning_4_xml;
const int _19__Tuning_4_xmlSize = 23169;
const int _19__Tuning_4_xmlSize = 23877;

extern const char* _20__Tuning_5_xml;
const int _20__Tuning_5_xmlSize = 23166;
const int _20__Tuning_5_xmlSize = 23797;

extern const char* _21__Direct_1_xml;
const int _21__Direct_1_xmlSize = 22581;
const int _21__Direct_1_xmlSize = 23000;

extern const char* _22__Direct_2_xml;
const int _22__Direct_2_xmlSize = 23125;
const int _22__Direct_2_xmlSize = 23530;

extern const char* _23__Adaptive_Tempo_1_xml;
const int _23__Adaptive_Tempo_1_xmlSize = 24491;
const int _23__Adaptive_Tempo_1_xmlSize = 25202;

extern const char* _24__Adaptive_Tempo_2_xml;
const int _24__Adaptive_Tempo_2_xmlSize = 24491;
const int _24__Adaptive_Tempo_2_xmlSize = 25161;

extern const char* _25__Adaptive_Tempo_3_xml;
const int _25__Adaptive_Tempo_3_xmlSize = 24488;
const int _25__Adaptive_Tempo_3_xmlSize = 25103;

extern const char* _26__Adaptive_Tempo_4_xml;
const int _26__Adaptive_Tempo_4_xmlSize = 24485;
const int _26__Adaptive_Tempo_4_xmlSize = 25096;

extern const char* _27__PianoMapGallery_xml;
const int _27__PianoMapGallery_xmlSize = 31183;
const int _27__PianoMapGallery_xmlSize = 32187;

extern const char* And_So_xml;
const int And_So_xmlSize = 7254;
Expand Down Expand Up @@ -186,11 +186,17 @@ namespace BinaryData
const int NS_8_ItIsEnough_xmlSize = 22311;

extern const char* Basic_Piano_xml;
const int Basic_Piano_xmlSize = 4177;
const int Basic_Piano_xmlSize = 4393;

extern const char* Mikes_Gallery_xml;
const int Mikes_Gallery_xmlSize = 35379;

extern const char* icon_iOS_72_png;
const int icon_iOS_72_pngSize = 8662;

extern const char* icon_iOS_300_jpg;
const int icon_iOS_300_jpgSize = 121625;

extern const char* bitKlavier_x_png;
const int bitKlavier_x_pngSize = 2519;

Expand All @@ -203,18 +209,6 @@ namespace BinaryData
extern const char* general_icon_png;
const int general_icon_pngSize = 12817;

extern const char* icon_iOS_72_jpg;
const int icon_iOS_72_jpgSize = 44916;

extern const char* icon_iOS_300_jpg;
const int icon_iOS_300_jpgSize = 738779;

extern const char* icon_iOS_72_png;
const int icon_iOS_72_pngSize = 8662;

extern const char* icon_iOS_300_png;
const int icon_iOS_300_pngSize = 39172;

extern const char* icon_png;
const int icon_pngSize = 207890;

Expand Down Expand Up @@ -273,7 +267,7 @@ namespace BinaryData
extern const char* namedResourceList[];

// Number of elements in the namedResourceList array.
const int namedResourceListSize = 87;
const int namedResourceListSize = 85;

// If you provide the name of one of the binary resource variables above, this function will
// return the corresponding data and its size (or a null pointer if the name isn't found).
Expand Down
4 changes: 2 additions & 2 deletions bk_JUCE/bitKlavier/JuceLibraryCode/JuceHeader.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
namespace ProjectInfo
{
const char* const projectName = "bitKlavier";
const char* const versionString = "1.9";
const int versionNumber = 0x10900;
const char* const versionString = "2";
const int versionNumber = 0x20000;
}
#endif
10 changes: 7 additions & 3 deletions bk_JUCE/bitKlavier/Source/AudioConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ typedef enum BKPreparationType {
PreparationTypePianoMap,
PreparationTypeReset,
PreparationTypePiano,
PreparationTypeComment,
BKPreparationTypeNil
} BKPreparationType;

Expand Down Expand Up @@ -247,7 +248,8 @@ static const std::vector<std::string> cPreparationTypes = {
"GenericMod",
"PianoMap",
"Reset",
"Piano"
"Piano",
"Comment"
};

typedef enum BKPreparationDisplay {
Expand Down Expand Up @@ -476,13 +478,15 @@ static const std::vector<std::vector<float>> cSynchronicDefaultRangeValuesAndInc
#pragma mark - Nostalgic
typedef enum NostalgicSyncMode {
NoteLengthSync = 0, //reverse note length set by played note length
SynchronicSync, //reverse note length set by next synchronic pulse
SynchronicSync, //reverse note length set by next synchronic pulse, begins with keyOn
SynchronicSync2, //reverse note length set by next synchronic pulse, and begins with keyOff
NostalgicSyncModeNil
} NostalgicSyncMode;

static const std::vector<std::string> cNostalgicSyncModes = {
"Note Length",
"Synchronic Sync"
"Synchronic Sync KeyDown",
"Synchronic Sync KeyUp"
};

typedef enum NostalgicParameterType {
Expand Down
65 changes: 52 additions & 13 deletions bk_JUCE/bitKlavier/Source/BKConstructionSite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@

#define DRAW_MULTITOUCH 0

BKConstructionSite::BKConstructionSite(BKAudioProcessor& p, /*Viewport* vp,*/ BKItemGraph* theGraph):
BKConstructionSite::BKConstructionSite(BKAudioProcessor& p, BKItemGraph* theGraph):
altDown(false),
processor(p),
graph(theGraph),
connect(false),
lastX(10),
lastY(10),
held(false)
lastX(10), lastY(10),
held(false),
edittingComment(false)
{
addAndMakeVisible(clickFrame);
clickFrame.setSize(5,5);
Expand Down Expand Up @@ -126,6 +126,7 @@ void BKConstructionSite::deleteSelected(void)

for (int i = selectedItems.size(); --i >= 0;)
{
selectedItems[i]->print();
deleteItem(selectedItems[i]);
}

Expand Down Expand Up @@ -300,7 +301,7 @@ void BKConstructionSite::addItem(BKPreparationType type, bool center)
{
int thisId = -1;

if (type != PreparationTypeGenericMod)
if (type != PreparationTypeGenericMod && type != PreparationTypeComment)
{
thisId = processor.gallery->getNewId(type);

Expand All @@ -314,6 +315,10 @@ void BKConstructionSite::addItem(BKPreparationType type, bool center)
toAdd->setPianoTarget(processor.currentPiano->getId());
toAdd->configurePianoCB();
}
else if (type == PreparationTypeComment)
{
toAdd->configureComment();
}

#if JUCE_IOS
toAdd->setTopLeftPosition(lastX, lastY);
Expand All @@ -329,11 +334,11 @@ void BKConstructionSite::addItem(BKPreparationType type, bool center)
toAdd->setTopLeftPosition(lastX, lastY);
}
#endif

lastX += 10; lastY += 10;

graph->addItem(toAdd);

addAndMakeVisible(toAdd);
}

Expand Down Expand Up @@ -503,7 +508,17 @@ void BKConstructionSite::editMenuCallback(int result, BKConstructionSite* vc)

#endif

if (result == EDIT_ID)

if (result == OFF_ID)
{
// OFF
processor.clearBitKlavier();
}
else if (result == KEYBOARD_ID)
{
((MainViewController*)vc->getParentComponent())->toggleDisplay();
}
else if (result == EDIT_ID)
{
vc->processor.updateState->setCurrentDisplay(vc->currentItem->getType(), vc->currentItem->getId());
}
Expand Down Expand Up @@ -541,6 +556,10 @@ void BKConstructionSite::editMenuCallback(int result, BKConstructionSite* vc)
{
vc->deleteSelected();
}
else if (result == COMMENT_ID)
{
vc->addItem(PreparationTypeComment, true);
}
else if (result == KEYMAP_ID)
{
vc->addItem(PreparationTypeKeymap, true);
Expand Down Expand Up @@ -628,7 +647,17 @@ void BKConstructionSite::editMenuCallback(int result, BKConstructionSite* vc)

void BKConstructionSite::mouseDoubleClick(const MouseEvent& eo)
{

/*
BKItem* item = dynamic_cast<BKItem*> (eo.originalComponent->getParentComponent());
if (item != nullptr)
{
if (item->getType() == PreparationTypeComment)
{
//item->
}
}
*/
}

void BKConstructionSite::mouseHold(Component* frame, bool onItem)
Expand Down Expand Up @@ -667,6 +696,17 @@ void BKConstructionSite::mouseHold(Component* frame, bool onItem)

void BKConstructionSite::mouseDown (const MouseEvent& eo)
{
if (edittingComment)
{
BKItem* anItem = dynamic_cast<BKItem*> (eo.originalComponent->getParentComponent());
if (anItem == nullptr)
{
graph->deselectAll();
}
edittingComment = false;
return;
}

MouseEvent e = eo.getEventRelativeTo(this);

#if JUCE_IOS
Expand Down Expand Up @@ -779,11 +819,11 @@ void BKConstructionSite::mouseDown (const MouseEvent& eo)
}

getParentComponent()->grabKeyboardFocus();

}

void BKConstructionSite::mouseUp (const MouseEvent& eo)
{
if (edittingComment) return;

MouseEvent e = eo.getEventRelativeTo(this);

Expand Down Expand Up @@ -835,7 +875,8 @@ void BKConstructionSite::mouseUp (const MouseEvent& eo)

void BKConstructionSite::mouseDrag (const MouseEvent& e)
{

if (edittingComment) return;

#if JUCE_IOS
MouseEvent eo = (e.eventComponent != this) ? e.getEventRelativeTo(this) : e;

Expand All @@ -862,8 +903,6 @@ void BKConstructionSite::mouseDrag (const MouseEvent& e)
for (auto item : graph->getSelectedItems())
{
item->performDrag(e);

//if (item->)
}
}

Expand Down
1 change: 1 addition & 0 deletions bk_JUCE/bitKlavier/Source/BKConstructionSite.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ class BKConstructionSite : public LassoSource<BKItem*>, public MouseHoldListener
return touches.size();
}

bool edittingComment;

private:

Expand Down
Loading

0 comments on commit 8d07fff

Please sign in to comment.