react-native-gizwits-sdk-v5 1.5.5-thirdbluetooth → 1.5.6-thirdbluetooth
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/libs/sdk-bluetooth-release.aar +0 -0
- package/ios/GizwitsiOSSDK.framework/GizwitsiOSSDK +0 -0
- package/ios/GizwitsiOSSDK.framework/Headers/CocoaAsyncSocket.h +18 -0
- package/ios/GizwitsiOSSDK.framework/Headers/DDASLLogger.h +41 -0
- package/ios/GizwitsiOSSDK.framework/Headers/DDAbstractDatabaseLogger.h +102 -0
- package/ios/GizwitsiOSSDK.framework/Headers/DDContextFilterLogFormatter.h +63 -0
- package/ios/GizwitsiOSSDK.framework/Headers/DDDispatchQueueLogFormatter.h +128 -0
- package/ios/GizwitsiOSSDK.framework/Headers/DDFileLogger.h +340 -0
- package/ios/GizwitsiOSSDK.framework/Headers/DDLog+LOGV.h +99 -0
- package/ios/GizwitsiOSSDK.framework/Headers/DDLog.h +632 -0
- package/ios/GizwitsiOSSDK.framework/Headers/DDMultiFormatter.h +30 -0
- package/ios/GizwitsiOSSDK.framework/Headers/DDTTYLogger.h +171 -0
- package/ios/GizwitsiOSSDK.framework/Headers/ESPAES.h +19 -0
- package/ios/GizwitsiOSSDK.framework/Headers/ESPDataCode.h +44 -0
- package/ios/GizwitsiOSSDK.framework/Headers/ESPDatumCode.h +38 -0
- package/ios/GizwitsiOSSDK.framework/Headers/ESPGuideCode.h +15 -0
- package/ios/GizwitsiOSSDK.framework/Headers/ESPTools.h +22 -0
- package/ios/GizwitsiOSSDK.framework/Headers/ESPTouch.h +36 -0
- package/ios/GizwitsiOSSDK.framework/Headers/ESPTouchDelegate.h +24 -0
- package/ios/GizwitsiOSSDK.framework/Headers/ESPTouchGenerator.h +46 -0
- package/ios/GizwitsiOSSDK.framework/Headers/ESPTouchResult.h +36 -0
- package/ios/GizwitsiOSSDK.framework/Headers/ESPTouchTask.h +124 -0
- package/ios/GizwitsiOSSDK.framework/Headers/ESPTouchTaskParameter.h +173 -0
- package/ios/GizwitsiOSSDK.framework/Headers/ESPUDPSocketClient.h +50 -0
- package/ios/GizwitsiOSSDK.framework/Headers/ESPUDPSocketServer.h +49 -0
- package/ios/GizwitsiOSSDK.framework/Headers/ESP_ByteUtil.h +128 -0
- package/ios/GizwitsiOSSDK.framework/Headers/ESP_CRC8.h +61 -0
- package/ios/GizwitsiOSSDK.framework/Headers/ESP_NetUtil.h +82 -0
- package/ios/GizwitsiOSSDK.framework/Headers/ESP_WifiUtil.h +33 -0
- package/ios/GizwitsiOSSDK.framework/Headers/ForegroundReconnection.h +23 -0
- package/ios/GizwitsiOSSDK.framework/Headers/GCDTimer.h +19 -0
- package/ios/GizwitsiOSSDK.framework/Headers/GizwitsiOSSDK-Swift.h +338 -0
- package/ios/GizwitsiOSSDK.framework/Headers/GizwitsiOSSDK.h +24 -0
- package/ios/GizwitsiOSSDK.framework/Headers/MQTTClient.h +39 -0
- package/ios/GizwitsiOSSDK.framework/Headers/MQTTInMemoryPersistence.h +16 -0
- package/ios/GizwitsiOSSDK.framework/Headers/MQTTSSLSecurityPolicyDecoder.h +19 -0
- package/ios/GizwitsiOSSDK.framework/Headers/MQTTSSLSecurityPolicyEncoder.h +18 -0
- package/ios/GizwitsiOSSDK.framework/Headers/MQTTSessionLegacy.h +112 -0
- package/ios/GizwitsiOSSDK.framework/Headers/MQTTSessionSynchron.h +194 -0
- package/ios/GizwitsiOSSDK.framework/Headers/MQTTStrict.h +33 -0
- package/ios/GizwitsiOSSDK.framework/Headers/MQTTUntil.h +14 -0
- package/ios/GizwitsiOSSDK.framework/Headers/ReconnectTimer.h +21 -0
- package/ios/GizwitsiOSSDK.framework/Headers/_GCDAsyncSocket.h +1226 -0
- package/ios/GizwitsiOSSDK.framework/Headers/_GCDAsyncUdpSocket.h +1036 -0
- package/ios/GizwitsiOSSDK.framework/Headers/_GizwitsParser.h +61 -0
- package/ios/GizwitsiOSSDK.framework/Headers/_MQTTCFSocketDecoder.h +39 -0
- package/ios/GizwitsiOSSDK.framework/Headers/_MQTTCFSocketEncoder.h +38 -0
- package/ios/GizwitsiOSSDK.framework/Headers/_MQTTCFSocketTransport.h +79 -0
- package/ios/GizwitsiOSSDK.framework/Headers/_MQTTCoreDataPersistence.h +21 -0
- package/ios/GizwitsiOSSDK.framework/Headers/_MQTTDecoder.h +66 -0
- package/ios/GizwitsiOSSDK.framework/Headers/_MQTTLog.h +123 -0
- package/ios/GizwitsiOSSDK.framework/Headers/_MQTTMessage.h +233 -0
- package/ios/GizwitsiOSSDK.framework/Headers/_MQTTPersistence.h +124 -0
- package/ios/GizwitsiOSSDK.framework/Headers/_MQTTProperties.h +76 -0
- package/ios/GizwitsiOSSDK.framework/Headers/_MQTTSSLSecurityPolicy.h +158 -0
- package/ios/GizwitsiOSSDK.framework/Headers/_MQTTSSLSecurityPolicyTransport.h +30 -0
- package/ios/GizwitsiOSSDK.framework/Headers/_MQTTSession.h +886 -0
- package/ios/GizwitsiOSSDK.framework/Headers/_MQTTSessionManager.h +237 -0
- package/ios/GizwitsiOSSDK.framework/Headers/_MQTTTransport.h +114 -0
- package/ios/GizwitsiOSSDK.framework/Headers/_SSZipArchive.h +178 -0
- package/ios/GizwitsiOSSDK.framework/Headers/_SSZipCommon.h +71 -0
- package/ios/GizwitsiOSSDK.framework/Headers/_ZipArchive.h +26 -0
- package/ios/GizwitsiOSSDK.framework/Headers/a_weighting.h +88 -0
- package/ios/GizwitsiOSSDK.framework/Headers/aubio.h +231 -0
- package/ios/GizwitsiOSSDK.framework/Headers/audio_unit.h +61 -0
- package/ios/GizwitsiOSSDK.framework/Headers/awhitening.h +125 -0
- package/ios/GizwitsiOSSDK.framework/Headers/beattracking.h +121 -0
- package/ios/GizwitsiOSSDK.framework/Headers/biquad.h +75 -0
- package/ios/GizwitsiOSSDK.framework/Headers/c_weighting.h +88 -0
- package/ios/GizwitsiOSSDK.framework/Headers/common.h +104 -0
- package/ios/GizwitsiOSSDK.framework/Headers/cvec.h +247 -0
- package/ios/GizwitsiOSSDK.framework/Headers/dct.h +85 -0
- package/ios/GizwitsiOSSDK.framework/Headers/fft.h +144 -0
- package/ios/GizwitsiOSSDK.framework/Headers/filter.h +176 -0
- package/ios/GizwitsiOSSDK.framework/Headers/filterbank.h +90 -0
- package/ios/GizwitsiOSSDK.framework/Headers/filterbank_mel.h +72 -0
- package/ios/GizwitsiOSSDK.framework/Headers/fmat.h +172 -0
- package/ios/GizwitsiOSSDK.framework/Headers/fvec.h +178 -0
- package/ios/GizwitsiOSSDK.framework/Headers/hist.h +63 -0
- package/ios/GizwitsiOSSDK.framework/Headers/ioutils.h +60 -0
- package/ios/GizwitsiOSSDK.framework/Headers/log.h +99 -0
- package/ios/GizwitsiOSSDK.framework/Headers/lvec.h +118 -0
- package/ios/GizwitsiOSSDK.framework/Headers/mathutils.h +330 -0
- package/ios/GizwitsiOSSDK.framework/Headers/mfcc.h +79 -0
- package/ios/GizwitsiOSSDK.framework/Headers/musicutils.h +171 -0
- package/ios/GizwitsiOSSDK.framework/Headers/notes.h +113 -0
- package/ios/GizwitsiOSSDK.framework/Headers/onset.h +347 -0
- package/ios/GizwitsiOSSDK.framework/Headers/parameter.h +159 -0
- package/ios/GizwitsiOSSDK.framework/Headers/peakpicker.h +57 -0
- package/ios/GizwitsiOSSDK.framework/Headers/phasevoc.h +112 -0
- package/ios/GizwitsiOSSDK.framework/Headers/pitch.h +197 -0
- package/ios/GizwitsiOSSDK.framework/Headers/pitchfcomb.h +76 -0
- package/ios/GizwitsiOSSDK.framework/Headers/pitchmcomb.h +77 -0
- package/ios/GizwitsiOSSDK.framework/Headers/pitchschmitt.h +75 -0
- package/ios/GizwitsiOSSDK.framework/Headers/pitchspecacf.h +103 -0
- package/ios/GizwitsiOSSDK.framework/Headers/pitchyin.h +100 -0
- package/ios/GizwitsiOSSDK.framework/Headers/pitchyinfast.h +102 -0
- package/ios/GizwitsiOSSDK.framework/Headers/pitchyinfft.h +99 -0
- package/ios/GizwitsiOSSDK.framework/Headers/resampler.h +65 -0
- package/ios/GizwitsiOSSDK.framework/Headers/sampler.h +140 -0
- package/ios/GizwitsiOSSDK.framework/Headers/scale.h +80 -0
- package/ios/GizwitsiOSSDK.framework/Headers/sink.h +181 -0
- package/ios/GizwitsiOSSDK.framework/Headers/sink_apple_audio.h +163 -0
- package/ios/GizwitsiOSSDK.framework/Headers/sink_sndfile.h +162 -0
- package/ios/GizwitsiOSSDK.framework/Headers/sink_wavwrite.h +162 -0
- package/ios/GizwitsiOSSDK.framework/Headers/source.h +184 -0
- package/ios/GizwitsiOSSDK.framework/Headers/source_apple_audio.h +156 -0
- package/ios/GizwitsiOSSDK.framework/Headers/source_avcodec.h +155 -0
- package/ios/GizwitsiOSSDK.framework/Headers/source_sndfile.h +155 -0
- package/ios/GizwitsiOSSDK.framework/Headers/source_wavread.h +160 -0
- package/ios/GizwitsiOSSDK.framework/Headers/specdesc.h +204 -0
- package/ios/GizwitsiOSSDK.framework/Headers/tempo.h +255 -0
- package/ios/GizwitsiOSSDK.framework/Headers/tss.h +103 -0
- package/ios/GizwitsiOSSDK.framework/Headers/types.h +70 -0
- package/ios/GizwitsiOSSDK.framework/Headers/vecutils.h +116 -0
- package/ios/GizwitsiOSSDK.framework/Headers/wavetable.h +178 -0
- package/ios/GizwitsiOSSDK.framework/Info.plist +0 -0
- package/ios/GizwitsiOSSDK.framework/LICENSE +17 -0
- package/ios/GizwitsiOSSDK.framework/Modules/GizwitsiOSSDK.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
- package/ios/GizwitsiOSSDK.framework/Modules/GizwitsiOSSDK.swiftmodule/arm64-apple-ios.abi.json +57489 -0
- package/ios/GizwitsiOSSDK.framework/Modules/GizwitsiOSSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +1752 -0
- package/ios/GizwitsiOSSDK.framework/Modules/GizwitsiOSSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/GizwitsiOSSDK.framework/Modules/GizwitsiOSSDK.swiftmodule/arm64-apple-ios.swiftinterface +1752 -0
- package/ios/GizwitsiOSSDK.framework/Modules/GizwitsiOSSDK.swiftmodule/arm64-apple-ios.swiftmodule +0 -0
- package/ios/GizwitsiOSSDK.framework/Modules/module.modulemap +11 -0
- package/ios/GizwitsiOSSDK.framework/PrivacyInfo.xcprivacy +23 -0
- package/ios/GizwitsiOSSDK.framework/README.md +31 -0
- package/package.json +1 -1
- package/react-native-gizwits-sdk-v5.podspec +2 -2
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright (C) 2007-2013 Paul Brossier <piem@aubio.org>
|
|
3
|
+
and Amaury Hazan <ahazan@iua.upf.edu>
|
|
4
|
+
|
|
5
|
+
This file is part of aubio.
|
|
6
|
+
|
|
7
|
+
aubio is free software: you can redistribute it and/or modify
|
|
8
|
+
it under the terms of the GNU General Public License as published by
|
|
9
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
10
|
+
(at your option) any later version.
|
|
11
|
+
|
|
12
|
+
aubio is distributed in the hope that it will be useful,
|
|
13
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
GNU General Public License for more details.
|
|
16
|
+
|
|
17
|
+
You should have received a copy of the GNU General Public License
|
|
18
|
+
along with aubio. If not, see <http://www.gnu.org/licenses/>.
|
|
19
|
+
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/** \file
|
|
23
|
+
|
|
24
|
+
Mel-Frequency Cepstrum Coefficients object
|
|
25
|
+
|
|
26
|
+
This object computes MFCC coefficients on an input cvec_t.
|
|
27
|
+
|
|
28
|
+
The implementation follows the specifications established by Malcolm Slaney
|
|
29
|
+
in its Auditory Toolbox, available online (see file mfcc.m).
|
|
30
|
+
|
|
31
|
+
http://engineering.ecn.purdue.edu/~malcolm/interval/1998-010/
|
|
32
|
+
|
|
33
|
+
\example spectral/test-mfcc.c
|
|
34
|
+
|
|
35
|
+
*/
|
|
36
|
+
|
|
37
|
+
#ifndef AUBIO_MFCC_H
|
|
38
|
+
#define AUBIO_MFCC_H
|
|
39
|
+
|
|
40
|
+
#ifdef __cplusplus
|
|
41
|
+
extern "C"
|
|
42
|
+
{
|
|
43
|
+
#endif
|
|
44
|
+
|
|
45
|
+
/** mfcc object */
|
|
46
|
+
typedef struct _aubio_mfcc_t aubio_mfcc_t;
|
|
47
|
+
|
|
48
|
+
/** create mfcc object
|
|
49
|
+
|
|
50
|
+
\param buf_size size of analysis buffer (and length the FFT transform)
|
|
51
|
+
\param samplerate audio sampling rate
|
|
52
|
+
\param n_coeffs number of desired coefficients
|
|
53
|
+
\param n_filters number of desired filters
|
|
54
|
+
|
|
55
|
+
*/
|
|
56
|
+
aubio_mfcc_t *new_aubio_mfcc (uint_t buf_size,
|
|
57
|
+
uint_t n_filters, uint_t n_coeffs, uint_t samplerate);
|
|
58
|
+
|
|
59
|
+
/** delete mfcc object
|
|
60
|
+
|
|
61
|
+
\param mf mfcc object as returned by new_aubio_mfcc
|
|
62
|
+
|
|
63
|
+
*/
|
|
64
|
+
void del_aubio_mfcc (aubio_mfcc_t * mf);
|
|
65
|
+
|
|
66
|
+
/** mfcc object processing
|
|
67
|
+
|
|
68
|
+
\param mf mfcc object as returned by new_aubio_mfcc
|
|
69
|
+
\param in input spectrum (buf_size long)
|
|
70
|
+
\param out output mel coefficients buffer (n_coeffs long)
|
|
71
|
+
|
|
72
|
+
*/
|
|
73
|
+
void aubio_mfcc_do (aubio_mfcc_t * mf, const cvec_t * in, fvec_t * out);
|
|
74
|
+
|
|
75
|
+
#ifdef __cplusplus
|
|
76
|
+
}
|
|
77
|
+
#endif
|
|
78
|
+
|
|
79
|
+
#endif /* AUBIO_MFCC_H */
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright (C) 2003-2015 Paul Brossier <piem@aubio.org>
|
|
3
|
+
|
|
4
|
+
This file is part of aubio.
|
|
5
|
+
|
|
6
|
+
aubio is free software: you can redistribute it and/or modify
|
|
7
|
+
it under the terms of the GNU General Public License as published by
|
|
8
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
(at your option) any later version.
|
|
10
|
+
|
|
11
|
+
aubio is distributed in the hope that it will be useful,
|
|
12
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
GNU General Public License for more details.
|
|
15
|
+
|
|
16
|
+
You should have received a copy of the GNU General Public License
|
|
17
|
+
along with aubio. If not, see <http://www.gnu.org/licenses/>.
|
|
18
|
+
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/** @file
|
|
22
|
+
* various functions useful in audio signal processing
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
#ifndef AUBIO_MUSICUTILS_H
|
|
26
|
+
#define AUBIO_MUSICUTILS_H
|
|
27
|
+
|
|
28
|
+
#ifdef __cplusplus
|
|
29
|
+
extern "C" {
|
|
30
|
+
#endif
|
|
31
|
+
|
|
32
|
+
/** create window
|
|
33
|
+
|
|
34
|
+
\param window_type type of the window to create
|
|
35
|
+
\param size length of the window to create (see fvec_set_window())
|
|
36
|
+
|
|
37
|
+
*/
|
|
38
|
+
fvec_t *new_aubio_window (char_t * window_type, uint_t size);
|
|
39
|
+
|
|
40
|
+
/** set elements of a vector to window coefficients
|
|
41
|
+
|
|
42
|
+
\param window exsting ::fvec_t to use
|
|
43
|
+
\param window_type type of the window to create
|
|
44
|
+
|
|
45
|
+
List of available window types: "rectangle", "hamming", "hanning",
|
|
46
|
+
"hanningz", "blackman", "blackman_harris", "gaussian", "welch", "parzen",
|
|
47
|
+
"default".
|
|
48
|
+
|
|
49
|
+
"default" is equivalent to "hanningz".
|
|
50
|
+
|
|
51
|
+
References:
|
|
52
|
+
|
|
53
|
+
- <a href="http://en.wikipedia.org/wiki/Window_function">Window
|
|
54
|
+
function</a> on Wikipedia
|
|
55
|
+
- Amalia de Götzen, Nicolas Bernardini, and Daniel Arfib. Traditional (?)
|
|
56
|
+
implementations of a phase vocoder: the tricks of the trade. In Proceedings of
|
|
57
|
+
the International Conference on Digital Audio Effects (DAFx-00), pages 37–44,
|
|
58
|
+
Uni- versity of Verona, Italy, 2000.
|
|
59
|
+
(<a href="http://www.cs.princeton.edu/courses/archive/spr09/cos325/Bernardini.pdf">
|
|
60
|
+
pdf</a>)
|
|
61
|
+
|
|
62
|
+
*/
|
|
63
|
+
uint_t fvec_set_window (fvec_t * window, char_t * window_type);
|
|
64
|
+
|
|
65
|
+
/** compute the principal argument
|
|
66
|
+
|
|
67
|
+
This function maps the input phase to its corresponding value wrapped in the
|
|
68
|
+
range \f$ [-\pi, \pi] \f$.
|
|
69
|
+
|
|
70
|
+
\param phase unwrapped phase to map to the unit circle
|
|
71
|
+
|
|
72
|
+
\return equivalent phase wrapped to the unit circle
|
|
73
|
+
|
|
74
|
+
*/
|
|
75
|
+
smpl_t aubio_unwrap2pi (smpl_t phase);
|
|
76
|
+
|
|
77
|
+
/** convert frequency bin to midi value */
|
|
78
|
+
smpl_t aubio_bintomidi (smpl_t bin, smpl_t samplerate, smpl_t fftsize);
|
|
79
|
+
|
|
80
|
+
/** convert midi value to frequency bin */
|
|
81
|
+
smpl_t aubio_miditobin (smpl_t midi, smpl_t samplerate, smpl_t fftsize);
|
|
82
|
+
|
|
83
|
+
/** convert frequency bin to frequency (Hz) */
|
|
84
|
+
smpl_t aubio_bintofreq (smpl_t bin, smpl_t samplerate, smpl_t fftsize);
|
|
85
|
+
|
|
86
|
+
/** convert frequency (Hz) to frequency bin */
|
|
87
|
+
smpl_t aubio_freqtobin (smpl_t freq, smpl_t samplerate, smpl_t fftsize);
|
|
88
|
+
|
|
89
|
+
/** convert frequency (Hz) to midi value (0-128) */
|
|
90
|
+
smpl_t aubio_freqtomidi (smpl_t freq);
|
|
91
|
+
|
|
92
|
+
/** convert midi value (0-128) to frequency (Hz) */
|
|
93
|
+
smpl_t aubio_miditofreq (smpl_t midi);
|
|
94
|
+
|
|
95
|
+
/** clean up cached memory at the end of program
|
|
96
|
+
|
|
97
|
+
This function should be used at the end of programs to purge all cached
|
|
98
|
+
memory. So far it is only useful to clean FFTW's cache.
|
|
99
|
+
|
|
100
|
+
*/
|
|
101
|
+
void aubio_cleanup (void);
|
|
102
|
+
|
|
103
|
+
/** zero-crossing rate (ZCR)
|
|
104
|
+
|
|
105
|
+
The zero-crossing rate is the number of times a signal changes sign,
|
|
106
|
+
divided by the length of this signal.
|
|
107
|
+
|
|
108
|
+
\param v vector to compute ZCR from
|
|
109
|
+
|
|
110
|
+
\return zero-crossing rate of v
|
|
111
|
+
|
|
112
|
+
*/
|
|
113
|
+
smpl_t aubio_zero_crossing_rate (fvec_t * v);
|
|
114
|
+
|
|
115
|
+
/** compute sound level on a linear scale
|
|
116
|
+
|
|
117
|
+
This gives the average of the square amplitudes.
|
|
118
|
+
|
|
119
|
+
\param v vector to compute level from
|
|
120
|
+
|
|
121
|
+
\return level of v
|
|
122
|
+
|
|
123
|
+
*/
|
|
124
|
+
smpl_t aubio_level_lin (const fvec_t * v);
|
|
125
|
+
|
|
126
|
+
/** compute sound pressure level (SPL) in dB
|
|
127
|
+
|
|
128
|
+
This quantity is often wrongly called 'loudness'.
|
|
129
|
+
|
|
130
|
+
This gives ten times the log10 of the average of the square amplitudes.
|
|
131
|
+
|
|
132
|
+
\param v vector to compute dB SPL from
|
|
133
|
+
|
|
134
|
+
\return level of v in dB SPL
|
|
135
|
+
|
|
136
|
+
*/
|
|
137
|
+
smpl_t aubio_db_spl (const fvec_t * v);
|
|
138
|
+
|
|
139
|
+
/** check if buffer level in dB SPL is under a given threshold
|
|
140
|
+
|
|
141
|
+
\param v vector to get level from
|
|
142
|
+
\param threshold threshold in dB SPL
|
|
143
|
+
|
|
144
|
+
\return 0 if level is under the given threshold, 1 otherwise
|
|
145
|
+
|
|
146
|
+
*/
|
|
147
|
+
uint_t aubio_silence_detection (const fvec_t * v, smpl_t threshold);
|
|
148
|
+
|
|
149
|
+
/** get buffer level if level >= threshold, 1. otherwise
|
|
150
|
+
|
|
151
|
+
\param v vector to get level from
|
|
152
|
+
\param threshold threshold in dB SPL
|
|
153
|
+
|
|
154
|
+
\return level in dB SPL if level >= threshold, 1. otherwise
|
|
155
|
+
|
|
156
|
+
*/
|
|
157
|
+
smpl_t aubio_level_detection (const fvec_t * v, smpl_t threshold);
|
|
158
|
+
|
|
159
|
+
/** clamp the values of a vector within the range [-abs(max), abs(max)]
|
|
160
|
+
|
|
161
|
+
\param in vector to clamp
|
|
162
|
+
\param absmax maximum value over which input vector elements should be clamped
|
|
163
|
+
|
|
164
|
+
*/
|
|
165
|
+
void fvec_clamp(fvec_t *in, smpl_t absmax);
|
|
166
|
+
|
|
167
|
+
#ifdef __cplusplus
|
|
168
|
+
}
|
|
169
|
+
#endif
|
|
170
|
+
|
|
171
|
+
#endif /* AUBIO_MUSICUTILS_H */
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright (C) 2003-2014 Paul Brossier <piem@aubio.org>
|
|
3
|
+
|
|
4
|
+
This file is part of aubio.
|
|
5
|
+
|
|
6
|
+
aubio is free software: you can redistribute it and/or modify
|
|
7
|
+
it under the terms of the GNU General Public License as published by
|
|
8
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
(at your option) any later version.
|
|
10
|
+
|
|
11
|
+
aubio is distributed in the hope that it will be useful,
|
|
12
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
GNU General Public License for more details.
|
|
15
|
+
|
|
16
|
+
You should have received a copy of the GNU General Public License
|
|
17
|
+
along with aubio. If not, see <http://www.gnu.org/licenses/>.
|
|
18
|
+
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/** \file
|
|
22
|
+
|
|
23
|
+
Note detection object
|
|
24
|
+
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
#ifndef _AUBIO_NOTES_H
|
|
28
|
+
#define _AUBIO_NOTES_H
|
|
29
|
+
|
|
30
|
+
#ifdef __cplusplus
|
|
31
|
+
extern "C" {
|
|
32
|
+
#endif
|
|
33
|
+
|
|
34
|
+
/** notes detection object */
|
|
35
|
+
typedef struct _aubio_notes_t aubio_notes_t;
|
|
36
|
+
|
|
37
|
+
/** create notes detection object
|
|
38
|
+
|
|
39
|
+
\param method notes detection type as specified in specdesc.h
|
|
40
|
+
\param buf_size buffer size for phase vocoder
|
|
41
|
+
\param hop_size hop size for phase vocoder
|
|
42
|
+
\param samplerate sampling rate of the input signal
|
|
43
|
+
|
|
44
|
+
\return newly created ::aubio_notes_t
|
|
45
|
+
|
|
46
|
+
*/
|
|
47
|
+
aubio_notes_t * new_aubio_notes (const char_t * method,
|
|
48
|
+
uint_t buf_size, uint_t hop_size, uint_t samplerate);
|
|
49
|
+
|
|
50
|
+
/** delete notes detection object
|
|
51
|
+
|
|
52
|
+
\param o notes detection object to delete
|
|
53
|
+
|
|
54
|
+
*/
|
|
55
|
+
void del_aubio_notes(aubio_notes_t * o);
|
|
56
|
+
|
|
57
|
+
/** execute note detection on an input signal frame
|
|
58
|
+
|
|
59
|
+
\param o note detection object as returned by new_aubio_notes()
|
|
60
|
+
\param input input signal of size [hop_size]
|
|
61
|
+
\param output output notes, fvec of length 3
|
|
62
|
+
|
|
63
|
+
The notes output is a vector of length 3 containing:
|
|
64
|
+
- 0. the midi note value, or 0 if no note was found
|
|
65
|
+
- 1. the note velocity
|
|
66
|
+
- 2. the midi note to turn off
|
|
67
|
+
|
|
68
|
+
*/
|
|
69
|
+
void aubio_notes_do (aubio_notes_t *o, const fvec_t * input, fvec_t * output);
|
|
70
|
+
|
|
71
|
+
/** set notes detection silence threshold
|
|
72
|
+
|
|
73
|
+
\param o notes detection object as returned by new_aubio_notes()
|
|
74
|
+
\param silence new silence detection threshold
|
|
75
|
+
|
|
76
|
+
\return 0 on success, non-zero otherwise
|
|
77
|
+
|
|
78
|
+
*/
|
|
79
|
+
uint_t aubio_notes_set_silence(aubio_notes_t * o, smpl_t silence);
|
|
80
|
+
|
|
81
|
+
/** get notes detection silence threshold
|
|
82
|
+
|
|
83
|
+
\param o notes detection object as returned by new_aubio_notes()
|
|
84
|
+
|
|
85
|
+
\return current silence threshold
|
|
86
|
+
|
|
87
|
+
*/
|
|
88
|
+
smpl_t aubio_notes_get_silence(const aubio_notes_t * o);
|
|
89
|
+
|
|
90
|
+
/** get notes detection minimum inter-onset interval, in millisecond
|
|
91
|
+
|
|
92
|
+
\param o notes detection object as returned by new_aubio_notes()
|
|
93
|
+
|
|
94
|
+
\return current minimum inter onset interval
|
|
95
|
+
|
|
96
|
+
*/
|
|
97
|
+
smpl_t aubio_notes_get_minioi_ms(const aubio_notes_t *o);
|
|
98
|
+
|
|
99
|
+
/** set notes detection minimum inter-onset interval, in millisecond
|
|
100
|
+
|
|
101
|
+
\param o notes detection object as returned by new_aubio_notes()
|
|
102
|
+
\param minioi_ms new inter-onset interval
|
|
103
|
+
|
|
104
|
+
\return 0 on success, non-zero otherwise
|
|
105
|
+
|
|
106
|
+
*/
|
|
107
|
+
uint_t aubio_notes_set_minioi_ms (aubio_notes_t *o, smpl_t minioi_ms);
|
|
108
|
+
|
|
109
|
+
#ifdef __cplusplus
|
|
110
|
+
}
|
|
111
|
+
#endif
|
|
112
|
+
|
|
113
|
+
#endif /* _AUBIO_NOTES_H */
|
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright (C) 2006-2013 Paul Brossier <piem@aubio.org>
|
|
3
|
+
|
|
4
|
+
This file is part of aubio.
|
|
5
|
+
|
|
6
|
+
aubio is free software: you can redistribute it and/or modify
|
|
7
|
+
it under the terms of the GNU General Public License as published by
|
|
8
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
(at your option) any later version.
|
|
10
|
+
|
|
11
|
+
aubio is distributed in the hope that it will be useful,
|
|
12
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
GNU General Public License for more details.
|
|
15
|
+
|
|
16
|
+
You should have received a copy of the GNU General Public License
|
|
17
|
+
along with aubio. If not, see <http://www.gnu.org/licenses/>.
|
|
18
|
+
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/** \file
|
|
22
|
+
|
|
23
|
+
Onset detection object
|
|
24
|
+
|
|
25
|
+
The following routines compute the onset detection function and detect peaks
|
|
26
|
+
in these functions. When onsets are found above a given silence threshold,
|
|
27
|
+
and after a minimum inter-onset interval, the output vector returned by
|
|
28
|
+
aubio_onset_do() is filled with `1`. Otherwise, the output vector remains
|
|
29
|
+
`0`.
|
|
30
|
+
|
|
31
|
+
The peak-picking threshold, the silence threshold, and the minimum
|
|
32
|
+
inter-onset interval can be adjusted during the execution of the
|
|
33
|
+
aubio_onset_do routine using the corresponding functions.
|
|
34
|
+
|
|
35
|
+
\example onset/test-onset.c
|
|
36
|
+
\example examples/aubioonset.c
|
|
37
|
+
\example examples/aubionotes.c
|
|
38
|
+
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
#ifndef AUBIO_ONSET_H
|
|
43
|
+
#define AUBIO_ONSET_H
|
|
44
|
+
|
|
45
|
+
#ifdef __cplusplus
|
|
46
|
+
extern "C" {
|
|
47
|
+
#endif
|
|
48
|
+
|
|
49
|
+
/** onset detection object */
|
|
50
|
+
typedef struct _aubio_onset_t aubio_onset_t;
|
|
51
|
+
|
|
52
|
+
/** create onset detection object
|
|
53
|
+
|
|
54
|
+
\param method onset detection type as specified in specdesc.h
|
|
55
|
+
\param buf_size buffer size for phase vocoder
|
|
56
|
+
\param hop_size hop size for phase vocoder
|
|
57
|
+
\param samplerate sampling rate of the input signal
|
|
58
|
+
|
|
59
|
+
\return newly created ::aubio_onset_t
|
|
60
|
+
|
|
61
|
+
*/
|
|
62
|
+
aubio_onset_t * new_aubio_onset (const char_t * method,
|
|
63
|
+
uint_t buf_size, uint_t hop_size, uint_t samplerate);
|
|
64
|
+
|
|
65
|
+
/** execute onset detection
|
|
66
|
+
|
|
67
|
+
\param o onset detection object as returned by new_aubio_onset()
|
|
68
|
+
\param input new audio vector of length hop_size
|
|
69
|
+
\param onset output vector of length 1, containing 0 if no onset was found,
|
|
70
|
+
and a value equal or greater than 1 otherwise
|
|
71
|
+
|
|
72
|
+
When no onset was detected, the first element of the output vector `onset`
|
|
73
|
+
is set to 0.
|
|
74
|
+
|
|
75
|
+
When an onset is found, the first element of the output vector `onset` is set
|
|
76
|
+
to `offset = 1 + a` where `a` is a number in the range`[0, 1]`.
|
|
77
|
+
|
|
78
|
+
The final onset detection time, in samples, can be obtained with
|
|
79
|
+
aubio_onset_get_last(). It can also be derived from `offset` as
|
|
80
|
+
follows:
|
|
81
|
+
|
|
82
|
+
\code
|
|
83
|
+
t = total_frames + offset * hop_size - delay
|
|
84
|
+
\endcode
|
|
85
|
+
|
|
86
|
+
where `total_frames` is the total number of frames processed so far, and
|
|
87
|
+
`delay` is the current delay of the onset object, as returned by
|
|
88
|
+
aubio_onset_get_delay().
|
|
89
|
+
|
|
90
|
+
*/
|
|
91
|
+
void aubio_onset_do (aubio_onset_t *o, const fvec_t * input, fvec_t * onset);
|
|
92
|
+
|
|
93
|
+
/** get the time of the latest onset detected, in samples
|
|
94
|
+
|
|
95
|
+
\param o onset detection object as returned by new_aubio_onset()
|
|
96
|
+
|
|
97
|
+
\return onset detection timestamps (in samples)
|
|
98
|
+
|
|
99
|
+
*/
|
|
100
|
+
uint_t aubio_onset_get_last (const aubio_onset_t *o);
|
|
101
|
+
|
|
102
|
+
/** get the time of the latest onset detected, in seconds
|
|
103
|
+
|
|
104
|
+
\param o onset detection object as returned by new_aubio_onset()
|
|
105
|
+
|
|
106
|
+
\return onset detection timestamps (in seconds)
|
|
107
|
+
|
|
108
|
+
*/
|
|
109
|
+
smpl_t aubio_onset_get_last_s (const aubio_onset_t *o);
|
|
110
|
+
|
|
111
|
+
/** get the time of the latest onset detected, in milliseconds
|
|
112
|
+
|
|
113
|
+
\param o onset detection object as returned by new_aubio_onset()
|
|
114
|
+
|
|
115
|
+
\return onset detection timestamps (in milliseconds)
|
|
116
|
+
|
|
117
|
+
*/
|
|
118
|
+
smpl_t aubio_onset_get_last_ms (const aubio_onset_t *o);
|
|
119
|
+
|
|
120
|
+
/** set onset detection adaptive whitening
|
|
121
|
+
|
|
122
|
+
\param o onset detection object as returned by new_aubio_onset()
|
|
123
|
+
\param enable 1 to enable, 0 to disable
|
|
124
|
+
|
|
125
|
+
\return 0 if successful, 1 otherwise
|
|
126
|
+
|
|
127
|
+
*/
|
|
128
|
+
uint_t aubio_onset_set_awhitening(aubio_onset_t * o, uint_t enable);
|
|
129
|
+
|
|
130
|
+
/** get onset detection adaptive whitening
|
|
131
|
+
|
|
132
|
+
\param o onset detection object as returned by new_aubio_onset()
|
|
133
|
+
|
|
134
|
+
\return 1 if enabled, 0 otherwise
|
|
135
|
+
|
|
136
|
+
*/
|
|
137
|
+
smpl_t aubio_onset_get_awhitening(aubio_onset_t * o);
|
|
138
|
+
|
|
139
|
+
/** set or disable log compression
|
|
140
|
+
|
|
141
|
+
\param o onset detection object as returned by new_aubio_onset()
|
|
142
|
+
\param lambda logarithmic compression factor, 0 to disable
|
|
143
|
+
|
|
144
|
+
\return 0 if successful, 1 otherwise
|
|
145
|
+
|
|
146
|
+
*/
|
|
147
|
+
uint_t aubio_onset_set_compression(aubio_onset_t *o, smpl_t lambda);
|
|
148
|
+
|
|
149
|
+
/** get onset detection log compression
|
|
150
|
+
|
|
151
|
+
\param o onset detection object as returned by new_aubio_onset()
|
|
152
|
+
|
|
153
|
+
\returns 0 if disabled, compression factor otherwise
|
|
154
|
+
|
|
155
|
+
*/
|
|
156
|
+
smpl_t aubio_onset_get_compression(aubio_onset_t *o);
|
|
157
|
+
|
|
158
|
+
/** set onset detection silence threshold
|
|
159
|
+
|
|
160
|
+
\param o onset detection object as returned by new_aubio_onset()
|
|
161
|
+
\param silence new silence detection threshold
|
|
162
|
+
|
|
163
|
+
*/
|
|
164
|
+
uint_t aubio_onset_set_silence(aubio_onset_t * o, smpl_t silence);
|
|
165
|
+
|
|
166
|
+
/** get onset detection silence threshold
|
|
167
|
+
|
|
168
|
+
\param o onset detection object as returned by new_aubio_onset()
|
|
169
|
+
|
|
170
|
+
\return current silence threshold
|
|
171
|
+
|
|
172
|
+
*/
|
|
173
|
+
smpl_t aubio_onset_get_silence(const aubio_onset_t * o);
|
|
174
|
+
|
|
175
|
+
/** get onset detection function
|
|
176
|
+
|
|
177
|
+
\param o onset detection object as returned by new_aubio_onset()
|
|
178
|
+
\return the current value of the descriptor
|
|
179
|
+
|
|
180
|
+
*/
|
|
181
|
+
smpl_t aubio_onset_get_descriptor (const aubio_onset_t *o);
|
|
182
|
+
|
|
183
|
+
/** get thresholded onset detection function
|
|
184
|
+
|
|
185
|
+
\param o onset detection object as returned by new_aubio_onset()
|
|
186
|
+
\return the value of the thresholded descriptor
|
|
187
|
+
|
|
188
|
+
*/
|
|
189
|
+
smpl_t aubio_onset_get_thresholded_descriptor (const aubio_onset_t *o);
|
|
190
|
+
|
|
191
|
+
/** set onset detection peak picking threshold
|
|
192
|
+
|
|
193
|
+
\param o onset detection object as returned by new_aubio_onset()
|
|
194
|
+
\param threshold new peak-picking threshold
|
|
195
|
+
|
|
196
|
+
*/
|
|
197
|
+
uint_t aubio_onset_set_threshold(aubio_onset_t * o, smpl_t threshold);
|
|
198
|
+
|
|
199
|
+
/** set minimum inter onset interval in samples
|
|
200
|
+
|
|
201
|
+
\param o onset detection object as returned by new_aubio_onset()
|
|
202
|
+
\param minioi minimum interval between two consecutive onsets (in
|
|
203
|
+
samples)
|
|
204
|
+
|
|
205
|
+
*/
|
|
206
|
+
uint_t aubio_onset_set_minioi(aubio_onset_t * o, uint_t minioi);
|
|
207
|
+
|
|
208
|
+
/** set minimum inter onset interval in seconds
|
|
209
|
+
|
|
210
|
+
\param o onset detection object as returned by new_aubio_onset()
|
|
211
|
+
\param minioi minimum interval between two consecutive onsets (in
|
|
212
|
+
seconds)
|
|
213
|
+
|
|
214
|
+
*/
|
|
215
|
+
uint_t aubio_onset_set_minioi_s(aubio_onset_t * o, smpl_t minioi);
|
|
216
|
+
|
|
217
|
+
/** set minimum inter onset interval in milliseconds
|
|
218
|
+
|
|
219
|
+
\param o onset detection object as returned by new_aubio_onset()
|
|
220
|
+
\param minioi minimum interval between two consecutive onsets (in
|
|
221
|
+
milliseconds)
|
|
222
|
+
|
|
223
|
+
*/
|
|
224
|
+
uint_t aubio_onset_set_minioi_ms(aubio_onset_t * o, smpl_t minioi);
|
|
225
|
+
|
|
226
|
+
/** set delay in samples
|
|
227
|
+
|
|
228
|
+
\param o onset detection object as returned by new_aubio_onset()
|
|
229
|
+
\param delay constant system delay to take back from detection time
|
|
230
|
+
(in samples)
|
|
231
|
+
|
|
232
|
+
*/
|
|
233
|
+
uint_t aubio_onset_set_delay(aubio_onset_t * o, uint_t delay);
|
|
234
|
+
|
|
235
|
+
/** set delay in seconds
|
|
236
|
+
|
|
237
|
+
\param o onset detection object as returned by new_aubio_onset()
|
|
238
|
+
\param delay constant system delay to take back from detection time
|
|
239
|
+
(in seconds)
|
|
240
|
+
|
|
241
|
+
*/
|
|
242
|
+
uint_t aubio_onset_set_delay_s(aubio_onset_t * o, smpl_t delay);
|
|
243
|
+
|
|
244
|
+
/** set delay in milliseconds
|
|
245
|
+
|
|
246
|
+
\param o onset detection object as returned by new_aubio_onset()
|
|
247
|
+
\param delay constant system delay to take back from detection time
|
|
248
|
+
(in milliseconds)
|
|
249
|
+
|
|
250
|
+
*/
|
|
251
|
+
uint_t aubio_onset_set_delay_ms(aubio_onset_t * o, smpl_t delay);
|
|
252
|
+
|
|
253
|
+
/** get minimum inter onset interval in samples
|
|
254
|
+
|
|
255
|
+
\param o onset detection object as returned by new_aubio_onset()
|
|
256
|
+
\return minimum interval between two consecutive onsets (in
|
|
257
|
+
samples)
|
|
258
|
+
|
|
259
|
+
*/
|
|
260
|
+
uint_t aubio_onset_get_minioi(const aubio_onset_t * o);
|
|
261
|
+
|
|
262
|
+
/** get minimum inter onset interval in seconds
|
|
263
|
+
|
|
264
|
+
\param o onset detection object as returned by new_aubio_onset()
|
|
265
|
+
\return minimum interval between two consecutive onsets (in
|
|
266
|
+
seconds)
|
|
267
|
+
|
|
268
|
+
*/
|
|
269
|
+
smpl_t aubio_onset_get_minioi_s(const aubio_onset_t * o);
|
|
270
|
+
|
|
271
|
+
/** get minimum inter onset interval in milliseconds
|
|
272
|
+
|
|
273
|
+
\param o onset detection object as returned by new_aubio_onset()
|
|
274
|
+
\return minimum interval between two consecutive onsets (in
|
|
275
|
+
milliseconds)
|
|
276
|
+
|
|
277
|
+
*/
|
|
278
|
+
smpl_t aubio_onset_get_minioi_ms(const aubio_onset_t * o);
|
|
279
|
+
|
|
280
|
+
/** get delay in samples
|
|
281
|
+
|
|
282
|
+
\param o onset detection object as returned by new_aubio_onset()
|
|
283
|
+
\return constant system delay to take back from detection time
|
|
284
|
+
(in samples)
|
|
285
|
+
|
|
286
|
+
*/
|
|
287
|
+
uint_t aubio_onset_get_delay(const aubio_onset_t * o);
|
|
288
|
+
|
|
289
|
+
/** get delay in seconds
|
|
290
|
+
|
|
291
|
+
\param o onset detection object as returned by new_aubio_onset()
|
|
292
|
+
\return constant system delay to take back from detection time
|
|
293
|
+
(in seconds)
|
|
294
|
+
|
|
295
|
+
*/
|
|
296
|
+
smpl_t aubio_onset_get_delay_s(const aubio_onset_t * o);
|
|
297
|
+
|
|
298
|
+
/** get delay in milliseconds
|
|
299
|
+
|
|
300
|
+
\param o onset detection object as returned by new_aubio_onset()
|
|
301
|
+
\return constant system delay to take back from detection time
|
|
302
|
+
(in milliseconds)
|
|
303
|
+
|
|
304
|
+
*/
|
|
305
|
+
smpl_t aubio_onset_get_delay_ms(const aubio_onset_t * o);
|
|
306
|
+
|
|
307
|
+
/** get onset peak picking threshold
|
|
308
|
+
|
|
309
|
+
\param o onset detection object as returned by new_aubio_onset()
|
|
310
|
+
\return current onset detection threshold
|
|
311
|
+
|
|
312
|
+
*/
|
|
313
|
+
smpl_t aubio_onset_get_threshold(const aubio_onset_t * o);
|
|
314
|
+
|
|
315
|
+
/** set default parameters
|
|
316
|
+
|
|
317
|
+
\param o onset detection object as returned by new_aubio_onset()
|
|
318
|
+
\param onset_mode detection mode to adjust
|
|
319
|
+
|
|
320
|
+
This function is called at the end of new_aubio_onset().
|
|
321
|
+
|
|
322
|
+
*/
|
|
323
|
+
uint_t aubio_onset_set_default_parameters (aubio_onset_t * o, const char_t * onset_mode);
|
|
324
|
+
|
|
325
|
+
/** reset onset detection
|
|
326
|
+
|
|
327
|
+
\param o onset detection object as returned by new_aubio_onset()
|
|
328
|
+
|
|
329
|
+
Reset current time and last onset to 0.
|
|
330
|
+
|
|
331
|
+
This function is called at the end of new_aubio_onset().
|
|
332
|
+
|
|
333
|
+
*/
|
|
334
|
+
void aubio_onset_reset(aubio_onset_t * o);
|
|
335
|
+
|
|
336
|
+
/** delete onset detection object
|
|
337
|
+
|
|
338
|
+
\param o onset detection object to delete
|
|
339
|
+
|
|
340
|
+
*/
|
|
341
|
+
void del_aubio_onset(aubio_onset_t * o);
|
|
342
|
+
|
|
343
|
+
#ifdef __cplusplus
|
|
344
|
+
}
|
|
345
|
+
#endif
|
|
346
|
+
|
|
347
|
+
#endif /* AUBIO_ONSET_H */
|