Skip to content

Commit b607350

Browse files
committed
Add license and readme
1 parent 056b2d6 commit b607350

File tree

2 files changed

+149
-0
lines changed

2 files changed

+149
-0
lines changed

LICENSE.txt

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
THE CRAPL v0 BETA 1
2+
3+
4+
0. Information about the CRAPL
5+
6+
If you have questions or concerns about the CRAPL, or you need more
7+
information about this license, please contact:
8+
9+
Matthew Might
10+
http://matt.might.net/
11+
12+
13+
I. Preamble
14+
15+
Science thrives on openness.
16+
17+
In modern science, it is often infeasible to replicate claims without
18+
access to the software underlying those claims.
19+
20+
Let's all be honest: when scientists write code, aesthetics and
21+
software engineering principles take a back seat to having running,
22+
working code before a deadline.
23+
24+
So, let's release the ugly. And, let's be proud of that.
25+
26+
27+
II. Definitions
28+
29+
1. "This License" refers to version 0 beta 0 of the Community
30+
Research and Academic Programming License (the CRAPL).
31+
32+
2. "The Program" refers to the medley of source code, shell scripts,
33+
executables, objects, libraries and build files supplied to You,
34+
or these files as modified by You.
35+
36+
[Any appearance of design in the Program is purely coincidental and
37+
should not in any way be mistaken for evidence of thoughtful
38+
software construction.]
39+
40+
3. "You" refers to the person or persons brave and daft enough to use
41+
the Program.
42+
43+
4. "The Documentation" refers to the Program.
44+
45+
5. "The Author" probably refers to the caffeine-addled graduate
46+
student that got the Program to work moments before a submission
47+
deadline.
48+
49+
50+
III. Terms
51+
52+
1. By reading this sentence, You have agreed to the terms and
53+
conditions of this License.
54+
55+
2. If the Program shows any evidence of having been properly tested
56+
or verfied, You will disregard this evidence.
57+
58+
3. You agree to hold the Author free from shame, embarrassment or
59+
ridicule for any hacks, kludges or leaps of faith found within the
60+
Program.
61+
62+
4. You recognize that any request for support for the Program will be
63+
discarded with extreme prejudice.
64+
65+
5. The Author reserves all rights to the Program, except for any
66+
rights granted under any additional licenses attached to the
67+
Program.
68+
69+
70+
IV. Permissions
71+
72+
1. You are permitted to use the Program to validate published
73+
scientific claims.
74+
75+
2. You are permitted to use the Program to validate scientific claims
76+
submitted for peer review, under the condition that You keep
77+
modifications to the Program confidential until those claims have
78+
been published.
79+
80+
3. You are permitted to use and/or modify the Program for the
81+
validation of novel scientific claims if You make a good-faith
82+
attempt to notify the Author of Your work and Your claims prior to
83+
submission for publication.
84+
85+
4. If You publicly release any claims or data that were supported or
86+
generated by the Program or a modification thereof, in whole or in
87+
part, You will release any inputs supplied to the Program and any
88+
modifications You made to the Progam. This License will be in
89+
effect for the modified program.
90+
91+
92+
V. Disclaimer of Warranty
93+
94+
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
95+
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
96+
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
97+
WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
98+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
99+
A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
100+
PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
101+
DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
102+
CORRECTION.
103+
104+
105+
VI. Limitation of Liability
106+
107+
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
108+
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR
109+
CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
110+
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
111+
ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT
112+
NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR
113+
LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM
114+
TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
115+
PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Syllable Detector - MATLAB implementation
2+
3+
The syllable detector is a MATLAB program that uses the DSP functionality
4+
to perform low-latency syllable detection based on a simple neural network
5+
trained using the [training code](https://github.com/gardner-lab/syllable-detector-learn)
6+
created by @bwpearre. Detection events result in a TTL pulse that can be generated
7+
either on an audio channel or via an Arduino (pin 7). For the Arduino output, see the
8+
[arduino branch](https://github.com/gardner-lab/syllable-detector-matlab/tree/arduino).
9+
10+
This detector is less performant than the
11+
[Swift implementation](https://raw.githubusercontent.com/gardner-lab/syllable-detector-swift),
12+
but offers a cross-platform solution with lower barriers to entry and more flexibility
13+
for debugging. Performance an be tuned by adjusting the buffer size for input and output,
14+
but lowering these values too much (less than 2-5ms) can result in buffer overruns and
15+
underruns, that will hurt accuracy.
16+
17+
Note that the MATLAB implementation may not support all the same normalization options that are available in the training code and Swift implementation.
18+
19+
To start the detector, use the `nndetector_live` command. You will be prompted to
20+
select what input and output devices to use, as well as for a ".mat" file containing
21+
a trained detector.
22+
23+
You can include parameters when calling the `nndetector_live` command. For example, to
24+
tune the audio buffer sizes to 2ms, use the following command:
25+
26+
```
27+
nndetector_live('buffer_size_input', 0.002, 'buffer_size_output', 0.002);
28+
```
29+
30+
This code requies the Data Acquisition Toolbox and the Parallel Computing Toolbox.
31+
32+
This code was created by Jeffrey Markowitz @jmarkow, and underwent minor modifications
33+
to optimize performance (using "spmd" from the Parallel toolbox) by L. Nathan Perkins
34+
@nathanntg.

0 commit comments

Comments
 (0)