Development notes » History » Version 1
Chris Cannam, 2014-02-14 03:25 PM
1 | 1 | Chris Cannam | h1. Development notes |
---|---|---|---|
2 | 1 | Chris Cannam | |
3 | 1 | Chris Cannam | |
4 | 1 | Chris Cannam | h3. Some issues on building the compiled version of the MATLAB code |
5 | 1 | Chris Cannam | |
6 | 1 | Chris Cannam | h4. Reading config files (m files using eval) |
7 | 1 | Chris Cannam | |
8 | 1 | Chris Cannam | When reading/writing files - such as config files - not everything will behave like in the matlab console. |
9 | 1 | Chris Cannam | |
10 | 1 | Chris Cannam | The way the config files were being read was not working - was simply using eval. It was necessary to read the file manually, adapting the suggestion found here: http://stackoverflow.com/questions/185461/reading-input-m-file-in-a-main-m-file#185660 |
11 | 1 | Chris Cannam | |
12 | 1 | Chris Cannam | > (...)in a function we would create a text file, INP, containing our parameters. |
13 | 1 | Chris Cannam | > We create this file in the directory returned by the ctfroot function. |
14 | 1 | Chris Cannam | > Then, in MAIN, we would use the following to retrieve these parameters: |
15 | 1 | Chris Cannam | > |
16 | 1 | Chris Cannam | <pre> |
17 | 1 | Chris Cannam | eval(char(textread(fullfile(ctfroot, INP), '%s', 'whitespace', ''); |
18 | 1 | Chris Cannam | </pre> |
19 | 1 | Chris Cannam | |
20 | 1 | Chris Cannam | See commit:d9262cdbfb38d9262cdbfb38 on the jabuilder-int branch. |
21 | 1 | Chris Cannam | |
22 | 1 | Chris Cannam | h4. Other input/output files |
23 | 1 | Chris Cannam | |
24 | 1 | Chris Cannam | At the moment the input/output is done in the same folder where the the java class is being called from (hrir_final.mat and binsimecho.wav...). |
25 | 1 | Chris Cannam | |
26 | 1 | Chris Cannam | h3. Building the isvr jar |
27 | 1 | Chris Cannam | |
28 | 1 | Chris Cannam | <pre> |
29 | 1 | Chris Cannam | > /Applications/MATLAB_R2013b.app/bin/mcc -W "java:uk.ac.soton.isvr,HumanEcho" -d ./scratch -T "link:lib" -v "class{HumanEcho:./webapp/WEB-INF/mcode/gen_echo.m}" |
30 | 1 | Chris Cannam | </pre> |
31 | 1 | Chris Cannam | |
32 | 1 | Chris Cannam | h4. Contents of the isvr jar |
33 | 1 | Chris Cannam | |
34 | 1 | Chris Cannam | <pre> |
35 | 1 | Chris Cannam | > jar tvf scratch/isvr.jar |
36 | 1 | Chris Cannam | 0 Tue Nov 26 16:47:42 GMT 2013 META-INF/ |
37 | 1 | Chris Cannam | 68 Tue Nov 26 16:47:44 GMT 2013 META-INF/MANIFEST.MF |
38 | 1 | Chris Cannam | 0 Tue Nov 26 16:47:30 GMT 2013 uk/ |
39 | 1 | Chris Cannam | 0 Tue Nov 26 16:47:30 GMT 2013 uk/ac/ |
40 | 1 | Chris Cannam | 0 Tue Nov 26 16:47:30 GMT 2013 uk/ac/soton/ |
41 | 1 | Chris Cannam | 0 Tue Nov 26 16:47:36 GMT 2013 uk/ac/soton/isvr/ |
42 | 1 | Chris Cannam | 3895 Tue Nov 26 16:47:36 GMT 2013 uk/ac/soton/isvr/HumanEcho.class |
43 | 1 | Chris Cannam | 336 Tue Nov 26 16:47:36 GMT 2013 uk/ac/soton/isvr/HumanEchoRemote.class |
44 | 1 | Chris Cannam | 168802 Tue Nov 26 16:47:30 GMT 2013 uk/ac/soton/isvr/isvr.ctf |
45 | 1 | Chris Cannam | 1798 Tue Nov 26 16:47:36 GMT 2013 uk/ac/soton/isvr/IsvrMCRFactory.class |
46 | 1 | Chris Cannam | </pre> |
47 | 1 | Chris Cannam | |
48 | 1 | Chris Cannam | h3. Configuration |
49 | 1 | Chris Cannam | |
50 | 1 | Chris Cannam | The app configuration file can be found in @WebContent/WEB-INF/classes/myapp.properties@ |
51 | 1 | Chris Cannam | |
52 | 1 | Chris Cannam | h3. Logging |
53 | 1 | Chris Cannam | |
54 | 1 | Chris Cannam | We are using log4j for logging. The log4j jar (1.2.17) is included in the repository. The configuration file is in @webapp/WEB-INF/classes/@ |
55 | 1 | Chris Cannam | |
56 | 1 | Chris Cannam | h2. Building the webapp with Javabuilder/MATLAB (using the precompiled isvr.jar) |
57 | 1 | Chris Cannam | |
58 | 1 | Chris Cannam | * Download MATLAB MCR 2013b (8.2) version from this page: |
59 | 1 | Chris Cannam | <pre> |
60 | 1 | Chris Cannam | http://www.mathworks.co.uk/products/compiler/mcr/ |
61 | 1 | Chris Cannam | </pre> |
62 | 1 | Chris Cannam | |
63 | 1 | Chris Cannam | h2. Tomcat |
64 | 1 | Chris Cannam | |
65 | 1 | Chris Cannam | * Using Tomcat 7 (Catalina). Download from |
66 | 1 | Chris Cannam | <pre> |
67 | 1 | Chris Cannam | http://tomcat.apache.org/download-70.cgi |
68 | 1 | Chris Cannam | </pre> |