From b997a3b825e74da3b28d58e5023e87707f392bb8 Mon Sep 17 00:00:00 2001 From: bill-auger Date: Oct 21 2018 11:03:36 +0000 Subject: rebranding --- diff --git a/.gitignore b/.gitignore index 784799e..9659f12 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ - * -!JuceBoilerplate.jucer +!AudioTagToo.jucer !.gitignore !COPYING !LICENSES.md @@ -40,15 +39,16 @@ !Source/Controllers/ !Source/Models/ -!Source/Models/JuceBoilerplateStore.cpp -!Source/Models/JuceBoilerplateStore.h +!Source/Models/AudioTagTooStore.cpp +!Source/Models/AudioTagTooStore.h !Source/Models/Seeds.cpp !Source/Models/Seeds.h !Source/Trace/ !Source/Trace/Trace.cpp !Source/Trace/Trace.h -!Source/Trace/JuceBoilerplateStore.h +!Source/Trace/TraceAudioTagTooStore.h +!Source/Trace/TraceMain.h !Source/Trace/TraceWaveform.h !Source/Views/ diff --git a/Assets/README.md b/Assets/README.md index 9d872e0..e6a4503 100644 --- a/Assets/README.md +++ b/Assets/README.md @@ -1,6 +1,6 @@ -### JuceAudio Assets Licenses +### AudioTagToo Assets Licenses -The original audio, video, and image files in the JuceAudio Assets/ directory are licensed under +The original audio, video, and image files in the AudioTagToo Assets/ directory are licensed under [version 3 of the GNU General Public License](COPYING_ASSETS), or any later version, with the "sources" or "preferred form" explicitly defined to be any and all binary data, meta-data, editor project files, scripts, and source code of custom executables diff --git a/AudioTagToo.jucer b/AudioTagToo.jucer new file mode 100644 index 0000000..0529788 --- /dev/null +++ b/AudioTagToo.jucer @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Builds/Makefile/Makefile b/Builds/Makefile/Makefile index ce0eff6..dc83a57 100644 --- a/Builds/Makefile/Makefile +++ b/Builds/Makefile/Makefile @@ -37,7 +37,7 @@ ifeq ($(CONFIG),Debug) JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DDEBUG=1 -D_DEBUG=1 -DJUCER_LINUX_MAKE_9CCEB774=1 -DJUCE_APP_VERSION=0.0.1 -DJUCE_APP_VERSION_HEX=0x1 $(shell pkg-config --cflags alsa freetype2 libcurl x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../JuceLibraryCode/modules $(CPPFLAGS) JUCE_CPPFLAGS_APP := -DJucePlugin_Build_VST=0 -DJucePlugin_Build_VST3=0 -DJucePlugin_Build_AU=0 -DJucePlugin_Build_AUv3=0 -DJucePlugin_Build_RTAS=0 -DJucePlugin_Build_AAX=0 -DJucePlugin_Build_Standalone=0 - JUCE_TARGET_APP := juce-boilerplate-dbg + JUCE_TARGET_APP := audio-tag-too-dbg JUCE_CFLAGS += $(JUCE_CPPFLAGS) $(TARGET_ARCH) -g -ggdb -O0 $(CFLAGS) JUCE_CXXFLAGS += $(JUCE_CFLAGS) -std=c++14 $(CXXFLAGS) @@ -58,7 +58,7 @@ ifeq ($(CONFIG),Release) JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DNDEBUG=1 -DJUCER_LINUX_MAKE_9CCEB774=1 -DJUCE_APP_VERSION=0.0.1 -DJUCE_APP_VERSION_HEX=0x1 $(shell pkg-config --cflags alsa freetype2 libcurl x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../JuceLibraryCode/modules $(CPPFLAGS) JUCE_CPPFLAGS_APP := -DJucePlugin_Build_VST=0 -DJucePlugin_Build_VST3=0 -DJucePlugin_Build_AU=0 -DJucePlugin_Build_AUv3=0 -DJucePlugin_Build_RTAS=0 -DJucePlugin_Build_AAX=0 -DJucePlugin_Build_Standalone=0 - JUCE_TARGET_APP := juce-boilerplate + JUCE_TARGET_APP := audio-tag-too JUCE_CFLAGS += $(JUCE_CPPFLAGS) $(TARGET_ARCH) -O3 $(CFLAGS) JUCE_CXXFLAGS += $(JUCE_CFLAGS) -std=c++14 $(CXXFLAGS) @@ -73,7 +73,7 @@ OBJECTS_APP := \ $(JUCE_OBJDIR)/MediaConstants_dc2ebbb4.o \ $(JUCE_OBJDIR)/StorageConstants_d344b97d.o \ $(JUCE_OBJDIR)/Main_90ebc5c2.o \ - $(JUCE_OBJDIR)/JuceBoilerplateStore_119f6b1b.o \ + $(JUCE_OBJDIR)/AudioTagTooStore_2c91ca77.o \ $(JUCE_OBJDIR)/Seeds_7de92226.o \ $(JUCE_OBJDIR)/Trace_fd3024bc.o \ $(JUCE_OBJDIR)/MainContent_91787020.o \ @@ -97,7 +97,7 @@ OBJECTS_APP := \ all : $(JUCE_OUTDIR)/$(JUCE_TARGET_APP) $(JUCE_OUTDIR)/$(JUCE_TARGET_APP) : check-pkg-config $(OBJECTS_APP) $(RESOURCES) - @echo Linking "JuceBoilerplate - App" + @echo Linking "AudioTagToo - App" -$(V_AT)mkdir -p $(JUCE_BINDIR) -$(V_AT)mkdir -p $(JUCE_LIBDIR) -$(V_AT)mkdir -p $(JUCE_OUTDIR) @@ -128,9 +128,9 @@ $(JUCE_OBJDIR)/Main_90ebc5c2.o: ../../Source/Main.cpp @echo "Compiling Main.cpp" $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<" -$(JUCE_OBJDIR)/JuceBoilerplateStore_119f6b1b.o: ../../Source/Models/JuceBoilerplateStore.cpp +$(JUCE_OBJDIR)/AudioTagTooStore_2c91ca77.o: ../../Source/Models/AudioTagTooStore.cpp -$(V_AT)mkdir -p $(JUCE_OBJDIR) - @echo "Compiling JuceBoilerplateStore.cpp" + @echo "Compiling AudioTagTooStore.cpp" $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<" $(JUCE_OBJDIR)/Seeds_7de92226.o: ../../Source/Models/Seeds.cpp @@ -223,11 +223,11 @@ check-pkg-config: @pkg-config --print-errors alsa freetype2 libcurl x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0 clean: - @echo Cleaning JuceBoilerplate + @echo Cleaning AudioTagToo $(V_AT)$(CLEANCMD) strip: - @echo Stripping JuceBoilerplate + @echo Stripping AudioTagToo -$(V_AT)$(STRIP) --strip-unneeded $(JUCE_OUTDIR)/$(TARGET) -include $(OBJECTS_APP:%.o=%.d) diff --git a/Builds/Packaging/PKGBUILD b/Builds/Packaging/PKGBUILD index 306629a..4eca90b 100644 --- a/Builds/Packaging/PKGBUILD +++ b/Builds/Packaging/PKGBUILD @@ -1,19 +1,19 @@ # Maintainer: bill-auger -pkgname=juce-boilerplate +pkgname=audio-tag-too pkgver=0.0.1 pkgrel=1 pkgdesc="Clip and stitch audio samples" arch=('i686' 'x86_64') -url=https://github.com/bill-auger/juce-boilerplate/ +url=https://github.com/bill-auger/audio-tag-too/ license=('GPL3') depends=() makedepends=('libxinerama' 'libxrandr') _builddir=${pkgname}-${pkgver}/Builds/Makefile -source=(https://github.com/bill-auger/juce-boilerplate/archive/v${pkgver}.tar.gz) +source=(https://github.com/bill-auger/audio-tag-too/archive/v${pkgver}.tar.gz) sha256sums=('6555c56449d350579dccc75e153dcde672fd7001788ad90642d9de41ba7a71a2') @@ -26,5 +26,5 @@ build() package() { - install -Dm 755 ${_builddir}/build/juce-boilerplate ${pkgdir}/usr/bin/juce-boilerplate + install -Dm 755 ${_builddir}/build/audio-tag-too ${pkgdir}/usr/bin/audio-tag-too } diff --git a/JuceBoilerplate.jucer b/JuceBoilerplate.jucer deleted file mode 100644 index d5b8f23..0000000 --- a/JuceBoilerplate.jucer +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/JuceLibraryCode/AppConfig.h b/JuceLibraryCode/AppConfig.h index 42477cc..74514b5 100644 --- a/JuceLibraryCode/AppConfig.h +++ b/JuceLibraryCode/AppConfig.h @@ -16,7 +16,7 @@ //============================================================================== // [BEGIN_USER_CODE_SECTION] -#define JUCE_JACK_CLIENT_NAME "juce-boilerplate" +#define JUCE_JACK_CLIENT_NAME "audio-tag-too" #define STRING(a_var_or_id) a_var_or_id.toString() #define CHARSTAR(a_string) a_string.toStdString().c_str() diff --git a/JuceLibraryCode/BinaryData.cpp b/JuceLibraryCode/BinaryData.cpp index d461424..d72cc0f 100644 --- a/JuceLibraryCode/BinaryData.cpp +++ b/JuceLibraryCode/BinaryData.cpp @@ -9,46 +9,35 @@ namespace BinaryData //================== audio-x-generic.png ================== static const unsigned char temp_binary_data_0[] = -{ 47,42,92,10,124,42,124,32,32,83,111,117,114,99,101,47,32,45,32,10,124,42,124,32,32,67,111,112,121,114,105,103,104,116,32,50,48,49,56,32,98,105,108,108,45,97,117,103,101,114,32,60,104,116,116,112,115,58,47,47,103,105,116,104,117,98,46,99,111,109,47,98, -105,108,108,45,97,117,103,101,114,47,115,111,117,114,99,101,47,47,105,115,115,117,101,115,62,10,124,42,124,10,124,42,124,32,32,84,104,105,115,32,102,105,108,101,32,105,115,32,112,97,114,116,32,111,102,32,116,104,101,32,83,111,117,114,99,101,47,32,112, -114,111,103,114,97,109,46,10,124,42,124,10,124,42,124,32,32,83,111,117,114,99,101,47,32,105,115,32,102,114,101,101,32,115,111,102,116,119,97,114,101,58,32,121,111,117,32,99,97,110,32,114,101,100,105,115,116,114,105,98,117,116,101,32,105,116,32,97,110, -100,47,111,114,32,109,111,100,105,102,121,10,124,42,124,32,32,105,116,32,117,110,100,101,114,32,116,104,101,32,116,101,114,109,115,32,111,102,32,116,104,101,32,71,78,85,32,71,101,110,101,114,97,108,32,80,117,98,108,105,99,32,76,105,99,101,110,115,101, -32,97,115,32,112,117,98,108,105,115,104,101,100,32,98,121,10,124,42,124,32,32,116,104,101,32,70,114,101,101,32,83,111,102,116,119,97,114,101,32,70,111,117,110,100,97,116,105,111,110,44,32,101,105,116,104,101,114,32,118,101,114,115,105,111,110,32,51,32, -111,102,32,116,104,101,32,76,105,99,101,110,115,101,44,32,111,114,10,124,42,124,32,32,40,97,116,32,121,111,117,114,32,111,112,116,105,111,110,41,32,97,110,121,32,108,97,116,101,114,32,118,101,114,115,105,111,110,46,10,124,42,124,10,124,42,124,32,32,83, -111,117,114,99,101,47,32,105,115,32,100,105,115,116,114,105,98,117,116,101,100,32,105,110,32,116,104,101,32,104,111,112,101,32,116,104,97,116,32,105,116,32,119,105,108,108,32,98,101,32,117,115,101,102,117,108,44,10,124,42,124,32,32,98,117,116,32,87,73, -84,72,79,85,84,32,65,78,89,32,87,65,82,82,65,78,84,89,59,32,119,105,116,104,111,117,116,32,101,118,101,110,32,116,104,101,32,105,109,112,108,105,101,100,32,119,97,114,114,97,110,116,121,32,111,102,10,124,42,124,32,32,77,69,82,67,72,65,78,84,65,66,73, -76,73,84,89,32,111,114,32,70,73,84,78,69,83,83,32,70,79,82,32,65,32,80,65,82,84,73,67,85,76,65,82,32,80,85,82,80,79,83,69,46,32,32,83,101,101,32,116,104,101,10,124,42,124,32,32,71,78,85,32,71,101,110,101,114,97,108,32,80,117,98,108,105,99,32,76,105,99, -101,110,115,101,32,102,111,114,32,109,111,114,101,32,100,101,116,97,105,108,115,46,10,124,42,124,10,124,42,124,32,32,89,111,117,32,115,104,111,117,108,100,32,104,97,118,101,32,114,101,99,101,105,118,101,100,32,97,32,99,111,112,121,32,111,102,32,116,104, -101,32,71,78,85,32,71,101,110,101,114,97,108,32,80,117,98,108,105,99,32,76,105,99,101,110,115,101,10,124,42,124,32,32,97,108,111,110,103,32,119,105,116,104,32,83,111,117,114,99,101,47,46,32,32,73,102,32,110,111,116,44,32,115,101,101,32,60,104,116,116, -112,58,47,47,119,119,119,46,103,110,117,46,111,114,103,47,108,105,99,101,110,115,101,115,47,62,46,10,92,42,47,10,10,10,137,80,78,71,13,10,26,10,13,73,72,68,82,48,48,8,6,87,2,249,135,6,98,75,71,68,255,255,255,160,189,167,147,7,193,73,68,65,84,104,129, -237,153,91,108,156,87,17,199,255,115,190,203,126,123,249,188,23,175,189,78,226,218,169,35,220,16,18,130,114,171,73,131,210,150,132,23,36,196,67,145,72,218,66,104,171,168,1,245,13,241,24,250,14,130,23,46,226,129,72,136,139,80,130,168,104,5,173,210,86, -8,2,86,170,144,80,59,23,154,56,105,154,171,189,94,175,119,215,222,221,111,191,203,57,195,131,189,173,237,236,58,118,98,27,9,121,164,209,174,142,246,155,153,223,153,153,115,190,61,7,88,149,85,89,149,85,89,149,135,16,250,95,7,48,87,14,28,94,155,38,229, -117,67,19,221,138,169,91,215,241,24,49,103,12,87,125,227,216,177,177,201,185,191,215,87,58,192,231,14,167,215,176,210,186,165,134,110,98,238,214,116,234,21,68,143,49,184,75,74,100,76,67,112,50,209,233,165,91,147,148,76,165,172,68,75,194,56,213,223,239, -141,201,82,18,192,242,3,28,60,18,79,194,55,122,32,168,7,132,30,161,137,71,133,38,54,48,115,143,12,120,29,17,113,162,181,165,150,76,181,106,201,68,194,74,37,83,70,220,78,192,110,73,194,142,38,160,27,33,120,126,201,114,189,18,92,127,2,73,123,3,206,252, -235,253,98,84,54,242,183,100,207,29,233,56,167,148,218,162,11,225,69,147,166,151,72,218,122,186,53,29,110,137,199,181,120,75,18,182,157,132,29,75,34,108,37,193,44,45,215,159,128,235,149,224,249,19,112,189,81,140,151,135,48,50,94,130,235,79,2,224,143, -237,198,194,29,96,48,105,30,113,35,191,75,6,160,192,27,95,122,241,69,61,22,109,213,117,97,69,92,191,4,215,47,193,243,38,224,250,19,168,184,67,40,148,167,198,148,10,26,218,16,194,64,196,106,67,200,76,192,50,147,176,66,73,8,97,130,21,67,90,164,150,21,236, -72,7,46,223,248,61,92,175,132,153,179,56,91,8,166,97,127,28,100,56,212,138,144,153,128,161,37,160,164,133,98,105,12,197,194,184,119,183,152,231,190,190,158,144,84,14,24,138,224,104,203,91,66,117,241,131,10,134,32,13,166,25,71,56,212,10,211,104,65,56, -212,10,43,148,130,169,39,224,213,2,20,138,121,228,115,185,224,234,88,214,203,229,47,105,197,82,142,29,167,240,161,98,57,224,121,234,159,130,196,143,118,237,220,9,34,64,73,69,225,136,182,252,25,128,174,142,167,96,71,58,33,132,133,201,201,60,74,165,60, -178,185,113,149,203,253,199,25,205,142,170,177,194,88,152,149,63,12,162,243,210,87,103,152,232,44,9,92,252,221,207,179,215,49,35,109,7,143,100,126,48,245,141,128,68,165,178,50,25,136,88,109,120,235,237,55,156,43,151,47,235,66,224,14,17,6,125,95,189,167, -88,92,16,58,46,204,13,244,190,66,4,41,21,249,182,88,153,12,132,241,252,164,82,132,141,191,249,89,246,195,135,183,38,98,120,178,113,9,137,135,117,112,175,67,2,152,225,75,173,241,82,243,246,88,49,33,20,106,88,66,75,14,18,80,12,130,112,27,58,92,188,61,64, -177,164,114,96,173,92,6,88,41,10,169,198,235,246,131,88,100,6,61,226,94,93,25,16,65,65,145,84,141,155,110,209,230,64,80,204,180,118,45,86,166,132,8,51,35,144,75,3,34,128,153,94,125,21,43,148,129,169,38,110,186,241,44,222,154,128,98,213,116,217,93,158, -18,98,80,160,202,75,212,3,49,175,32,176,100,127,169,74,8,4,166,21,204,129,32,25,100,7,75,83,66,12,2,113,243,21,109,89,122,128,24,228,251,75,213,3,128,194,10,150,16,129,192,96,170,165,141,37,235,1,172,36,8,96,37,9,183,227,75,178,19,51,158,103,21,90,150, -151,57,102,80,50,121,177,169,211,175,125,187,45,38,2,218,173,9,236,209,117,218,198,224,22,98,17,7,177,34,240,176,82,116,91,74,101,124,66,208,120,15,88,22,128,250,206,57,81,184,215,233,243,47,103,218,21,243,81,40,124,43,179,182,61,232,221,208,27,109,77, -183,107,86,40,2,203,138,34,144,30,2,159,63,87,46,23,48,81,30,133,166,235,3,76,188,52,7,143,100,122,56,80,59,72,136,94,34,94,67,68,97,165,212,29,102,92,5,79,151,227,244,206,121,226,4,140,25,246,249,153,67,233,221,138,232,143,125,143,247,197,250,118,238, -55,98,209,52,170,181,81,84,156,17,84,156,81,20,171,31,128,57,129,16,141,39,208,150,233,130,235,149,96,26,173,128,122,136,18,250,250,203,29,235,117,129,239,16,248,155,186,102,68,215,118,103,100,91,186,53,106,69,44,161,9,192,15,152,243,185,130,147,29,205, -49,17,1,83,77,12,225,186,141,207,239,75,118,134,195,198,235,7,15,28,178,187,58,55,195,113,178,152,172,220,130,31,84,224,122,69,184,94,1,158,95,66,205,29,159,122,160,114,19,144,176,123,144,138,237,128,98,229,44,26,224,217,87,82,45,66,25,63,6,232,192,246, -109,91,245,77,159,222,106,180,167,214,195,243,39,225,120,121,120,126,121,122,194,137,204,77,91,34,17,171,13,154,102,64,169,196,172,68,235,182,30,233,214,190,183,231,137,61,209,116,107,26,183,70,254,10,211,104,129,38,12,248,65,21,53,175,8,207,159,128, -231,207,62,179,138,133,215,160,171,227,105,252,249,205,63,212,254,213,162,158,127,41,243,40,2,156,218,244,153,222,244,190,39,159,9,25,70,8,229,234,48,70,139,231,167,156,121,37,56,110,30,53,175,48,235,185,144,25,199,198,245,207,34,144,190,2,16,169,143, -27,134,182,125,93,231,58,113,59,123,10,174,95,132,174,77,177,73,233,192,11,202,179,130,183,66,41,180,39,183,162,37,210,131,147,239,188,230,92,187,126,253,162,107,153,223,95,48,192,225,195,48,170,58,222,249,194,158,190,53,187,182,237,23,165,242,13,144, -43,16,177,50,208,52,19,85,71,135,82,30,132,111,220,99,44,157,216,130,187,195,215,32,85,112,19,159,100,128,171,21,121,110,112,112,96,195,190,167,191,108,230,10,3,40,59,195,240,131,50,152,21,116,205,66,56,212,134,104,56,3,59,210,9,93,216,184,116,249,125, -217,223,255,19,175,230,58,191,213,157,240,43,39,126,250,81,109,193,19,72,127,169,61,17,107,219,182,117,175,184,118,231,47,176,204,36,66,70,28,82,186,8,148,11,215,45,192,113,199,103,205,190,21,74,97,93,219,110,248,158,133,63,189,254,235,218,229,243,213, -31,206,200,191,253,70,241,151,134,113,161,55,155,29,223,188,99,199,118,171,45,189,139,162,145,24,72,8,248,94,13,149,106,25,35,119,238,242,169,107,239,86,111,222,186,174,73,37,223,204,103,189,163,39,95,43,12,1,152,247,175,233,61,130,53,219,138,88,96,14, -80,169,102,225,212,198,96,232,81,16,9,72,233,193,11,202,144,178,6,211,176,97,219,159,66,170,165,23,186,150,194,185,127,191,231,159,62,211,239,126,112,190,124,244,108,127,249,202,52,1,80,229,98,32,143,31,203,125,119,251,19,206,166,155,31,221,254,98,56, -166,111,38,66,10,128,78,196,142,82,52,226,186,106,96,114,66,158,60,251,55,231,31,249,188,83,157,14,92,76,171,66,147,147,140,123,142,215,95,120,33,109,123,33,237,234,147,123,159,74,127,118,203,227,162,230,230,224,249,147,96,86,83,135,85,134,13,211,140, -3,172,225,206,240,117,12,13,13,185,23,46,13,170,98,206,59,126,250,239,197,227,185,17,233,76,79,140,62,109,95,78,7,211,76,253,5,142,47,12,190,122,168,99,125,44,194,191,48,117,107,111,87,87,183,31,79,198,76,83,215,12,41,165,44,149,74,126,110,108,92,230, -243,5,83,42,57,80,24,149,111,13,156,158,120,119,100,36,168,2,208,102,232,76,219,106,26,164,14,115,63,168,70,218,80,230,187,224,208,246,127,37,157,177,109,218,45,52,108,96,226,136,148,96,25,240,120,185,32,111,12,14,86,175,228,135,189,96,78,208,98,134, -206,5,224,233,192,235,48,117,144,153,48,205,192,154,110,100,247,187,161,209,48,85,10,141,62,155,5,94,15,190,110,155,103,168,154,161,178,137,206,133,153,247,20,111,33,87,76,212,36,112,177,128,224,235,210,12,98,62,144,5,189,205,46,246,142,108,190,224,9, -179,75,103,166,109,198,253,33,20,22,48,227,15,11,48,247,217,58,4,53,208,185,50,23,160,222,19,245,177,7,14,98,57,164,81,9,173,202,255,165,252,23,245,196,220,24,41,245,209,21,73,69,78,68,174,66,96,130,10,0,0 }; +{ 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,48,0,0,0,48,8,6,0,0,0,87,2,249,135,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,7,193,73,68,65,84,104,129,237,153,91,108,156,87,17,199,255,115,190,203,126,123,249,188,23,175,189,78,226, +218,169,35,220,16,18,130,114,171,73,131,210,150,132,23,36,196,67,145,72,218,66,104,171,168,1,245,13,241,24,250,14,130,23,46,226,129,72,136,139,80,130,168,104,5,173,210,86,8,2,86,170,144,80,59,23,154,56,105,154,171,189,94,175,119,215,222,221,111,191,203, +57,195,131,189,173,237,236,58,118,98,27,9,121,164,209,174,142,246,155,153,223,153,153,115,190,61,7,88,149,85,89,149,85,89,149,135,16,250,95,7,48,87,14,28,94,155,38,229,117,67,19,221,138,169,91,215,241,24,49,103,12,87,125,227,216,177,177,201,185,191,215, +87,58,192,231,14,167,215,176,210,186,165,134,110,98,238,214,116,234,21,68,143,49,184,75,74,100,76,67,112,50,209,233,165,91,147,148,76,165,172,68,75,194,56,213,223,239,141,201,82,18,192,242,3,28,60,18,79,194,55,122,32,168,7,132,30,161,137,71,133,38,54, +48,115,143,12,120,29,17,113,162,181,165,150,76,181,106,201,68,194,74,37,83,70,220,78,192,110,73,194,142,38,160,27,33,120,126,201,114,189,18,92,127,2,73,123,3,206,252,235,253,0,98,84,54,242,183,100,0,207,29,233,56,167,148,218,162,11,225,69,147,166,151, +72,218,122,186,53,29,110,137,199,181,120,75,18,182,157,132,29,75,34,108,37,193,44,45,215,159,128,235,149,224,249,19,112,189,81,140,151,135,48,50,94,130,235,79,2,224,143,237,198,194,29,96,48,105,30,113,35,191,75,6,160,192,27,95,122,241,69,61,22,109,213, +117,97,69,92,191,4,215,47,193,243,38,224,250,19,168,184,67,40,148,167,198,148,10,26,218,16,194,64,196,106,67,200,76,192,50,147,176,66,73,8,97,130,21,67,90,164,150,21,0,0,236,72,7,46,223,248,61,92,175,132,153,179,56,91,8,166,97,127,28,100,56,212,138,144, +153,128,161,37,160,164,133,98,105,12,197,194,184,119,183,152,231,190,190,158,144,84,14,24,138,224,104,203,91,66,117,241,131,10,0,134,32,13,166,25,71,56,212,10,211,104,65,56,212,10,43,148,130,169,39,224,213,2,20,138,121,228,115,185,224,234,88,214,203, +229,47,105,197,82,142,29,167,240,161,98,57,224,121,234,159,130,196,143,118,237,220,9,34,64,73,69,225,136,182,252,25,0,128,174,142,167,96,71,58,33,132,133,201,201,60,74,165,60,178,185,113,149,203,253,199,25,205,142,170,177,194,88,152,149,63,12,162,243, +210,87,103,152,232,44,9,92,252,221,207,179,215,49,35,109,7,143,100,126,48,245,141,0,128,68,165,178,50,25,136,88,109,120,235,237,55,156,43,151,47,235,66,224,14,17,6,125,95,189,167,88,92,16,58,46,204,13,244,190,66,4,41,21,249,182,88,153,12,0,132,241,252, +164,82,132,141,191,249,89,246,195,135,183,38,0,98,120,178,113,9,137,135,117,112,175,67,2,152,225,75,173,241,82,243,0,246,88,49,33,20,106,88,66,75,14,0,18,80,12,130,112,27,58,92,188,61,64,177,164,114,96,173,92,6,88,41,10,169,198,235,246,131,88,100,6,61, +226,94,93,25,0,16,65,65,145,84,141,155,110,209,230,64,80,204,180,118,45,86,166,132,8,0,51,35,144,75,3,0,34,128,153,94,125,21,43,148,129,169,38,110,186,241,44,222,154,128,98,213,116,217,93,158,18,98,80,160,202,75,212,3,0,49,175,32,0,0,176,100,127,169, +74,8,4,166,21,204,0,129,32,25,100,7,75,83,66,12,2,113,243,21,109,89,122,128,24,228,251,75,213,3,128,194,10,150,16,129,192,96,170,165,141,37,235,1,172,36,0,8,96,37,9,183,227,75,178,19,51,0,158,103,21,90,150,151,57,102,80,50,121,177,169,211,175,125,187, +45,38,2,218,173,9,236,209,117,218,198,224,22,98,17,7,177,34,240,176,82,116,91,74,101,124,66,208,120,15,88,22,128,250,206,57,81,184,215,233,243,47,103,218,21,243,81,40,124,43,179,182,61,232,221,208,27,109,77,183,107,86,40,2,203,138,34,144,30,2,159,63, +87,46,23,48,81,30,133,166,235,0,3,76,188,52,0,7,143,100,122,56,80,59,72,136,94,34,94,67,68,97,165,212,29,102,92,5,79,151,227,244,206,121,226,4,140,25,246,249,153,67,233,221,138,232,143,125,143,247,197,250,118,238,55,98,209,52,170,181,81,84,156,17,84, +156,81,20,171,31,128,57,0,129,16,141,39,208,150,233,130,235,149,96,26,173,128,122,136,18,250,250,203,29,235,117,129,239,16,248,155,186,102,68,215,118,103,100,91,186,53,106,69,44,161,9,192,15,152,243,185,130,147,29,205,49,17,1,83,77,12,0,225,186,141,207, +239,75,118,134,195,198,235,7,15,28,178,187,58,55,195,113,178,152,172,220,130,31,84,224,122,69,184,94,1,158,95,66,205,29,159,122,160,114,19,0,144,176,123,144,138,237,128,98,229,44,26,224,217,87,82,45,66,25,63,6,232,192,246,109,91,245,77,159,222,106,180, +167,214,195,243,39,225,120,121,120,126,121,122,194,137,204,77,91,34,17,171,13,154,102,64,169,0,196,172,0,68,235,182,30,233,214,190,183,231,137,61,209,116,107,26,183,70,254,10,211,104,129,38,12,248,65,21,53,175,8,207,159,128,231,207,62,179,138,133,215, +160,171,227,105,252,249,205,63,212,0,254,213,162,0,158,127,41,243,40,2,156,218,244,153,222,244,190,39,159,9,25,70,8,229,234,48,70,139,231,167,156,121,37,56,110,30,53,175,48,235,185,144,25,199,198,245,207,34,144,190,2,16,169,143,27,134,182,125,93,231, +58,113,59,123,10,174,95,132,174,77,177,73,233,192,11,202,179,130,183,66,41,180,39,183,162,37,210,131,147,239,188,230,92,187,126,253,162,107,153,223,95,48,192,225,195,48,170,58,222,249,194,158,190,53,187,182,237,23,165,242,13,144,43,16,177,50,208,52,19, +85,71,135,82,30,132,111,220,99,44,157,216,130,187,195,215,32,85,112,19,159,100,128,171,21,121,110,112,112,96,195,190,167,191,108,230,10,3,40,59,195,240,131,50,152,21,116,205,66,56,212,134,104,56,3,59,210,9,93,216,184,116,249,125,217,223,255,19,175,230, +58,191,213,157,240,43,39,126,250,81,109,193,0,19,72,127,169,61,17,107,219,182,117,175,184,118,231,47,176,204,36,66,70,28,82,186,8,148,11,215,45,192,113,199,103,205,190,21,74,97,93,219,110,248,158,133,63,189,254,235,218,229,243,213,31,206,200,0,191,253, +70,241,151,134,113,161,55,155,29,223,188,99,199,118,171,45,189,139,162,145,24,72,8,248,94,13,149,106,25,35,119,238,242,169,107,239,86,111,222,186,174,73,37,223,204,103,189,163,39,95,43,12,1,152,247,175,233,61,0,130,53,219,138,88,96,14,80,169,102,225, +212,198,96,232,81,16,9,72,233,193,11,202,144,178,6,211,176,97,219,159,66,170,165,23,186,150,194,185,127,191,231,159,62,211,239,126,112,190,124,244,108,127,249,202,52,0,1,80,229,98,32,143,31,203,125,119,251,19,206,166,155,31,221,254,98,56,166,111,38,66, +10,128,78,196,142,82,52,226,186,106,96,114,66,158,60,251,55,231,31,249,188,83,157,14,92,76,171,66,147,147,140,123,142,215,95,120,33,109,123,33,237,234,147,123,159,74,127,118,203,227,162,230,230,224,249,147,96,86,83,135,85,134,13,211,140,3,172,225,206, +240,117,12,13,13,185,23,46,13,170,98,206,59,126,250,239,197,227,185,17,233,76,79,140,62,109,95,78,7,211,76,253,5,142,47,12,0,0,190,122,168,99,125,44,194,191,48,117,107,111,87,87,183,31,79,198,76,83,215,12,41,165,44,149,74,126,110,108,92,230,243,5,83, +42,57,80,24,149,111,13,156,158,120,119,100,36,168,2,208,102,232,76,219,106,26,164,14,115,63,168,70,218,80,230,187,224,208,246,127,37,157,177,109,218,45,52,108,96,226,136,148,96,25,240,120,185,32,111,12,14,86,175,228,135,189,96,78,208,98,134,206,5,224, +233,192,235,48,117,144,153,48,205,192,154,110,100,247,187,161,209,48,85,10,141,62,155,5,94,15,190,110,155,103,168,154,161,178,137,206,133,153,247,20,111,33,87,76,212,36,112,177,128,224,235,210,12,98,62,144,5,189,205,46,246,142,108,190,224,9,179,75,103, +166,109,198,253,33,20,22,48,227,15,11,48,247,217,58,4,53,208,185,50,23,160,222,19,245,177,7,14,98,57,164,81,9,173,202,255,165,252,23,245,196,220,24,41,245,209,21,0,0,0,0,73,69,78,68,174,66,96,130,0,0 }; const char* audioxgeneric_png = (const char*) temp_binary_data_0; @@ -62,7 +51,7 @@ const char* getNamedResource (const char* resourceNameUTF8, int& numBytes) switch (hash) { - case 0xad59371f: numBytes = 2814; return audioxgeneric_png; + case 0xad59371f: numBytes = 2060; return audioxgeneric_png; default: break; } diff --git a/JuceLibraryCode/BinaryData.h b/JuceLibraryCode/BinaryData.h index 3fe13d9..e9c88a4 100644 --- a/JuceLibraryCode/BinaryData.h +++ b/JuceLibraryCode/BinaryData.h @@ -9,7 +9,7 @@ namespace BinaryData { extern const char* audioxgeneric_png; - const int audioxgeneric_pngSize = 2814; + const int audioxgeneric_pngSize = 2060; // Number of elements in the namedResourceList and originalFileNames arrays. const int namedResourceListSize = 1; diff --git a/JuceLibraryCode/JuceHeader.h b/JuceLibraryCode/JuceHeader.h index 0e48496..e7768ba 100644 --- a/JuceLibraryCode/JuceHeader.h +++ b/JuceLibraryCode/JuceHeader.h @@ -37,7 +37,7 @@ #if ! JUCE_DONT_DECLARE_PROJECTINFO namespace ProjectInfo { - const char* const projectName = "JuceBoilerplate"; + const char* const projectName = "AudioTagToo"; const char* const versionString = "0.0.1"; const int versionNumber = 0x1; } diff --git a/LICENSES.md b/LICENSES.md index 07a636a..9f3a19c 100644 --- a/LICENSES.md +++ b/LICENSES.md @@ -1,18 +1,18 @@ -The original audio, video, and image files in the JuceAudio Assets/ directory are licensed under +The original audio, video, and image files in the AudioTagToo Assets/ directory are licensed under [version 3 of the GNU General Public License](Assets/COPYING_ASSETS), or any later version. See [Assets/README.md](Assets/README.md) for details. -The documentation files in the JuceAudio Documentation/ directory are licensed under +The documentation files in the AudioTagToo Documentation/ directory are licensed under [version 3 of the GNU General Public License](Documentation/COPYING_DOCUMENTATION), or any later version. See [Documentation/README.md](Documentation/README.md) for details. -The source code files in the JuceAudio JuceLibraryCode/ directory are licensed under +The source code files in the AudioTagToo JuceLibraryCode/ directory are licensed under [version 3 of the GNU General Public License](COPYING), or any later version, per the option: > Permission is granted to use this software under the terms of either: > a) the GPL v2 (or any later version) > b) the Affero GPL v3 -The source code files in the JuceAudio Source/ directory are licensed under +The source code files in the AudioTagToo Source/ directory are licensed under [version 3 of the GNU General Public License](COPYING), or any later version. The original inspiration for this application was Cedric Roux's Public Domain audiotag program. diff --git a/README.md b/README.md index b0ca25c..4335aa8 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ #### Arch, Parabola: ``` ### build and install with makepkg ### -$ wget https://raw.githubusercontent.com/bill-auger/juce-boilerplate/master/Builds/Packaging/PKGBUILD +$ wget https://raw.githubusercontent.com/bill-auger/audio-tag-too/master/Builds/Packaging/PKGBUILD # makepkg -sri ./PKGBUILD ``` @@ -26,7 +26,7 @@ $ make $ sudo make install ### run ### -$ juce-boilerplate +$ audio-tag-too ``` #### Fedora: @@ -45,7 +45,7 @@ $ make $ su -c "make install" ### run ### -$ juce-boilerplate +$ audio-tag-too ``` #### OpenSuse Leap >= 42, OpenSuse Tumbleweed, Suse SLE >= 12: @@ -63,7 +63,7 @@ $ make $ sudo make install ### run ### -$ juce-boilerplate +$ audio-tag-too ``` #### Other GNU/Linux: diff --git a/Source/Constants/AppConstants.cpp b/Source/Constants/AppConstants.cpp index 9426fc3..ee13ebb 100644 --- a/Source/Constants/AppConstants.cpp +++ b/Source/Constants/AppConstants.cpp @@ -1,33 +1,32 @@ /*\ -|*| JuceBoilerplate - JUCE boilerplate audio player GUI application -|*| Copyright 2018 bill-auger +|*| AudioTagToo - Clip and stitch audio samples +|*| Copyright 2018 bill-auger |*| -|*| This file is part of the JuceBoilerplate program. +|*| This file is part of the AudioTagToo program. |*| -|*| JuceBoilerplate is free software: you can redistribute it and/or modify +|*| AudioTagToo is free software: you can redistribute it and/or modify |*| it under the terms of the GNU General Public License as published by |*| the Free Software Foundation, either version 3 of the License, or |*| (at your option) any later version. |*| -|*| JuceBoilerplate is distributed in the hope that it will be useful, +|*| AudioTagToo is distributed in the hope that it will be useful, |*| but WITHOUT ANY WARRANTY; without even the implied warranty of |*| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |*| GNU General Public License for more details. |*| |*| You should have received a copy of the GNU General Public License -|*| along with JuceBoilerplate. If not, see . +|*| along with AudioTagToo. If not, see . \*/ - #include "AppConstants.h" // names and IDs const String APP::APP_NAME = ProjectInfo::projectName ; const String APP::APP_VERSION = ProjectInfo::versionString ; -const String APP::APP_CMD = "juce-boilerplate" ; -const String APP::WORKER_THREAD_NAME = "juceboilerplate-worker" ; +const String APP::APP_CMD = "audio-tag-too" ; +const String APP::WORKER_THREAD_NAME = "audiotagtoo-worker" ; const String APP::DIGITS = "0123456789" ; const String APP::LETTERS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" ; const String APP::ALPHANUMERIC = DIGITS + LETTERS ; @@ -44,7 +43,7 @@ const String APP::CLI_FPS_TOKEN = "--fps" ; // runtime constants #define APP_CMD_PAD String("").paddedLeft(' ' , APP_CMD.length()) const StringArray APP::CLI_USAGE_MSG = StringArray::fromLines( - String("JuceAudio Usage:\n") + + String("AudioTagToo Usage:\n") + "\n\t" + APP_CMD + " [ " + CLI_HELP_TOKEN + " | " + CLI_VERSION_TOKEN + " ]" + "\n\t" + APP_CMD + " [ " + CLI_DIR_TOKEN + " ]" + @@ -57,10 +56,10 @@ const StringArray APP::CLI_USAGE_MSG = StringArray::fromLines( "\n\n\t\t" + CLI_FPS_TOKEN + " " + "\n\t\t\tstarts " + APP_NAME + " with N frames per second graphics update" ) ; // filesystem -const String APP::IconFilename() { return APP_CMD + ".png" ; } -const String APP::DesktopFilename() { return APP_CMD + ".desktop" ; } +const String APP::IconFilename() { return APP_CMD + ".png" ; } +const String APP::DesktopFilename() { return APP_CMD + ".desktop" ; } const String APP::IconsPath() { return ".local/share/icons/hicolor/48x48/apps/" ; } -const String APP::AppsPath() { return ".local/share/applications/" ; } +const String APP::AppsPath() { return ".local/share/applications/" ; } const File APP::HomeDir() { return File::getSpecialLocation(File::userHomeDirectory ) ; } const File APP::MusicDir() { return File::getSpecialLocation(File::userMusicDirectory ) ; } const File APP::AppdataDir() { return File::getSpecialLocation(File::userApplicationDataDirectory) ; } @@ -68,7 +67,7 @@ const File APP::BinFile() { return File::getSpecialLocation(File::curr const File APP::IconFile() { return HomeDir().getChildFile (IconsPath() + IconFilename() ) ; } const File APP::DesktopFile() { return HomeDir().getChildFile (AppsPath() + DesktopFilename()) ; } const String APP::DesktopFileText() { return String("[Desktop Entry]\r\n") + - "Name=JuceBoilerplate\r\n" + + "Name=AudioTagToo\r\n" + "GenericName=\r\n" + "Comment=\r\n" + "Categories=AudioVideo;\r\n" + diff --git a/Source/Constants/AppConstants.h b/Source/Constants/AppConstants.h index 81da2ef..cb77d31 100644 --- a/Source/Constants/AppConstants.h +++ b/Source/Constants/AppConstants.h @@ -1,21 +1,21 @@ /*\ -|*| JuceBoilerplate - JUCE boilerplate audio player GUI application -|*| Copyright 2018 bill-auger +|*| AudioTagToo - Clip and stitch audio samples +|*| Copyright 2018 bill-auger |*| -|*| This file is part of the JuceBoilerplate program. +|*| This file is part of the AudioTagToo program. |*| -|*| JuceBoilerplate is free software: you can redistribute it and/or modify +|*| AudioTagToo is free software: you can redistribute it and/or modify |*| it under the terms of the GNU General Public License as published by |*| the Free Software Foundation, either version 3 of the License, or |*| (at your option) any later version. |*| -|*| JuceBoilerplate is distributed in the hope that it will be useful, +|*| AudioTagToo is distributed in the hope that it will be useful, |*| but WITHOUT ANY WARRANTY; without even the implied warranty of |*| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |*| GNU General Public License for more details. |*| |*| You should have received a copy of the GNU General Public License -|*| along with JuceBoilerplate. If not, see . +|*| along with AudioTagToo. If not, see . \*/ diff --git a/Source/Constants/GuiConstants.cpp b/Source/Constants/GuiConstants.cpp index 073bd18..8de0fe0 100644 --- a/Source/Constants/GuiConstants.cpp +++ b/Source/Constants/GuiConstants.cpp @@ -1,21 +1,21 @@ /*\ -|*| JuceBoilerplate - JUCE boilerplate audio player GUI application -|*| Copyright 2018 bill-auger +|*| AudioTagToo - Clip and stitch audio samples +|*| Copyright 2018 bill-auger |*| -|*| This file is part of the JuceBoilerplate program. +|*| This file is part of the AudioTagToo program. |*| -|*| JuceBoilerplate is free software: you can redistribute it and/or modify +|*| AudioTagToo is free software: you can redistribute it and/or modify |*| it under the terms of the GNU General Public License as published by |*| the Free Software Foundation, either version 3 of the License, or |*| (at your option) any later version. |*| -|*| JuceBoilerplate is distributed in the hope that it will be useful, +|*| AudioTagToo is distributed in the hope that it will be useful, |*| but WITHOUT ANY WARRANTY; without even the implied warranty of |*| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |*| GNU General Public License for more details. |*| |*| You should have received a copy of the GNU General Public License -|*| along with JuceBoilerplate. If not, see . +|*| along with AudioTagToo. If not, see . \*/ @@ -50,8 +50,8 @@ const Colour GUI::HEAD_COLOR = Colour(0xFF8080FF) ; const Colour GUI::TAIL_COLOR = Colour(0xFFFF8080) ; const uint8 GUI::COURSE_FPS = 8 ; const uint8 GUI::FINE_FPS = 12 ; -const String GUI::UPPER_WAVEFORM_ID = "waveform-upper" ; -const String GUI::LOWER_WAVEFORM_ID = "waveform-lower" ; +const String GUI::FULL_WAVEFORM_ID = "full-waveform" ; +const String GUI::CLIP_WAVEFORM_ID = "clip-waveform" ; const String GUI::NO_FILE_TEXT = "(No audio file selected)" ; // user messages diff --git a/Source/Constants/GuiConstants.h b/Source/Constants/GuiConstants.h index 5435cf3..5c2d5d2 100644 --- a/Source/Constants/GuiConstants.h +++ b/Source/Constants/GuiConstants.h @@ -1,21 +1,21 @@ /*\ -|*| JuceBoilerplate - JUCE boilerplate audio player GUI application -|*| Copyright 2018 bill-auger +|*| AudioTagToo - Clip and stitch audio samples +|*| Copyright 2018 bill-auger |*| -|*| This file is part of the JuceBoilerplate program. +|*| This file is part of the AudioTagToo program. |*| -|*| JuceBoilerplate is free software: you can redistribute it and/or modify +|*| AudioTagToo is free software: you can redistribute it and/or modify |*| it under the terms of the GNU General Public License as published by |*| the Free Software Foundation, either version 3 of the License, or |*| (at your option) any later version. |*| -|*| JuceBoilerplate is distributed in the hope that it will be useful, +|*| AudioTagToo is distributed in the hope that it will be useful, |*| but WITHOUT ANY WARRANTY; without even the implied warranty of |*| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |*| GNU General Public License for more details. |*| |*| You should have received a copy of the GNU General Public License -|*| along with JuceBoilerplate. If not, see . +|*| along with AudioTagToo. If not, see . \*/ @@ -58,8 +58,8 @@ public: static const Colour TAIL_COLOR ; static const uint8 COURSE_FPS ; static const uint8 FINE_FPS ; - static const String UPPER_WAVEFORM_ID ; - static const String LOWER_WAVEFORM_ID ; + static const String FULL_WAVEFORM_ID ; + static const String CLIP_WAVEFORM_ID ; static const String NO_FILE_TEXT ; // user messages diff --git a/Source/Constants/MediaConstants.cpp b/Source/Constants/MediaConstants.cpp index d47c2d7..9913fa4 100644 --- a/Source/Constants/MediaConstants.cpp +++ b/Source/Constants/MediaConstants.cpp @@ -1,28 +1,27 @@ /*\ -|*| JuceBoilerplate - JUCE boilerplate audio player GUI application -|*| Copyright 2018 bill-auger +|*| AudioTagToo - Clip and stitch audio samples +|*| Copyright 2018 bill-auger |*| -|*| This file is part of the JuceBoilerplate program. +|*| This file is part of the AudioTagToo program. |*| -|*| JuceBoilerplate is free software: you can redistribute it and/or modify +|*| AudioTagToo is free software: you can redistribute it and/or modify |*| it under the terms of the GNU General Public License as published by |*| the Free Software Foundation, either version 3 of the License, or |*| (at your option) any later version. |*| -|*| JuceBoilerplate is distributed in the hope that it will be useful, +|*| AudioTagToo is distributed in the hope that it will be useful, |*| but WITHOUT ANY WARRANTY; without even the implied warranty of |*| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |*| GNU General Public License for more details. |*| |*| You should have received a copy of the GNU General Public License -|*| along with JuceBoilerplate. If not, see . +|*| along with AudioTagToo. If not, see . \*/ #include "MediaConstants.h" -const uint8 MEDIA::N_CHANNELS_IN = 2 ; const uint8 MEDIA::N_CHANNELS_OUT = 2 ; const String MEDIA::IMPORT_WAVEFILE_MASK = "*.wav;*.aiff" ; const String MEDIA::IMPORT_WAVEFILE_DESC = "Uncompressed Audio files" ; diff --git a/Source/Constants/MediaConstants.h b/Source/Constants/MediaConstants.h index d676723..83e8e86 100644 --- a/Source/Constants/MediaConstants.h +++ b/Source/Constants/MediaConstants.h @@ -1,21 +1,21 @@ /*\ -|*| JuceBoilerplate - JUCE boilerplate audio player GUI application -|*| Copyright 2018 bill-auger +|*| AudioTagToo - Clip and stitch audio samples +|*| Copyright 2018 bill-auger |*| -|*| This file is part of the JuceBoilerplate program. +|*| This file is part of the AudioTagToo program. |*| -|*| JuceBoilerplate is free software: you can redistribute it and/or modify +|*| AudioTagToo is free software: you can redistribute it and/or modify |*| it under the terms of the GNU General Public License as published by |*| the Free Software Foundation, either version 3 of the License, or |*| (at your option) any later version. |*| -|*| JuceBoilerplate is distributed in the hope that it will be useful, +|*| AudioTagToo is distributed in the hope that it will be useful, |*| but WITHOUT ANY WARRANTY; without even the implied warranty of |*| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |*| GNU General Public License for more details. |*| |*| You should have received a copy of the GNU General Public License -|*| along with JuceBoilerplate. If not, see . +|*| along with AudioTagToo. If not, see . \*/ @@ -30,7 +30,6 @@ class MEDIA { public: - static const uint8 N_CHANNELS_IN ; static const uint8 N_CHANNELS_OUT ; static const String IMPORT_WAVEFILE_MASK ; static const String IMPORT_WAVEFILE_DESC ; diff --git a/Source/Constants/StorageConstants.cpp b/Source/Constants/StorageConstants.cpp index 48ec22f..a6ae689 100644 --- a/Source/Constants/StorageConstants.cpp +++ b/Source/Constants/StorageConstants.cpp @@ -1,25 +1,24 @@ /*\ -|*| JuceBoilerplate - JUCE boilerplate audio player GUI application -|*| Copyright 2018 bill-auger +|*| AudioTagToo - Clip and stitch audio samples +|*| Copyright 2018 bill-auger |*| -|*| This file is part of the JuceBoilerplate program. +|*| This file is part of the AudioTagToo program. |*| -|*| JuceBoilerplate is free software: you can redistribute it and/or modify +|*| AudioTagToo is free software: you can redistribute it and/or modify |*| it under the terms of the GNU General Public License as published by |*| the Free Software Foundation, either version 3 of the License, or |*| (at your option) any later version. |*| -|*| JuceBoilerplate is distributed in the hope that it will be useful, +|*| AudioTagToo is distributed in the hope that it will be useful, |*| but WITHOUT ANY WARRANTY; without even the implied warranty of |*| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |*| GNU General Public License for more details. |*| |*| You should have received a copy of the GNU General Public License -|*| along with JuceBoilerplate. If not, see . +|*| along with AudioTagToo. If not, see . \*/ - #include "StorageConstants.h" @@ -47,8 +46,8 @@ const StringArray STORE::RootKeys() { return StringArray::fromLines(R ROOT_TRANSIENT_IDS ) ; } // storage nodes -const Identifier STORE::STORAGE_ID = "juce-boilerplate-config" ; -const Identifier STORE::DEVICE_XML_ID = "juce-boilerplate-device-config" ; +const Identifier STORE::STORAGE_ID = "audio-tag-too-config" ; +const Identifier STORE::DEVICE_XML_ID = "audio-tag-too-device-config" ; // root IDs const Identifier STORE::CONFIG_VERSION_KEY = "config-version" ; diff --git a/Source/Constants/StorageConstants.h b/Source/Constants/StorageConstants.h index 6bede35..0db8eb2 100644 --- a/Source/Constants/StorageConstants.h +++ b/Source/Constants/StorageConstants.h @@ -1,21 +1,21 @@ /*\ -|*| JuceBoilerplate - JUCE boilerplate audio player GUI application -|*| Copyright 2018 bill-auger +|*| AudioTagToo - Clip and stitch audio samples +|*| Copyright 2018 bill-auger |*| -|*| This file is part of the JuceBoilerplate program. +|*| This file is part of the AudioTagToo program. |*| -|*| JuceBoilerplate is free software: you can redistribute it and/or modify +|*| AudioTagToo is free software: you can redistribute it and/or modify |*| it under the terms of the GNU General Public License as published by |*| the Free Software Foundation, either version 3 of the License, or |*| (at your option) any later version. |*| -|*| JuceBoilerplate is distributed in the hope that it will be useful, +|*| AudioTagToo is distributed in the hope that it will be useful, |*| but WITHOUT ANY WARRANTY; without even the implied warranty of |*| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |*| GNU General Public License for more details. |*| |*| You should have received a copy of the GNU General Public License -|*| along with JuceBoilerplate. If not, see . +|*| along with AudioTagToo. If not, see . \*/ diff --git a/Source/Main.cpp b/Source/Main.cpp index 61ed837..6e02f38 100644 --- a/Source/Main.cpp +++ b/Source/Main.cpp @@ -1,43 +1,54 @@ /*\ -|*| JuceBoilerplate - JUCE boilerplate audio player GUI application -|*| Copyright 2018 bill-auger +|*| AudioTagToo - Clip and stitch audio samples +|*| Copyright 2018 bill-auger |*| -|*| This file is part of the JuceBoilerplate program. +|*| This file is part of the AudioTagToo program. |*| -|*| JuceBoilerplate is free software: you can redistribute it and/or modify +|*| AudioTagToo is free software: you can redistribute it and/or modify |*| it under the terms of the GNU General Public License as published by |*| the Free Software Foundation, either version 3 of the License, or |*| (at your option) any later version. |*| -|*| JuceBoilerplate is distributed in the hope that it will be useful, +|*| AudioTagToo is distributed in the hope that it will be useful, |*| but WITHOUT ANY WARRANTY; without even the implied warranty of |*| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |*| GNU General Public License for more details. |*| |*| You should have received a copy of the GNU General Public License -|*| along with JuceBoilerplate. If not, see . +|*| along with AudioTagToo. If not, see . \*/ #include "Constants/AppConstants.h" #include "Constants/GuiConstants.h" #include "Views/MainContent.h" +#include "Trace/TraceMain.h" -class JuceBoilerplateApplication : public JUCEApplication +class AudioTagTooApplication : public JUCEApplication { public: - JuceBoilerplateApplication() {} + AudioTagTooApplication() {} + void initialise(const String& commandLine) override { +DEBUG_TRACE_INIT_VERSION + this->mainWindow.reset(new MainWindow()) ; - if (! true /*JuceBoilerplate::Init()*/) { setApplicationReturnValue(255) ; quit() ; } + if (! true /*AudioTagToo::Init()*/) { setApplicationReturnValue(255) ; quit() ; } } - void shutdown() override { this->mainWindow = nullptr ; } + void shutdown() override + { +DEBUG_TRACE_SHUTDOWN_IN + + this->mainWindow = nullptr ; + +DEBUG_TRACE_SHUTDOWN_OUT + } void systemRequestedQuit() override { quit() ; } @@ -95,4 +106,4 @@ private: } ; -START_JUCE_APPLICATION(JuceBoilerplateApplication) +START_JUCE_APPLICATION(AudioTagTooApplication) diff --git a/Source/Models/AudioTagTooStore.cpp b/Source/Models/AudioTagTooStore.cpp new file mode 100644 index 0000000..1ad1aed --- /dev/null +++ b/Source/Models/AudioTagTooStore.cpp @@ -0,0 +1,375 @@ +/*\ +|*| AudioTagToo - Clip and stitch audio samples +|*| Copyright 2018 bill-auger +|*| +|*| This file is part of the AudioTagToo program. +|*| +|*| AudioTagToo is free software: you can redistribute it and/or modify +|*| it under the terms of the GNU General Public License as published by +|*| the Free Software Foundation, either version 3 of the License, or +|*| (at your option) any later version. +|*| +|*| AudioTagToo is distributed in the hope that it will be useful, +|*| but WITHOUT ANY WARRANTY; without even the implied warranty of +|*| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +|*| GNU General Public License for more details. +|*| +|*| You should have received a copy of the GNU General Public License +|*| along with AudioTagToo. If not, see . +\*/ + + +#include "AudioTagTooStore.h" +#include "Seeds.h" +#include "../Constants/AppConstants.h" +#include "../Constants/GuiConstants.h" +#include "../Constants/StorageConstants.h" +#include "../Trace/TraceAudioTagTooStore.h" + + +/* AudioTagTooStore public instance methods */ + +AudioTagTooStore::~AudioTagTooStore() { } + + +/* AudioTagTooStore private instance methods */ + +/* initialization */ + +AudioTagTooStore::AudioTagTooStore() { } + +bool AudioTagTooStore::initialize() +{ + // create shared config ValueTree from persistent storage or defaults + loadConfig() ; verifyConfig() ; + + listen(true) ; + + return true ; +} + +void AudioTagTooStore::teardown() { listen(false) ; storeConfig(this->deviceStateXml.get()) ; } + + +/* validations */ + +void AudioTagTooStore::verifyConfig() +{ + // verify or reset stored configuration + bool was_storage_found = this->root.isValid() ; + bool is_root_valid = this->root.hasType(STORE::STORAGE_ID) ; + bool has_canonical_nodes = !hasDuplicatedNodes(this->root) ; + if (!was_storage_found || !is_root_valid) this->root = Seeds::DefaultStore() ; + else if (!has_canonical_nodes ) removeConflictedNodes(this->root , String::empty) ; + + // verify schema version + int stored_version = int(this->root[STORE::CONFIG_VERSION_KEY]) ; + bool do_versions_match = stored_version == STORE::CONFIG_VERSION ; + if (!do_versions_match) + { + // NYI: convert (if ever necessary) + File parent_dir = this->storageFile.getParentDirectory() ; + File backup_file = parent_dir.getNonexistentChildFile(STORE::STORAGE_FILENAME , ".bak" , false) ; + this->storageFile.copyFileTo(backup_file) ; + + this->root.removeProperty(STORE::CONFIG_VERSION_KEY , nullptr) ; + } + +DEBUG_TRACE_VERIFY_STORED_CONFIG +} + +void AudioTagTooStore::verifyRoot() +{ + // ensure missing properties exist + verifyRootProperty(STORE::CONFIG_VERSION_KEY , var(STORE::CONFIG_VERSION)) ; +} + +void AudioTagTooStore::sanitizeRoot() +{ + // filter any rogue data + filterRogueKeys (this->root , STORE::RootPersistentKeys ()) ; + filterRogueNodes(this->root , STORE::RootPersistentNodes()) ; +} + +/* validation/sanitization helpers */ + +void AudioTagTooStore::verifyChildNode(ValueTree store , Identifier node_id) +{ +DEBUG_TRACE_VERIFY_MISSING_NODE + + if (!store.getChildWithName(node_id).isValid()) + store.addChild(ValueTree(node_id) , -1 , nullptr) ; +} + +void AudioTagTooStore::verifyRootChildNode(Identifier node_id) +{ + verifyChildNode(this->root , node_id) ; +} + +void AudioTagTooStore::verifyProperty(ValueTree store , Identifier key , var default_value) +{ +DEBUG_TRACE_VERIFY_MISSING_PROPERTY + + if (!store.hasProperty(key)) store.setProperty(key , default_value , nullptr) ; +} + +void AudioTagTooStore::verifyRootProperty(Identifier key , var default_value) +{ + verifyProperty(this->root , key , default_value) ; +} + +bool AudioTagTooStore::hasDuplicatedNodes(ValueTree stored_config) +{ + StringArray root_node_ids = STORE::RootPersistentNodes() ; + int n_duplicated_nodes = 0 ; + bool has_duplicates = false ; + + n_duplicated_nodes = nDuplicatedNodes(stored_config , root_node_ids) ; + has_duplicates = has_duplicates || n_duplicated_nodes > root_node_ids.size() ; + + return has_duplicates ; +} + +int AudioTagTooStore::nDuplicatedNodes(ValueTree parent_node , StringArray node_ids) +{ + int n_duplicated_nodes = 0 ; + + for (int node_n = 0 ; node_n < node_ids.size() ; ++node_n) + { + Identifier node_id = STORE::FilterId(node_ids[node_n]) ; + + for (int child_n = 0 ; child_n < parent_node.getNumChildren() ; ++child_n) + if (parent_node.getChild(child_n).hasType(node_id)) ++n_duplicated_nodes ; + } + + return n_duplicated_nodes ; +} + +void AudioTagTooStore::removeConflictedNodes(ValueTree parent_node , Identifier node_id) +{ + ValueTree node ; + while ((node = parent_node.getChildWithName(node_id)).isValid()) + parent_node.removeChild(node , nullptr) ; +} + +void AudioTagTooStore::filterRogueKeys(ValueTree parent_node , StringArray persistent_keys) +{ + for (int key_n = 0 ; key_n < parent_node.getNumProperties() ; ++key_n) + { + String property_id = STRING(parent_node.getPropertyName(key_n)) ; + +DEBUG_TRACE_FILTER_ROGUE_KEY + + if (!persistent_keys.contains(property_id)) + parent_node.removeProperty( property_id , nullptr) ; + } +} + +void AudioTagTooStore::filterRogueNodes(ValueTree parent_node , StringArray persistent_node_ids) +{ + for (int child_n = 0 ; child_n < parent_node.getNumChildren() ; ++child_n) + { + String node_id = STRING(parent_node.getChild(child_n).getType()) ; + +DEBUG_TRACE_FILTER_ROGUE_NODE + + if (!persistent_node_ids.contains(node_id)) + parent_node.removeChild(child_n , nullptr) ; + } +} + +void AudioTagTooStore::sanitizeIntProperty(ValueTree store , Identifier key , + int min_value , int max_value) +{ + int value = int(store[key]) ; + + if (value < min_value || value > max_value) store.removeProperty(key , nullptr) ; + +DEBUG_TRACE_SANITIZE_INT_PROPERTY +} + +void AudioTagTooStore::sanitizeComboProperty(ValueTree store , Identifier key , + StringArray options ) +{ + sanitizeIntProperty(store , key , 0 , options.size() - 1) ; +} + + +/* persistence */ + +void AudioTagTooStore::loadConfig() +{ + // load application configuration from persistent storage + File storage_dir = APP::AppdataDir().getChildFile(STORE::STORAGE_DIRNAME ) ; + this->deviceXmlFile = storage_dir .getChildFile(STORE::DEVICE_FILENAME ) ; +#ifdef STORAGE_IS_BINARY + this->storageFile = storage_dir .getChildFile(STORE::STORAGE_FILENAME) ; + FileInputStream* storage = new FileInputStream(this->storageFile) ; + this->root = (storage->openedOk()) ? ValueTree::readFromStream(*storage) : + ValueTree::invalid ; + delete storage ; +#else // STORAGE_IS_BINARY + this->storageFile = + this->storageXmlFile = storage_dir .getChildFile(STORE::STORAGE_FILENAME) ; + XmlElement* storage_xml = XmlDocument::parse(this->storageXmlFile) ; + this->root = (storage_xml != nullptr) ? ValueTree::fromXml(*storage_xml) : + ValueTree::invalid ; + delete storage_xml ; +#endif // STORAGE_IS_BINARY + + // load audio device configuration from persistent storage + this->deviceStateXml.reset(XmlDocument::parse(this->deviceXmlFile)) ; + bool is_config_valid = (this->deviceStateXml.get() != nullptr && + this->deviceStateXml.get()->hasTagName(STORE::DEVICE_XML_ID)) ; + if (!is_config_valid) this->deviceStateXml.reset() ; +} + +bool AudioTagTooStore::storeConfig(XmlElement* device_state_xml) +{ +DEBUG_TRACE_STORE_CONFIG + + // prepare storage directory + File temp_file = this->storageFile.getSiblingFile(STORE::STORAGE_FILENAME + ".temp") ; + if (temp_file.create().failed() || !temp_file.deleteFile()) + { +#ifdef HAS_MAIN_CONTROLLER + AudioTagToo::Error(GUI::FILESYSTEM_WRITE_ERROR_MSG) ; +#else // HAS_MAIN_CONTROLLER + Trace::TraceError(GUI::FILESYSTEM_WRITE_ERROR_MSG) ; +#endif // HAS_MAIN_CONTROLLER + + return false ; + } + +DEBUG_TRACE_DUMP_STORE(this->root , "root") + + if (this->root.isValid()) + { +#ifdef STORAGE_IS_BINARY + +DEBUG_WRITE_STORE_XML(this->root , "root") + + // marshall application configuration out to persistent binary storage + FileOutputStream* storage_stream = new FileOutputStream(temp_file) ; + if (!storage_stream->failedToOpen()) + { + this->root.writeToStream(*storage_stream) ; + storage_stream->flush() ; + temp_file.moveFileTo(this->storageFile) ; + delete storage_stream ; + } + else + { + #ifdef HAS_MAIN_CONTROLLER + AudioTagToo::Error(GUI::STORAGE_WRITE_ERROR_MSG + "application configuration") ; + #else // HAS_MAIN_CONTROLLER + Trace::TraceError(GUI::STORAGE_WRITE_ERROR_MSG + "application configuration") ; + #endif // HAS_MAIN_CONTROLLER + delete storage_stream ; + + return false ; + } + +#else // STORAGE_IS_BINARY + + // marshall application configuration out to persistent XML storage + XmlElement* storage_xml = this->root.createXml() ; + if (storage_xml->writeToFile(this->storageXmlFile , StringRef() , StringRef("UTF-8") , 0)) + delete storage_xml ; + else + { +#ifdef HAS_MAIN_CONTROLLER + AudioTagToo::Error(GUI::STORAGE_WRITE_ERROR_MSG + "application configuration") ; +#else // HAS_MAIN_CONTROLLER + Trace::TraceError(GUI::STORAGE_WRITE_ERROR_MSG + "application configuration") ; +#endif // HAS_MAIN_CONTROLLER + delete storage_xml ; + + return false ; + } + +#endif // STORAGE_IS_BINARY + } + + // marshall audio device configuration out to persistent XML storage + if (device_state_xml != nullptr) + { + if (device_state_xml->writeToFile(temp_file , String::empty)) + { + this->deviceStateXml.reset(device_state_xml) ; + temp_file.moveFileTo(this->deviceXmlFile) ; + delete device_state_xml ; + } + else + { + if (device_state_xml != this->deviceStateXml.get()) delete device_state_xml ; +#ifdef HAS_MAIN_CONTROLLER + JuceBoilerplate::Error(GUI::STORAGE_WRITE_ERROR_MSG + "audio device configuration") ; +#else // HAS_MAIN_CONTROLLER + Trace::TraceError(GUI::STORAGE_WRITE_ERROR_MSG + "audio device configuration") ; +#endif // HAS_MAIN_CONTROLLER + + return false ; + } + } + + return true ; +} + + +/* event handlers */ + +void AudioTagTooStore::listen(bool should_listen) +{ +#ifdef HAS_MAIN_CONTROLLER + if (!AudioTagToo::IsInitialized) return ; +#endif // HAS_MAIN_CONTROLLER + +DEBUG_TRACE_LISTEN + + if (should_listen) { this->root.addListener (this) ; } + else { this->root.removeListener(this) ; } +} + +void AudioTagTooStore::valueTreePropertyChanged(ValueTree& node , const Identifier& key) +{ +DEBUG_TRACE_CONFIG_TREE_CHANGED + +#ifdef HAS_MAIN_CONTROLLER + AudioTagToo::HandleConfigChanged(key) ; +#endif // HAS_MAIN_CONTROLLER +} + + +/* getters/setters */ + +bool AudioTagTooStore::isKnownProperty(ValueTree node , const Identifier& key) +{ + ValueTree parent_node = node.getParent() ; + + return (node == this->root) ? STORE::RootKeys().contains(key) : + false ; +} + +void AudioTagTooStore::setProperty(ValueTree node , const Identifier& key , + const var value ) +{ +DEBUG_TRACE_SET_PROPERTY + + if (node.isValid()) node.setProperty(key , value , nullptr) ; +} + +void AudioTagTooStore::setConfig(ValueTree config_node , const Identifier& key , + const var value ) +{ +DEBUG_TRACE_SET_CONFIG + + // validate mutating of critical configuration + if (!config_node.isValid() || !isKnownProperty(config_node , key)) return ; + +#ifdef HAS_MAIN_CONTROLLER + + if (!AudioTagToo::IsInitialized || !AudioTagToo::DisabledFeatures.contains(key)) +#endif // HAS_MAIN_CONTROLLER + setProperty(config_node , key , value) ; +} diff --git a/Source/Models/AudioTagTooStore.h b/Source/Models/AudioTagTooStore.h new file mode 100644 index 0000000..b9fd535 --- /dev/null +++ b/Source/Models/AudioTagTooStore.h @@ -0,0 +1,93 @@ +/*\ +|*| AudioTagToo - Clip and stitch audio samples +|*| Copyright 2018 bill-auger +|*| +|*| This file is part of the AudioTagToo program. +|*| +|*| AudioTagToo is free software: you can redistribute it and/or modify +|*| it under the terms of the GNU General Public License as published by +|*| the Free Software Foundation, either version 3 of the License, or +|*| (at your option) any later version. +|*| +|*| AudioTagToo is distributed in the hope that it will be useful, +|*| but WITHOUT ANY WARRANTY; without even the implied warranty of +|*| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +|*| GNU General Public License for more details. +|*| +|*| You should have received a copy of the GNU General Public License +|*| along with AudioTagToo. If not, see . +\*/ + + +#pragma once + +#include "../../JuceLibraryCode/JuceHeader.h" + + +/** + AudioTagTooStore is the model class for the AudioTagToo application. + It holds the runtime configuration via shared value holders + and handles persistence via XML or JUCE binary storage. +*/ +class AudioTagTooStore : ValueTree::Listener +{ + friend class MainContent ; + + +public: + + ~AudioTagTooStore() ; + + +private: + + // initialization + AudioTagTooStore() ; + bool initialize() ; + void teardown() ; + + // validations + void verifyConfig() ; + void verifyRoot () ; + void sanitizeRoot() ; + + // validation/sanitization helpers + void verifyChildNode (ValueTree store , Identifier node_id) ; + void verifyRootChildNode (Identifier node_id) ; + void verifyProperty (ValueTree store , Identifier key , var default_value) ; + void verifyRootProperty (Identifier key , var default_value) ; + bool hasDuplicatedNodes (ValueTree stored_config) ; + int nDuplicatedNodes (ValueTree parent_node , StringArray node_ids) ; + void removeConflictedNodes(ValueTree parent_node , Identifier node_id) ; + void filterRogueKeys (ValueTree parent_node , StringArray persistent_keys) ; + void filterRogueNodes (ValueTree parent_node , StringArray persistent_node_ids) ; + void sanitizeIntProperty (ValueTree store , Identifier key , int min_value , int max_value) ; + void sanitizeComboProperty(ValueTree store , Identifier key , StringArray options) ; + + // persistence + void loadConfig () ; + bool storeConfig(XmlElement* device_state_xml) ; + + // event handlers + void listen (bool should_listen) ; + void valueTreePropertyChanged(ValueTree& node , const Identifier& key) override ; + + // unhandled ValueTree::Listener events + void valueTreeChildAdded (ValueTree& /*parent_node*/ , ValueTree& /*new_node*/ ) override {} + void valueTreeChildRemoved (ValueTree& /*parent_node*/ , ValueTree& /*deleted_node*/ , int /*prev_idx*/) override {} + void valueTreeChildOrderChanged(ValueTree& /*parent_node*/ , int /*prev_idx*/ , int /*curr_idx*/) override {} + void valueTreeParentChanged (ValueTree& /*reparented_node*/ ) override {} + void valueTreeRedirected (ValueTree& /*redirected_node*/ ) override {} + + // getters/setters + bool isKnownProperty(ValueTree node , const Identifier& key) ; + void setProperty (ValueTree node , const Identifier& key , const var value) ; + void setConfig (ValueTree config_node , const Identifier& key , const var value) ; + + // configuration/persistence + File storageFile ; + File storageXmlFile ; + File deviceXmlFile ; + ValueTree root ; // persistent static config (STORE::STORAGE_ID node) + std::unique_ptr deviceStateXml ; // Juce AudioDeviceManager state +} ; diff --git a/Source/Models/JuceBoilerplateStore.cpp b/Source/Models/JuceBoilerplateStore.cpp deleted file mode 100644 index 7d07c26..0000000 --- a/Source/Models/JuceBoilerplateStore.cpp +++ /dev/null @@ -1,376 +0,0 @@ -/*\ -|*| JuceBoilerplate - JUCE boilerplate audio player GUI application -|*| Copyright 2018 bill-auger -|*| -|*| This file is part of the JuceBoilerplate program. -|*| -|*| JuceBoilerplate is free software: you can redistribute it and/or modify -|*| it under the terms of the GNU General Public License as published by -|*| the Free Software Foundation, either version 3 of the License, or -|*| (at your option) any later version. -|*| -|*| JuceBoilerplate is distributed in the hope that it will be useful, -|*| but WITHOUT ANY WARRANTY; without even the implied warranty of -|*| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -|*| GNU General Public License for more details. -|*| -|*| You should have received a copy of the GNU General Public License -|*| along with JuceBoilerplate. If not, see . -\*/ - - - -#include "JuceBoilerplateStore.h" -#include "Seeds.h" -#include "../Constants/AppConstants.h" -#include "../Constants/GuiConstants.h" -#include "../Constants/StorageConstants.h" -#include "../Trace/TraceJuceBoilerplateStore.h" - - -/* JuceBoilerplateStore public instance methods */ - -JuceBoilerplateStore::~JuceBoilerplateStore() { } - - -/* JuceBoilerplateStore private instance methods */ - -/* initialization */ - -JuceBoilerplateStore::JuceBoilerplateStore() { } - -bool JuceBoilerplateStore::initialize() -{ - // create shared config ValueTree from persistent storage or defaults - loadConfig() ; verifyConfig() ; - - listen(true) ; - - return true ; -} - -void JuceBoilerplateStore::teardown() { listen(false) ; storeConfig(this->deviceStateXml.get()) ; } - - -/* validations */ - -void JuceBoilerplateStore::verifyConfig() -{ - // verify or reset stored configuration - bool was_storage_found = this->root.isValid() ; - bool is_root_valid = this->root.hasType(STORE::STORAGE_ID) ; - bool has_canonical_nodes = !hasDuplicatedNodes(this->root) ; - if (!was_storage_found || !is_root_valid) this->root = Seeds::DefaultStore() ; - else if (!has_canonical_nodes ) removeConflictedNodes(this->root , String::empty) ; - - // verify schema version - int stored_version = int(this->root[STORE::CONFIG_VERSION_KEY]) ; - bool do_versions_match = stored_version == STORE::CONFIG_VERSION ; - if (!do_versions_match) - { - // NYI: convert (if ever necessary) - File parent_dir = this->storageFile.getParentDirectory() ; - File backup_file = parent_dir.getNonexistentChildFile(STORE::STORAGE_FILENAME , ".bak" , false) ; - this->storageFile.copyFileTo(backup_file) ; - - this->root.removeProperty(STORE::CONFIG_VERSION_KEY , nullptr) ; - } - -DEBUG_TRACE_VERIFY_STORED_CONFIG -} - -void JuceBoilerplateStore::verifyRoot() -{ - // ensure missing properties exist - verifyRootProperty(STORE::CONFIG_VERSION_KEY , var(STORE::CONFIG_VERSION)) ; -} - -void JuceBoilerplateStore::sanitizeRoot() -{ - // filter any rogue data - filterRogueKeys (this->root , STORE::RootPersistentKeys ()) ; - filterRogueNodes(this->root , STORE::RootPersistentNodes()) ; -} - - -/* validation/sanitization helpers */ - -void JuceBoilerplateStore::verifyChildNode(ValueTree store , Identifier node_id) -{ -DEBUG_TRACE_VERIFY_MISSING_NODE - - if (!store.getChildWithName(node_id).isValid()) - store.addChild(ValueTree(node_id) , -1 , nullptr) ; -} - -void JuceBoilerplateStore::verifyRootChildNode(Identifier node_id) -{ - verifyChildNode(this->root , node_id) ; -} - -void JuceBoilerplateStore::verifyProperty(ValueTree store , Identifier key , var default_value) -{ -DEBUG_TRACE_VERIFY_MISSING_PROPERTY - - if (!store.hasProperty(key)) store.setProperty(key , default_value , nullptr) ; -} - -void JuceBoilerplateStore::verifyRootProperty(Identifier key , var default_value) -{ - verifyProperty(this->root , key , default_value) ; -} - -bool JuceBoilerplateStore::hasDuplicatedNodes(ValueTree stored_config) -{ - StringArray root_node_ids = STORE::RootPersistentNodes() ; - int n_duplicated_nodes = 0 ; - bool has_duplicates = false ; - - n_duplicated_nodes = nDuplicatedNodes(stored_config , root_node_ids) ; - has_duplicates = has_duplicates || n_duplicated_nodes > root_node_ids.size() ; - - return has_duplicates ; -} - -int JuceBoilerplateStore::nDuplicatedNodes(ValueTree parent_node , StringArray node_ids) -{ - int n_duplicated_nodes = 0 ; - - for (int node_n = 0 ; node_n < node_ids.size() ; ++node_n) - { - Identifier node_id = STORE::FilterId(node_ids[node_n]) ; - - for (int child_n = 0 ; child_n < parent_node.getNumChildren() ; ++child_n) - if (parent_node.getChild(child_n).hasType(node_id)) ++n_duplicated_nodes ; - } - - return n_duplicated_nodes ; -} - -void JuceBoilerplateStore::removeConflictedNodes(ValueTree parent_node , Identifier node_id) -{ - ValueTree node ; - while ((node = parent_node.getChildWithName(node_id)).isValid()) - parent_node.removeChild(node , nullptr) ; -} - -void JuceBoilerplateStore::filterRogueKeys(ValueTree parent_node , StringArray persistent_keys) -{ - for (int key_n = 0 ; key_n < parent_node.getNumProperties() ; ++key_n) - { - String property_id = STRING(parent_node.getPropertyName(key_n)) ; - -DEBUG_TRACE_FILTER_ROGUE_KEY - - if (!persistent_keys.contains(property_id)) - parent_node.removeProperty( property_id , nullptr) ; - } -} - -void JuceBoilerplateStore::filterRogueNodes(ValueTree parent_node , StringArray persistent_node_ids) -{ - for (int child_n = 0 ; child_n < parent_node.getNumChildren() ; ++child_n) - { - String node_id = STRING(parent_node.getChild(child_n).getType()) ; - -DEBUG_TRACE_FILTER_ROGUE_NODE - - if (!persistent_node_ids.contains(node_id)) - parent_node.removeChild(child_n , nullptr) ; - } -} - -void JuceBoilerplateStore::sanitizeIntProperty(ValueTree store , Identifier key , - int min_value , int max_value) -{ - int value = int(store[key]) ; - - if (value < min_value || value > max_value) store.removeProperty(key , nullptr) ; - -DEBUG_TRACE_SANITIZE_INT_PROPERTY -} - -void JuceBoilerplateStore::sanitizeComboProperty(ValueTree store , Identifier key , - StringArray options ) -{ - sanitizeIntProperty(store , key , 0 , options.size() - 1) ; -} - - -/* persistence */ - -void JuceBoilerplateStore::loadConfig() -{ - // load application configuration from persistent storage - File storage_dir = APP::AppdataDir().getChildFile(STORE::STORAGE_DIRNAME ) ; - this->deviceXmlFile = storage_dir .getChildFile(STORE::DEVICE_FILENAME ) ; -#ifdef STORAGE_IS_BINARY - this->storageFile = storage_dir .getChildFile(STORE::STORAGE_FILENAME) ; - FileInputStream* storage = new FileInputStream(this->storageFile) ; - this->root = (storage->openedOk()) ? ValueTree::readFromStream(*storage) : - ValueTree::invalid ; - delete storage ; -#else // STORAGE_IS_BINARY - this->storageFile = - this->storageXmlFile = storage_dir .getChildFile(STORE::STORAGE_FILENAME) ; - XmlElement* storage_xml = XmlDocument::parse(this->storageXmlFile) ; - this->root = (storage_xml != nullptr) ? ValueTree::fromXml(*storage_xml) : - ValueTree::invalid ; - delete storage_xml ; -#endif // STORAGE_IS_BINARY - - // load audio device configuration from persistent storage - this->deviceStateXml.reset(XmlDocument::parse(this->deviceXmlFile)) ; - bool is_config_valid = (this->deviceStateXml.get() != nullptr && - this->deviceStateXml.get()->hasTagName(STORE::DEVICE_XML_ID)) ; - if (!is_config_valid) this->deviceStateXml.reset() ; -} - -bool JuceBoilerplateStore::storeConfig(XmlElement* device_state_xml) -{ -DEBUG_TRACE_STORE_CONFIG - - // prepare storage directory - File temp_file = this->storageFile.getSiblingFile(STORE::STORAGE_FILENAME + ".temp") ; - if (temp_file.create().failed() || !temp_file.deleteFile()) - { -#ifdef HAS_MAIN_CONTROLLER - AudioTagToo::Error(GUI::FILESYSTEM_WRITE_ERROR_MSG) ; -#else // HAS_MAIN_CONTROLLER - Trace::TraceError(GUI::FILESYSTEM_WRITE_ERROR_MSG) ; -#endif // HAS_MAIN_CONTROLLER - - return false ; - } - -DEBUG_TRACE_DUMP_STORE(this->root , "root") - - if (this->root.isValid()) - { -#ifdef STORAGE_IS_BINARY - -DEBUG_WRITE_STORE_XML(this->root , "root") - - // marshall application configuration out to persistent binary storage - FileOutputStream* storage_stream = new FileOutputStream(temp_file) ; - if (!storage_stream->failedToOpen()) - { - this->root.writeToStream(*storage_stream) ; - storage_stream->flush() ; - temp_file.moveFileTo(this->storageFile) ; - delete storage_stream ; - } - else - { - #ifdef HAS_MAIN_CONTROLLER - JuceBoilerplate::Error(GUI::STORAGE_WRITE_ERROR_MSG + "application configuration") ; - #else // HAS_MAIN_CONTROLLER - Trace::TraceError(GUI::STORAGE_WRITE_ERROR_MSG + "application configuration") ; - #endif // HAS_MAIN_CONTROLLER - delete storage_stream ; - - return false ; - } - -#else // STORAGE_IS_BINARY - - // marshall application configuration out to persistent XML storage - XmlElement* storage_xml = this->root.createXml() ; - if (storage_xml->writeToFile(this->storageXmlFile , StringRef() , StringRef("UTF-8") , 0)) - delete storage_xml ; - else - { -#ifdef HAS_MAIN_CONTROLLER - AudioTagToo::Error(GUI::STORAGE_WRITE_ERROR_MSG + "application configuration") ; -#else // HAS_MAIN_CONTROLLER - Trace::TraceError(GUI::STORAGE_WRITE_ERROR_MSG + "application configuration") ; -#endif // HAS_MAIN_CONTROLLER - delete storage_xml ; - - return false ; - } - -#endif // STORAGE_IS_BINARY - } - - // marshall audio device configuration out to persistent XML storage - if (device_state_xml != nullptr) - { - if (device_state_xml->writeToFile(temp_file , String::empty)) - { - this->deviceStateXml.reset(device_state_xml) ; - temp_file.moveFileTo(this->deviceXmlFile) ; - delete device_state_xml ; - } - else - { - if (device_state_xml != this->deviceStateXml.get()) delete device_state_xml ; -#ifdef HAS_MAIN_CONTROLLER - JuceBoilerplate::Error(GUI::STORAGE_WRITE_ERROR_MSG + "audio device configuration") ; -#else // HAS_MAIN_CONTROLLER - Trace::TraceError(GUI::STORAGE_WRITE_ERROR_MSG + "audio device configuration") ; -#endif // HAS_MAIN_CONTROLLER - - return false ; - } - } - - return true ; -} - - -/* event handlers */ - -void JuceBoilerplateStore::listen(bool should_listen) -{ -#ifdef HAS_MAIN_CONTROLLER - if (!JuceBoilerplate::IsInitialized) return ; -#endif // HAS_MAIN_CONTROLLER - -DEBUG_TRACE_LISTEN - - if (should_listen) { this->root.addListener (this) ; } - else { this->root.removeListener(this) ; } -} - -void JuceBoilerplateStore::valueTreePropertyChanged(ValueTree& node , const Identifier& key) -{ -DEBUG_TRACE_CONFIG_TREE_CHANGED - -#ifdef HAS_MAIN_CONTROLLER - JuceBoilerplate::HandleConfigChanged(key) ; -#endif // HAS_MAIN_CONTROLLER -} - - -/* getters/setters */ - -bool JuceBoilerplateStore::isKnownProperty(ValueTree node , const Identifier& key) -{ - ValueTree parent_node = node.getParent() ; - - return (node == this->root) ? STORE::RootKeys().contains(key) : - false ; -} - -void JuceBoilerplateStore::setProperty(ValueTree node , const Identifier& key , - const var value ) -{ -DEBUG_TRACE_SET_PROPERTY - - if (node.isValid()) node.setProperty(key , value , nullptr) ; -} - -void JuceBoilerplateStore::setConfig(ValueTree config_node , const Identifier& key , - const var value ) -{ -DEBUG_TRACE_SET_CONFIG - - // validate mutating of critical configuration - if (!config_node.isValid() || !isKnownProperty(config_node , key)) return ; - -#ifdef HAS_MAIN_CONTROLLER - if (!JuceBoilerplate::IsInitialized || !JuceBoilerplate::DisabledFeatures.contains(key)) -#endif // HAS_MAIN_CONTROLLER - setProperty(config_node , key , value) ; -} diff --git a/Source/Models/JuceBoilerplateStore.h b/Source/Models/JuceBoilerplateStore.h deleted file mode 100644 index 093ab04..0000000 --- a/Source/Models/JuceBoilerplateStore.h +++ /dev/null @@ -1,93 +0,0 @@ -/*\ -|*| JuceBoilerplate - JUCE boilerplate audio player GUI application -|*| Copyright 2018 bill-auger -|*| -|*| This file is part of the JuceBoilerplate program. -|*| -|*| JuceBoilerplate is free software: you can redistribute it and/or modify -|*| it under the terms of the GNU General Public License as published by -|*| the Free Software Foundation, either version 3 of the License, or -|*| (at your option) any later version. -|*| -|*| JuceBoilerplate is distributed in the hope that it will be useful, -|*| but WITHOUT ANY WARRANTY; without even the implied warranty of -|*| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -|*| GNU General Public License for more details. -|*| -|*| You should have received a copy of the GNU General Public License -|*| along with JuceBoilerplate. If not, see . -\*/ - - -#pragma once - -#include "../../JuceLibraryCode/JuceHeader.h" - - -/** - JuceBoilerplateStore is the model class for the JuceBoilerplate application. - It holds the runtime configuration via shared value holders - and handles persistence via XML or JUCE binary storage. -*/ -class JuceBoilerplateStore : ValueTree::Listener -{ - friend class MainContent ; - - -public: - - ~JuceBoilerplateStore() ; - - -private: - - // initialization - JuceBoilerplateStore() ; - bool initialize() ; - void teardown() ; - - // validations - void verifyConfig() ; - void verifyRoot () ; - void sanitizeRoot() ; - - // validation/sanitization helpers - void verifyChildNode (ValueTree store , Identifier node_id) ; - void verifyRootChildNode (Identifier node_id) ; - void verifyProperty (ValueTree store , Identifier key , var default_value) ; - void verifyRootProperty (Identifier key , var default_value) ; - bool hasDuplicatedNodes (ValueTree stored_config) ; - int nDuplicatedNodes (ValueTree parent_node , StringArray node_ids) ; - void removeConflictedNodes(ValueTree parent_node , Identifier node_id) ; - void filterRogueKeys (ValueTree parent_node , StringArray persistent_keys) ; - void filterRogueNodes (ValueTree parent_node , StringArray persistent_node_ids) ; - void sanitizeIntProperty (ValueTree store , Identifier key , int min_value , int max_value) ; - void sanitizeComboProperty(ValueTree store , Identifier key , StringArray options) ; - - // persistence - void loadConfig () ; - bool storeConfig(XmlElement* device_state_xml) ; - - // event handlers - void listen (bool should_listen) ; - void valueTreePropertyChanged(ValueTree& node , const Identifier& key) override ; - - // unhandled ValueTree::Listener events - void valueTreeChildAdded (ValueTree& /*parent_node*/ , ValueTree& /*new_node*/ ) override {} - void valueTreeChildRemoved (ValueTree& /*parent_node*/ , ValueTree& /*deleted_node*/ , int /*prev_idx*/) override {} - void valueTreeChildOrderChanged(ValueTree& /*parent_node*/ , int /*prev_idx*/ , int /*curr_idx*/) override {} - void valueTreeParentChanged (ValueTree& /*reparented_node*/ ) override {} - void valueTreeRedirected (ValueTree& /*redirected_node*/ ) override {} - - // getters/setters - bool isKnownProperty(ValueTree node , const Identifier& key) ; - void setProperty (ValueTree node , const Identifier& key , const var value) ; - void setConfig (ValueTree config_node , const Identifier& key , const var value) ; - - // configuration/persistence - File storageFile ; - File storageXmlFile ; - File deviceXmlFile ; - ValueTree root ; // persistent static config (STORE::STORAGE_ID node) - std::unique_ptr deviceStateXml ; // Juce AudioDeviceManager state -} ; diff --git a/Source/Models/Seeds.cpp b/Source/Models/Seeds.cpp index df7c709..57c2dc5 100644 --- a/Source/Models/Seeds.cpp +++ b/Source/Models/Seeds.cpp @@ -1,21 +1,21 @@ /*\ -|*| JuceBoilerplate - JUCE boilerplate audio player GUI application -|*| Copyright 2018 bill-auger +|*| AudioTagToo - Clip and stitch audio samples +|*| Copyright 2018 bill-auger |*| -|*| This file is part of the JuceBoilerplate program. +|*| This file is part of the AudioTagToo program. |*| -|*| JuceBoilerplate is free software: you can redistribute it and/or modify +|*| AudioTagToo is free software: you can redistribute it and/or modify |*| it under the terms of the GNU General Public License as published by |*| the Free Software Foundation, either version 3 of the License, or |*| (at your option) any later version. |*| -|*| JuceBoilerplate is distributed in the hope that it will be useful, +|*| AudioTagToo is distributed in the hope that it will be useful, |*| but WITHOUT ANY WARRANTY; without even the implied warranty of |*| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |*| GNU General Public License for more details. |*| |*| You should have received a copy of the GNU General Public License -|*| along with JuceBoilerplate. If not, see . +|*| along with AudioTagToo. If not, see . \*/ diff --git a/Source/Models/Seeds.h b/Source/Models/Seeds.h index 54c174f..418533a 100644 --- a/Source/Models/Seeds.h +++ b/Source/Models/Seeds.h @@ -1,21 +1,21 @@ /*\ -|*| JuceBoilerplate - JUCE boilerplate audio player GUI application -|*| Copyright 2018 bill-auger +|*| AudioTagToo - Clip and stitch audio samples +|*| Copyright 2018 bill-auger |*| -|*| This file is part of the JuceBoilerplate program. +|*| This file is part of the AudioTagToo program. |*| -|*| JuceBoilerplate is free software: you can redistribute it and/or modify +|*| AudioTagToo is free software: you can redistribute it and/or modify |*| it under the terms of the GNU General Public License as published by |*| the Free Software Foundation, either version 3 of the License, or |*| (at your option) any later version. |*| -|*| JuceBoilerplate is distributed in the hope that it will be useful, +|*| AudioTagToo is distributed in the hope that it will be useful, |*| but WITHOUT ANY WARRANTY; without even the implied warranty of |*| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |*| GNU General Public License for more details. |*| |*| You should have received a copy of the GNU General Public License -|*| along with JuceBoilerplate. If not, see . +|*| along with AudioTagToo. If not, see . \*/ diff --git a/Source/Trace/Trace.cpp b/Source/Trace/Trace.cpp index 869d253..90155c7 100644 --- a/Source/Trace/Trace.cpp +++ b/Source/Trace/Trace.cpp @@ -1,21 +1,21 @@ /*\ -|*| JuceBoilerplate - JUCE boilerplate audio player GUI application -|*| Copyright 2018 bill-auger +|*| AudioTagToo - Clip and stitch audio samples +|*| Copyright 2018 bill-auger |*| -|*| This file is part of the JuceBoilerplate program. +|*| This file is part of the AudioTagToo program. |*| -|*| JuceBoilerplate is free software: you can redistribute it and/or modify +|*| AudioTagToo is free software: you can redistribute it and/or modify |*| it under the terms of the GNU General Public License as published by |*| the Free Software Foundation, either version 3 of the License, or |*| (at your option) any later version. |*| -|*| JuceBoilerplate is distributed in the hope that it will be useful, +|*| AudioTagToo is distributed in the hope that it will be useful, |*| but WITHOUT ANY WARRANTY; without even the implied warranty of |*| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |*| GNU General Public License for more details. |*| |*| You should have received a copy of the GNU General Public License -|*| along with JuceBoilerplate. If not, see . +|*| along with AudioTagToo. If not, see . \*/ diff --git a/Source/Trace/Trace.h b/Source/Trace/Trace.h index 4558f36..dba7927 100644 --- a/Source/Trace/Trace.h +++ b/Source/Trace/Trace.h @@ -1,21 +1,21 @@ /*\ -|*| JuceBoilerplate - JUCE boilerplate audio player GUI application -|*| Copyright 2018 bill-auger +|*| AudioTagToo - Clip and stitch audio samples +|*| Copyright 2018 bill-auger |*| -|*| This file is part of the JuceBoilerplate program. +|*| This file is part of the AudioTagToo program. |*| -|*| JuceBoilerplate is free software: you can redistribute it and/or modify +|*| AudioTagToo is free software: you can redistribute it and/or modify |*| it under the terms of the GNU General Public License as published by |*| the Free Software Foundation, either version 3 of the License, or |*| (at your option) any later version. |*| -|*| JuceBoilerplate is distributed in the hope that it will be useful, +|*| AudioTagToo is distributed in the hope that it will be useful, |*| but WITHOUT ANY WARRANTY; without even the implied warranty of |*| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |*| GNU General Public License for more details. |*| |*| You should have received a copy of the GNU General Public License -|*| along with JuceBoilerplate. If not, see . +|*| along with AudioTagToo. If not, see . \*/ diff --git a/Source/Trace/TraceAudioTagTooStore.h b/Source/Trace/TraceAudioTagTooStore.h new file mode 100644 index 0000000..c608248 --- /dev/null +++ b/Source/Trace/TraceAudioTagTooStore.h @@ -0,0 +1,131 @@ +/*\ +|*| AudioTagToo - Clip and stitch audio samples +|*| Copyright 2018 bill-auger +|*| +|*| This file is part of the AudioTagToo program. +|*| +|*| AudioTagToo is free software: you can redistribute it and/or modify +|*| it under the terms of the GNU General Public License as published by +|*| the Free Software Foundation, either version 3 of the License, or +|*| (at your option) any later version. +|*| +|*| AudioTagToo is distributed in the hope that it will be useful, +|*| but WITHOUT ANY WARRANTY; without even the implied warranty of +|*| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +|*| GNU General Public License for more details. +|*| +|*| You should have received a copy of the GNU General Public License +|*| along with AudioTagToo. If not, see . +\*/ + + +#pragma once + +#include "Trace.h" + + +#if DEBUG_TRACE + +/* persistence */ + + #define DEBUG_TRACE_VERIFY_STORED_CONFIG \ + String not_found_msg = "stored config not found - restoring defaults" ; \ + String invalid_msg = "stored config invalid - restoring defaults" ; \ + String corrupt_msg = "stored config corrupt - pruning duplicated nodes" ; \ + String upgraded_msg = "upgrading config version from v" + String(stored_version) + \ + " to v" + String(STORE::CONFIG_VERSION) ; \ + String success_msg = "stored config parsed successfully v" + String(stored_version) ; \ + Trace::TraceStore("looking for stored config at " + this->storageFile.getFullPathName()) ; \ + Trace::TraceStore((!was_storage_found ) ? not_found_msg : \ + (!is_root_valid ) ? invalid_msg : \ + (!has_canonical_nodes) ? corrupt_msg : \ + (!do_versions_match ) ? upgraded_msg : success_msg) ; + + #define DEBUG_TRACE_VERIFY_MISSING_NODE \ + Trace::TraceMissingNode(store , node_id) ; + + #define DEBUG_TRACE_VERIFY_MISSING_PROPERTY \ + Trace::TraceMissingProperty(store , key , default_value) ; + + #define DEBUG_TRACE_FILTER_ROGUE_KEY \ + if (!persistent_keys.contains(property_id)) \ + Trace::TraceStore("removing rogue property '" + String(property_id) + \ + "' from '" + STRING(parent_node.getType()) + "'") ; + + #define DEBUG_TRACE_FILTER_ROGUE_NODE \ + if (!persistent_node_ids.contains(node_id)) \ + Trace::TraceStore("removing rogue node '" + String(node_id) + \ + "' from '" + STRING(parent_node.getType()) + "'") ; + + #define DEBUG_TRACE_SANITIZE_INT_PROPERTY \ + String relation = String(min_value) + " <= " + String(value) + " <= " + String(max_value) ; \ + String node_id = STRING(store.getType()) ; String property_id = STRING(key) ; \ + if (value < min_value || value > max_value) \ + Trace::TraceStore("value (" + relation + ") out of range for '" + \ + node_id + "['" + property_id + "'] - removing" ) ; + + #define DEBUG_TRACE_DUMP_STORE_ROOT DEBUG_TRACE_DUMP_STORE(this->root , "root") + + #define DEBUG_TRACE_DUMP_STORE_ALL \ + DEBUG_TRACE_DUMP_STORE_ROOT + + #define DEBUG_TRACE_STORE_CONFIG \ + String file_path = this->storageFile.getFullPathName() ; \ + if (!this->root.isValid()) Trace::TraceError("stored config invalid - not storing") ; \ + else Trace::TraceStore("storing config to " + file_path) ; + + +/* maintenance */ + + #define DEBUG_TRACE_LISTEN \ + String state = (should_listen) ? "resumed" : "suspended" ; \ + Trace::TraceStore(state + " listening for model changes") ; + + #define DEBUG_TRACE_CONFIG_TREE_CHANGED Trace::TraceTreeChanged(node , key) ; + + #define DEBUG_TRACE_SET_PROPERTY \ + if (!node.isValid()) Trace::TraceError("request to set property on invalid tree - ignoring") ; + + // 'HAS_MAIN_CONTROLLER' switches can simply be removed if controller exists + // or if such guards are not needed + #ifdef HAS_MAIN_CONTROLLER + #define MAIN_CONTROLLER_GUARD (AudioTagToo::IsInitialized && AudioTagToo::DisabledFeatures.contains(key)) + #else // HAS_MAIN_CONTROLLER + #define MAIN_CONTROLLER_GUARD (true) + #endif // HAS_MAIN_CONTROLLER + #define DEBUG_TRACE_SET_CONFIG \ + ValueTree parent_node = config_node.getParent() ; \ + String node_id = STRING(config_node.getType()) ; \ + String key_str = STRING(key) ; \ + bool is_unknown_key = !isKnownProperty(config_node , key) ; \ + bool is_unknown_node = config_node != this->root ; \ + String invalid_tree_msg = "request to set property on invalid tree - ignoring" ; \ + String disabled_key_msg = "request to set disabled property - ignoring" ; \ + String change_msg = ((!is_unknown_key) ? "" : \ + (is_unknown_node) ? "unknown node '" + node_id + "'" : \ + "unknown key '" + key_str + "'" ) + \ + ((!is_unknown_key) ? "" : " - (ignoring) " ) + \ + Trace::TraceSetValue(config_node , key , value) ; \ + if (!config_node.isValid()) Trace::TraceError (invalid_tree_msg) ; \ + else if (MAIN_CONTROLLER_GUARD ) Trace::TraceError (disabled_key_msg) ; \ + else if (!is_unknown_key ) Trace::TraceStoreVb(change_msg ) ; \ + else Trace::TraceError (change_msg ) ; + +#else // DEBUG_TRACE + + #define DEBUG_TRACE_VERIFY_STORED_CONFIG ; + #define DEBUG_TRACE_VERIFY_MISSING_NODE ; + #define DEBUG_TRACE_VERIFY_MISSING_PROPERTY ; + #define DEBUG_TRACE_FILTER_ROGUE_KEY ; + #define DEBUG_TRACE_FILTER_ROGUE_NODE ; + #define DEBUG_TRACE_SANITIZE_INT_PROPERTY ; + #define DEBUG_TRACE_DUMP_STORE_ROOT ; + #define DEBUG_TRACE_DUMP_STORE_ALL ; + #define DEBUG_TRACE_STORE_CONFIG ; + #define DEBUG_TRACE_LISTEN ; + #define DEBUG_TRACE_CONFIG_TREE_CHANGED ; + #define DEBUG_TRACE_SET_PROPERTY ; + #define DEBUG_TRACE_STORE_SET_VALUE ; + #define DEBUG_TRACE_GUI_SET_VALUE ; + +#endif // DEBUG_TRACE diff --git a/Source/Trace/TraceJuceBoilerplateStore.h b/Source/Trace/TraceJuceBoilerplateStore.h deleted file mode 100644 index a052cd0..0000000 --- a/Source/Trace/TraceJuceBoilerplateStore.h +++ /dev/null @@ -1,131 +0,0 @@ -/*\ -|*| JuceBoilerplate - JUCE boilerplate audio player GUI application -|*| Copyright 2018 bill-auger -|*| -|*| This file is part of the JuceBoilerplate program. -|*| -|*| JuceBoilerplate is free software: you can redistribute it and/or modify -|*| it under the terms of the GNU General Public License as published by -|*| the Free Software Foundation, either version 3 of the License, or -|*| (at your option) any later version. -|*| -|*| JuceBoilerplate is distributed in the hope that it will be useful, -|*| but WITHOUT ANY WARRANTY; without even the implied warranty of -|*| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -|*| GNU General Public License for more details. -|*| -|*| You should have received a copy of the GNU General Public License -|*| along with JuceBoilerplate. If not, see . -\*/ - - -#pragma once - -#include "Trace.h" - - -#if DEBUG_TRACE - -/* persistence */ - - #define DEBUG_TRACE_VERIFY_STORED_CONFIG \ - String not_found_msg = "stored config not found - restoring defaults" ; \ - String invalid_msg = "stored config invalid - restoring defaults" ; \ - String corrupt_msg = "stored config corrupt - pruning duplicated nodes" ; \ - String upgraded_msg = "upgrading config version from v" + String(stored_version) + \ - " to v" + String(STORE::CONFIG_VERSION) ; \ - String success_msg = "stored config parsed successfully v" + String(stored_version) ; \ - Trace::TraceStore("looking for stored config at " + this->storageFile.getFullPathName()) ; \ - Trace::TraceStore((!was_storage_found ) ? not_found_msg : \ - (!is_root_valid ) ? invalid_msg : \ - (!has_canonical_nodes) ? corrupt_msg : \ - (!do_versions_match ) ? upgraded_msg : success_msg) ; - - #define DEBUG_TRACE_VERIFY_MISSING_NODE \ - Trace::TraceMissingNode(store , node_id) ; - - #define DEBUG_TRACE_VERIFY_MISSING_PROPERTY \ - Trace::TraceMissingProperty(store , key , default_value) ; - - #define DEBUG_TRACE_FILTER_ROGUE_KEY \ - if (!persistent_keys.contains(property_id)) \ - Trace::TraceStore("removing rogue property '" + String(property_id) + \ - "' from '" + STRING(parent_node.getType()) + "'") ; - - #define DEBUG_TRACE_FILTER_ROGUE_NODE \ - if (!persistent_node_ids.contains(node_id)) \ - Trace::TraceStore("removing rogue node '" + String(node_id) + \ - "' from '" + STRING(parent_node.getType()) + "'") ; - - #define DEBUG_TRACE_SANITIZE_INT_PROPERTY \ - String relation = String(min_value) + " <= " + String(value) + " <= " + String(max_value) ; \ - String node_id = STRING(store.getType()) ; String property_id = STRING(key) ; \ - if (value < min_value || value > max_value) \ - Trace::TraceStore("value (" + relation + ") out of range for '" + \ - node_id + "['" + property_id + "'] - removing" ) ; - - #define DEBUG_TRACE_DUMP_STORE_ROOT DEBUG_TRACE_DUMP_STORE(this->root , "root") - - #define DEBUG_TRACE_DUMP_STORE_ALL \ - DEBUG_TRACE_DUMP_STORE_ROOT - - #define DEBUG_TRACE_STORE_CONFIG \ - String file_path = this->storageFile.getFullPathName() ; \ - if (!this->root.isValid()) Trace::TraceError("stored config invalid - not storing") ; \ - else Trace::TraceStore("storing config to " + file_path) ; - - -/* maintenance */ - - #define DEBUG_TRACE_LISTEN \ - String state = (should_listen) ? "resumed" : "suspended" ; \ - Trace::TraceStore(state + " listening for model changes") ; - - #define DEBUG_TRACE_CONFIG_TREE_CHANGED Trace::TraceTreeChanged(node , key) ; - - #define DEBUG_TRACE_SET_PROPERTY \ - if (!node.isValid()) Trace::TraceError("request to set property on invalid tree - ignoring") ; - - // 'HAS_MAIN_CONTROLLER' switches can simply be removed if controller exists - // or if such guards are not needed - #ifdef HAS_MAIN_CONTROLLER - #define MAIN_CONTROLLER_GUARD (JuceBoilerplate::IsInitialized && JuceBoilerplate::DisabledFeatures.contains(key)) - #else // HAS_MAIN_CONTROLLER - #define MAIN_CONTROLLER_GUARD (true) - #endif // HAS_MAIN_CONTROLLER - #define DEBUG_TRACE_SET_CONFIG \ - ValueTree parent_node = config_node.getParent() ; \ - String node_id = STRING(config_node.getType()) ; \ - String key_str = STRING(key) ; \ - bool is_unknown_key = !isKnownProperty(config_node , key) ; \ - bool is_unknown_node = config_node != this->root ; \ - String invalid_tree_msg = "request to set property on invalid tree - ignoring" ; \ - String disabled_key_msg = "request to set disabled property - ignoring" ; \ - String change_msg = ((!is_unknown_key) ? "" : \ - (is_unknown_node) ? "unknown node '" + node_id + "'" : \ - "unknown key '" + key_str + "'" ) + \ - ((!is_unknown_key) ? "" : " - (ignoring) " ) + \ - Trace::TraceSetValue(config_node , key , value) ; \ - if (!config_node.isValid()) Trace::TraceError (invalid_tree_msg) ; \ - else if (MAIN_CONTROLLER_GUARD ) Trace::TraceError (disabled_key_msg) ; \ - else if (!is_unknown_key ) Trace::TraceStoreVb(change_msg ) ; \ - else Trace::TraceError (change_msg ) ; - -#else // DEBUG_TRACE - - #define DEBUG_TRACE_VERIFY_STORED_CONFIG ; - #define DEBUG_TRACE_VERIFY_MISSING_NODE ; - #define DEBUG_TRACE_VERIFY_MISSING_PROPERTY ; - #define DEBUG_TRACE_FILTER_ROGUE_KEY ; - #define DEBUG_TRACE_FILTER_ROGUE_NODE ; - #define DEBUG_TRACE_SANITIZE_INT_PROPERTY ; - #define DEBUG_TRACE_DUMP_STORE_ROOT ; - #define DEBUG_TRACE_DUMP_STORE_ALL ; - #define DEBUG_TRACE_STORE_CONFIG ; - #define DEBUG_TRACE_LISTEN ; - #define DEBUG_TRACE_CONFIG_TREE_CHANGED ; - #define DEBUG_TRACE_SET_PROPERTY ; - #define DEBUG_TRACE_STORE_SET_VALUE ; - #define DEBUG_TRACE_GUI_SET_VALUE ; - -#endif // DEBUG_TRACE diff --git a/Source/Trace/TraceMain.h b/Source/Trace/TraceMain.h new file mode 100644 index 0000000..e7df48b --- /dev/null +++ b/Source/Trace/TraceMain.h @@ -0,0 +1,44 @@ +/*\ +|*| AudioTagToo - Clip and stitch audio samples +|*| Copyright 2018 bill-auger +|*| +|*| This file is part of the AudioTagToo program. +|*| +|*| AudioTagToo is free software: you can redistribute it and/or modify +|*| it under the terms of the GNU General Public License as published by +|*| the Free Software Foundation, either version 3 of the License, or +|*| (at your option) any later version. +|*| +|*| AudioTagToo is distributed in the hope that it will be useful, +|*| but WITHOUT ANY WARRANTY; without even the implied warranty of +|*| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +|*| GNU General Public License for more details. +|*| +|*| You should have received a copy of the GNU General Public License +|*| along with AudioTagToo. If not, see . +\*/ + + +#pragma once + + +#ifdef DEBUG_TRACE + + #include "Trace.h" + + + #define DEBUG_TRACE_INIT_VERSION \ + if (!cli_params.contains(APP::CLI_VERSION_TOKEN)) \ + LOG(AvCaster::VersionMsg().joinIntoString("\n") + "\n") ; + + #define DEBUG_TRACE_SHUTDOWN_IN Trace::TraceState("shutting down") ; + + #define DEBUG_TRACE_SHUTDOWN_OUT Trace::TraceState("clean shutdown - bye") ; + +#else // DEBUG_TRACE + + #define DEBUG_TRACE_INIT_VERSION ; + #define DEBUG_TRACE_SHUTDOWN_IN ; + #define DEBUG_TRACE_SHUTDOWN_OUT ; + +#endif // DEBUG_TRACE diff --git a/Source/Trace/TraceWaveform.h b/Source/Trace/TraceWaveform.h index 1e2b6b5..637f4e5 100644 --- a/Source/Trace/TraceWaveform.h +++ b/Source/Trace/TraceWaveform.h @@ -1,21 +1,21 @@ /*\ -|*| JuceBoilerplate - JUCE boilerplate audio player GUI application -|*| Copyright 2018 bill-auger +|*| AudioTagToo - Clip and stitch audio samples +|*| Copyright 2018 bill-auger |*| -|*| This file is part of the JuceBoilerplate program. +|*| This file is part of the AudioTagToo program. |*| -|*| JuceBoilerplate is free software: you can redistribute it and/or modify +|*| AudioTagToo is free software: you can redistribute it and/or modify |*| it under the terms of the GNU General Public License as published by |*| the Free Software Foundation, either version 3 of the License, or |*| (at your option) any later version. |*| -|*| JuceBoilerplate is distributed in the hope that it will be useful, +|*| AudioTagToo is distributed in the hope that it will be useful, |*| but WITHOUT ANY WARRANTY; without even the implied warranty of |*| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |*| GNU General Public License for more details. |*| |*| You should have received a copy of the GNU General Public License -|*| along with JuceBoilerplate. If not, see . +|*| along with AudioTagToo. If not, see . \*/ diff --git a/Source/Views/MainContent.cpp b/Source/Views/MainContent.cpp index e56adb2..0f884f9 100644 --- a/Source/Views/MainContent.cpp +++ b/Source/Views/MainContent.cpp @@ -1,21 +1,21 @@ /*\ -|*| JuceBoilerplate - JUCE boilerplate audio player GUI application -|*| Copyright 2018 bill-auger +|*| AudioTagToo - Clip and stitch audio samples +|*| Copyright 2018 bill-auger |*| -|*| This file is part of the JuceBoilerplate program. +|*| This file is part of the AudioTagToo program. |*| -|*| JuceBoilerplate is free software: you can redistribute it and/or modify +|*| AudioTagToo is free software: you can redistribute it and/or modify |*| it under the terms of the GNU General Public License as published by |*| the Free Software Foundation, either version 3 of the License, or |*| (at your option) any later version. |*| -|*| JuceBoilerplate is distributed in the hope that it will be useful, +|*| AudioTagToo is distributed in the hope that it will be useful, |*| but WITHOUT ANY WARRANTY; without even the implied warranty of |*| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |*| GNU General Public License for more details. |*| |*| You should have received a copy of the GNU General Public License -|*| along with JuceBoilerplate. If not, see . +|*| along with AudioTagToo. If not, see . \*/ @@ -63,11 +63,11 @@ MainContent::MainContent () //[/Constructor_pre] - waveformUpper.reset (new Waveform (formatManager , transportSource , courseFps)); - addAndMakeVisible (waveformUpper.get()); + fullWaveform.reset (new Waveform (formatManager , transportSource , courseFps)); + addAndMakeVisible (fullWaveform.get()); - waveformLower.reset (new Waveform (formatManager , transportSource , fineFps)); - addAndMakeVisible (waveformLower.get()); + clipWaveform.reset (new Waveform (formatManager , transportSource , fineFps)); + addAndMakeVisible (clipWaveform.get()); groupComponent.reset (new GroupComponent ("new group", String())); @@ -94,18 +94,16 @@ MainContent::MainContent () statusbar.reset (new Statusbar()); addAndMakeVisible (statusbar.get()); - statusbar->setName ("statusbar"); - //[UserPreSize] this->app = JUCEApplication::getInstance() ; - this->storage.reset(new JuceBoilerplateStore()) ; + this->storage.reset(new AudioTagTooStore()) ; - this->waveformUpper.setName(GUI::UPPER_WAVEFORM_ID) ; - this->waveformLower.setName(GUI::LOWER_WAVEFORM_ID) ; - this->waveforms.push_back(this->waveformUpper.get()) ; - this->waveforms.push_back(this->waveformLower.get()) ; + this->fullWaveform->setName(GUI::FULL_WAVEFORM_ID) ; + this->clipWaveform->setName(GUI::CLIP_WAVEFORM_ID) ; + this->waveforms.push_back(this->fullWaveform.get()) ; + this->waveforms.push_back(this->clipWaveform.get()) ; this->fileTree->setColour(FileTreeComponent::backgroundColourId , GUI::BROWSER_BG_COLOR) ; @@ -166,8 +164,8 @@ MainContent::~MainContent() //[/Destructor_pre] - waveformUpper = nullptr; - waveformLower = nullptr; + fullWaveform = nullptr; + clipWaveform = nullptr; groupComponent = nullptr; headButton = nullptr; transportButton = nullptr; @@ -210,15 +208,16 @@ void MainContent::resized() //[UserPreResize] Add your own custom resize code here.. //[/UserPreResize] - waveformUpper->setBounds ((getWidth() / 2) - ((getWidth() - 32) / 2), 16, getWidth() - 32, 120); - waveformLower->setBounds ((getWidth() / 2) - ((getWidth() - 32) / 2), 16 + 120 - -8, getWidth() - 32, 120); + fullWaveform->setBounds ((getWidth() / 2) - ((getWidth() - 32) / 2), 16, getWidth() - 32, 120); + clipWaveform->setBounds ((getWidth() / 2) - ((getWidth() - 32) / 2), 16 + 120 - -8, getWidth() - 32, 120); groupComponent->setBounds ((getWidth() / 2) - ((getWidth() - 32) / 2), (16 + 120 - -8) + 120 - -8, getWidth() - 32, 24); headButton->setBounds ((getWidth() / 2) + -150 - (150 / 2), (16 + 120 - -8) + 120 - -8, 150, 24); transportButton->setBounds ((getWidth() / 2) - (150 / 2), (16 + 120 - -8) + 120 - -8, 150, 24); tailButton->setBounds ((getWidth() / 2) + 150 - (150 / 2), (16 + 120 - -8) + 120 - -8, 150, 24); - fileTree->setBounds ((getWidth() / 2) - ((getWidth() - 32) / 2), ((16 + 120 - -8) + 120 - -8) + 24 - -8, getWidth() - 32, proportionOfHeight (0.3901f)); - deviceSelector->setBounds ((getWidth() / 2) - ((getWidth() - 32) / 2), ((16 + 120 - -8) + 120 - -8) + 24 - -8, getWidth() - 32, proportionOfHeight (0.3901f)); + fileTree->setBounds ((getWidth() / 2) - ((getWidth() - 32) / 2), ((16 + 120 - -8) + 120 - -8) + 24 - -8, getWidth() - 32, proportionOfHeight (0.3900f)); + deviceSelector->setBounds ((getWidth() / 2) - ((getWidth() - 32) / 2), ((16 + 120 - -8) + 120 - -8) + 24 - -8, getWidth() - 32, proportionOfHeight (0.3900f)); statusbar->setBounds ((getWidth() / 2) - ((getWidth() - 16) / 2), getHeight() - 8 - 32, getWidth() - 16, 32); + //[UserResized] Add your own custom resize handling here.. //[/UserResized] } @@ -375,10 +374,10 @@ BEGIN_JUCER_METADATA - - - diff --git a/Source/Views/MainContent.h b/Source/Views/MainContent.h index 9c80e02..659c1ee 100644 --- a/Source/Views/MainContent.h +++ b/Source/Views/MainContent.h @@ -1,21 +1,21 @@ /*\ -|*| JuceBoilerplate - JUCE boilerplate audio player GUI application -|*| Copyright 2018 bill-auger +|*| AudioTagToo - Clip and stitch audio samples +|*| Copyright 2018 bill-auger |*| -|*| This file is part of the JuceBoilerplate program. +|*| This file is part of the AudioTagToo program. |*| -|*| JuceBoilerplate is free software: you can redistribute it and/or modify +|*| AudioTagToo is free software: you can redistribute it and/or modify |*| it under the terms of the GNU General Public License as published by |*| the Free Software Foundation, either version 3 of the License, or |*| (at your option) any later version. |*| -|*| JuceBoilerplate is distributed in the hope that it will be useful, +|*| AudioTagToo is distributed in the hope that it will be useful, |*| but WITHOUT ANY WARRANTY; without even the implied warranty of |*| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |*| GNU General Public License for more details. |*| |*| You should have received a copy of the GNU General Public License -|*| along with JuceBoilerplate. If not, see . +|*| along with AudioTagToo. If not, see . \*/ @@ -24,7 +24,7 @@ //[Headers] -- You can add your own extra header files here -- #include "../../JuceLibraryCode/JuceHeader.h" -#include "JuceBoilerplateStore.h" +#include "../Models/AudioTagTooStore.h" #include "Statusbar.h" #include "Waveform.h" @@ -35,7 +35,7 @@ //============================================================================== /** //[Comments] - MainComponent is the top-most parent GUI container for the JuceBoilerplate application. + MainComponent is the top-most parent GUI container for the AudioTagToo application. //[/Comments] */ class MainContent : public AudioAppComponent, @@ -73,7 +73,7 @@ private: AudioSourcePlayer audioSourcePlayer ; AudioTransportSource transportSource ; std::unique_ptr audioFileSource ; - std::unique_ptr storage ; + std::unique_ptr storage ; std::vector waveforms ; uint8 courseFps ; uint8 fineFps ; @@ -110,8 +110,8 @@ private: //[/UserVariables] //============================================================================== - std::unique_ptr waveformUpper; - std::unique_ptr waveformLower; + std::unique_ptr fullWaveform; + std::unique_ptr clipWaveform; std::unique_ptr groupComponent; std::unique_ptr headButton; std::unique_ptr transportButton; diff --git a/Source/Views/Statusbar.cpp b/Source/Views/Statusbar.cpp index bced373..9f85b3d 100644 --- a/Source/Views/Statusbar.cpp +++ b/Source/Views/Statusbar.cpp @@ -1,21 +1,21 @@ /*\ -|*| JuceBoilerplate - JUCE boilerplate audio player GUI application -|*| Copyright 2018 bill-auger +|*| AudioTagToo - Clip and stitch audio samples +|*| Copyright 2018 bill-auger |*| -|*| This file is part of the JuceBoilerplate program. +|*| This file is part of the AudioTagToo program. |*| -|*| JuceBoilerplate is free software: you can redistribute it and/or modify +|*| AudioTagToo is free software: you can redistribute it and/or modify |*| it under the terms of the GNU General Public License as published by |*| the Free Software Foundation, either version 3 of the License, or |*| (at your option) any later version. |*| -|*| JuceBoilerplate is distributed in the hope that it will be useful, +|*| AudioTagToo is distributed in the hope that it will be useful, |*| but WITHOUT ANY WARRANTY; without even the implied warranty of |*| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |*| GNU General Public License for more details. |*| |*| You should have received a copy of the GNU General Public License -|*| along with JuceBoilerplate. If not, see . +|*| along with AudioTagToo. If not, see . \*/ diff --git a/Source/Views/Statusbar.h b/Source/Views/Statusbar.h index 78ca1c1..fb9bc17 100644 --- a/Source/Views/Statusbar.h +++ b/Source/Views/Statusbar.h @@ -1,21 +1,21 @@ /*\ -|*| JuceBoilerplate - JUCE boilerplate audio player GUI application -|*| Copyright 2018 bill-auger +|*| AudioTagToo - Clip and stitch audio samples +|*| Copyright 2018 bill-auger |*| -|*| This file is part of the JuceBoilerplate program. +|*| This file is part of the AudioTagToo program. |*| -|*| JuceBoilerplate is free software: you can redistribute it and/or modify +|*| AudioTagToo is free software: you can redistribute it and/or modify |*| it under the terms of the GNU General Public License as published by |*| the Free Software Foundation, either version 3 of the License, or |*| (at your option) any later version. |*| -|*| JuceBoilerplate is distributed in the hope that it will be useful, +|*| AudioTagToo is distributed in the hope that it will be useful, |*| but WITHOUT ANY WARRANTY; without even the implied warranty of |*| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |*| GNU General Public License for more details. |*| |*| You should have received a copy of the GNU General Public License -|*| along with JuceBoilerplate. If not, see . +|*| along with AudioTagToo. If not, see . \*/ @@ -32,7 +32,7 @@ //============================================================================== /** //[Comments] - Statusbar is the bottom statusbar GUI for the JuceBoilerplate application. + Statusbar is the bottom statusbar GUI for the AudioTagToo application. It does nothing useful yet. //[/Comments] */ diff --git a/Source/Views/Waveform.cpp b/Source/Views/Waveform.cpp index 0cbdeae..3612fbc 100644 --- a/Source/Views/Waveform.cpp +++ b/Source/Views/Waveform.cpp @@ -1,21 +1,21 @@ /*\ -|*| JuceBoilerplate - JUCE boilerplate audio player GUI application -|*| Copyright 2018 bill-auger +|*| AudioTagToo - Clip and stitch audio samples +|*| Copyright 2018 bill-auger |*| -|*| This file is part of the JuceBoilerplate program. +|*| This file is part of the AudioTagToo program. |*| -|*| JuceBoilerplate is free software: you can redistribute it and/or modify +|*| AudioTagToo is free software: you can redistribute it and/or modify |*| it under the terms of the GNU General Public License as published by |*| the Free Software Foundation, either version 3 of the License, or |*| (at your option) any later version. |*| -|*| JuceBoilerplate is distributed in the hope that it will be useful, +|*| AudioTagToo is distributed in the hope that it will be useful, |*| but WITHOUT ANY WARRANTY; without even the implied warranty of |*| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |*| GNU General Public License for more details. |*| |*| You should have received a copy of the GNU General Public License -|*| along with JuceBoilerplate. If not, see . +|*| along with AudioTagToo. If not, see . \*/ @@ -259,7 +259,7 @@ void Waveform::mouseWheelMove(const MouseEvent& , const MouseWheelDetails& wheel { double audio_n_secs = this->thumbnail.getTotalLength() ; - if (audio_n_secs <= 0.0 || getName() == GUI::UPPER_WAVEFORM_ID) return ; + if (audio_n_secs <= 0.0 || getName() == GUI::FULL_WAVEFORM_ID) return ; // set pan if (wheel.deltaX != 0.0f) diff --git a/Source/Views/Waveform.h b/Source/Views/Waveform.h index bcbc891..3ad14db 100644 --- a/Source/Views/Waveform.h +++ b/Source/Views/Waveform.h @@ -1,21 +1,21 @@ /*\ -|*| JuceBoilerplate - JUCE boilerplate audio player GUI application -|*| Copyright 2018 bill-auger +|*| AudioTagToo - Clip and stitch audio samples +|*| Copyright 2018 bill-auger |*| -|*| This file is part of the JuceBoilerplate program. +|*| This file is part of the AudioTagToo program. |*| -|*| JuceBoilerplate is free software: you can redistribute it and/or modify +|*| AudioTagToo is free software: you can redistribute it and/or modify |*| it under the terms of the GNU General Public License as published by |*| the Free Software Foundation, either version 3 of the License, or |*| (at your option) any later version. |*| -|*| JuceBoilerplate is distributed in the hope that it will be useful, +|*| AudioTagToo is distributed in the hope that it will be useful, |*| but WITHOUT ANY WARRANTY; without even the implied warranty of |*| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |*| GNU General Public License for more details. |*| |*| You should have received a copy of the GNU General Public License -|*| along with JuceBoilerplate. If not, see . +|*| along with AudioTagToo. If not, see . \*/ @@ -32,7 +32,7 @@ //============================================================================== /** //[Comments] - Waveform is the audio wave graph for the JuceBoilerplate application. + Waveform is the audio wave graph for the AudioTagToo application. //[/Comments] */ class Waveform : public Component,