diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 39fb081a42a86ccf8f9cf99dbccc8bdf7c828bce..0000000000000000000000000000000000000000 --- a/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -*.iml -.gradle -/local.properties -/.idea/workspace.xml -/.idea/libraries -.DS_Store -/build -/captures -.externalNativeBuild diff --git a/.idea/.name b/.idea/.name deleted file mode 100644 index 10210ca26ea804309af50b78851c60c41d81b361..0000000000000000000000000000000000000000 --- a/.idea/.name +++ /dev/null @@ -1 +0,0 @@ -ChordTeller \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml deleted file mode 100644 index 96cc43efa6a0885098044e976cd780bb42c68a70..0000000000000000000000000000000000000000 --- a/.idea/compiler.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project version="4"> - <component name="CompilerConfiguration"> - <resourceExtensions /> - <wildcardResourcePatterns> - <entry name="!?*.java" /> - <entry name="!?*.form" /> - <entry name="!?*.class" /> - <entry name="!?*.groovy" /> - <entry name="!?*.scala" /> - <entry name="!?*.flex" /> - <entry name="!?*.kt" /> - <entry name="!?*.clj" /> - <entry name="!?*.aj" /> - </wildcardResourcePatterns> - <annotationProcessing> - <profile default="true" name="Default" enabled="false"> - <processorPath useClasspath="true" /> - </profile> - </annotationProcessing> - </component> -</project> \ No newline at end of file diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml deleted file mode 100644 index e7bedf3377d40335424fd605124d4761390218bb..0000000000000000000000000000000000000000 --- a/.idea/copyright/profiles_settings.xml +++ /dev/null @@ -1,3 +0,0 @@ -<component name="CopyrightManager"> - <settings default="" /> -</component> \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml deleted file mode 100644 index 7bdd217c638f679d85aae230c783ee2b0b9241dc..0000000000000000000000000000000000000000 --- a/.idea/gradle.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project version="4"> - <component name="GradleSettings"> - <option name="linkedExternalProjectsSettings"> - <GradleProjectSettings> - <option name="distributionType" value="LOCAL" /> - <option name="externalProjectPath" value="$PROJECT_DIR$/" /> - <option name="gradleHome" value="C:\Program Files\Android\Android Studio\gradle\gradle-2.14.1" /> - <option name="resolveModulePerSourceSet" value="false" /> - </GradleProjectSettings> - </option> - </component> -</project> \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 5d19981032aa01b060f5a568641d7a8840cc90dc..0000000000000000000000000000000000000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project version="4"> - <component name="EntryPointsManager"> - <entry_points version="2.0" /> - </component> - <component name="NullableNotNullManager"> - <option name="myDefaultNullable" value="android.support.annotation.Nullable" /> - <option name="myDefaultNotNull" value="android.support.annotation.NonNull" /> - <option name="myNullables"> - <value> - <list size="4"> - <item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" /> - <item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" /> - <item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" /> - <item index="3" class="java.lang.String" itemvalue="android.support.annotation.Nullable" /> - </list> - </value> - </option> - <option name="myNotNulls"> - <value> - <list size="4"> - <item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" /> - <item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" /> - <item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" /> - <item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" /> - </list> - </value> - </option> - </component> - <component name="ProjectLevelVcsManager" settingsEditedManually="false"> - <OptionsSetting value="true" id="Add" /> - <OptionsSetting value="true" id="Remove" /> - <OptionsSetting value="true" id="Checkout" /> - <OptionsSetting value="true" id="Update" /> - <OptionsSetting value="true" id="Status" /> - <OptionsSetting value="true" id="Edit" /> - <ConfirmationsSetting value="0" id="Add" /> - <ConfirmationsSetting value="0" id="Remove" /> - </component> - <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK"> - <output url="file://$PROJECT_DIR$/build/classes" /> - </component> - <component name="ProjectType"> - <option name="id" value="Android" /> - </component> -</project> \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index ce626f4e9317a1e4601b8f816905a1d971025dde..0000000000000000000000000000000000000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,9 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project version="4"> - <component name="ProjectModuleManager"> - <modules> - <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" /> - <module fileurl="file://$PROJECT_DIR$/chordTeller.iml" filepath="$PROJECT_DIR$/chordTeller.iml" /> - </modules> - </component> -</project> \ No newline at end of file diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml deleted file mode 100644 index 7f68460d8b38ac04e3a3224d7c79ef719b1991a9..0000000000000000000000000000000000000000 --- a/.idea/runConfigurations.xml +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project version="4"> - <component name="RunConfigurationProducerService"> - <option name="ignoredProducers"> - <set> - <option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" /> - <option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" /> - <option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" /> - </set> - </option> - </component> -</project> \ No newline at end of file diff --git a/MATLAB.zip b/MATLAB.zip new file mode 100644 index 0000000000000000000000000000000000000000..5ff09ba2f69e0da1f3cb55ac3bfb05f5e17cf13a Binary files /dev/null and b/MATLAB.zip differ diff --git a/MATLAB/ChordRead.m b/MATLAB/ChordRead.m new file mode 100644 index 0000000000000000000000000000000000000000..2605a9572ebc802b323f335228a137c06a3034a4 --- /dev/null +++ b/MATLAB/ChordRead.m @@ -0,0 +1,69 @@ +recorder = audiorecorder(); +set(recorder,'TimerPeriod',3, 'TimerFcn',{@audioTimer}); +record(recorder,60); +function audioTimer(hObject, ~) + Fs = 7900; %8000 + y = getaudiodata(hObject); + ydft = fft(y); + ydft = ydft(1:length(y)/2+1); + freq = 0:Fs/length(y):Fs/2; + ydftSquared = abs(ydft.^2); + [pks, locs] = findpeaks(ydftSquared); + plot(freq, ydftSquared, freq(locs), pks, 'or') + axis tight + threshould = getThreshould(ydftSquared); + sprintf('%d\n', threshould); + + keyNum = []; + pkFreqs = []; + + for i = 1 : size(pks) + if pks(i) > threshould + n = 12 * log2((freq(1, locs(i)) / 440)) + 49; + n = n + 0.5; + % sprintf('%d\n', int16(n)) + % sprintf('%f\n', freq(1,locs(i))) + keyNum = [keyNum(1: end), int16(n)]; + pkFreqs = [pkFreqs(1:end), freq(1, locs(i))]; + end + end + + printTone(keyNum); + printResult(keyNum, pkFreqs); + xlabel('Hz'); +end + +function threshould = getThreshould(y) + maxVal = 0; + % get max range + for i = 1:size(y) + if y(i) > maxVal + maxVal = y(i); + end + end + threshould = maxVal / 7; +end + +function printResult(a, b) + a = unique(a); + b = unique(b); + fprintf('key numbers are: ') + fprintf('%d ', a) + fprintf('\n') + fprintf('frequencies are: ') + fprintf('%d ', b) + fprintf('\n') +end + +function printTone(key) + tones = {'C2', 'C#2', 'D2', 'D#2', 'E2', 'F2', 'F#2', 'G2','G#2', 'A2', 'A#2', 'B2', 'C3', 'C#3', 'D3', 'D#3', 'E3', 'F3', 'F#3', 'G3','G#3', 'A3', 'A#3', 'B3', 'C4', 'C#4', 'D4', 'D#4', 'E4', 'F4', 'F#4', 'G4','G#4', 'A4', 'A#4', 'B4', 'C5', 'C#5', 'D5', 'D#5', 'E5', 'F5', 'F#5', 'G5','G#5', 'A5', 'A#5', 'B5', 'C6'}; + key = unique(key); + fprintf('notes are: ') + for note = key + offset = note - 15; + if offset < 62 && offset > 0 + fprintf('%s ', tones{offset}) + end + end + fprintf('\n') +end \ No newline at end of file diff --git a/MATLAB/ChordReader b/MATLAB/ChordReader new file mode 160000 index 0000000000000000000000000000000000000000..e5c33dc320cf3d69e399fdbef88e2a038663e1b9 --- /dev/null +++ b/MATLAB/ChordReader @@ -0,0 +1 @@ +Subproject commit e5c33dc320cf3d69e399fdbef88e2a038663e1b9 diff --git a/MATLAB/GUI.fig b/MATLAB/GUI.fig new file mode 100644 index 0000000000000000000000000000000000000000..b96d05b67e7e0c588d57f1cd8d3883ba63965a3f Binary files /dev/null and b/MATLAB/GUI.fig differ diff --git a/MATLAB/GUI.m b/MATLAB/GUI.m new file mode 100644 index 0000000000000000000000000000000000000000..d6c75a1b1d8e667c942f37d90521f9e50ff6e05f --- /dev/null +++ b/MATLAB/GUI.m @@ -0,0 +1,190 @@ +function varargout = GUI(varargin) +% GUI MATLAB code for gui.fig +% GUI, by itself, creates a new GUI or raises the existing +% singleton*. +% +% H = GUI returns the handle to a new GUI or the handle to +% the existing singleton*. +% +% GUI('CALLBACK',hObject,eventData,handles,...) calls the local +% function named CALLBACK in GUI.M with the given input arguments. +% +% GUI('Property','Value',...) creates a new GUI or raises the +% existing singleton*. Starting from the left, property value pairs are +% applied to the GUI before gui_OpeningFcn gets called. An +% unrecognized property name or invalid value makes property application +% stop. All inputs are passed to gui_OpeningFcn via varargin. +% +% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one +% instance to run (singleton)". +% +% See also: GUIDE, GUIDATA, GUIHANDLES + +% Edit the above text to modify the response to help gui + +% Last Modified by GUIDE v2.5 15-Nov-2016 15:40:24 + +% Begin initialization code - DO NOT EDIT +gui_Singleton = 1; +gui_State = struct('gui_Name', mfilename, ... + 'gui_Singleton', gui_Singleton, ... + 'gui_OpeningFcn', @gui_OpeningFcn, ... + 'gui_OutputFcn', @gui_OutputFcn, ... + 'gui_LayoutFcn', [] , ... + 'gui_Callback', []); +if nargin && ischar(varargin{1}) + gui_State.gui_Callback = str2func(varargin{1}); +end + +if nargout + [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:}); +else + gui_mainfcn(gui_State, varargin{:}); +end +% End initialization code - DO NOT EDIT + + +% --- Executes just before gui is made visible. +function gui_OpeningFcn(hObject, eventdata, handles, varargin) +% This function has no output args, see OutputFcn. +% hObject handle to figure +% eventdata reserved - to be defined in a future version of MATLAB +% handles structure with handles and user data (see GUIDATA) +% varargin command line arguments to gui (see VARARGIN) + +% Choose default command line output for gui +handles.output = hObject; +handles.Fs = 7900; +handles.recorder = audiorecorder(handles.Fs, 8, 1); +%set(handles.recorder,'TimerPeriod',1, 'TimerFcn',{@audioTimer, hObject}); + +% Update handles structure +guidata(hObject, handles); + +% UIWAIT makes gui wait for user response (see UIRESUME) +% uiwait(handles.figure1); + + +% --- Outputs from this function are returned to the command line. +function varargout = gui_OutputFcn(hObject, eventdata, handles) +% varargout cell array for returning output args (see VARARGOUT); +% hObject handle to figure +% eventdata reserved - to be defined in a future version of MATLAB +% handles structure with handles and user data (see GUIDATA) + +% Get default command line output from handles structure +varargout{1} = handles.output; + + +% --- Executes on button press in pushbutton1. +function pushbutton1_Callback(hObject, eventdata, handles) +% hObject handle to pushbutton1 (see GCBO) +% eventdata reserved - to be defined in a future version of MATLAB +% handles structure with handles and user data (see GUIDATA) +global stop; +stop = false; +while not (stop) + recordblocking(handles.recorder, 5); + audioTimer(handles.recorder); +end +%ChordRead(handles); + +%{ +function ChordRead(handles) +% TODO: need to pass handles to audioTimer funciton. +% maybe using global variable??? +recorder = audiorecorder(); +set(recorder,'TimerPeriod',3, 'TimerFcn',{@audioTimer}); +recordblocking(recorder, 6); +%} + +function audioTimer(hObject, varargin) + Fs = 7900; %8000 + y = getaudiodata(hObject); + ydft = fft(y); + ydft = ydft(1:length(y)/2+1); + freq = 0:Fs/length(y):Fs/2; + ydftSquared = abs(ydft.^2); + [pks, locs] = findpeaks(ydftSquared); + plot(freq, ydftSquared, freq(locs), pks, 'or') + axis tight + threshold = getThreshold(ydftSquared); + sprintf('%d\n', threshold); + + keyNum = []; + pkFreqs = []; + + for i = 1 : size(pks) + if pks(i) > threshold + n = 12 * log2((freq(1, locs(i)) / 440)) + 49; + n = n + 0.5; + keyNum = [keyNum(1: end), int16(n)]; + pkFreqs = [pkFreqs(1:end), freq(1, locs(i))]; + end + end + + if not (isempty(keyNum)) + printTone(keyNum); + printResult(keyNum, pkFreqs); + end + % set(handle.edit1,'String','finish'); + xlabel('Hz'); + +function threshold = getThreshold(y) + maxVal = 0; + % get max range + for i = 1:size(y) + if y(i) > maxVal + maxVal = y(i); + end + end + threshold = maxVal / 7; + +function printResult(a, b) + a = unique(a); + b = unique(b); + fprintf('key numbers are: ') + fprintf('%d ', a) + fprintf('\n') + fprintf('frequencies are: ') + fprintf('%d ', b) + fprintf('\n') + +function printTone(key) + tones = {'C2', 'C#2', 'D2', 'D#2', 'E2', 'F2', 'F#2', 'G2','G#2', 'A2', 'A#2', 'B2', 'C3', 'C#3', 'D3', 'D#3', 'E3', 'F3', 'F#3', 'G3','G#3', 'A3', 'A#3', 'B3', 'C4', 'C#4', 'D4', 'D#4', 'E4', 'F4', 'F#4', 'G4','G#4', 'A4', 'A#4', 'B4', 'C5', 'C#5', 'D5', 'D#5', 'E5', 'F5', 'F#5', 'G5','G#5', 'A5', 'A#5', 'B5', 'C6'}; + key = unique(key); + + keyTones = {}; + first = 1; + firstNote = 0; + for note = key + offset = note - 15; + if offset < 62 && offset > 0 + if first == 1 + firstNote = offset; + first = 0; + elseif (offset - firstNote) >= 12 + break; + end + keyTones{end+1} = tones{offset}; + end + end + + b = uicontrol('Style', 'edit',... + 'Position', [300, 200, 200, 100],... + 'FontSize', 15,... + 'Max', 2); + + s = strtrim(cellstr(keyTones)); + wrapToneString = textwrap(b, s); + set(b, 'String', wrapToneString); + + +% --- Executes on button press in pushbutton2. +function pushbutton2_Callback(hObject, eventdata, handles) +% hObject handle to pushbutton2 (see GCBO) +% eventdata reserved - to be defined in a future version of MATLAB +% handles structure with handles and user data (see GUIDATA) +global stop; +stop = true; +%stop(handles.recorder); diff --git a/MATLAB/GUI.prj b/MATLAB/GUI.prj new file mode 100644 index 0000000000000000000000000000000000000000..a76974712bec003d67bde3733d3fb624a45d7594 --- /dev/null +++ b/MATLAB/GUI.prj @@ -0,0 +1,124 @@ +<deployment-project plugin="plugin.ezdeploy" plugin-version="1.0"> + <configuration file="C:\Users\jiangj4\Documents\MATLAB\GUI.prj" location="C:\Users\jiangj4\Documents\MATLAB" name="GUI" target="target.ezdeploy.standalone" target-name="Application Compiler"> + <param.appname>GUI</param.appname> + <param.icon /> + <param.icons /> + <param.version>1.0</param.version> + <param.authnamewatermark /> + <param.email /> + <param.company /> + <param.summary /> + <param.description /> + <param.screenshot /> + <param.guid /> + <param.installpath.string>\GUI\</param.installpath.string> + <param.installpath.combo>option.installpath.programfiles</param.installpath.combo> + <param.logo /> + <param.install.notes /> + <param.target.install.notes /> + <param.intermediate>${PROJECT_ROOT}\GUI\for_testing</param.intermediate> + <param.files.only>${PROJECT_ROOT}\GUI\for_redistribution_files_only</param.files.only> + <param.output>${PROJECT_ROOT}\GUI\for_redistribution</param.output> + <param.logdir>${PROJECT_ROOT}\GUI</param.logdir> + <param.enable.clean.build>false</param.enable.clean.build> + <param.user.defined.mcr.options /> + <param.embed.ctf>true</param.embed.ctf> + <param.target.type>subtarget.standalone</param.target.type> + <param.support.packages /> + <param.web.mcr>true</param.web.mcr> + <param.package.mcr>false</param.package.mcr> + <param.no.mcr>false</param.no.mcr> + <param.web.mcr.name>MyAppInstaller_web</param.web.mcr.name> + <param.package.mcr.name>MyAppInstaller_mcr</param.package.mcr.name> + <param.no.mcr.name>MyAppInstaller_app</param.no.mcr.name> + <param.windows.command.prompt>true</param.windows.command.prompt> + <param.create.log>false</param.create.log> + <param.log.file /> + <unset> + <param.icon /> + <param.icons /> + <param.version /> + <param.authnamewatermark /> + <param.email /> + <param.company /> + <param.summary /> + <param.description /> + <param.screenshot /> + <param.guid /> + <param.installpath.string /> + <param.installpath.combo /> + <param.logo /> + <param.target.install.notes /> + <param.intermediate /> + <param.files.only /> + <param.output /> + <param.logdir /> + <param.enable.clean.build /> + <param.user.defined.mcr.options /> + <param.embed.ctf /> + <param.target.type /> + <param.support.packages /> + <param.web.mcr /> + <param.package.mcr /> + <param.no.mcr /> + <param.web.mcr.name /> + <param.package.mcr.name /> + <param.no.mcr.name /> + <param.windows.command.prompt /> + <param.create.log /> + <param.log.file /> + </unset> + <fileset.main> + <file>${PROJECT_ROOT}\GUI.m</file> + </fileset.main> + <fileset.resources /> + <fileset.package /> + <fileset.depfun> + <file>${PROJECT_ROOT}\GUI.fig</file> + </fileset.depfun> + <build-deliverables> + <file location="${PROJECT_ROOT}\GUI\for_testing" name="splash.png" optional="false">C:\Users\jiangj4\Documents\MATLAB\GUI\for_testing\splash.png</file> + <file location="${PROJECT_ROOT}\GUI\for_testing" name="GUI.exe" optional="false">C:\Users\jiangj4\Documents\MATLAB\GUI\for_testing\GUI.exe</file> + <file location="${PROJECT_ROOT}\GUI\for_testing" name="readme.txt" optional="true">C:\Users\jiangj4\Documents\MATLAB\GUI\for_testing\readme.txt</file> + </build-deliverables> + <workflow /> + <matlab> + <root>C:\Program Files\MATLAB\R2016b</root> + <toolboxes> + <toolbox name="fixedpoint" /> + <toolbox name="matlabcoder" /> + <toolbox name="embeddedcoder" /> + </toolboxes> + <toolbox> + <fixedpoint> + <enabled>true</enabled> + </fixedpoint> + </toolbox> + <toolbox> + <matlabcoder> + <enabled>true</enabled> + </matlabcoder> + </toolbox> + <toolbox> + <embeddedcoder> + <enabled>true</enabled> + </embeddedcoder> + </toolbox> + </matlab> + <platform> + <unix>false</unix> + <mac>false</mac> + <windows>true</windows> + <win2k>false</win2k> + <winxp>false</winxp> + <vista>false</vista> + <linux>false</linux> + <solaris>false</solaris> + <osver>6.2</osver> + <os32>false</os32> + <os64>true</os64> + <arch>win64</arch> + <matlab>true</matlab> + </platform> + </configuration> +</deployment-project> \ No newline at end of file diff --git a/MATLAB/GUI/PackagingLog.html b/MATLAB/GUI/PackagingLog.html new file mode 100644 index 0000000000000000000000000000000000000000..c5204c869b6c7897cb57761889ec15797f317155 --- /dev/null +++ b/MATLAB/GUI/PackagingLog.html @@ -0,0 +1,19 @@ +<html><meta charset="UTF-8"><pre> +<font color=blue>mcc -o GUI -W WinMain:GUI -T link:exe -d C:\Users\jiangj4\Documents\MATLAB\GUI\for_testing -v C:\Users\jiangj4\Documents\MATLAB\GUI.m -r 'C:\Program Files\MATLAB\R2016b\toolbox\compiler\Resources\default_icon.ico' </font> +Compiler version: 6.3 (R2016b) + +Dependency analysis by REQUIREMENTS. + +[Warning: Adding path "C:\Users\jiangj4\Documents\MATLAB" to Compiler path +instance.] +Parsing file "C:\Users\jiangj4\Documents\MATLAB\GUI.m" + (Referenced from: "Compiler Command Line"). +Deleting 1 temporary MEX authorization files. +Removing: 'C:\Users\jiangj4\AppData\Local\Temp\mathworks_tmp_02aac25314_10924.auth'. +Generating file "C:\Users\jiangj4\Documents\MATLAB\GUI\for_testing\readme.txt". +<font color=blue>Packaging...</font> +Creating the bundle... +Web based installer created at C:\Users\jiangj4\Documents\MATLAB\GUI\for_redistribution\MyAppInstaller_web.exe. +Packaging complete. +Elapsed packaging time was: 40 seconds. +</pre></html> diff --git a/MATLAB/GUI/for_redistribution/MyAppInstaller_web.exe b/MATLAB/GUI/for_redistribution/MyAppInstaller_web.exe new file mode 100644 index 0000000000000000000000000000000000000000..7a7c49e33da2303671cdf2e40270fef37095814b Binary files /dev/null and b/MATLAB/GUI/for_redistribution/MyAppInstaller_web.exe differ diff --git a/MATLAB/GUI/for_redistribution_files_only/GUI.exe b/MATLAB/GUI/for_redistribution_files_only/GUI.exe new file mode 100644 index 0000000000000000000000000000000000000000..8486764cbfa69ea53c35a54e527d76bf1e92468c Binary files /dev/null and b/MATLAB/GUI/for_redistribution_files_only/GUI.exe differ diff --git a/MATLAB/GUI/for_redistribution_files_only/default_icon.ico b/MATLAB/GUI/for_redistribution_files_only/default_icon.ico new file mode 100644 index 0000000000000000000000000000000000000000..0ff90412612555e638cec553edfcd22cac16889e Binary files /dev/null and b/MATLAB/GUI/for_redistribution_files_only/default_icon.ico differ diff --git a/MATLAB/GUI/for_redistribution_files_only/readme.txt b/MATLAB/GUI/for_redistribution_files_only/readme.txt new file mode 100644 index 0000000000000000000000000000000000000000..ec711d2a16f274234840ebe4a84fb88873efb8a6 --- /dev/null +++ b/MATLAB/GUI/for_redistribution_files_only/readme.txt @@ -0,0 +1,54 @@ +MATLAB Compiler + +1. Prerequisites for Deployment + +. Verify the MATLAB Runtime is installed and ensure you + have installed version 9.1 (R2016b). + +. If the MATLAB Runtime is not installed, do the following: + (1) enter + + >>mcrinstaller + + at MATLAB prompt. The MCRINSTALLER command displays the + location of the MATLAB Runtime installer. + + (2) run the MATLAB Runtime installer. + +Or download the Windows 64-bit version of the MATLAB Runtime for R2016b +from the MathWorks Web site by navigating to + + http://www.mathworks.com/products/compiler/mcr/index.html + + +For more information about the MATLAB Runtime and the MATLAB Runtime installer, see +Package and Distribute in the MATLAB Compiler documentation +in the MathWorks Documentation Center. + + +NOTE: You will need administrator rights to run MCRInstaller. + + +2. Files to Deploy and Package + +Files to package for Standalone +================================ +-GUI.exe +-MCRInstaller.exe + -if end users are unable to download the MATLAB Runtime using the above + link, include it when building your component by clicking + the "Runtime downloaded from web" link in the Deployment Tool +-This readme file + +3. Definitions + +For information on deployment terminology, go to +http://www.mathworks.com/help. Select MATLAB Compiler > +Getting Started > About Application Deployment > +Deployment Product Terms in the MathWorks Documentation +Center. + + + + + diff --git a/MATLAB/GUI/for_redistribution_files_only/splash.png b/MATLAB/GUI/for_redistribution_files_only/splash.png new file mode 100644 index 0000000000000000000000000000000000000000..d60c6faffbbd25bd799b1bb0b635526bb0928578 Binary files /dev/null and b/MATLAB/GUI/for_redistribution_files_only/splash.png differ diff --git a/MATLAB/GUI/for_testing/GUI.exe b/MATLAB/GUI/for_testing/GUI.exe new file mode 100644 index 0000000000000000000000000000000000000000..8486764cbfa69ea53c35a54e527d76bf1e92468c Binary files /dev/null and b/MATLAB/GUI/for_testing/GUI.exe differ diff --git a/MATLAB/GUI/for_testing/mccExcludedFiles.log b/MATLAB/GUI/for_testing/mccExcludedFiles.log new file mode 100644 index 0000000000000000000000000000000000000000..2971575563c9ce3ac7c2745b902afe3099f2a36c --- /dev/null +++ b/MATLAB/GUI/for_testing/mccExcludedFiles.log @@ -0,0 +1,7 @@ +The List of Excluded Files +Excluded files Exclusion Message ID Reason For Exclusion Exclusion Rule +C:/Program Files/MATLAB/R2016b/toolbox/local/+matlab/+internal/+toolboxes/addInstalledToolboxesToJavaPath.m MATLAB:depfun:req:ExcludedBy Cannot be packaged for use in the target environment MCR. Removed from the parts list by license Compiler. [Cc]:/Program Files/MATLAB/R2016b/toolbox/local/[+]matlab/[+]internal/[+]toolboxes/ +C:/Program Files/MATLAB/R2016b/toolbox/local/+matlab/+internal/+toolboxes/addInstalledToolboxesToPath.m MATLAB:depfun:req:ExcludedBy Cannot be packaged for use in the target environment MCR. Removed from the parts list by license Compiler. [Cc]:/Program Files/MATLAB/R2016b/toolbox/local/[+]matlab/[+]internal/[+]toolboxes/ +C:/Program Files/MATLAB/R2016b/toolbox/local/+matlab/+internal/+zipAddOns/addInstalledZipAddOnsToPath.m MATLAB:depfun:req:ExcludedBy Cannot be packaged for use in the target environment MCR. Removed from the parts list by license Compiler. [Cc]:/Program Files/MATLAB/R2016b/toolbox/local/[+]matlab/[+]internal/[+]zipAddOns/ +C:/Program Files/MATLAB/R2016b/toolbox/local/pathdef.m MATLAB:depfun:req:ExcludedBy Cannot be packaged for use in the target environment MCR. Removed from the parts list by license Compiler. [Cc]:/Program Files/MATLAB/R2016b/toolbox/local/pathdef[.]m +C:/Program Files/MATLAB/R2016b/toolbox/matlab/codetools/initdesktoputils.m MATLAB:depfun:req:ExcludedBy Cannot be packaged for use in the target environment MCR. Removed from the parts list by license Compiler. [Cc]:/Program Files/MATLAB/R2016b/toolbox/matlab/codetools/ diff --git a/MATLAB/GUI/for_testing/readme.txt b/MATLAB/GUI/for_testing/readme.txt new file mode 100644 index 0000000000000000000000000000000000000000..ec711d2a16f274234840ebe4a84fb88873efb8a6 --- /dev/null +++ b/MATLAB/GUI/for_testing/readme.txt @@ -0,0 +1,54 @@ +MATLAB Compiler + +1. Prerequisites for Deployment + +. Verify the MATLAB Runtime is installed and ensure you + have installed version 9.1 (R2016b). + +. If the MATLAB Runtime is not installed, do the following: + (1) enter + + >>mcrinstaller + + at MATLAB prompt. The MCRINSTALLER command displays the + location of the MATLAB Runtime installer. + + (2) run the MATLAB Runtime installer. + +Or download the Windows 64-bit version of the MATLAB Runtime for R2016b +from the MathWorks Web site by navigating to + + http://www.mathworks.com/products/compiler/mcr/index.html + + +For more information about the MATLAB Runtime and the MATLAB Runtime installer, see +Package and Distribute in the MATLAB Compiler documentation +in the MathWorks Documentation Center. + + +NOTE: You will need administrator rights to run MCRInstaller. + + +2. Files to Deploy and Package + +Files to package for Standalone +================================ +-GUI.exe +-MCRInstaller.exe + -if end users are unable to download the MATLAB Runtime using the above + link, include it when building your component by clicking + the "Runtime downloaded from web" link in the Deployment Tool +-This readme file + +3. Definitions + +For information on deployment terminology, go to +http://www.mathworks.com/help. Select MATLAB Compiler > +Getting Started > About Application Deployment > +Deployment Product Terms in the MathWorks Documentation +Center. + + + + + diff --git a/MATLAB/GUI/for_testing/requiredMCRProducts.txt b/MATLAB/GUI/for_testing/requiredMCRProducts.txt new file mode 100644 index 0000000000000000000000000000000000000000..3ed6af0990c9e5425b4c8a7a0733dbecfe2fbde2 --- /dev/null +++ b/MATLAB/GUI/for_testing/requiredMCRProducts.txt @@ -0,0 +1 @@ +35000 35010 \ No newline at end of file diff --git a/MATLAB/GUI/for_testing/splash.png b/MATLAB/GUI/for_testing/splash.png new file mode 100644 index 0000000000000000000000000000000000000000..d60c6faffbbd25bd799b1bb0b635526bb0928578 Binary files /dev/null and b/MATLAB/GUI/for_testing/splash.png differ diff --git a/MATLAB/a.wav b/MATLAB/a.wav new file mode 100644 index 0000000000000000000000000000000000000000..845a86d954bbe8a13ed320bcf0f206f790685939 Binary files /dev/null and b/MATLAB/a.wav differ diff --git a/MATLAB/b.wav b/MATLAB/b.wav new file mode 100644 index 0000000000000000000000000000000000000000..ce0a7fd790a45edad5af0216194969d152d8fa3e Binary files /dev/null and b/MATLAB/b.wav differ diff --git a/MATLAB/c.wav b/MATLAB/c.wav new file mode 100644 index 0000000000000000000000000000000000000000..58c727a5f9766815413379102b2e5497bae616e6 Binary files /dev/null and b/MATLAB/c.wav differ diff --git a/MATLAB/c4-c5.wav b/MATLAB/c4-c5.wav new file mode 100644 index 0000000000000000000000000000000000000000..96eccb379763234de67f831dc4ca8b62d06df002 Binary files /dev/null and b/MATLAB/c4-c5.wav differ diff --git a/MATLAB/cdefgab.wav b/MATLAB/cdefgab.wav new file mode 100644 index 0000000000000000000000000000000000000000..c6ed28c6aed220d24260284fa0183076237f92a2 Binary files /dev/null and b/MATLAB/cdefgab.wav differ diff --git a/MATLAB/chord-c.wav b/MATLAB/chord-c.wav new file mode 100644 index 0000000000000000000000000000000000000000..b62604fa508d1e263183fa85823fdfb290db4d61 Binary files /dev/null and b/MATLAB/chord-c.wav differ diff --git a/MATLAB/chord-c5.wav b/MATLAB/chord-c5.wav new file mode 100644 index 0000000000000000000000000000000000000000..036cb79a978fcdf7830541ea2fde189c67b64c71 Binary files /dev/null and b/MATLAB/chord-c5.wav differ diff --git a/MATLAB/chord-c7.wav b/MATLAB/chord-c7.wav new file mode 100644 index 0000000000000000000000000000000000000000..1eb28e5941d4125736b30e2d76d093e6c49066f3 Binary files /dev/null and b/MATLAB/chord-c7.wav differ diff --git a/MATLAB/chord.wav b/MATLAB/chord.wav new file mode 100644 index 0000000000000000000000000000000000000000..21086dfaed1bc110a9c7d61e4762414b53d7bef4 Binary files /dev/null and b/MATLAB/chord.wav differ diff --git a/MATLAB/d.wav b/MATLAB/d.wav new file mode 100644 index 0000000000000000000000000000000000000000..2013941ee8fab15e49dfce8c029647885eafc4c2 Binary files /dev/null and b/MATLAB/d.wav differ diff --git a/MATLAB/e.wav b/MATLAB/e.wav new file mode 100644 index 0000000000000000000000000000000000000000..689cdd9a861b47f03b1597ec3b9900645a8a2ca5 Binary files /dev/null and b/MATLAB/e.wav differ diff --git a/MATLAB/f.wav b/MATLAB/f.wav new file mode 100644 index 0000000000000000000000000000000000000000..b86408f95fd8086670963a9124afc201f88c2769 Binary files /dev/null and b/MATLAB/f.wav differ diff --git a/MATLAB/f4-f5-2.wav b/MATLAB/f4-f5-2.wav new file mode 100644 index 0000000000000000000000000000000000000000..bde23ccdbe0bb3250853eb48158d7acefe20aaaf Binary files /dev/null and b/MATLAB/f4-f5-2.wav differ diff --git a/MATLAB/f4-f5.wav b/MATLAB/f4-f5.wav new file mode 100644 index 0000000000000000000000000000000000000000..5bc3c5bfec55e9d6c5a42314a9d05f278d385c69 Binary files /dev/null and b/MATLAB/f4-f5.wav differ diff --git a/MATLAB/flue95.wav b/MATLAB/flue95.wav new file mode 100644 index 0000000000000000000000000000000000000000..af3d85026774a547c81886e53a146712d290b712 Binary files /dev/null and b/MATLAB/flue95.wav differ diff --git a/MATLAB/g.wav b/MATLAB/g.wav new file mode 100644 index 0000000000000000000000000000000000000000..0d21813e9ab464b01ea0a900aed7b210f6cae205 Binary files /dev/null and b/MATLAB/g.wav differ diff --git a/MATLAB/note-c.wav b/MATLAB/note-c.wav new file mode 100644 index 0000000000000000000000000000000000000000..ef716bb38a7b90e7e0f11bd27a9a2620ccbd88af Binary files /dev/null and b/MATLAB/note-c.wav differ diff --git a/MATLAB/record.m b/MATLAB/record.m new file mode 100644 index 0000000000000000000000000000000000000000..7921456e312beab81fdff54d992808c3f4e4fd10 --- /dev/null +++ b/MATLAB/record.m @@ -0,0 +1,83 @@ +% Function that records sound from the microphone at a specified sampling +% rate for a fixed number of seconds +% +% Fs - the sampling rate (Hz) +% durationSecs - the (optional) duration of the recording (seconds) +% N - the (optional) FFT N-point block size +function [recorder] = record(Fs,durationSecs,N) + + if ~exist('durationSecs','var') + % default to five minutes of recording + durationSecs = 300; + end + + if ~exist('N','var') + % default to the sampling rate + N = Fs; + end + + % add an extra half-second so that we get the full duration in our + % processing + durationSecs = durationSecs + 0.5; + + % index of the last sample obtained from our recording + lastSampleIdx = 0; + + % start time of the recording + atTimSecs = 0; + + % create the audio recorder + recorder = audiorecorder(Fs,8,1); + + % assign a timer function to the recorder + set(recorder,'TimerPeriod',1,'TimerFcn',@audioTimerCallback); + + % create a figure with two subplots + hFig = figure; + hAxes1 = subplot(2,1,1); + hAxes2 = subplot(2,1,2); + + % create the graphics handles to the data that will be plotted on each + % axes + hPlot1 = plot(hAxes1,NaN,NaN); + hPlot2 = plot(hAxes2,NaN,NaN); + + drawnow; + + % start the recording + record(recorder,durationSecs); + + % define the timer callback + function audioTimerCallback(hObject,~) + + % get the sample data + samples = getaudiodata(hObject); + + % skip if not enough data + if length(samples)<lastSampleIdx+1+Fs + return; + end + + % extract the samples that we have not performed an FFT on + X = samples(lastSampleIdx+1:lastSampleIdx+Fs); + + % compute the FFT + Y = fft(X,N); + + % plot the data + t = linspace(0,1-1/Fs,Fs) + atTimSecs; + set(hPlot1,'XData',t,'YData',X); + + f = 0:Fs/N:(Fs/N)*(N-1); + set(hPlot2,'XData',f,'YData',abs(Y)); + + % increment the last sample index + lastSampleIdx = lastSampleIdx + Fs; + + % increment the time in seconds "counter" + atTimSecs = atTimSecs + 1; + end + + % do not exit function until the figure has been deleted + waitfor(hFig); +end \ No newline at end of file diff --git a/README.md b/README.md deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/add b/add deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/app/.gitignore b/app/.gitignore deleted file mode 100644 index 796b96d1c402326528b4ba3c12ee9d92d0e212e9..0000000000000000000000000000000000000000 --- a/app/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build diff --git a/app/build.gradle b/app/build.gradle deleted file mode 100644 index db67506c7cb731b55c8b5e4ac4e5f2e66fc0e678..0000000000000000000000000000000000000000 --- a/app/build.gradle +++ /dev/null @@ -1,29 +0,0 @@ -apply plugin: 'com.android.application' - -android { - compileSdkVersion 24 - buildToolsVersion "24.0.3" - defaultConfig { - applicationId "com.example.jjiay.chordteller" - minSdkVersion 15 - targetSdkVersion 24 - versionCode 1 - versionName "1.0" - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" - } - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } -} - -dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) - androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { - exclude group: 'com.android.support', module: 'support-annotations' - }) - compile 'com.android.support:appcompat-v7:24.2.1' - testCompile 'junit:junit:4.12' -} diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro deleted file mode 100644 index 437397f7ddb78ffdd3d4c39734d658db7b480ffa..0000000000000000000000000000000000000000 --- a/app/proguard-rules.pro +++ /dev/null @@ -1,17 +0,0 @@ -# Add project specific ProGuard rules here. -# By default, the flags in this file are appended to flags specified -# in C:\Users\jjiay\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt -# You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# Add any project specific keep options here: - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} diff --git a/app/src/androidTest/java/com/example/jjiay/chordteller/ExampleInstrumentedTest.java b/app/src/androidTest/java/com/example/jjiay/chordteller/ExampleInstrumentedTest.java deleted file mode 100644 index dd875f87406f43a66bb9fdf26f9c0c7e263e2d95..0000000000000000000000000000000000000000 --- a/app/src/androidTest/java/com/example/jjiay/chordteller/ExampleInstrumentedTest.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.example.jjiay.chordteller; - -import android.content.Context; -import android.support.test.InstrumentationRegistry; -import android.support.test.runner.AndroidJUnit4; - -import org.junit.Test; -import org.junit.runner.RunWith; - -import static org.junit.Assert.*; - -/** - * Instrumentation test, which will execute on an Android device. - * - * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> - */ -@RunWith(AndroidJUnit4.class) -public class ExampleInstrumentedTest { - @Test - public void useAppContext() throws Exception { - // Context of the app under test. - Context appContext = InstrumentationRegistry.getTargetContext(); - - assertEquals("com.example.jjiay.chordteller", appContext.getPackageName()); - } -} diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml deleted file mode 100644 index f51b8974ea26e654509340f0c5516227c85f6b3e..0000000000000000000000000000000000000000 --- a/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<manifest xmlns:android="http://schemas.android.com/apk/res/android" - package="com.example.jjiay.chordteller"> - - <application - android:allowBackup="true" - android:icon="@mipmap/ic_launcher" - android:label="@string/app_name" - android:supportsRtl="true" - android:theme="@style/AppTheme"> - <activity android:name=".MainActivity"> - <intent-filter> - <action android:name="android.intent.action.MAIN" /> - - <category android:name="android.intent.category.LAUNCHER" /> - </intent-filter> - </activity> - </application> - -</manifest> \ No newline at end of file diff --git a/app/src/main/java/com/example/jjiay/chordteller/MainActivity.java b/app/src/main/java/com/example/jjiay/chordteller/MainActivity.java deleted file mode 100644 index cadaae802649a62d2e013141573dbbb9f3422bed..0000000000000000000000000000000000000000 --- a/app/src/main/java/com/example/jjiay/chordteller/MainActivity.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.example.jjiay.chordteller; - -import android.support.v7.app.AppCompatActivity; -import android.os.Bundle; - -public class MainActivity extends AppCompatActivity { - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_main); - } -} diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml deleted file mode 100644 index 30d4953fd98c7c490333c5e65868f87cf9b528a2..0000000000000000000000000000000000000000 --- a/app/src/main/res/layout/activity_main.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:tools="http://schemas.android.com/tools" - android:id="@+id/activity_main" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:paddingBottom="@dimen/activity_vertical_margin" - android:paddingLeft="@dimen/activity_horizontal_margin" - android:paddingRight="@dimen/activity_horizontal_margin" - android:paddingTop="@dimen/activity_vertical_margin" - tools:context="com.example.jjiay.chordteller.MainActivity"> - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="Hello World!" /> -</RelativeLayout> diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index cde69bcccec65160d92116f20ffce4fce0b5245c..0000000000000000000000000000000000000000 Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index c133a0cbd379f5af6dbf1a899a0293ca5eccfad0..0000000000000000000000000000000000000000 Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index bfa42f0e7b91d006d22352c9ff2f134e504e3c1d..0000000000000000000000000000000000000000 Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index 324e72cdd7480cb983fa1bcc7ce686e51ef87fe7..0000000000000000000000000000000000000000 Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index aee44e138434630332d88b1680f33c4b24c70ab3..0000000000000000000000000000000000000000 Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/app/src/main/res/values-w820dp/dimens.xml b/app/src/main/res/values-w820dp/dimens.xml deleted file mode 100644 index 63fc816444614bd64f68a372d1f93211628ee51d..0000000000000000000000000000000000000000 --- a/app/src/main/res/values-w820dp/dimens.xml +++ /dev/null @@ -1,6 +0,0 @@ -<resources> - <!-- Example customization of dimensions originally defined in res/values/dimens.xml - (such as screen margins) for screens with more than 820dp of available width. This - would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). --> - <dimen name="activity_horizontal_margin">64dp</dimen> -</resources> diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml deleted file mode 100644 index 3ab3e9cbce07f7cdc941fc8ba424c05e83ed80f0..0000000000000000000000000000000000000000 --- a/app/src/main/res/values/colors.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<resources> - <color name="colorPrimary">#3F51B5</color> - <color name="colorPrimaryDark">#303F9F</color> - <color name="colorAccent">#FF4081</color> -</resources> diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml deleted file mode 100644 index 47c82246738c4d056e8030d3a259206f42e8e15d..0000000000000000000000000000000000000000 --- a/app/src/main/res/values/dimens.xml +++ /dev/null @@ -1,5 +0,0 @@ -<resources> - <!-- Default screen margins, per the Android Design guidelines. --> - <dimen name="activity_horizontal_margin">16dp</dimen> - <dimen name="activity_vertical_margin">16dp</dimen> -</resources> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml deleted file mode 100644 index b664050a6e563a8fd337581b66dc83f466c3ebb6..0000000000000000000000000000000000000000 --- a/app/src/main/res/values/strings.xml +++ /dev/null @@ -1,3 +0,0 @@ -<resources> - <string name="app_name">ChordTeller</string> -</resources> diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml deleted file mode 100644 index 5885930df6d10edf3d6df40d6556297d11f953da..0000000000000000000000000000000000000000 --- a/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,11 +0,0 @@ -<resources> - - <!-- Base application theme. --> - <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> - <!-- Customize your theme here. --> - <item name="colorPrimary">@color/colorPrimary</item> - <item name="colorPrimaryDark">@color/colorPrimaryDark</item> - <item name="colorAccent">@color/colorAccent</item> - </style> - -</resources> diff --git a/app/src/test/java/com/example/jjiay/chordteller/ExampleUnitTest.java b/app/src/test/java/com/example/jjiay/chordteller/ExampleUnitTest.java deleted file mode 100644 index e035bcef4e162f2d2d71c4d6f1feff0f57aa2153..0000000000000000000000000000000000000000 --- a/app/src/test/java/com/example/jjiay/chordteller/ExampleUnitTest.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.example.jjiay.chordteller; - -import org.junit.Test; - -import static org.junit.Assert.*; - -/** - * Example local unit test, which will execute on the development machine (host). - * - * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> - */ -public class ExampleUnitTest { - @Test - public void addition_isCorrect() throws Exception { - assertEquals(4, 2 + 2); - } -} \ No newline at end of file diff --git a/build.gradle b/build.gradle deleted file mode 100644 index 53f4fad67c4fb01175c53849bd4cd9e0d4036218..0000000000000000000000000000000000000000 --- a/build.gradle +++ /dev/null @@ -1,23 +0,0 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - -buildscript { - repositories { - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:2.2.1' - - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files - } -} - -allprojects { - repositories { - jcenter() - } -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/gradle.properties b/gradle.properties deleted file mode 100644 index aac7c9b4614ccfde6c721f24994cf30885a791d0..0000000000000000000000000000000000000000 --- a/gradle.properties +++ /dev/null @@ -1,17 +0,0 @@ -# Project-wide Gradle settings. - -# IDE (e.g. Android Studio) users: -# Gradle settings configured through the IDE *will override* -# any settings specified in this file. - -# For more details on how to configure your build environment visit -# http://www.gradle.org/docs/current/userguide/build_environment.html - -# Specifies the JVM arguments used for the daemon process. -# The setting is particularly useful for tweaking memory settings. -org.gradle.jvmargs=-Xmx1536m - -# When configured, Gradle will run in incubating parallel mode. -# This option should only be used with decoupled projects. More details, visit -# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 13372aef5e24af05341d49695ee84e5f9b594659..0000000000000000000000000000000000000000 Binary files a/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 04e285f34080d98841a9fac832466aec720aecec..0000000000000000000000000000000000000000 --- a/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Mon Dec 28 10:00:20 PST 2015 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip diff --git a/gradlew b/gradlew deleted file mode 100644 index 9d82f78915133e1c35a6ea51252590fb38efac2f..0000000000000000000000000000000000000000 --- a/gradlew +++ /dev/null @@ -1,160 +0,0 @@ -#!/usr/bin/env bash - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; -esac - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") -} -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" - -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/gradlew.bat b/gradlew.bat deleted file mode 100644 index 8a0b282aa6885fb573c106b3551f7275c5f17e8e..0000000000000000000000000000000000000000 --- a/gradlew.bat +++ /dev/null @@ -1,90 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windowz variants - -if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/settings.gradle b/settings.gradle deleted file mode 100644 index e7b4def49cb53d9aa04228dd3edb14c9e635e003..0000000000000000000000000000000000000000 --- a/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -include ':app'