react-native-gizwits-sdk-v5 1.5.6-thirdbluetooth → 1.5.7-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.
Files changed (128) hide show
  1. package/package.json +1 -1
  2. package/react-native-gizwits-sdk-v5.podspec +2 -2
  3. package/ios/GizwitsiOSSDK.framework/GizwitsiOSSDK +0 -0
  4. package/ios/GizwitsiOSSDK.framework/Headers/CocoaAsyncSocket.h +0 -18
  5. package/ios/GizwitsiOSSDK.framework/Headers/DDASLLogger.h +0 -41
  6. package/ios/GizwitsiOSSDK.framework/Headers/DDAbstractDatabaseLogger.h +0 -102
  7. package/ios/GizwitsiOSSDK.framework/Headers/DDContextFilterLogFormatter.h +0 -63
  8. package/ios/GizwitsiOSSDK.framework/Headers/DDDispatchQueueLogFormatter.h +0 -128
  9. package/ios/GizwitsiOSSDK.framework/Headers/DDFileLogger.h +0 -340
  10. package/ios/GizwitsiOSSDK.framework/Headers/DDLog+LOGV.h +0 -99
  11. package/ios/GizwitsiOSSDK.framework/Headers/DDLog.h +0 -632
  12. package/ios/GizwitsiOSSDK.framework/Headers/DDMultiFormatter.h +0 -30
  13. package/ios/GizwitsiOSSDK.framework/Headers/DDTTYLogger.h +0 -171
  14. package/ios/GizwitsiOSSDK.framework/Headers/ESPAES.h +0 -19
  15. package/ios/GizwitsiOSSDK.framework/Headers/ESPDataCode.h +0 -44
  16. package/ios/GizwitsiOSSDK.framework/Headers/ESPDatumCode.h +0 -38
  17. package/ios/GizwitsiOSSDK.framework/Headers/ESPGuideCode.h +0 -15
  18. package/ios/GizwitsiOSSDK.framework/Headers/ESPTools.h +0 -22
  19. package/ios/GizwitsiOSSDK.framework/Headers/ESPTouch.h +0 -36
  20. package/ios/GizwitsiOSSDK.framework/Headers/ESPTouchDelegate.h +0 -24
  21. package/ios/GizwitsiOSSDK.framework/Headers/ESPTouchGenerator.h +0 -46
  22. package/ios/GizwitsiOSSDK.framework/Headers/ESPTouchResult.h +0 -36
  23. package/ios/GizwitsiOSSDK.framework/Headers/ESPTouchTask.h +0 -124
  24. package/ios/GizwitsiOSSDK.framework/Headers/ESPTouchTaskParameter.h +0 -173
  25. package/ios/GizwitsiOSSDK.framework/Headers/ESPUDPSocketClient.h +0 -50
  26. package/ios/GizwitsiOSSDK.framework/Headers/ESPUDPSocketServer.h +0 -49
  27. package/ios/GizwitsiOSSDK.framework/Headers/ESP_ByteUtil.h +0 -128
  28. package/ios/GizwitsiOSSDK.framework/Headers/ESP_CRC8.h +0 -61
  29. package/ios/GizwitsiOSSDK.framework/Headers/ESP_NetUtil.h +0 -82
  30. package/ios/GizwitsiOSSDK.framework/Headers/ESP_WifiUtil.h +0 -33
  31. package/ios/GizwitsiOSSDK.framework/Headers/ForegroundReconnection.h +0 -23
  32. package/ios/GizwitsiOSSDK.framework/Headers/GCDTimer.h +0 -19
  33. package/ios/GizwitsiOSSDK.framework/Headers/GizwitsiOSSDK-Swift.h +0 -338
  34. package/ios/GizwitsiOSSDK.framework/Headers/GizwitsiOSSDK.h +0 -24
  35. package/ios/GizwitsiOSSDK.framework/Headers/MQTTClient.h +0 -39
  36. package/ios/GizwitsiOSSDK.framework/Headers/MQTTInMemoryPersistence.h +0 -16
  37. package/ios/GizwitsiOSSDK.framework/Headers/MQTTSSLSecurityPolicyDecoder.h +0 -19
  38. package/ios/GizwitsiOSSDK.framework/Headers/MQTTSSLSecurityPolicyEncoder.h +0 -18
  39. package/ios/GizwitsiOSSDK.framework/Headers/MQTTSessionLegacy.h +0 -112
  40. package/ios/GizwitsiOSSDK.framework/Headers/MQTTSessionSynchron.h +0 -194
  41. package/ios/GizwitsiOSSDK.framework/Headers/MQTTStrict.h +0 -33
  42. package/ios/GizwitsiOSSDK.framework/Headers/MQTTUntil.h +0 -14
  43. package/ios/GizwitsiOSSDK.framework/Headers/ReconnectTimer.h +0 -21
  44. package/ios/GizwitsiOSSDK.framework/Headers/_GCDAsyncSocket.h +0 -1226
  45. package/ios/GizwitsiOSSDK.framework/Headers/_GCDAsyncUdpSocket.h +0 -1036
  46. package/ios/GizwitsiOSSDK.framework/Headers/_GizwitsParser.h +0 -61
  47. package/ios/GizwitsiOSSDK.framework/Headers/_MQTTCFSocketDecoder.h +0 -39
  48. package/ios/GizwitsiOSSDK.framework/Headers/_MQTTCFSocketEncoder.h +0 -38
  49. package/ios/GizwitsiOSSDK.framework/Headers/_MQTTCFSocketTransport.h +0 -79
  50. package/ios/GizwitsiOSSDK.framework/Headers/_MQTTCoreDataPersistence.h +0 -21
  51. package/ios/GizwitsiOSSDK.framework/Headers/_MQTTDecoder.h +0 -66
  52. package/ios/GizwitsiOSSDK.framework/Headers/_MQTTLog.h +0 -123
  53. package/ios/GizwitsiOSSDK.framework/Headers/_MQTTMessage.h +0 -233
  54. package/ios/GizwitsiOSSDK.framework/Headers/_MQTTPersistence.h +0 -124
  55. package/ios/GizwitsiOSSDK.framework/Headers/_MQTTProperties.h +0 -76
  56. package/ios/GizwitsiOSSDK.framework/Headers/_MQTTSSLSecurityPolicy.h +0 -158
  57. package/ios/GizwitsiOSSDK.framework/Headers/_MQTTSSLSecurityPolicyTransport.h +0 -30
  58. package/ios/GizwitsiOSSDK.framework/Headers/_MQTTSession.h +0 -886
  59. package/ios/GizwitsiOSSDK.framework/Headers/_MQTTSessionManager.h +0 -237
  60. package/ios/GizwitsiOSSDK.framework/Headers/_MQTTTransport.h +0 -114
  61. package/ios/GizwitsiOSSDK.framework/Headers/_SSZipArchive.h +0 -178
  62. package/ios/GizwitsiOSSDK.framework/Headers/_SSZipCommon.h +0 -71
  63. package/ios/GizwitsiOSSDK.framework/Headers/_ZipArchive.h +0 -26
  64. package/ios/GizwitsiOSSDK.framework/Headers/a_weighting.h +0 -88
  65. package/ios/GizwitsiOSSDK.framework/Headers/aubio.h +0 -231
  66. package/ios/GizwitsiOSSDK.framework/Headers/audio_unit.h +0 -61
  67. package/ios/GizwitsiOSSDK.framework/Headers/awhitening.h +0 -125
  68. package/ios/GizwitsiOSSDK.framework/Headers/beattracking.h +0 -121
  69. package/ios/GizwitsiOSSDK.framework/Headers/biquad.h +0 -75
  70. package/ios/GizwitsiOSSDK.framework/Headers/c_weighting.h +0 -88
  71. package/ios/GizwitsiOSSDK.framework/Headers/common.h +0 -104
  72. package/ios/GizwitsiOSSDK.framework/Headers/cvec.h +0 -247
  73. package/ios/GizwitsiOSSDK.framework/Headers/dct.h +0 -85
  74. package/ios/GizwitsiOSSDK.framework/Headers/fft.h +0 -144
  75. package/ios/GizwitsiOSSDK.framework/Headers/filter.h +0 -176
  76. package/ios/GizwitsiOSSDK.framework/Headers/filterbank.h +0 -90
  77. package/ios/GizwitsiOSSDK.framework/Headers/filterbank_mel.h +0 -72
  78. package/ios/GizwitsiOSSDK.framework/Headers/fmat.h +0 -172
  79. package/ios/GizwitsiOSSDK.framework/Headers/fvec.h +0 -178
  80. package/ios/GizwitsiOSSDK.framework/Headers/hist.h +0 -63
  81. package/ios/GizwitsiOSSDK.framework/Headers/ioutils.h +0 -60
  82. package/ios/GizwitsiOSSDK.framework/Headers/log.h +0 -99
  83. package/ios/GizwitsiOSSDK.framework/Headers/lvec.h +0 -118
  84. package/ios/GizwitsiOSSDK.framework/Headers/mathutils.h +0 -330
  85. package/ios/GizwitsiOSSDK.framework/Headers/mfcc.h +0 -79
  86. package/ios/GizwitsiOSSDK.framework/Headers/musicutils.h +0 -171
  87. package/ios/GizwitsiOSSDK.framework/Headers/notes.h +0 -113
  88. package/ios/GizwitsiOSSDK.framework/Headers/onset.h +0 -347
  89. package/ios/GizwitsiOSSDK.framework/Headers/parameter.h +0 -159
  90. package/ios/GizwitsiOSSDK.framework/Headers/peakpicker.h +0 -57
  91. package/ios/GizwitsiOSSDK.framework/Headers/phasevoc.h +0 -112
  92. package/ios/GizwitsiOSSDK.framework/Headers/pitch.h +0 -197
  93. package/ios/GizwitsiOSSDK.framework/Headers/pitchfcomb.h +0 -76
  94. package/ios/GizwitsiOSSDK.framework/Headers/pitchmcomb.h +0 -77
  95. package/ios/GizwitsiOSSDK.framework/Headers/pitchschmitt.h +0 -75
  96. package/ios/GizwitsiOSSDK.framework/Headers/pitchspecacf.h +0 -103
  97. package/ios/GizwitsiOSSDK.framework/Headers/pitchyin.h +0 -100
  98. package/ios/GizwitsiOSSDK.framework/Headers/pitchyinfast.h +0 -102
  99. package/ios/GizwitsiOSSDK.framework/Headers/pitchyinfft.h +0 -99
  100. package/ios/GizwitsiOSSDK.framework/Headers/resampler.h +0 -65
  101. package/ios/GizwitsiOSSDK.framework/Headers/sampler.h +0 -140
  102. package/ios/GizwitsiOSSDK.framework/Headers/scale.h +0 -80
  103. package/ios/GizwitsiOSSDK.framework/Headers/sink.h +0 -181
  104. package/ios/GizwitsiOSSDK.framework/Headers/sink_apple_audio.h +0 -163
  105. package/ios/GizwitsiOSSDK.framework/Headers/sink_sndfile.h +0 -162
  106. package/ios/GizwitsiOSSDK.framework/Headers/sink_wavwrite.h +0 -162
  107. package/ios/GizwitsiOSSDK.framework/Headers/source.h +0 -184
  108. package/ios/GizwitsiOSSDK.framework/Headers/source_apple_audio.h +0 -156
  109. package/ios/GizwitsiOSSDK.framework/Headers/source_avcodec.h +0 -155
  110. package/ios/GizwitsiOSSDK.framework/Headers/source_sndfile.h +0 -155
  111. package/ios/GizwitsiOSSDK.framework/Headers/source_wavread.h +0 -160
  112. package/ios/GizwitsiOSSDK.framework/Headers/specdesc.h +0 -204
  113. package/ios/GizwitsiOSSDK.framework/Headers/tempo.h +0 -255
  114. package/ios/GizwitsiOSSDK.framework/Headers/tss.h +0 -103
  115. package/ios/GizwitsiOSSDK.framework/Headers/types.h +0 -70
  116. package/ios/GizwitsiOSSDK.framework/Headers/vecutils.h +0 -116
  117. package/ios/GizwitsiOSSDK.framework/Headers/wavetable.h +0 -178
  118. package/ios/GizwitsiOSSDK.framework/Info.plist +0 -0
  119. package/ios/GizwitsiOSSDK.framework/LICENSE +0 -17
  120. package/ios/GizwitsiOSSDK.framework/Modules/GizwitsiOSSDK.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
  121. package/ios/GizwitsiOSSDK.framework/Modules/GizwitsiOSSDK.swiftmodule/arm64-apple-ios.abi.json +0 -57489
  122. package/ios/GizwitsiOSSDK.framework/Modules/GizwitsiOSSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +0 -1752
  123. package/ios/GizwitsiOSSDK.framework/Modules/GizwitsiOSSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  124. package/ios/GizwitsiOSSDK.framework/Modules/GizwitsiOSSDK.swiftmodule/arm64-apple-ios.swiftinterface +0 -1752
  125. package/ios/GizwitsiOSSDK.framework/Modules/GizwitsiOSSDK.swiftmodule/arm64-apple-ios.swiftmodule +0 -0
  126. package/ios/GizwitsiOSSDK.framework/Modules/module.modulemap +0 -11
  127. package/ios/GizwitsiOSSDK.framework/PrivacyInfo.xcprivacy +0 -23
  128. package/ios/GizwitsiOSSDK.framework/README.md +0 -31
@@ -1,63 +0,0 @@
1
- /*
2
- Copyright (C) 2003-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
- * Histogram function
24
- *
25
- * Big hacks to implement an histogram
26
- */
27
-
28
- #ifndef AUBIO_HIST_H
29
- #define AUBIO_HIST_H
30
-
31
- #ifdef __cplusplus
32
- extern "C" {
33
- #endif
34
-
35
- /** histogram object */
36
- typedef struct _aubio_hist_t aubio_hist_t;
37
-
38
- /** histogram creation
39
-
40
- \param flow minimum input
41
- \param fhig maximum input
42
- \param nelems number of histogram columns
43
-
44
- */
45
- aubio_hist_t * new_aubio_hist(smpl_t flow, smpl_t fhig, uint_t nelems);
46
- /** histogram deletion */
47
- void del_aubio_hist(aubio_hist_t *s);
48
- /** compute the histogram */
49
- void aubio_hist_do(aubio_hist_t *s, fvec_t * input);
50
- /** compute the histogram ignoring null elements */
51
- void aubio_hist_do_notnull(aubio_hist_t *s, fvec_t * input);
52
- /** compute the mean of the histogram */
53
- smpl_t aubio_hist_mean(const aubio_hist_t *s);
54
- /** weight the histogram */
55
- void aubio_hist_weight(aubio_hist_t *s);
56
- /** compute dynamic histogram for non-null elements */
57
- void aubio_hist_dyn_notnull (aubio_hist_t *s, fvec_t *input);
58
-
59
- #ifdef __cplusplus
60
- }
61
- #endif
62
-
63
- #endif /* AUBIO_HIST_H */
@@ -1,60 +0,0 @@
1
- /*
2
- Copyright (C) 2016 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
- #ifndef AUBIO_IOUTILS_H
22
- #define AUBIO_IOUTILS_H
23
-
24
- /** \file
25
-
26
- Simple utility functions to validate input parameters.
27
-
28
- */
29
-
30
- #ifdef __cplusplus
31
- extern "C" {
32
- #endif
33
-
34
- /** validate samplerate
35
-
36
- \param kind the object kind to report on
37
- \param path the object properties to report on
38
- \param samplerate the object properties to report on
39
- \return 0 if ok, non-zero if validation failed
40
-
41
- */
42
- uint_t aubio_io_validate_samplerate(const char_t *kind, const char_t *path,
43
- uint_t samplerate);
44
-
45
- /** validate number of channels
46
-
47
- \param kind the object kind to report on
48
- \param path the object properties to report on
49
- \param channels the object properties to report on
50
- \return 0 if ok, non-zero if validation failed
51
-
52
- */
53
- uint_t aubio_io_validate_channels(const char_t *kind, const char_t *path,
54
- uint_t channels);
55
-
56
- #ifdef __cplusplus
57
- }
58
- #endif
59
-
60
- #endif /* AUBIO_IOUTILS_H */
@@ -1,99 +0,0 @@
1
- /*
2
- Copyright (C) 2016 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
- #ifndef AUBIO_LOG_H
22
- #define AUBIO_LOG_H
23
-
24
- #ifdef __cplusplus
25
- extern "C" {
26
- #endif
27
-
28
- /** \file
29
-
30
- Logging features
31
-
32
- This file specifies ::aubio_log_set_function and
33
- ::aubio_log_set_level_function, which let you define one or several custom
34
- logging functions to redirect warnings and errors from aubio to your
35
- application. The custom function should have the prototype defined in
36
- ::aubio_log_function_t.
37
-
38
- After a call to ::aubio_log_set_level_function, ::aubio_log_reset can be used
39
- to reset each logging functions to the default ones.
40
-
41
- \example utils/test-log.c
42
-
43
- */
44
-
45
- /** list of logging levels */
46
- enum aubio_log_level {
47
- AUBIO_LOG_ERR, /**< critical errors */
48
- AUBIO_LOG_INF, /**< infos */
49
- AUBIO_LOG_MSG, /**< general messages */
50
- AUBIO_LOG_DBG, /**< debug messages */
51
- AUBIO_LOG_WRN, /**< warnings */
52
- AUBIO_LOG_LAST_LEVEL, /**< number of valid levels */
53
- };
54
-
55
- /** Logging function prototype, to be passed to ::aubio_log_set_function
56
-
57
- \param level log level
58
- \param message text to log
59
- \param data optional closure used by the callback
60
-
61
- See @ref utils/test-log.c for an example of logging function.
62
-
63
- */
64
- typedef void (*aubio_log_function_t)(sint_t level, const char_t *message, void
65
- *data);
66
-
67
- /** Set logging function for all levels
68
-
69
- \param fun the function to be used to log, of type ::aubio_log_function_t
70
- \param data optional closure to be passed to the function (can be NULL if
71
- nothing to pass)
72
-
73
- */
74
- void aubio_log_set_function(aubio_log_function_t fun, void* data);
75
-
76
- /** Set logging function for a given level
77
-
78
- \param level the level for which to set the logging function
79
- \param fun the function to be used to log, of type ::aubio_log_function_t
80
- \param data optional closure to be passed to the function (can be NULL if
81
- nothing to pass)
82
-
83
- */
84
- aubio_log_function_t aubio_log_set_level_function(sint_t level,
85
- aubio_log_function_t fun, void* data);
86
-
87
- /** Reset all logging functions to the default one
88
-
89
- After calling this function, the default logging function will be used to
90
- print error, warning, normal, and debug messages to `stdout` or `stderr`.
91
-
92
- */
93
- void aubio_log_reset(void);
94
-
95
- #ifdef __cplusplus
96
- }
97
- #endif
98
-
99
- #endif /* AUBIO_LOG_H */
@@ -1,118 +0,0 @@
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
- #ifndef AUBIO_LVEC_H
22
- #define AUBIO_LVEC_H
23
-
24
- #ifdef __cplusplus
25
- extern "C" {
26
- #endif
27
-
28
- /** \file
29
-
30
- Vector of real-valued data in double precision
31
-
32
- This file specifies the ::lvec_t buffer type, which is used in some places in
33
- aubio to store a vector of ::lsmp_t.
34
-
35
- Note: the lvec_t data type is required in some algorithms such as IIR filters
36
- (see temporal/filter.h).
37
-
38
- \example test-lvec.c
39
-
40
- */
41
-
42
- /** Buffer for real data in double precision */
43
- typedef struct {
44
- uint_t length; /**< length of buffer */
45
- lsmp_t *data; /**< data array of size [length] */
46
- } lvec_t;
47
-
48
- /** lvec_t buffer creation function
49
-
50
- \param length the length of the buffer to create
51
-
52
- */
53
- lvec_t * new_lvec(uint_t length);
54
- /** lvec_t buffer deletion function
55
-
56
- \param s buffer to delete as returned by new_lvec()
57
-
58
- */
59
- void del_lvec(lvec_t *s);
60
-
61
- /** read sample value in a buffer
62
-
63
- \param s vector to read from
64
- \param position sample position to read from
65
-
66
- */
67
- lsmp_t lvec_get_sample(lvec_t *s, uint_t position);
68
-
69
- /** write sample value in a buffer
70
-
71
- \param s vector to write to
72
- \param data value to write in s->data[position]
73
- \param position sample position to write to
74
-
75
- */
76
- void lvec_set_sample(lvec_t *s, lsmp_t data, uint_t position);
77
-
78
- /** read data from a buffer
79
-
80
- \param s vector to read from
81
-
82
- */
83
- lsmp_t * lvec_get_data(const lvec_t *s);
84
-
85
- /** print out lvec data
86
-
87
- \param s vector to print out
88
-
89
- */
90
- void lvec_print(const lvec_t *s);
91
-
92
- /** set all elements to a given value
93
-
94
- \param s vector to modify
95
- \param val value to set elements to
96
-
97
- */
98
- void lvec_set_all(lvec_t *s, smpl_t val);
99
-
100
- /** set all elements to zero
101
-
102
- \param s vector to modify
103
-
104
- */
105
- void lvec_zeros(lvec_t *s);
106
-
107
- /** set all elements to ones
108
-
109
- \param s vector to modify
110
-
111
- */
112
- void lvec_ones(lvec_t *s);
113
-
114
- #ifdef __cplusplus
115
- }
116
- #endif
117
-
118
- #endif /* AUBIO_LVEC_H */
@@ -1,330 +0,0 @@
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
-
23
- Various math functions
24
-
25
- \example test-mathutils.c
26
- \example test-mathutils-window.c
27
-
28
- */
29
-
30
- #ifndef AUBIO_MATHUTILS_H
31
- #define AUBIO_MATHUTILS_H
32
-
33
- #include "fvec.h"
34
- #include "musicutils.h"
35
-
36
- #ifdef __cplusplus
37
- extern "C" {
38
- #endif
39
-
40
- /** compute the mean of a vector
41
-
42
- \param s vector to compute mean from
43
- \return the mean of `v`
44
-
45
- */
46
- smpl_t fvec_mean (fvec_t * s);
47
-
48
- /** find the max of a vector
49
-
50
- \param s vector to get the max from
51
-
52
- \return the value of the minimum of v
53
-
54
- */
55
- smpl_t fvec_max (fvec_t * s);
56
-
57
- /** find the min of a vector
58
-
59
- \param s vector to get the min from
60
-
61
- \return the value of the maximum of v
62
-
63
- */
64
- smpl_t fvec_min (fvec_t * s);
65
-
66
- /** find the index of the min of a vector
67
-
68
- \param s vector to get the index from
69
-
70
- \return the index of the minimum element of v
71
-
72
- */
73
- uint_t fvec_min_elem (fvec_t * s);
74
-
75
- /** find the index of the max of a vector
76
-
77
- \param s vector to get the index from
78
-
79
- \return the index of the maximum element of v
80
-
81
- */
82
- uint_t fvec_max_elem (fvec_t * s);
83
-
84
- /** swap the left and right halves of a vector
85
-
86
- This function swaps the left part of the signal with the right part of the
87
- signal. Therefore
88
-
89
- \f$ a[0], a[1], ..., a[\frac{N}{2}], a[\frac{N}{2}+1], ..., a[N-1], a[N] \f$
90
-
91
- becomes
92
-
93
- \f$ a[\frac{N}{2}+1], ..., a[N-1], a[N], a[0], a[1], ..., a[\frac{N}{2}] \f$
94
-
95
- This operation, known as 'fftshift' in the Matlab Signal Processing Toolbox,
96
- can be used before computing the FFT to simplify the phase relationship of the
97
- resulting spectrum. See Amalia de Götzen's paper referred to above.
98
-
99
- */
100
- void fvec_shift (fvec_t * v);
101
-
102
- /** swap the left and right halves of a vector
103
-
104
- This function swaps the left part of the signal with the right part of the
105
- signal. Therefore
106
-
107
- \f$ a[0], a[1], ..., a[\frac{N}{2}], a[\frac{N}{2}+1], ..., a[N-1], a[N] \f$
108
-
109
- becomes
110
-
111
- \f$ a[\frac{N}{2}+1], ..., a[N-1], a[N], a[0], a[1], ..., a[\frac{N}{2}] \f$
112
-
113
- This operation, known as 'ifftshift' in the Matlab Signal Processing Toolbox,
114
- can be used after computing the inverse FFT to simplify the phase relationship
115
- of the resulting spectrum. See Amalia de Götzen's paper referred to above.
116
-
117
- */
118
- void fvec_ishift (fvec_t * v);
119
-
120
- /** push a new element to the end of a vector, erasing the first element and
121
- * sliding all others
122
-
123
- \param in vector to push to
124
- \param new_elem new_element to add at the end of the vector
125
-
126
- In numpy words, this is equivalent to: in = np.concatenate([in, [new_elem]])[1:]
127
-
128
- */
129
- void fvec_push(fvec_t *in, smpl_t new_elem);
130
-
131
- /** compute the sum of all elements of a vector
132
-
133
- \param v vector to compute the sum of
134
-
135
- \return the sum of v
136
-
137
- */
138
- smpl_t fvec_sum (fvec_t * v);
139
-
140
- /** compute the High Frequency Content of a vector
141
-
142
- The High Frequency Content is defined as \f$ \sum_0^{N-1} (k+1) v[k] \f$.
143
-
144
- \param v vector to get the energy from
145
-
146
- \return the HFC of v
147
-
148
- */
149
- smpl_t fvec_local_hfc (fvec_t * v);
150
-
151
- /** computes the p-norm of a vector
152
-
153
- Computes the p-norm of a vector for \f$ p = \alpha \f$
154
-
155
- \f$ L^p = ||x||_p = (|x_1|^p + |x_2|^p + ... + |x_n|^p ) ^ \frac{1}{p} \f$
156
-
157
- If p = 1, the result is the Manhattan distance.
158
-
159
- If p = 2, the result is the Euclidean distance.
160
-
161
- As p tends towards large values, \f$ L^p \f$ tends towards the maximum of the
162
- input vector.
163
-
164
- References:
165
-
166
- - <a href="http://en.wikipedia.org/wiki/Lp_space">\f$L^p\f$ space</a> on
167
- Wikipedia
168
-
169
- \param v vector to compute norm from
170
- \param p order of the computed norm
171
-
172
- \return the p-norm of v
173
-
174
- */
175
- smpl_t fvec_alpha_norm (fvec_t * v, smpl_t p);
176
-
177
- /** alpha normalisation
178
-
179
- This function divides all elements of a vector by the p-norm as computed by
180
- fvec_alpha_norm().
181
-
182
- \param v vector to compute norm from
183
- \param p order of the computed norm
184
-
185
- */
186
- void fvec_alpha_normalise (fvec_t * v, smpl_t p);
187
-
188
- /** add a constant to each elements of a vector
189
-
190
- \param v vector to add constant to
191
- \param c constant to add to v
192
-
193
- */
194
- void fvec_add (fvec_t * v, smpl_t c);
195
-
196
- /** remove the minimum value of the vector to each elements
197
-
198
- \param v vector to remove minimum from
199
-
200
- */
201
- void fvec_min_removal (fvec_t * v);
202
-
203
- /** compute moving median threshold of a vector
204
-
205
- This function computes the moving median threshold value of at the given
206
- position of a vector, taking the median among post elements before and up to
207
- pre elements after pos.
208
-
209
- \param v input vector
210
- \param tmp temporary vector of length post+1+pre
211
- \param post length of causal part to take before pos
212
- \param pre length of anti-causal part to take after pos
213
- \param pos index to compute threshold for
214
-
215
- \return moving median threshold value
216
-
217
- */
218
- smpl_t fvec_moving_thres (fvec_t * v, fvec_t * tmp, uint_t post, uint_t pre,
219
- uint_t pos);
220
-
221
- /** apply adaptive threshold to a vector
222
-
223
- For each points at position p of an input vector, this function remove the
224
- moving median threshold computed at p.
225
-
226
- \param v input vector
227
- \param tmp temporary vector of length post+1+pre
228
- \param post length of causal part to take before pos
229
- \param pre length of anti-causal part to take after pos
230
-
231
- */
232
- void fvec_adapt_thres (fvec_t * v, fvec_t * tmp, uint_t post, uint_t pre);
233
-
234
- /** returns the median of a vector
235
-
236
- The QuickSelect routine is based on the algorithm described in "Numerical
237
- recipes in C", Second Edition, Cambridge University Press, 1992, Section 8.5,
238
- ISBN 0-521-43108-5
239
-
240
- This implementation of the QuickSelect routine is based on Nicolas
241
- Devillard's implementation, available at http://ndevilla.free.fr/median/median/
242
- and in the Public Domain.
243
-
244
- \param v vector to get median from
245
-
246
- \return the median of v
247
-
248
- */
249
- smpl_t fvec_median (fvec_t * v);
250
-
251
- /** finds exact peak index by quadratic interpolation
252
-
253
- See [Quadratic Interpolation of Spectral
254
- Peaks](https://ccrma.stanford.edu/~jos/sasp/Quadratic_Peak_Interpolation.html),
255
- by Julius O. Smith III
256
-
257
- \f$ p_{frac} = \frac{1}{2} \frac {x[p-1] - x[p+1]} {x[p-1] - 2 x[p] + x[p+1]} \in [ -.5, .5] \f$
258
-
259
- \param x vector to get the interpolated peak position from
260
- \param p index of the peak in vector `x`
261
- \return \f$ p + p_{frac} \f$ exact peak position of interpolated maximum or minimum
262
-
263
- */
264
- smpl_t fvec_quadratic_peak_pos (const fvec_t * x, uint_t p);
265
-
266
- /** finds magnitude of peak by quadratic interpolation
267
-
268
- See [Quadratic Interpolation of Spectral
269
- Peaks](https://ccrma.stanford.edu/~jos/sasp/Quadratic_Peak_Interpolation.html),
270
- by Julius O. Smith III
271
-
272
- \param x vector to get the magnitude of the interpolated peak position from
273
- \param p index of the peak in vector `x`
274
- \return magnitude of interpolated peak
275
-
276
- */
277
- smpl_t fvec_quadratic_peak_mag (fvec_t * x, smpl_t p);
278
-
279
- /** Quadratic interpolation using Lagrange polynomial.
280
-
281
- Inspired from ``Comparison of interpolation algorithms in real-time sound
282
- processing'', Vladimir Arnost,
283
-
284
- \param s0,s1,s2 are 3 consecutive samples of a curve
285
- \param pf is the floating point index [0;2]
286
-
287
- \return \f$ s0 + (pf/2.)*((pf-3.)*s0-2.*(pf-2.)*s1+(pf-1.)*s2); \f$
288
-
289
- */
290
- smpl_t aubio_quadfrac (smpl_t s0, smpl_t s1, smpl_t s2, smpl_t pf);
291
-
292
- /** return 1 if v[p] is a peak and positive, 0 otherwise
293
-
294
- This function returns 1 if a peak is found at index p in the vector v. The
295
- peak is defined as follows:
296
-
297
- - v[p] is positive
298
- - v[p-1] < v[p]
299
- - v[p] > v[p+1]
300
-
301
- \param v input vector
302
- \param p position of supposed for peak
303
-
304
- \return 1 if a peak is found, 0 otherwise
305
-
306
- */
307
- uint_t fvec_peakpick (const fvec_t * v, uint_t p);
308
-
309
- /** return 1 if a is a power of 2, 0 otherwise */
310
- uint_t aubio_is_power_of_two(uint_t a);
311
-
312
- /** return the next power of power of 2 greater than a */
313
- uint_t aubio_next_power_of_two(uint_t a);
314
-
315
- /** return the log2 factor of the given power of 2 value a */
316
- uint_t aubio_power_of_two_order(uint_t a);
317
-
318
- /** compute normalised autocorrelation function
319
-
320
- \param input vector to compute autocorrelation from
321
- \param output vector to store autocorrelation function to
322
-
323
- */
324
- void aubio_autocorr (const fvec_t * input, fvec_t * output);
325
-
326
- #ifdef __cplusplus
327
- }
328
- #endif
329
-
330
- #endif /* AUBIO_MATHUTILS_H */