diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..0c0a2472bc9c33c72f1bd6da91948bbe059ba584
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+*__pycache__
+pretrained/*
\ No newline at end of file
diff --git a/.ipynb_checkpoints/Untitled-checkpoint.ipynb b/.ipynb_checkpoints/Untitled-checkpoint.ipynb
new file mode 100644
index 0000000000000000000000000000000000000000..363fcab7ed6e9634e198cf5555ceb88932c9a245
--- /dev/null
+++ b/.ipynb_checkpoints/Untitled-checkpoint.ipynb
@@ -0,0 +1,6 @@
+{
+ "cells": [],
+ "metadata": {},
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/README.md b/README.md
index cff5d6829144d014e11320504d8391d299602502..35db6a58e2493f049b3e3daf30c69c83091a6d4f 100644
--- a/README.md
+++ b/README.md
@@ -1,13 +1,118 @@
----
-title: NeuCoSVC
-emoji: 🚀
-colorFrom: pink
-colorTo: purple
-sdk: gradio
-sdk_version: 4.12.0
-app_file: app.py
-pinned: false
-license: mit
----
-
-Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
+# Neural Concatenative Singing Voice Conversion
+
+
+
+[](https://github.com/thuhcsi/NeuCoSVC)
+
+This is the official implementation of NeuCoSVC, an any-to-any singing voice conversion model from our [paper](https://arxiv.org/abs/2312.04919).
+Audio samples are available at [https://thuhcsi.github.io/NeuCoSVC/](https://thuhcsi.github.io/NeuCoSVC/). The trained checkpoints are available from [google drive](https://drive.google.com/file/d/1QjoQ6mt7-OZPHF4X20TXbikYdg8NlepR/view?usp=drive_link).
+
+
+
+Figure: The structure of the proposed SVC system: (a) the SSL feature extracting and matching module; (b) the neural harmonic signal generator; (c) the audio synthesizer.
+
+## Setup
+
+### Environment
+
+We recommend installing the project's environment using Anaconda. The `requirements.txt` file contains a curated list of dependencies for the developing environment(Torch 2.0.1 + cu117). You can use the following commands to set up the environment:
+
+```bash
+conda create -n NeuCoSVC python=3.10.6
+conda activate NeuCoSVC
+pip install -r requirements.txt
+```
+
+Additionally, you can find the complete original environment used for developing in the `requirements_all.txt` file.
+
+Besides, [REAPER](https://github.com/google/REAPER) is required for pitch extraction. You need to download and install REAPER, and then modify the path to REAPER in [utils/pitch_ld_extraction.py](utils/pitch_ld_extraction.py)
+
+### Checkpoints
+
+The checkpoint for the frozen WavLM Large encoder can be obtained from the [original WavLM repository](https://github.com/microsoft/unilm/tree/master/wavlm).
+
+The trained FastSVC model with neural harmonic filters can be downloaded from [google drive](https://drive.google.com/file/d/1QjoQ6mt7-OZPHF4X20TXbikYdg8NlepR/view?usp=drive_link)
+
+Then you need to put the WavLM-Large.pt file and model.pkl folder in the `pretrained` folder.
+
+## Inference
+
+Note that the source waveform must be 24kHz. `--speech_enroll` is recommended when using speech as the reference audio, and the pitch of the reference audio will be increased to 1.2 times when performing a pitch shift to cover the pitch gap between singing and speech.
+
+```bash
+python infer.py --src_wav_path src-wav-path --ref_wav_path ref-wav-path --out_path out-path --speech_enroll
+```
+
+## Training
+
+### Data Preparation
+
+Take the OpenSinger dataset as an example, the dataset needs to be **resampled to 24kHz**.
+
+```
+- OpenSinger_24k
+ |- ManRaw/
+ | | - SingerID_SongName/
+ | | | - SingerID_SongName_SongClipNumber.wav/
+ | | | - ...
+ | | - ...
+ |- WomanRaw/
+ | | - 0_光年之外/
+ | | | - 0_光年之外_0.wav/
+ | | | - ...
+ | | - ...
+```
+
+Then perform data preprocessing.
+
+1. Extract pitch and loudness. Specify the directories for pitch and loudness using the `--pitch_dir` and `--ld_dir` parameters respectively. If not specified, the features will be saved in the `pitch`/`loudness` folder under the `dataset-root` directory.
+
+ ```bash
+ python -m utils.pitch_ld_extraction --data_root dataset-root --pitch_dir dir-for-pitch --ld_dir dir-for-loudness --n_cpu 8
+ ```
+
+2. Extract pre-matching features of each audio piece. The program uses the average of the last five layers' features from WavLM for distance calculation and kNN. It replaces and concatenates on the corresponding feature of the 6th layer in WavLM for audio synthesis. This configuration has shown improved performance in experiments. If `--out_dir` is not specified, the features will be saved in the wavlm_features folder under the dataset-root directory.
+
+ ```bash
+ python -m dataset.prematch_dataset --data_root dataset-root --out_dir dir-for-wavlm-feats
+ ```
+
+3. Split the dataset into train, valid, and test sets, and generate the metadata files. By default, singing audio clips from the 26th and 27th male singers(OpenSinger/ManRaw/26(7)\_\*/\*.wav) and 46th and 47th female singers(OpenSinger/WomanRaw/46(7)\_\*/\*.wav) are considered as the test set. The remaining singers' audio files are randomly divided into the train set and the valid set in a 9:1 ratio. Specify the directories for features using the `--wavlm_dir`, `--pitch_dir`, and `--ld_dir` parameters. If not specified, the corresponding features will be read from the `wavlm_features`, `pitch`, and `loudness` folders under the `data_root` directory.
+
+ ```bash
+ python dataset/metadata.py --data_root dataset-root
+ ```
+
+### Train Decoder
+
+```bash
+# for single GPU training:
+python start.py --data_root dataset-dir --config configs/config.json --cp_path pretrained
+# for distributed multi GPUs training:
+torchrun --nnodes=1 --nproc_per_node=4 start.py --data_root dataset-dir --config configs/config.json --cp_path pretrained
+```
+
+To modify the training configurations or model parameters, you can edit the `configs/config.json` file.
+
+## Acknowledgements
+
+This work is inspired by [kNN-VC](https://github.com/bshall/knn-vc/tree/master) and built on the [U-net SVC](https://www.isca-speech.org/archive/interspeech_2022/li22da_interspeech.html) frameworks.
+
+We have incorporated publicly available code from the [kNN-VC](https://github.com/bshall/knn-vc/tree/master) and [WavLM](https://github.com/microsoft/unilm/tree/master/wavlm) projects.
+
+We would like to express our gratitude to the authors of kNN-VC and WavLM for sharing their codebases. Their contributions have been instrumental in the development of our project.
+
+## Citation
+
+If this repo is helpful with your research or projects, please kindly star our repo and cite our paper as follows:
+
+```bibtex
+@misc{sha2023neural,
+ title={neural concatenative singing voice conversion: rethinking concatenation-based approach for one-shot singing voice conversion},
+ author={Binzhu Sha and Xu Li and Zhiyong Wu and Ying Shan and Helen Meng},
+ year={2023},
+ eprint={2312.04919},
+ archivePrefix={arXiv},
+ primaryClass={cs.SD}
+}
+```
diff --git a/REAPER/CMakeLists.txt b/REAPER/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..58d95b6e17b5f45223f8c2654913c4f05b4e004d
--- /dev/null
+++ b/REAPER/CMakeLists.txt
@@ -0,0 +1,39 @@
+cmake_minimum_required(VERSION 2.8)
+project(Reaper)
+
+# Use C11 for unique_ptr
+include(CheckCXXCompilerFlag)
+CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
+CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
+if(COMPILER_SUPPORTS_CXX11)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+elseif(COMPILER_SUPPORTS_CXX0X)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
+else()
+ message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
+endif()
+
+include_directories(".")
+
+# Core functionality.
+add_library(core STATIC core/file_resource.h
+ core/file_resource.cc core/float_matrix.h
+ core/float_matrix-inl.h core/float_matrix.cc core/track.h
+ core/track.cc)
+
+# Wave functionality.
+add_library(wave STATIC wave/codec_riff.h wave/codec_riff.cc
+ wave/codec_api.h wave/codec_api-inl.h wave/wave.h wave/wave.cc
+ wave/wave_io.h wave/wave_io-inl.h wave/wave_io.cc)
+
+# Epoch tracker.
+add_library(epoch_tracker STATIC epoch_tracker/fft.h epoch_tracker/fft.cc
+ epoch_tracker/fd_filter.h epoch_tracker/fd_filter.cc
+ epoch_tracker/lpc_analyzer.cc epoch_tracker/lpc_analyzer.h
+ epoch_tracker/epoch_tracker.cc epoch_tracker/epoch_tracker.h)
+
+# Binary to extract F0.
+add_executable(reaper epoch_tracker_main.cc)
+target_link_libraries(wave core)
+target_link_libraries(epoch_tracker wave)
+target_link_libraries(reaper epoch_tracker)
diff --git a/REAPER/CONTRIBUTING.md b/REAPER/CONTRIBUTING.md
new file mode 100644
index 0000000000000000000000000000000000000000..d6508261ad2c3fde4ddcf166eeb88af62a31abc5
--- /dev/null
+++ b/REAPER/CONTRIBUTING.md
@@ -0,0 +1,13 @@
+Anyone contributing code must sign a Contributor License Agreement.
+
+Individual contributors can complete the Individual Contributor
+License Agreement online:
+
+https://developers.google.com/open-source/cla/individual
+
+If you are contributing on behalf of a corporation, fill out the
+Corporate Contributor License Agreement and send it in as described on
+this page:
+
+https://developers.google.com/open-source/cla/corporate
+
diff --git a/REAPER/LICENSE b/REAPER/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..d645695673349e3947e8e5ae42332d0ac3164cd7
--- /dev/null
+++ b/REAPER/LICENSE
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/REAPER/README.md b/REAPER/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..fa3b441cc5f806260a9c582bf11cdfae171c6214
--- /dev/null
+++ b/REAPER/README.md
@@ -0,0 +1,159 @@
+# REAPER: Robust Epoch And Pitch EstimatoR
+
+This is a speech processing system. The _reaper_ program uses the
+EpochTracker class to simultaneously estimate the location of
+voiced-speech "epochs" or glottal closure instants (GCI), voicing
+state (voiced or unvoiced) and fundamental frequency (F0 or "pitch").
+We define the local (instantaneous) F0 as the inverse of the time
+between successive GCI.
+
+This code was developed by David Talkin at Google. This is not an
+official Google product (experimental or otherwise), it is just
+code that happens to be owned by Google.
+
+## Downloading and Building _reaper_
+```
+cd convenient_place_for_repository
+git clone https://github.com/google/REAPER.git
+cd REAPER
+mkdir build # In the REAPER top-level directory
+cd build
+cmake ..
+make
+```
+
+_reaper_ will now be in `convenient_place_for_repository/REAPER/build/reaper`
+
+You may want to add that path to your PATH environment variable or
+move _reaper_ to your favorite bin repository.
+
+Example:
+
+To compute F0 (pitch) and pitchmark (GCI) tracks and write them out as ASCII files:
+
+`reaper -i /tmp/bla.wav -f /tmp/bla.f0 -p /tmp/bla.pm -a`
+
+
+## Input Signals:
+
+As written, the input stage expects 16-bit, signed integer samples.
+Any reasonable sample rate may be used, but rates below 16 kHz will
+introduce increasingly coarse quantization of the results, and higher
+rates will incur quadratic increase in computational requirements
+without gaining much in output accuracy.
+
+While REAPER is fairly robust to recording quality, it is designed for
+use with studio-quality speech signals, such as those recorded for
+concatenation text-to-speech systems. Phase distortion, such as that
+introduced by some close-talking microphones or by well-intended
+recording-studio filtering, including rumble removal, should be
+avoided, for best results. A rumble filter is provided within REAPER
+as the recommended (default) high-pass pre-filtering option, and is
+implemented as a symmetric FIR filter that introduces no phase
+distortion.
+
+The help text _(-h)_ provided by the _reaper_ program describes
+various output options, including debug output of some of the feature
+signals. Of special interest is the residual waveform which may be
+used to check for the expected waveshape. (The residual has a
+_.resid_ filename extension.) During non-nasalized, open vocal tract
+vocalizations (such as /a/), each period should show a somewhat noisy
+version of the derivative of the idealized glottal flow. If the computed
+residual deviates radically from this ideal, the Hilbert transform
+option _(-t)_ might improve matters.
+
+## The REAPER Algorithm:
+
+The process can be broken down into the following phases:
+* Signal Conditioning
+* Feature Extraction
+* Lattice Generation
+* Dynamic Programming
+* Backtrace and Output Generation
+
+
+## Signal Conditioning
+
+DC bias and low-frequency noise are removed by high-pass filtering,
+and the signal is converted to floating point. If the input is known
+to have phase distortion that is impacting tracker performance, a
+Hilbert transform, optionally done at this point, may improve
+performance.
+
+
+## Feature Extraction
+
+The following feature signals are derived from the conditioned input:
+* Linear Prediction residual:
+ This is computed using the autocorrelation method and continuous
+ interpolation of the filter coefficients. It is checked for the
+ expected polarity (negative impulses), and inverted, if necessary.
+* Amplitude-normalized prediction residual:
+ The normalization factor is based on the running, local RMS.
+* Pseudo-probability of voicing:
+ This is based on a local measure of low-frequency energy normalized
+ by the peak energy in the utterance.
+* Pseudo-probability of voicing onset:
+ Based on a forward delta of lowpassed energy.
+* Pseudo-probability of voicing offset:
+ Based on a backward delta of lowpassed energy.
+* Graded GCI candidates:
+ Each negative peak in the normalized residual is compared with the
+ local RMS. Peaks exceeding a threshold are selected as GCI candidates,
+ and then graded by a weighted combination of peak amplitude, skewness,
+ and sharpness. Each of the resulting candidates is associated with the
+ other feature values that occur closest in time to the candidate.
+* Normalized cross-correlation functions (NCCF) for each GCI candidate:
+ The correlations are computed on a weighted combination of the speech
+ signal and its LP residual. The correlation reference window for
+ each GCI candidate impulse is centered on the inpulse, and
+ correlations are computed for all lags in the expected pitch period range.
+
+
+## Lattice Generation
+
+Each GCI candidate (pulse) is set into a lattice structure that links
+preceding and following pulses that occur within minimum and maximum
+pitch period limits that are being considered for the utterance.
+These links establish all of the period hypotheses that will be
+considered for the pulse. Each hypothesis is scored on "local"
+evidence derived from the NCCF and peak quality measures. Each pulse
+is also assigned an unvoiced hypothesis, which is also given a score
+based on the available local evidence. The lattice is checked, and
+modified, if necessary to ensure that each pulse has at least one
+voiced and one unvoiced hypothesis preceding and following it, to
+maintain continuity for the dynamic programming to follow.
+(Note that the "scores" are used as costs during dynamic programming,
+so that low scores encourage selection of hypotheses.)
+
+
+## Dynamic Programming
+
+```
+For each pulse in the utterance:
+ For each period hypotheses following the pulse:
+ For each period hypothesis preceding the pulse:
+ Score the transition cost of connecting the periods. Choose the
+ minimum overall cost (cumulative+local+transition) preceding
+ period hypothesis, and save its cost and a backpointer to it.
+ The costs of making a voicing state change are modulated by the
+ probability of voicing onset and offset. The cost of
+ voiced-to-voiced transition is based on the delta F0 that
+ occurs, and the cost of staying in the unvoiced state is a
+ constant system parameter.
+```
+
+## Backtrace and Output Generation
+
+Starting at the last peak in the utterance, the lowest cost period
+candidate ending on that peak is found. This is the starting point
+for backtracking. The backpointers to the best preceding period
+candidates are then followed backwards through the utterance. As each
+"best candidate" is found, the time location of the terminal peak is
+recorded, along with the F0 corresponding to the period, or 0.0 if the
+candidate is unvoiced. Instead of simply taking the inverse of the
+period between GCI estimates as F0, the system refers back to the NCCF
+for that GCI, and takes the location of the NCCF maximum closest to
+the GCI-based period as the actual period. The output array of F0 and
+estimated GCI location is then time-reversed for final output.
+
diff --git a/REAPER/build/CMakeCache.txt b/REAPER/build/CMakeCache.txt
new file mode 100644
index 0000000000000000000000000000000000000000..95cf46ebf84ab1b43fe7a5b9cada18f544068fc8
--- /dev/null
+++ b/REAPER/build/CMakeCache.txt
@@ -0,0 +1,389 @@
+# This is the CMakeCache file.
+# For build in directory: /workspace/NeuCoSVC/REAPER/build
+# It was generated by CMake: /opt/conda/lib/python3.10/site-packages/cmake/data/bin/cmake
+# You can edit this file to change values found and used by cmake.
+# If you do not want to change any of the values, simply exit the editor.
+# If you do want to change a value, simply edit, save, and exit the editor.
+# The syntax for the file is as follows:
+# KEY:TYPE=VALUE
+# KEY is the name of a variable in the cache.
+# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!.
+# VALUE is the current value for the KEY.
+
+########################
+# EXTERNAL cache entries
+########################
+
+//Path to a program.
+CMAKE_ADDR2LINE:FILEPATH=/usr/bin/addr2line
+
+//Path to a program.
+CMAKE_AR:FILEPATH=/usr/bin/ar
+
+//Choose the type of build, options are: None Debug Release RelWithDebInfo
+// MinSizeRel ...
+CMAKE_BUILD_TYPE:STRING=
+
+//Enable/Disable color output during build.
+CMAKE_COLOR_MAKEFILE:BOOL=ON
+
+//CXX compiler
+CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++
+
+//A wrapper around 'ar' adding the appropriate '--plugin' option
+// for the GCC compiler
+CMAKE_CXX_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-9
+
+//A wrapper around 'ranlib' adding the appropriate '--plugin' option
+// for the GCC compiler
+CMAKE_CXX_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-9
+
+//Flags used by the CXX compiler during all build types.
+CMAKE_CXX_FLAGS:STRING=
+
+//Flags used by the CXX compiler during DEBUG builds.
+CMAKE_CXX_FLAGS_DEBUG:STRING=-g
+
+//Flags used by the CXX compiler during MINSIZEREL builds.
+CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
+
+//Flags used by the CXX compiler during RELEASE builds.
+CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
+
+//Flags used by the CXX compiler during RELWITHDEBINFO builds.
+CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
+
+//C compiler
+CMAKE_C_COMPILER:FILEPATH=/usr/bin/cc
+
+//A wrapper around 'ar' adding the appropriate '--plugin' option
+// for the GCC compiler
+CMAKE_C_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-9
+
+//A wrapper around 'ranlib' adding the appropriate '--plugin' option
+// for the GCC compiler
+CMAKE_C_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-9
+
+//Flags used by the C compiler during all build types.
+CMAKE_C_FLAGS:STRING=
+
+//Flags used by the C compiler during DEBUG builds.
+CMAKE_C_FLAGS_DEBUG:STRING=-g
+
+//Flags used by the C compiler during MINSIZEREL builds.
+CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
+
+//Flags used by the C compiler during RELEASE builds.
+CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
+
+//Flags used by the C compiler during RELWITHDEBINFO builds.
+CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
+
+//Path to a program.
+CMAKE_DLLTOOL:FILEPATH=CMAKE_DLLTOOL-NOTFOUND
+
+//Flags used by the linker during all build types.
+CMAKE_EXE_LINKER_FLAGS:STRING=
+
+//Flags used by the linker during DEBUG builds.
+CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=
+
+//Flags used by the linker during MINSIZEREL builds.
+CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=
+
+//Flags used by the linker during RELEASE builds.
+CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=
+
+//Flags used by the linker during RELWITHDEBINFO builds.
+CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
+
+//Enable/Disable output of compile commands during generation.
+CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=
+
+//Value Computed by CMake.
+CMAKE_FIND_PACKAGE_REDIRECTS_DIR:STATIC=/workspace/NeuCoSVC/REAPER/build/CMakeFiles/pkgRedirects
+
+//Install path prefix, prepended onto install directories.
+CMAKE_INSTALL_PREFIX:PATH=/usr/local
+
+//Path to a program.
+CMAKE_LINKER:FILEPATH=/usr/bin/ld
+
+//Path to a program.
+CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make
+
+//Flags used by the linker during the creation of modules during
+// all build types.
+CMAKE_MODULE_LINKER_FLAGS:STRING=
+
+//Flags used by the linker during the creation of modules during
+// DEBUG builds.
+CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=
+
+//Flags used by the linker during the creation of modules during
+// MINSIZEREL builds.
+CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=
+
+//Flags used by the linker during the creation of modules during
+// RELEASE builds.
+CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=
+
+//Flags used by the linker during the creation of modules during
+// RELWITHDEBINFO builds.
+CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
+
+//Path to a program.
+CMAKE_NM:FILEPATH=/usr/bin/nm
+
+//Path to a program.
+CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy
+
+//Path to a program.
+CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump
+
+//Value Computed by CMake
+CMAKE_PROJECT_DESCRIPTION:STATIC=
+
+//Value Computed by CMake
+CMAKE_PROJECT_HOMEPAGE_URL:STATIC=
+
+//Value Computed by CMake
+CMAKE_PROJECT_NAME:STATIC=Reaper
+
+//Path to a program.
+CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib
+
+//Path to a program.
+CMAKE_READELF:FILEPATH=/usr/bin/readelf
+
+//Flags used by the linker during the creation of shared libraries
+// during all build types.
+CMAKE_SHARED_LINKER_FLAGS:STRING=
+
+//Flags used by the linker during the creation of shared libraries
+// during DEBUG builds.
+CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=
+
+//Flags used by the linker during the creation of shared libraries
+// during MINSIZEREL builds.
+CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=
+
+//Flags used by the linker during the creation of shared libraries
+// during RELEASE builds.
+CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=
+
+//Flags used by the linker during the creation of shared libraries
+// during RELWITHDEBINFO builds.
+CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=
+
+//If set, runtime paths are not added when installing shared libraries,
+// but are added when building.
+CMAKE_SKIP_INSTALL_RPATH:BOOL=NO
+
+//If set, runtime paths are not added when using shared libraries.
+CMAKE_SKIP_RPATH:BOOL=NO
+
+//Flags used by the linker during the creation of static libraries
+// during all build types.
+CMAKE_STATIC_LINKER_FLAGS:STRING=
+
+//Flags used by the linker during the creation of static libraries
+// during DEBUG builds.
+CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=
+
+//Flags used by the linker during the creation of static libraries
+// during MINSIZEREL builds.
+CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING=
+
+//Flags used by the linker during the creation of static libraries
+// during RELEASE builds.
+CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=
+
+//Flags used by the linker during the creation of static libraries
+// during RELWITHDEBINFO builds.
+CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=
+
+//Path to a program.
+CMAKE_STRIP:FILEPATH=/usr/bin/strip
+
+//Path to a program.
+CMAKE_TAPI:FILEPATH=CMAKE_TAPI-NOTFOUND
+
+//If this value is on, makefiles will be generated without the
+// .SILENT directive, and all commands will be echoed to the console
+// during the make. This is useful for debugging only. With Visual
+// Studio IDE projects all commands are done without /nologo.
+CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE
+
+//Value Computed by CMake
+Reaper_BINARY_DIR:STATIC=/workspace/NeuCoSVC/REAPER/build
+
+//Value Computed by CMake
+Reaper_IS_TOP_LEVEL:STATIC=ON
+
+//Value Computed by CMake
+Reaper_SOURCE_DIR:STATIC=/workspace/NeuCoSVC/REAPER
+
+//Dependencies for the target
+epoch_tracker_LIB_DEPENDS:STATIC=general;wave;
+
+//Dependencies for the target
+wave_LIB_DEPENDS:STATIC=general;core;
+
+
+########################
+# INTERNAL cache entries
+########################
+
+//ADVANCED property for variable: CMAKE_ADDR2LINE
+CMAKE_ADDR2LINE-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_AR
+CMAKE_AR-ADVANCED:INTERNAL=1
+//This is the directory where this CMakeCache.txt was created
+CMAKE_CACHEFILE_DIR:INTERNAL=/workspace/NeuCoSVC/REAPER/build
+//Major version of cmake used to create the current loaded cache
+CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3
+//Minor version of cmake used to create the current loaded cache
+CMAKE_CACHE_MINOR_VERSION:INTERNAL=28
+//Patch version of cmake used to create the current loaded cache
+CMAKE_CACHE_PATCH_VERSION:INTERNAL=1
+//ADVANCED property for variable: CMAKE_COLOR_MAKEFILE
+CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1
+//Path to CMake executable.
+CMAKE_COMMAND:INTERNAL=/opt/conda/lib/python3.10/site-packages/cmake/data/bin/cmake
+//Path to cpack program executable.
+CMAKE_CPACK_COMMAND:INTERNAL=/opt/conda/lib/python3.10/site-packages/cmake/data/bin/cpack
+//Path to ctest program executable.
+CMAKE_CTEST_COMMAND:INTERNAL=/opt/conda/lib/python3.10/site-packages/cmake/data/bin/ctest
+//ADVANCED property for variable: CMAKE_CXX_COMPILER
+CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_CXX_COMPILER_AR
+CMAKE_CXX_COMPILER_AR-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_CXX_COMPILER_RANLIB
+CMAKE_CXX_COMPILER_RANLIB-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_CXX_FLAGS
+CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG
+CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL
+CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE
+CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO
+CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_C_COMPILER
+CMAKE_C_COMPILER-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_C_COMPILER_AR
+CMAKE_C_COMPILER_AR-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_C_COMPILER_RANLIB
+CMAKE_C_COMPILER_RANLIB-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_C_FLAGS
+CMAKE_C_FLAGS-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG
+CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL
+CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE
+CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO
+CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_DLLTOOL
+CMAKE_DLLTOOL-ADVANCED:INTERNAL=1
+//Executable file format
+CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF
+//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS
+CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG
+CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL
+CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE
+CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO
+CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS
+CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1
+//Name of external makefile project generator.
+CMAKE_EXTRA_GENERATOR:INTERNAL=
+//Name of generator.
+CMAKE_GENERATOR:INTERNAL=Unix Makefiles
+//Generator instance identifier.
+CMAKE_GENERATOR_INSTANCE:INTERNAL=
+//Name of generator platform.
+CMAKE_GENERATOR_PLATFORM:INTERNAL=
+//Name of generator toolset.
+CMAKE_GENERATOR_TOOLSET:INTERNAL=
+//Source directory with the top level CMakeLists.txt file for this
+// project
+CMAKE_HOME_DIRECTORY:INTERNAL=/workspace/NeuCoSVC/REAPER
+//Install .so files without execute permission.
+CMAKE_INSTALL_SO_NO_EXE:INTERNAL=1
+//ADVANCED property for variable: CMAKE_LINKER
+CMAKE_LINKER-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_MAKE_PROGRAM
+CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS
+CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG
+CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL
+CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE
+CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO
+CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_NM
+CMAKE_NM-ADVANCED:INTERNAL=1
+//number of local generators
+CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1
+//ADVANCED property for variable: CMAKE_OBJCOPY
+CMAKE_OBJCOPY-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_OBJDUMP
+CMAKE_OBJDUMP-ADVANCED:INTERNAL=1
+//Platform information initialized
+CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_RANLIB
+CMAKE_RANLIB-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_READELF
+CMAKE_READELF-ADVANCED:INTERNAL=1
+//Path to CMake installation.
+CMAKE_ROOT:INTERNAL=/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28
+//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS
+CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG
+CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL
+CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE
+CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO
+CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH
+CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_SKIP_RPATH
+CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS
+CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG
+CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL
+CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE
+CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO
+CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_STRIP
+CMAKE_STRIP-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_TAPI
+CMAKE_TAPI-ADVANCED:INTERNAL=1
+//uname command
+CMAKE_UNAME:INTERNAL=/usr/bin/uname
+//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE
+CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1
+//Test COMPILER_SUPPORTS_CXX0X
+COMPILER_SUPPORTS_CXX0X:INTERNAL=1
+//Test COMPILER_SUPPORTS_CXX11
+COMPILER_SUPPORTS_CXX11:INTERNAL=1
+//linker supports push/pop state
+_CMAKE_LINKER_PUSHPOP_STATE_SUPPORTED:INTERNAL=TRUE
+
diff --git a/REAPER/build/CMakeFiles/3.28.1/CMakeCCompiler.cmake b/REAPER/build/CMakeFiles/3.28.1/CMakeCCompiler.cmake
new file mode 100644
index 0000000000000000000000000000000000000000..5297182a27b7804d11ceed2326bc11bc9d8eda50
--- /dev/null
+++ b/REAPER/build/CMakeFiles/3.28.1/CMakeCCompiler.cmake
@@ -0,0 +1,74 @@
+set(CMAKE_C_COMPILER "/usr/bin/cc")
+set(CMAKE_C_COMPILER_ARG1 "")
+set(CMAKE_C_COMPILER_ID "GNU")
+set(CMAKE_C_COMPILER_VERSION "9.4.0")
+set(CMAKE_C_COMPILER_VERSION_INTERNAL "")
+set(CMAKE_C_COMPILER_WRAPPER "")
+set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "17")
+set(CMAKE_C_EXTENSIONS_COMPUTED_DEFAULT "ON")
+set(CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert;c_std_17;c_std_23")
+set(CMAKE_C90_COMPILE_FEATURES "c_std_90;c_function_prototypes")
+set(CMAKE_C99_COMPILE_FEATURES "c_std_99;c_restrict;c_variadic_macros")
+set(CMAKE_C11_COMPILE_FEATURES "c_std_11;c_static_assert")
+set(CMAKE_C17_COMPILE_FEATURES "c_std_17")
+set(CMAKE_C23_COMPILE_FEATURES "c_std_23")
+
+set(CMAKE_C_PLATFORM_ID "Linux")
+set(CMAKE_C_SIMULATE_ID "")
+set(CMAKE_C_COMPILER_FRONTEND_VARIANT "GNU")
+set(CMAKE_C_SIMULATE_VERSION "")
+
+
+
+
+set(CMAKE_AR "/usr/bin/ar")
+set(CMAKE_C_COMPILER_AR "/usr/bin/gcc-ar-9")
+set(CMAKE_RANLIB "/usr/bin/ranlib")
+set(CMAKE_C_COMPILER_RANLIB "/usr/bin/gcc-ranlib-9")
+set(CMAKE_LINKER "/usr/bin/ld")
+set(CMAKE_MT "")
+set(CMAKE_TAPI "CMAKE_TAPI-NOTFOUND")
+set(CMAKE_COMPILER_IS_GNUCC 1)
+set(CMAKE_C_COMPILER_LOADED 1)
+set(CMAKE_C_COMPILER_WORKS TRUE)
+set(CMAKE_C_ABI_COMPILED TRUE)
+
+set(CMAKE_C_COMPILER_ENV_VAR "CC")
+
+set(CMAKE_C_COMPILER_ID_RUN 1)
+set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m)
+set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
+set(CMAKE_C_LINKER_PREFERENCE 10)
+set(CMAKE_C_LINKER_DEPFILE_SUPPORTED FALSE)
+
+# Save compiler ABI information.
+set(CMAKE_C_SIZEOF_DATA_PTR "8")
+set(CMAKE_C_COMPILER_ABI "ELF")
+set(CMAKE_C_BYTE_ORDER "LITTLE_ENDIAN")
+set(CMAKE_C_LIBRARY_ARCHITECTURE "x86_64-linux-gnu")
+
+if(CMAKE_C_SIZEOF_DATA_PTR)
+ set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}")
+endif()
+
+if(CMAKE_C_COMPILER_ABI)
+ set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}")
+endif()
+
+if(CMAKE_C_LIBRARY_ARCHITECTURE)
+ set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu")
+endif()
+
+set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "")
+if(CMAKE_C_CL_SHOWINCLUDES_PREFIX)
+ set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}")
+endif()
+
+
+
+
+
+set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/9/include;/usr/local/include;/usr/include/x86_64-linux-gnu;/usr/include")
+set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "gcc;gcc_s;c;gcc;gcc_s")
+set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/9;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib")
+set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")
diff --git a/REAPER/build/CMakeFiles/3.28.1/CMakeCXXCompiler.cmake b/REAPER/build/CMakeFiles/3.28.1/CMakeCXXCompiler.cmake
new file mode 100644
index 0000000000000000000000000000000000000000..fd2417993cd901e1eb8386db8e557993f41277f9
--- /dev/null
+++ b/REAPER/build/CMakeFiles/3.28.1/CMakeCXXCompiler.cmake
@@ -0,0 +1,85 @@
+set(CMAKE_CXX_COMPILER "/usr/bin/c++")
+set(CMAKE_CXX_COMPILER_ARG1 "")
+set(CMAKE_CXX_COMPILER_ID "GNU")
+set(CMAKE_CXX_COMPILER_VERSION "9.4.0")
+set(CMAKE_CXX_COMPILER_VERSION_INTERNAL "")
+set(CMAKE_CXX_COMPILER_WRAPPER "")
+set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "14")
+set(CMAKE_CXX_EXTENSIONS_COMPUTED_DEFAULT "ON")
+set(CMAKE_CXX_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates;cxx_std_17;cxx_std_20")
+set(CMAKE_CXX98_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters")
+set(CMAKE_CXX11_COMPILE_FEATURES "cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates")
+set(CMAKE_CXX14_COMPILE_FEATURES "cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates")
+set(CMAKE_CXX17_COMPILE_FEATURES "cxx_std_17")
+set(CMAKE_CXX20_COMPILE_FEATURES "cxx_std_20")
+set(CMAKE_CXX23_COMPILE_FEATURES "")
+
+set(CMAKE_CXX_PLATFORM_ID "Linux")
+set(CMAKE_CXX_SIMULATE_ID "")
+set(CMAKE_CXX_COMPILER_FRONTEND_VARIANT "GNU")
+set(CMAKE_CXX_SIMULATE_VERSION "")
+
+
+
+
+set(CMAKE_AR "/usr/bin/ar")
+set(CMAKE_CXX_COMPILER_AR "/usr/bin/gcc-ar-9")
+set(CMAKE_RANLIB "/usr/bin/ranlib")
+set(CMAKE_CXX_COMPILER_RANLIB "/usr/bin/gcc-ranlib-9")
+set(CMAKE_LINKER "/usr/bin/ld")
+set(CMAKE_MT "")
+set(CMAKE_TAPI "CMAKE_TAPI-NOTFOUND")
+set(CMAKE_COMPILER_IS_GNUCXX 1)
+set(CMAKE_CXX_COMPILER_LOADED 1)
+set(CMAKE_CXX_COMPILER_WORKS TRUE)
+set(CMAKE_CXX_ABI_COMPILED TRUE)
+
+set(CMAKE_CXX_COMPILER_ENV_VAR "CXX")
+
+set(CMAKE_CXX_COMPILER_ID_RUN 1)
+set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm;mpp;CPP;ixx;cppm;ccm;cxxm;c++m)
+set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC)
+
+foreach (lang C OBJC OBJCXX)
+ if (CMAKE_${lang}_COMPILER_ID_RUN)
+ foreach(extension IN LISTS CMAKE_${lang}_SOURCE_FILE_EXTENSIONS)
+ list(REMOVE_ITEM CMAKE_CXX_SOURCE_FILE_EXTENSIONS ${extension})
+ endforeach()
+ endif()
+endforeach()
+
+set(CMAKE_CXX_LINKER_PREFERENCE 30)
+set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1)
+set(CMAKE_CXX_LINKER_DEPFILE_SUPPORTED FALSE)
+
+# Save compiler ABI information.
+set(CMAKE_CXX_SIZEOF_DATA_PTR "8")
+set(CMAKE_CXX_COMPILER_ABI "ELF")
+set(CMAKE_CXX_BYTE_ORDER "LITTLE_ENDIAN")
+set(CMAKE_CXX_LIBRARY_ARCHITECTURE "x86_64-linux-gnu")
+
+if(CMAKE_CXX_SIZEOF_DATA_PTR)
+ set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}")
+endif()
+
+if(CMAKE_CXX_COMPILER_ABI)
+ set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}")
+endif()
+
+if(CMAKE_CXX_LIBRARY_ARCHITECTURE)
+ set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu")
+endif()
+
+set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "")
+if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX)
+ set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}")
+endif()
+
+
+
+
+
+set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "/usr/include/c++/9;/usr/include/x86_64-linux-gnu/c++/9;/usr/include/c++/9/backward;/usr/lib/gcc/x86_64-linux-gnu/9/include;/usr/local/include;/usr/include/x86_64-linux-gnu;/usr/include")
+set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "stdc++;m;gcc_s;gcc;c;gcc_s;gcc")
+set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/9;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib")
+set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")
diff --git a/REAPER/build/CMakeFiles/3.28.1/CMakeDetermineCompilerABI_C.bin b/REAPER/build/CMakeFiles/3.28.1/CMakeDetermineCompilerABI_C.bin
new file mode 100644
index 0000000000000000000000000000000000000000..ef7cf8d2d6788d56c9dcd4686e182d97c7234f4c
--- /dev/null
+++ b/REAPER/build/CMakeFiles/3.28.1/CMakeDetermineCompilerABI_C.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3be1f453159bc8a0d583e4326dfd47e040d2af3035b240867b6b80ef7d199c59
+size 16656
diff --git a/REAPER/build/CMakeFiles/3.28.1/CMakeDetermineCompilerABI_CXX.bin b/REAPER/build/CMakeFiles/3.28.1/CMakeDetermineCompilerABI_CXX.bin
new file mode 100644
index 0000000000000000000000000000000000000000..fcbc9b55ee80cf64e44e65842fa83dfb17dd4488
--- /dev/null
+++ b/REAPER/build/CMakeFiles/3.28.1/CMakeDetermineCompilerABI_CXX.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f933b13b31986a32c54b9c7c0c976185dfa523b2fdb46bc72c539ca62f86ffb0
+size 16680
diff --git a/REAPER/build/CMakeFiles/3.28.1/CMakeSystem.cmake b/REAPER/build/CMakeFiles/3.28.1/CMakeSystem.cmake
new file mode 100644
index 0000000000000000000000000000000000000000..a17db27ee797f255ab3ae256437edc6524e8d67e
--- /dev/null
+++ b/REAPER/build/CMakeFiles/3.28.1/CMakeSystem.cmake
@@ -0,0 +1,15 @@
+set(CMAKE_HOST_SYSTEM "Linux-5.4.0-121-generic")
+set(CMAKE_HOST_SYSTEM_NAME "Linux")
+set(CMAKE_HOST_SYSTEM_VERSION "5.4.0-121-generic")
+set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64")
+
+
+
+set(CMAKE_SYSTEM "Linux-5.4.0-121-generic")
+set(CMAKE_SYSTEM_NAME "Linux")
+set(CMAKE_SYSTEM_VERSION "5.4.0-121-generic")
+set(CMAKE_SYSTEM_PROCESSOR "x86_64")
+
+set(CMAKE_CROSSCOMPILING "FALSE")
+
+set(CMAKE_SYSTEM_LOADED 1)
diff --git a/REAPER/build/CMakeFiles/3.28.1/CompilerIdC/CMakeCCompilerId.c b/REAPER/build/CMakeFiles/3.28.1/CompilerIdC/CMakeCCompilerId.c
new file mode 100644
index 0000000000000000000000000000000000000000..0a0ec9b1d6342673872775627a3017c9ef47adb7
--- /dev/null
+++ b/REAPER/build/CMakeFiles/3.28.1/CompilerIdC/CMakeCCompilerId.c
@@ -0,0 +1,880 @@
+#ifdef __cplusplus
+# error "A C++ compiler has been selected for C."
+#endif
+
+#if defined(__18CXX)
+# define ID_VOID_MAIN
+#endif
+#if defined(__CLASSIC_C__)
+/* cv-qualifiers did not exist in K&R C */
+# define const
+# define volatile
+#endif
+
+#if !defined(__has_include)
+/* If the compiler does not have __has_include, pretend the answer is
+ always no. */
+# define __has_include(x) 0
+#endif
+
+
+/* Version number components: V=Version, R=Revision, P=Patch
+ Version date components: YYYY=Year, MM=Month, DD=Day */
+
+#if defined(__INTEL_COMPILER) || defined(__ICC)
+# define COMPILER_ID "Intel"
+# if defined(_MSC_VER)
+# define SIMULATE_ID "MSVC"
+# endif
+# if defined(__GNUC__)
+# define SIMULATE_ID "GNU"
+# endif
+ /* __INTEL_COMPILER = VRP prior to 2021, and then VVVV for 2021 and later,
+ except that a few beta releases use the old format with V=2021. */
+# if __INTEL_COMPILER < 2021 || __INTEL_COMPILER == 202110 || __INTEL_COMPILER == 202111
+# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100)
+# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10)
+# if defined(__INTEL_COMPILER_UPDATE)
+# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE)
+# else
+# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10)
+# endif
+# else
+# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER)
+# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER_UPDATE)
+ /* The third version component from --version is an update index,
+ but no macro is provided for it. */
+# define COMPILER_VERSION_PATCH DEC(0)
+# endif
+# if defined(__INTEL_COMPILER_BUILD_DATE)
+ /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */
+# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE)
+# endif
+# if defined(_MSC_VER)
+ /* _MSC_VER = VVRR */
+# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
+# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
+# endif
+# if defined(__GNUC__)
+# define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
+# elif defined(__GNUG__)
+# define SIMULATE_VERSION_MAJOR DEC(__GNUG__)
+# endif
+# if defined(__GNUC_MINOR__)
+# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
+# endif
+# if defined(__GNUC_PATCHLEVEL__)
+# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
+# endif
+
+#elif (defined(__clang__) && defined(__INTEL_CLANG_COMPILER)) || defined(__INTEL_LLVM_COMPILER)
+# define COMPILER_ID "IntelLLVM"
+#if defined(_MSC_VER)
+# define SIMULATE_ID "MSVC"
+#endif
+#if defined(__GNUC__)
+# define SIMULATE_ID "GNU"
+#endif
+/* __INTEL_LLVM_COMPILER = VVVVRP prior to 2021.2.0, VVVVRRPP for 2021.2.0 and
+ * later. Look for 6 digit vs. 8 digit version number to decide encoding.
+ * VVVV is no smaller than the current year when a version is released.
+ */
+#if __INTEL_LLVM_COMPILER < 1000000L
+# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/100)
+# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/10 % 10)
+# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 10)
+#else
+# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/10000)
+# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/100 % 100)
+# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 100)
+#endif
+#if defined(_MSC_VER)
+ /* _MSC_VER = VVRR */
+# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
+# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
+#endif
+#if defined(__GNUC__)
+# define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
+#elif defined(__GNUG__)
+# define SIMULATE_VERSION_MAJOR DEC(__GNUG__)
+#endif
+#if defined(__GNUC_MINOR__)
+# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
+#endif
+#if defined(__GNUC_PATCHLEVEL__)
+# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
+#endif
+
+#elif defined(__PATHCC__)
+# define COMPILER_ID "PathScale"
+# define COMPILER_VERSION_MAJOR DEC(__PATHCC__)
+# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__)
+# if defined(__PATHCC_PATCHLEVEL__)
+# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__)
+# endif
+
+#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__)
+# define COMPILER_ID "Embarcadero"
+# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF)
+# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF)
+# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF)
+
+#elif defined(__BORLANDC__)
+# define COMPILER_ID "Borland"
+ /* __BORLANDC__ = 0xVRR */
+# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8)
+# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF)
+
+#elif defined(__WATCOMC__) && __WATCOMC__ < 1200
+# define COMPILER_ID "Watcom"
+ /* __WATCOMC__ = VVRR */
+# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100)
+# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
+# if (__WATCOMC__ % 10) > 0
+# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
+# endif
+
+#elif defined(__WATCOMC__)
+# define COMPILER_ID "OpenWatcom"
+ /* __WATCOMC__ = VVRP + 1100 */
+# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100)
+# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
+# if (__WATCOMC__ % 10) > 0
+# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
+# endif
+
+#elif defined(__SUNPRO_C)
+# define COMPILER_ID "SunPro"
+# if __SUNPRO_C >= 0x5100
+ /* __SUNPRO_C = 0xVRRP */
+# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>12)
+# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xFF)
+# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF)
+# else
+ /* __SUNPRO_CC = 0xVRP */
+# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>8)
+# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xF)
+# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF)
+# endif
+
+#elif defined(__HP_cc)
+# define COMPILER_ID "HP"
+ /* __HP_cc = VVRRPP */
+# define COMPILER_VERSION_MAJOR DEC(__HP_cc/10000)
+# define COMPILER_VERSION_MINOR DEC(__HP_cc/100 % 100)
+# define COMPILER_VERSION_PATCH DEC(__HP_cc % 100)
+
+#elif defined(__DECC)
+# define COMPILER_ID "Compaq"
+ /* __DECC_VER = VVRRTPPPP */
+# define COMPILER_VERSION_MAJOR DEC(__DECC_VER/10000000)
+# define COMPILER_VERSION_MINOR DEC(__DECC_VER/100000 % 100)
+# define COMPILER_VERSION_PATCH DEC(__DECC_VER % 10000)
+
+#elif defined(__IBMC__) && defined(__COMPILER_VER__)
+# define COMPILER_ID "zOS"
+ /* __IBMC__ = VRP */
+# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
+# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
+# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
+
+#elif defined(__open_xl__) && defined(__clang__)
+# define COMPILER_ID "IBMClang"
+# define COMPILER_VERSION_MAJOR DEC(__open_xl_version__)
+# define COMPILER_VERSION_MINOR DEC(__open_xl_release__)
+# define COMPILER_VERSION_PATCH DEC(__open_xl_modification__)
+# define COMPILER_VERSION_TWEAK DEC(__open_xl_ptf_fix_level__)
+
+
+#elif defined(__ibmxl__) && defined(__clang__)
+# define COMPILER_ID "XLClang"
+# define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__)
+# define COMPILER_VERSION_MINOR DEC(__ibmxl_release__)
+# define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__)
+# define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__)
+
+
+#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ >= 800
+# define COMPILER_ID "XL"
+ /* __IBMC__ = VRP */
+# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
+# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
+# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
+
+#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ < 800
+# define COMPILER_ID "VisualAge"
+ /* __IBMC__ = VRP */
+# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
+# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
+# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
+
+#elif defined(__NVCOMPILER)
+# define COMPILER_ID "NVHPC"
+# define COMPILER_VERSION_MAJOR DEC(__NVCOMPILER_MAJOR__)
+# define COMPILER_VERSION_MINOR DEC(__NVCOMPILER_MINOR__)
+# if defined(__NVCOMPILER_PATCHLEVEL__)
+# define COMPILER_VERSION_PATCH DEC(__NVCOMPILER_PATCHLEVEL__)
+# endif
+
+#elif defined(__PGI)
+# define COMPILER_ID "PGI"
+# define COMPILER_VERSION_MAJOR DEC(__PGIC__)
+# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__)
+# if defined(__PGIC_PATCHLEVEL__)
+# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__)
+# endif
+
+#elif defined(__clang__) && defined(__cray__)
+# define COMPILER_ID "CrayClang"
+# define COMPILER_VERSION_MAJOR DEC(__cray_major__)
+# define COMPILER_VERSION_MINOR DEC(__cray_minor__)
+# define COMPILER_VERSION_PATCH DEC(__cray_patchlevel__)
+# define COMPILER_VERSION_INTERNAL_STR __clang_version__
+
+
+#elif defined(_CRAYC)
+# define COMPILER_ID "Cray"
+# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR)
+# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR)
+
+#elif defined(__TI_COMPILER_VERSION__)
+# define COMPILER_ID "TI"
+ /* __TI_COMPILER_VERSION__ = VVVRRRPPP */
+# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000)
+# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000)
+# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000)
+
+#elif defined(__CLANG_FUJITSU)
+# define COMPILER_ID "FujitsuClang"
+# define COMPILER_VERSION_MAJOR DEC(__FCC_major__)
+# define COMPILER_VERSION_MINOR DEC(__FCC_minor__)
+# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__)
+# define COMPILER_VERSION_INTERNAL_STR __clang_version__
+
+
+#elif defined(__FUJITSU)
+# define COMPILER_ID "Fujitsu"
+# if defined(__FCC_version__)
+# define COMPILER_VERSION __FCC_version__
+# elif defined(__FCC_major__)
+# define COMPILER_VERSION_MAJOR DEC(__FCC_major__)
+# define COMPILER_VERSION_MINOR DEC(__FCC_minor__)
+# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__)
+# endif
+# if defined(__fcc_version)
+# define COMPILER_VERSION_INTERNAL DEC(__fcc_version)
+# elif defined(__FCC_VERSION)
+# define COMPILER_VERSION_INTERNAL DEC(__FCC_VERSION)
+# endif
+
+
+#elif defined(__ghs__)
+# define COMPILER_ID "GHS"
+/* __GHS_VERSION_NUMBER = VVVVRP */
+# ifdef __GHS_VERSION_NUMBER
+# define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100)
+# define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10)
+# define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10)
+# endif
+
+#elif defined(__TASKING__)
+# define COMPILER_ID "Tasking"
+ # define COMPILER_VERSION_MAJOR DEC(__VERSION__/1000)
+ # define COMPILER_VERSION_MINOR DEC(__VERSION__ % 100)
+# define COMPILER_VERSION_INTERNAL DEC(__VERSION__)
+
+#elif defined(__ORANGEC__)
+# define COMPILER_ID "OrangeC"
+# define COMPILER_VERSION_MAJOR DEC(__ORANGEC_MAJOR__)
+# define COMPILER_VERSION_MINOR DEC(__ORANGEC_MINOR__)
+# define COMPILER_VERSION_PATCH DEC(__ORANGEC_PATCHLEVEL__)
+
+#elif defined(__TINYC__)
+# define COMPILER_ID "TinyCC"
+
+#elif defined(__BCC__)
+# define COMPILER_ID "Bruce"
+
+#elif defined(__SCO_VERSION__)
+# define COMPILER_ID "SCO"
+
+#elif defined(__ARMCC_VERSION) && !defined(__clang__)
+# define COMPILER_ID "ARMCC"
+#if __ARMCC_VERSION >= 1000000
+ /* __ARMCC_VERSION = VRRPPPP */
+ # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000)
+ # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100)
+ # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
+#else
+ /* __ARMCC_VERSION = VRPPPP */
+ # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000)
+ # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10)
+ # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
+#endif
+
+
+#elif defined(__clang__) && defined(__apple_build_version__)
+# define COMPILER_ID "AppleClang"
+# if defined(_MSC_VER)
+# define SIMULATE_ID "MSVC"
+# endif
+# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
+# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
+# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
+# if defined(_MSC_VER)
+ /* _MSC_VER = VVRR */
+# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
+# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
+# endif
+# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__)
+
+#elif defined(__clang__) && defined(__ARMCOMPILER_VERSION)
+# define COMPILER_ID "ARMClang"
+ # define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000)
+ # define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100)
+ # define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION/100 % 100)
+# define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION)
+
+#elif defined(__clang__)
+# define COMPILER_ID "Clang"
+# if defined(_MSC_VER)
+# define SIMULATE_ID "MSVC"
+# endif
+# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
+# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
+# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
+# if defined(_MSC_VER)
+ /* _MSC_VER = VVRR */
+# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
+# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
+# endif
+
+#elif defined(__LCC__) && (defined(__GNUC__) || defined(__GNUG__) || defined(__MCST__))
+# define COMPILER_ID "LCC"
+# define COMPILER_VERSION_MAJOR DEC(__LCC__ / 100)
+# define COMPILER_VERSION_MINOR DEC(__LCC__ % 100)
+# if defined(__LCC_MINOR__)
+# define COMPILER_VERSION_PATCH DEC(__LCC_MINOR__)
+# endif
+# if defined(__GNUC__) && defined(__GNUC_MINOR__)
+# define SIMULATE_ID "GNU"
+# define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
+# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
+# if defined(__GNUC_PATCHLEVEL__)
+# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
+# endif
+# endif
+
+#elif defined(__GNUC__)
+# define COMPILER_ID "GNU"
+# define COMPILER_VERSION_MAJOR DEC(__GNUC__)
+# if defined(__GNUC_MINOR__)
+# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__)
+# endif
+# if defined(__GNUC_PATCHLEVEL__)
+# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
+# endif
+
+#elif defined(_MSC_VER)
+# define COMPILER_ID "MSVC"
+ /* _MSC_VER = VVRR */
+# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100)
+# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100)
+# if defined(_MSC_FULL_VER)
+# if _MSC_VER >= 1400
+ /* _MSC_FULL_VER = VVRRPPPPP */
+# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000)
+# else
+ /* _MSC_FULL_VER = VVRRPPPP */
+# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000)
+# endif
+# endif
+# if defined(_MSC_BUILD)
+# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD)
+# endif
+
+#elif defined(_ADI_COMPILER)
+# define COMPILER_ID "ADSP"
+#if defined(__VERSIONNUM__)
+ /* __VERSIONNUM__ = 0xVVRRPPTT */
+# define COMPILER_VERSION_MAJOR DEC(__VERSIONNUM__ >> 24 & 0xFF)
+# define COMPILER_VERSION_MINOR DEC(__VERSIONNUM__ >> 16 & 0xFF)
+# define COMPILER_VERSION_PATCH DEC(__VERSIONNUM__ >> 8 & 0xFF)
+# define COMPILER_VERSION_TWEAK DEC(__VERSIONNUM__ & 0xFF)
+#endif
+
+#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
+# define COMPILER_ID "IAR"
+# if defined(__VER__) && defined(__ICCARM__)
+# define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000)
+# define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000)
+# define COMPILER_VERSION_PATCH DEC((__VER__) % 1000)
+# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
+# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__) || defined(__ICCSTM8__))
+# define COMPILER_VERSION_MAJOR DEC((__VER__) / 100)
+# define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100))
+# define COMPILER_VERSION_PATCH DEC(__SUBVERSION__)
+# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
+# endif
+
+#elif defined(__SDCC_VERSION_MAJOR) || defined(SDCC)
+# define COMPILER_ID "SDCC"
+# if defined(__SDCC_VERSION_MAJOR)
+# define COMPILER_VERSION_MAJOR DEC(__SDCC_VERSION_MAJOR)
+# define COMPILER_VERSION_MINOR DEC(__SDCC_VERSION_MINOR)
+# define COMPILER_VERSION_PATCH DEC(__SDCC_VERSION_PATCH)
+# else
+ /* SDCC = VRP */
+# define COMPILER_VERSION_MAJOR DEC(SDCC/100)
+# define COMPILER_VERSION_MINOR DEC(SDCC/10 % 10)
+# define COMPILER_VERSION_PATCH DEC(SDCC % 10)
+# endif
+
+
+/* These compilers are either not known or too old to define an
+ identification macro. Try to identify the platform and guess that
+ it is the native compiler. */
+#elif defined(__hpux) || defined(__hpua)
+# define COMPILER_ID "HP"
+
+#else /* unknown compiler */
+# define COMPILER_ID ""
+#endif
+
+/* Construct the string literal in pieces to prevent the source from
+ getting matched. Store it in a pointer rather than an array
+ because some compilers will just produce instructions to fill the
+ array rather than assigning a pointer to a static array. */
+char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
+#ifdef SIMULATE_ID
+char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
+#endif
+
+#ifdef __QNXNTO__
+char const* qnxnto = "INFO" ":" "qnxnto[]";
+#endif
+
+#if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
+char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
+#endif
+
+#define STRINGIFY_HELPER(X) #X
+#define STRINGIFY(X) STRINGIFY_HELPER(X)
+
+/* Identify known platforms by name. */
+#if defined(__linux) || defined(__linux__) || defined(linux)
+# define PLATFORM_ID "Linux"
+
+#elif defined(__MSYS__)
+# define PLATFORM_ID "MSYS"
+
+#elif defined(__CYGWIN__)
+# define PLATFORM_ID "Cygwin"
+
+#elif defined(__MINGW32__)
+# define PLATFORM_ID "MinGW"
+
+#elif defined(__APPLE__)
+# define PLATFORM_ID "Darwin"
+
+#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
+# define PLATFORM_ID "Windows"
+
+#elif defined(__FreeBSD__) || defined(__FreeBSD)
+# define PLATFORM_ID "FreeBSD"
+
+#elif defined(__NetBSD__) || defined(__NetBSD)
+# define PLATFORM_ID "NetBSD"
+
+#elif defined(__OpenBSD__) || defined(__OPENBSD)
+# define PLATFORM_ID "OpenBSD"
+
+#elif defined(__sun) || defined(sun)
+# define PLATFORM_ID "SunOS"
+
+#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__)
+# define PLATFORM_ID "AIX"
+
+#elif defined(__hpux) || defined(__hpux__)
+# define PLATFORM_ID "HP-UX"
+
+#elif defined(__HAIKU__)
+# define PLATFORM_ID "Haiku"
+
+#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
+# define PLATFORM_ID "BeOS"
+
+#elif defined(__QNX__) || defined(__QNXNTO__)
+# define PLATFORM_ID "QNX"
+
+#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__)
+# define PLATFORM_ID "Tru64"
+
+#elif defined(__riscos) || defined(__riscos__)
+# define PLATFORM_ID "RISCos"
+
+#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__)
+# define PLATFORM_ID "SINIX"
+
+#elif defined(__UNIX_SV__)
+# define PLATFORM_ID "UNIX_SV"
+
+#elif defined(__bsdos__)
+# define PLATFORM_ID "BSDOS"
+
+#elif defined(_MPRAS) || defined(MPRAS)
+# define PLATFORM_ID "MP-RAS"
+
+#elif defined(__osf) || defined(__osf__)
+# define PLATFORM_ID "OSF1"
+
+#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv)
+# define PLATFORM_ID "SCO_SV"
+
+#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX)
+# define PLATFORM_ID "ULTRIX"
+
+#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX)
+# define PLATFORM_ID "Xenix"
+
+#elif defined(__WATCOMC__)
+# if defined(__LINUX__)
+# define PLATFORM_ID "Linux"
+
+# elif defined(__DOS__)
+# define PLATFORM_ID "DOS"
+
+# elif defined(__OS2__)
+# define PLATFORM_ID "OS2"
+
+# elif defined(__WINDOWS__)
+# define PLATFORM_ID "Windows3x"
+
+# elif defined(__VXWORKS__)
+# define PLATFORM_ID "VxWorks"
+
+# else /* unknown platform */
+# define PLATFORM_ID
+# endif
+
+#elif defined(__INTEGRITY)
+# if defined(INT_178B)
+# define PLATFORM_ID "Integrity178"
+
+# else /* regular Integrity */
+# define PLATFORM_ID "Integrity"
+# endif
+
+# elif defined(_ADI_COMPILER)
+# define PLATFORM_ID "ADSP"
+
+#else /* unknown platform */
+# define PLATFORM_ID
+
+#endif
+
+/* For windows compilers MSVC and Intel we can determine
+ the architecture of the compiler being used. This is because
+ the compilers do not have flags that can change the architecture,
+ but rather depend on which compiler is being used
+*/
+#if defined(_WIN32) && defined(_MSC_VER)
+# if defined(_M_IA64)
+# define ARCHITECTURE_ID "IA64"
+
+# elif defined(_M_ARM64EC)
+# define ARCHITECTURE_ID "ARM64EC"
+
+# elif defined(_M_X64) || defined(_M_AMD64)
+# define ARCHITECTURE_ID "x64"
+
+# elif defined(_M_IX86)
+# define ARCHITECTURE_ID "X86"
+
+# elif defined(_M_ARM64)
+# define ARCHITECTURE_ID "ARM64"
+
+# elif defined(_M_ARM)
+# if _M_ARM == 4
+# define ARCHITECTURE_ID "ARMV4I"
+# elif _M_ARM == 5
+# define ARCHITECTURE_ID "ARMV5I"
+# else
+# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM)
+# endif
+
+# elif defined(_M_MIPS)
+# define ARCHITECTURE_ID "MIPS"
+
+# elif defined(_M_SH)
+# define ARCHITECTURE_ID "SHx"
+
+# else /* unknown architecture */
+# define ARCHITECTURE_ID ""
+# endif
+
+#elif defined(__WATCOMC__)
+# if defined(_M_I86)
+# define ARCHITECTURE_ID "I86"
+
+# elif defined(_M_IX86)
+# define ARCHITECTURE_ID "X86"
+
+# else /* unknown architecture */
+# define ARCHITECTURE_ID ""
+# endif
+
+#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
+# if defined(__ICCARM__)
+# define ARCHITECTURE_ID "ARM"
+
+# elif defined(__ICCRX__)
+# define ARCHITECTURE_ID "RX"
+
+# elif defined(__ICCRH850__)
+# define ARCHITECTURE_ID "RH850"
+
+# elif defined(__ICCRL78__)
+# define ARCHITECTURE_ID "RL78"
+
+# elif defined(__ICCRISCV__)
+# define ARCHITECTURE_ID "RISCV"
+
+# elif defined(__ICCAVR__)
+# define ARCHITECTURE_ID "AVR"
+
+# elif defined(__ICC430__)
+# define ARCHITECTURE_ID "MSP430"
+
+# elif defined(__ICCV850__)
+# define ARCHITECTURE_ID "V850"
+
+# elif defined(__ICC8051__)
+# define ARCHITECTURE_ID "8051"
+
+# elif defined(__ICCSTM8__)
+# define ARCHITECTURE_ID "STM8"
+
+# else /* unknown architecture */
+# define ARCHITECTURE_ID ""
+# endif
+
+#elif defined(__ghs__)
+# if defined(__PPC64__)
+# define ARCHITECTURE_ID "PPC64"
+
+# elif defined(__ppc__)
+# define ARCHITECTURE_ID "PPC"
+
+# elif defined(__ARM__)
+# define ARCHITECTURE_ID "ARM"
+
+# elif defined(__x86_64__)
+# define ARCHITECTURE_ID "x64"
+
+# elif defined(__i386__)
+# define ARCHITECTURE_ID "X86"
+
+# else /* unknown architecture */
+# define ARCHITECTURE_ID ""
+# endif
+
+#elif defined(__TI_COMPILER_VERSION__)
+# if defined(__TI_ARM__)
+# define ARCHITECTURE_ID "ARM"
+
+# elif defined(__MSP430__)
+# define ARCHITECTURE_ID "MSP430"
+
+# elif defined(__TMS320C28XX__)
+# define ARCHITECTURE_ID "TMS320C28x"
+
+# elif defined(__TMS320C6X__) || defined(_TMS320C6X)
+# define ARCHITECTURE_ID "TMS320C6x"
+
+# else /* unknown architecture */
+# define ARCHITECTURE_ID ""
+# endif
+
+# elif defined(__ADSPSHARC__)
+# define ARCHITECTURE_ID "SHARC"
+
+# elif defined(__ADSPBLACKFIN__)
+# define ARCHITECTURE_ID "Blackfin"
+
+#elif defined(__TASKING__)
+
+# if defined(__CTC__) || defined(__CPTC__)
+# define ARCHITECTURE_ID "TriCore"
+
+# elif defined(__CMCS__)
+# define ARCHITECTURE_ID "MCS"
+
+# elif defined(__CARM__)
+# define ARCHITECTURE_ID "ARM"
+
+# elif defined(__CARC__)
+# define ARCHITECTURE_ID "ARC"
+
+# elif defined(__C51__)
+# define ARCHITECTURE_ID "8051"
+
+# elif defined(__CPCP__)
+# define ARCHITECTURE_ID "PCP"
+
+# else
+# define ARCHITECTURE_ID ""
+# endif
+
+#else
+# define ARCHITECTURE_ID
+#endif
+
+/* Convert integer to decimal digit literals. */
+#define DEC(n) \
+ ('0' + (((n) / 10000000)%10)), \
+ ('0' + (((n) / 1000000)%10)), \
+ ('0' + (((n) / 100000)%10)), \
+ ('0' + (((n) / 10000)%10)), \
+ ('0' + (((n) / 1000)%10)), \
+ ('0' + (((n) / 100)%10)), \
+ ('0' + (((n) / 10)%10)), \
+ ('0' + ((n) % 10))
+
+/* Convert integer to hex digit literals. */
+#define HEX(n) \
+ ('0' + ((n)>>28 & 0xF)), \
+ ('0' + ((n)>>24 & 0xF)), \
+ ('0' + ((n)>>20 & 0xF)), \
+ ('0' + ((n)>>16 & 0xF)), \
+ ('0' + ((n)>>12 & 0xF)), \
+ ('0' + ((n)>>8 & 0xF)), \
+ ('0' + ((n)>>4 & 0xF)), \
+ ('0' + ((n) & 0xF))
+
+/* Construct a string literal encoding the version number. */
+#ifdef COMPILER_VERSION
+char const* info_version = "INFO" ":" "compiler_version[" COMPILER_VERSION "]";
+
+/* Construct a string literal encoding the version number components. */
+#elif defined(COMPILER_VERSION_MAJOR)
+char const info_version[] = {
+ 'I', 'N', 'F', 'O', ':',
+ 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[',
+ COMPILER_VERSION_MAJOR,
+# ifdef COMPILER_VERSION_MINOR
+ '.', COMPILER_VERSION_MINOR,
+# ifdef COMPILER_VERSION_PATCH
+ '.', COMPILER_VERSION_PATCH,
+# ifdef COMPILER_VERSION_TWEAK
+ '.', COMPILER_VERSION_TWEAK,
+# endif
+# endif
+# endif
+ ']','\0'};
+#endif
+
+/* Construct a string literal encoding the internal version number. */
+#ifdef COMPILER_VERSION_INTERNAL
+char const info_version_internal[] = {
+ 'I', 'N', 'F', 'O', ':',
+ 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_',
+ 'i','n','t','e','r','n','a','l','[',
+ COMPILER_VERSION_INTERNAL,']','\0'};
+#elif defined(COMPILER_VERSION_INTERNAL_STR)
+char const* info_version_internal = "INFO" ":" "compiler_version_internal[" COMPILER_VERSION_INTERNAL_STR "]";
+#endif
+
+/* Construct a string literal encoding the version number components. */
+#ifdef SIMULATE_VERSION_MAJOR
+char const info_simulate_version[] = {
+ 'I', 'N', 'F', 'O', ':',
+ 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[',
+ SIMULATE_VERSION_MAJOR,
+# ifdef SIMULATE_VERSION_MINOR
+ '.', SIMULATE_VERSION_MINOR,
+# ifdef SIMULATE_VERSION_PATCH
+ '.', SIMULATE_VERSION_PATCH,
+# ifdef SIMULATE_VERSION_TWEAK
+ '.', SIMULATE_VERSION_TWEAK,
+# endif
+# endif
+# endif
+ ']','\0'};
+#endif
+
+/* Construct the string literal in pieces to prevent the source from
+ getting matched. Store it in a pointer rather than an array
+ because some compilers will just produce instructions to fill the
+ array rather than assigning a pointer to a static array. */
+char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]";
+char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]";
+
+
+
+#if !defined(__STDC__) && !defined(__clang__)
+# if defined(_MSC_VER) || defined(__ibmxl__) || defined(__IBMC__)
+# define C_VERSION "90"
+# else
+# define C_VERSION
+# endif
+#elif __STDC_VERSION__ > 201710L
+# define C_VERSION "23"
+#elif __STDC_VERSION__ >= 201710L
+# define C_VERSION "17"
+#elif __STDC_VERSION__ >= 201000L
+# define C_VERSION "11"
+#elif __STDC_VERSION__ >= 199901L
+# define C_VERSION "99"
+#else
+# define C_VERSION "90"
+#endif
+const char* info_language_standard_default =
+ "INFO" ":" "standard_default[" C_VERSION "]";
+
+const char* info_language_extensions_default = "INFO" ":" "extensions_default["
+#if (defined(__clang__) || defined(__GNUC__) || defined(__xlC__) || \
+ defined(__TI_COMPILER_VERSION__)) && \
+ !defined(__STRICT_ANSI__)
+ "ON"
+#else
+ "OFF"
+#endif
+"]";
+
+/*--------------------------------------------------------------------------*/
+
+#ifdef ID_VOID_MAIN
+void main() {}
+#else
+# if defined(__CLASSIC_C__)
+int main(argc, argv) int argc; char *argv[];
+# else
+int main(int argc, char* argv[])
+# endif
+{
+ int require = 0;
+ require += info_compiler[argc];
+ require += info_platform[argc];
+ require += info_arch[argc];
+#ifdef COMPILER_VERSION_MAJOR
+ require += info_version[argc];
+#endif
+#ifdef COMPILER_VERSION_INTERNAL
+ require += info_version_internal[argc];
+#endif
+#ifdef SIMULATE_ID
+ require += info_simulate[argc];
+#endif
+#ifdef SIMULATE_VERSION_MAJOR
+ require += info_simulate_version[argc];
+#endif
+#if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
+ require += info_cray[argc];
+#endif
+ require += info_language_standard_default[argc];
+ require += info_language_extensions_default[argc];
+ (void)argv;
+ return require;
+}
+#endif
diff --git a/REAPER/build/CMakeFiles/3.28.1/CompilerIdC/a.out b/REAPER/build/CMakeFiles/3.28.1/CompilerIdC/a.out
new file mode 100644
index 0000000000000000000000000000000000000000..6dc55f1097b689bb800e144a39fecd62174ebd94
Binary files /dev/null and b/REAPER/build/CMakeFiles/3.28.1/CompilerIdC/a.out differ
diff --git a/REAPER/build/CMakeFiles/3.28.1/CompilerIdCXX/CMakeCXXCompilerId.cpp b/REAPER/build/CMakeFiles/3.28.1/CompilerIdCXX/CMakeCXXCompilerId.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..9c9c90eaffe6bb0799f322938350b76c08c676dc
--- /dev/null
+++ b/REAPER/build/CMakeFiles/3.28.1/CompilerIdCXX/CMakeCXXCompilerId.cpp
@@ -0,0 +1,869 @@
+/* This source file must have a .cpp extension so that all C++ compilers
+ recognize the extension without flags. Borland does not know .cxx for
+ example. */
+#ifndef __cplusplus
+# error "A C compiler has been selected for C++."
+#endif
+
+#if !defined(__has_include)
+/* If the compiler does not have __has_include, pretend the answer is
+ always no. */
+# define __has_include(x) 0
+#endif
+
+
+/* Version number components: V=Version, R=Revision, P=Patch
+ Version date components: YYYY=Year, MM=Month, DD=Day */
+
+#if defined(__COMO__)
+# define COMPILER_ID "Comeau"
+ /* __COMO_VERSION__ = VRR */
+# define COMPILER_VERSION_MAJOR DEC(__COMO_VERSION__ / 100)
+# define COMPILER_VERSION_MINOR DEC(__COMO_VERSION__ % 100)
+
+#elif defined(__INTEL_COMPILER) || defined(__ICC)
+# define COMPILER_ID "Intel"
+# if defined(_MSC_VER)
+# define SIMULATE_ID "MSVC"
+# endif
+# if defined(__GNUC__)
+# define SIMULATE_ID "GNU"
+# endif
+ /* __INTEL_COMPILER = VRP prior to 2021, and then VVVV for 2021 and later,
+ except that a few beta releases use the old format with V=2021. */
+# if __INTEL_COMPILER < 2021 || __INTEL_COMPILER == 202110 || __INTEL_COMPILER == 202111
+# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100)
+# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10)
+# if defined(__INTEL_COMPILER_UPDATE)
+# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE)
+# else
+# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10)
+# endif
+# else
+# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER)
+# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER_UPDATE)
+ /* The third version component from --version is an update index,
+ but no macro is provided for it. */
+# define COMPILER_VERSION_PATCH DEC(0)
+# endif
+# if defined(__INTEL_COMPILER_BUILD_DATE)
+ /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */
+# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE)
+# endif
+# if defined(_MSC_VER)
+ /* _MSC_VER = VVRR */
+# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
+# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
+# endif
+# if defined(__GNUC__)
+# define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
+# elif defined(__GNUG__)
+# define SIMULATE_VERSION_MAJOR DEC(__GNUG__)
+# endif
+# if defined(__GNUC_MINOR__)
+# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
+# endif
+# if defined(__GNUC_PATCHLEVEL__)
+# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
+# endif
+
+#elif (defined(__clang__) && defined(__INTEL_CLANG_COMPILER)) || defined(__INTEL_LLVM_COMPILER)
+# define COMPILER_ID "IntelLLVM"
+#if defined(_MSC_VER)
+# define SIMULATE_ID "MSVC"
+#endif
+#if defined(__GNUC__)
+# define SIMULATE_ID "GNU"
+#endif
+/* __INTEL_LLVM_COMPILER = VVVVRP prior to 2021.2.0, VVVVRRPP for 2021.2.0 and
+ * later. Look for 6 digit vs. 8 digit version number to decide encoding.
+ * VVVV is no smaller than the current year when a version is released.
+ */
+#if __INTEL_LLVM_COMPILER < 1000000L
+# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/100)
+# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/10 % 10)
+# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 10)
+#else
+# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/10000)
+# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/100 % 100)
+# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 100)
+#endif
+#if defined(_MSC_VER)
+ /* _MSC_VER = VVRR */
+# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
+# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
+#endif
+#if defined(__GNUC__)
+# define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
+#elif defined(__GNUG__)
+# define SIMULATE_VERSION_MAJOR DEC(__GNUG__)
+#endif
+#if defined(__GNUC_MINOR__)
+# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
+#endif
+#if defined(__GNUC_PATCHLEVEL__)
+# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
+#endif
+
+#elif defined(__PATHCC__)
+# define COMPILER_ID "PathScale"
+# define COMPILER_VERSION_MAJOR DEC(__PATHCC__)
+# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__)
+# if defined(__PATHCC_PATCHLEVEL__)
+# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__)
+# endif
+
+#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__)
+# define COMPILER_ID "Embarcadero"
+# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF)
+# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF)
+# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF)
+
+#elif defined(__BORLANDC__)
+# define COMPILER_ID "Borland"
+ /* __BORLANDC__ = 0xVRR */
+# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8)
+# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF)
+
+#elif defined(__WATCOMC__) && __WATCOMC__ < 1200
+# define COMPILER_ID "Watcom"
+ /* __WATCOMC__ = VVRR */
+# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100)
+# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
+# if (__WATCOMC__ % 10) > 0
+# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
+# endif
+
+#elif defined(__WATCOMC__)
+# define COMPILER_ID "OpenWatcom"
+ /* __WATCOMC__ = VVRP + 1100 */
+# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100)
+# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
+# if (__WATCOMC__ % 10) > 0
+# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
+# endif
+
+#elif defined(__SUNPRO_CC)
+# define COMPILER_ID "SunPro"
+# if __SUNPRO_CC >= 0x5100
+ /* __SUNPRO_CC = 0xVRRP */
+# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>12)
+# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xFF)
+# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF)
+# else
+ /* __SUNPRO_CC = 0xVRP */
+# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>8)
+# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xF)
+# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF)
+# endif
+
+#elif defined(__HP_aCC)
+# define COMPILER_ID "HP"
+ /* __HP_aCC = VVRRPP */
+# define COMPILER_VERSION_MAJOR DEC(__HP_aCC/10000)
+# define COMPILER_VERSION_MINOR DEC(__HP_aCC/100 % 100)
+# define COMPILER_VERSION_PATCH DEC(__HP_aCC % 100)
+
+#elif defined(__DECCXX)
+# define COMPILER_ID "Compaq"
+ /* __DECCXX_VER = VVRRTPPPP */
+# define COMPILER_VERSION_MAJOR DEC(__DECCXX_VER/10000000)
+# define COMPILER_VERSION_MINOR DEC(__DECCXX_VER/100000 % 100)
+# define COMPILER_VERSION_PATCH DEC(__DECCXX_VER % 10000)
+
+#elif defined(__IBMCPP__) && defined(__COMPILER_VER__)
+# define COMPILER_ID "zOS"
+ /* __IBMCPP__ = VRP */
+# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100)
+# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10)
+# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10)
+
+#elif defined(__open_xl__) && defined(__clang__)
+# define COMPILER_ID "IBMClang"
+# define COMPILER_VERSION_MAJOR DEC(__open_xl_version__)
+# define COMPILER_VERSION_MINOR DEC(__open_xl_release__)
+# define COMPILER_VERSION_PATCH DEC(__open_xl_modification__)
+# define COMPILER_VERSION_TWEAK DEC(__open_xl_ptf_fix_level__)
+
+
+#elif defined(__ibmxl__) && defined(__clang__)
+# define COMPILER_ID "XLClang"
+# define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__)
+# define COMPILER_VERSION_MINOR DEC(__ibmxl_release__)
+# define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__)
+# define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__)
+
+
+#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ >= 800
+# define COMPILER_ID "XL"
+ /* __IBMCPP__ = VRP */
+# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100)
+# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10)
+# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10)
+
+#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ < 800
+# define COMPILER_ID "VisualAge"
+ /* __IBMCPP__ = VRP */
+# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100)
+# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10)
+# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10)
+
+#elif defined(__NVCOMPILER)
+# define COMPILER_ID "NVHPC"
+# define COMPILER_VERSION_MAJOR DEC(__NVCOMPILER_MAJOR__)
+# define COMPILER_VERSION_MINOR DEC(__NVCOMPILER_MINOR__)
+# if defined(__NVCOMPILER_PATCHLEVEL__)
+# define COMPILER_VERSION_PATCH DEC(__NVCOMPILER_PATCHLEVEL__)
+# endif
+
+#elif defined(__PGI)
+# define COMPILER_ID "PGI"
+# define COMPILER_VERSION_MAJOR DEC(__PGIC__)
+# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__)
+# if defined(__PGIC_PATCHLEVEL__)
+# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__)
+# endif
+
+#elif defined(__clang__) && defined(__cray__)
+# define COMPILER_ID "CrayClang"
+# define COMPILER_VERSION_MAJOR DEC(__cray_major__)
+# define COMPILER_VERSION_MINOR DEC(__cray_minor__)
+# define COMPILER_VERSION_PATCH DEC(__cray_patchlevel__)
+# define COMPILER_VERSION_INTERNAL_STR __clang_version__
+
+
+#elif defined(_CRAYC)
+# define COMPILER_ID "Cray"
+# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR)
+# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR)
+
+#elif defined(__TI_COMPILER_VERSION__)
+# define COMPILER_ID "TI"
+ /* __TI_COMPILER_VERSION__ = VVVRRRPPP */
+# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000)
+# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000)
+# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000)
+
+#elif defined(__CLANG_FUJITSU)
+# define COMPILER_ID "FujitsuClang"
+# define COMPILER_VERSION_MAJOR DEC(__FCC_major__)
+# define COMPILER_VERSION_MINOR DEC(__FCC_minor__)
+# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__)
+# define COMPILER_VERSION_INTERNAL_STR __clang_version__
+
+
+#elif defined(__FUJITSU)
+# define COMPILER_ID "Fujitsu"
+# if defined(__FCC_version__)
+# define COMPILER_VERSION __FCC_version__
+# elif defined(__FCC_major__)
+# define COMPILER_VERSION_MAJOR DEC(__FCC_major__)
+# define COMPILER_VERSION_MINOR DEC(__FCC_minor__)
+# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__)
+# endif
+# if defined(__fcc_version)
+# define COMPILER_VERSION_INTERNAL DEC(__fcc_version)
+# elif defined(__FCC_VERSION)
+# define COMPILER_VERSION_INTERNAL DEC(__FCC_VERSION)
+# endif
+
+
+#elif defined(__ghs__)
+# define COMPILER_ID "GHS"
+/* __GHS_VERSION_NUMBER = VVVVRP */
+# ifdef __GHS_VERSION_NUMBER
+# define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100)
+# define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10)
+# define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10)
+# endif
+
+#elif defined(__TASKING__)
+# define COMPILER_ID "Tasking"
+ # define COMPILER_VERSION_MAJOR DEC(__VERSION__/1000)
+ # define COMPILER_VERSION_MINOR DEC(__VERSION__ % 100)
+# define COMPILER_VERSION_INTERNAL DEC(__VERSION__)
+
+#elif defined(__ORANGEC__)
+# define COMPILER_ID "OrangeC"
+# define COMPILER_VERSION_MAJOR DEC(__ORANGEC_MAJOR__)
+# define COMPILER_VERSION_MINOR DEC(__ORANGEC_MINOR__)
+# define COMPILER_VERSION_PATCH DEC(__ORANGEC_PATCHLEVEL__)
+
+#elif defined(__SCO_VERSION__)
+# define COMPILER_ID "SCO"
+
+#elif defined(__ARMCC_VERSION) && !defined(__clang__)
+# define COMPILER_ID "ARMCC"
+#if __ARMCC_VERSION >= 1000000
+ /* __ARMCC_VERSION = VRRPPPP */
+ # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000)
+ # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100)
+ # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
+#else
+ /* __ARMCC_VERSION = VRPPPP */
+ # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000)
+ # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10)
+ # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
+#endif
+
+
+#elif defined(__clang__) && defined(__apple_build_version__)
+# define COMPILER_ID "AppleClang"
+# if defined(_MSC_VER)
+# define SIMULATE_ID "MSVC"
+# endif
+# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
+# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
+# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
+# if defined(_MSC_VER)
+ /* _MSC_VER = VVRR */
+# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
+# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
+# endif
+# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__)
+
+#elif defined(__clang__) && defined(__ARMCOMPILER_VERSION)
+# define COMPILER_ID "ARMClang"
+ # define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000)
+ # define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100)
+ # define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION/100 % 100)
+# define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION)
+
+#elif defined(__clang__)
+# define COMPILER_ID "Clang"
+# if defined(_MSC_VER)
+# define SIMULATE_ID "MSVC"
+# endif
+# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
+# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
+# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
+# if defined(_MSC_VER)
+ /* _MSC_VER = VVRR */
+# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
+# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
+# endif
+
+#elif defined(__LCC__) && (defined(__GNUC__) || defined(__GNUG__) || defined(__MCST__))
+# define COMPILER_ID "LCC"
+# define COMPILER_VERSION_MAJOR DEC(__LCC__ / 100)
+# define COMPILER_VERSION_MINOR DEC(__LCC__ % 100)
+# if defined(__LCC_MINOR__)
+# define COMPILER_VERSION_PATCH DEC(__LCC_MINOR__)
+# endif
+# if defined(__GNUC__) && defined(__GNUC_MINOR__)
+# define SIMULATE_ID "GNU"
+# define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
+# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
+# if defined(__GNUC_PATCHLEVEL__)
+# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
+# endif
+# endif
+
+#elif defined(__GNUC__) || defined(__GNUG__)
+# define COMPILER_ID "GNU"
+# if defined(__GNUC__)
+# define COMPILER_VERSION_MAJOR DEC(__GNUC__)
+# else
+# define COMPILER_VERSION_MAJOR DEC(__GNUG__)
+# endif
+# if defined(__GNUC_MINOR__)
+# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__)
+# endif
+# if defined(__GNUC_PATCHLEVEL__)
+# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
+# endif
+
+#elif defined(_MSC_VER)
+# define COMPILER_ID "MSVC"
+ /* _MSC_VER = VVRR */
+# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100)
+# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100)
+# if defined(_MSC_FULL_VER)
+# if _MSC_VER >= 1400
+ /* _MSC_FULL_VER = VVRRPPPPP */
+# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000)
+# else
+ /* _MSC_FULL_VER = VVRRPPPP */
+# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000)
+# endif
+# endif
+# if defined(_MSC_BUILD)
+# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD)
+# endif
+
+#elif defined(_ADI_COMPILER)
+# define COMPILER_ID "ADSP"
+#if defined(__VERSIONNUM__)
+ /* __VERSIONNUM__ = 0xVVRRPPTT */
+# define COMPILER_VERSION_MAJOR DEC(__VERSIONNUM__ >> 24 & 0xFF)
+# define COMPILER_VERSION_MINOR DEC(__VERSIONNUM__ >> 16 & 0xFF)
+# define COMPILER_VERSION_PATCH DEC(__VERSIONNUM__ >> 8 & 0xFF)
+# define COMPILER_VERSION_TWEAK DEC(__VERSIONNUM__ & 0xFF)
+#endif
+
+#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
+# define COMPILER_ID "IAR"
+# if defined(__VER__) && defined(__ICCARM__)
+# define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000)
+# define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000)
+# define COMPILER_VERSION_PATCH DEC((__VER__) % 1000)
+# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
+# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__) || defined(__ICCSTM8__))
+# define COMPILER_VERSION_MAJOR DEC((__VER__) / 100)
+# define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100))
+# define COMPILER_VERSION_PATCH DEC(__SUBVERSION__)
+# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
+# endif
+
+
+/* These compilers are either not known or too old to define an
+ identification macro. Try to identify the platform and guess that
+ it is the native compiler. */
+#elif defined(__hpux) || defined(__hpua)
+# define COMPILER_ID "HP"
+
+#else /* unknown compiler */
+# define COMPILER_ID ""
+#endif
+
+/* Construct the string literal in pieces to prevent the source from
+ getting matched. Store it in a pointer rather than an array
+ because some compilers will just produce instructions to fill the
+ array rather than assigning a pointer to a static array. */
+char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
+#ifdef SIMULATE_ID
+char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
+#endif
+
+#ifdef __QNXNTO__
+char const* qnxnto = "INFO" ":" "qnxnto[]";
+#endif
+
+#if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
+char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
+#endif
+
+#define STRINGIFY_HELPER(X) #X
+#define STRINGIFY(X) STRINGIFY_HELPER(X)
+
+/* Identify known platforms by name. */
+#if defined(__linux) || defined(__linux__) || defined(linux)
+# define PLATFORM_ID "Linux"
+
+#elif defined(__MSYS__)
+# define PLATFORM_ID "MSYS"
+
+#elif defined(__CYGWIN__)
+# define PLATFORM_ID "Cygwin"
+
+#elif defined(__MINGW32__)
+# define PLATFORM_ID "MinGW"
+
+#elif defined(__APPLE__)
+# define PLATFORM_ID "Darwin"
+
+#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
+# define PLATFORM_ID "Windows"
+
+#elif defined(__FreeBSD__) || defined(__FreeBSD)
+# define PLATFORM_ID "FreeBSD"
+
+#elif defined(__NetBSD__) || defined(__NetBSD)
+# define PLATFORM_ID "NetBSD"
+
+#elif defined(__OpenBSD__) || defined(__OPENBSD)
+# define PLATFORM_ID "OpenBSD"
+
+#elif defined(__sun) || defined(sun)
+# define PLATFORM_ID "SunOS"
+
+#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__)
+# define PLATFORM_ID "AIX"
+
+#elif defined(__hpux) || defined(__hpux__)
+# define PLATFORM_ID "HP-UX"
+
+#elif defined(__HAIKU__)
+# define PLATFORM_ID "Haiku"
+
+#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
+# define PLATFORM_ID "BeOS"
+
+#elif defined(__QNX__) || defined(__QNXNTO__)
+# define PLATFORM_ID "QNX"
+
+#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__)
+# define PLATFORM_ID "Tru64"
+
+#elif defined(__riscos) || defined(__riscos__)
+# define PLATFORM_ID "RISCos"
+
+#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__)
+# define PLATFORM_ID "SINIX"
+
+#elif defined(__UNIX_SV__)
+# define PLATFORM_ID "UNIX_SV"
+
+#elif defined(__bsdos__)
+# define PLATFORM_ID "BSDOS"
+
+#elif defined(_MPRAS) || defined(MPRAS)
+# define PLATFORM_ID "MP-RAS"
+
+#elif defined(__osf) || defined(__osf__)
+# define PLATFORM_ID "OSF1"
+
+#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv)
+# define PLATFORM_ID "SCO_SV"
+
+#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX)
+# define PLATFORM_ID "ULTRIX"
+
+#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX)
+# define PLATFORM_ID "Xenix"
+
+#elif defined(__WATCOMC__)
+# if defined(__LINUX__)
+# define PLATFORM_ID "Linux"
+
+# elif defined(__DOS__)
+# define PLATFORM_ID "DOS"
+
+# elif defined(__OS2__)
+# define PLATFORM_ID "OS2"
+
+# elif defined(__WINDOWS__)
+# define PLATFORM_ID "Windows3x"
+
+# elif defined(__VXWORKS__)
+# define PLATFORM_ID "VxWorks"
+
+# else /* unknown platform */
+# define PLATFORM_ID
+# endif
+
+#elif defined(__INTEGRITY)
+# if defined(INT_178B)
+# define PLATFORM_ID "Integrity178"
+
+# else /* regular Integrity */
+# define PLATFORM_ID "Integrity"
+# endif
+
+# elif defined(_ADI_COMPILER)
+# define PLATFORM_ID "ADSP"
+
+#else /* unknown platform */
+# define PLATFORM_ID
+
+#endif
+
+/* For windows compilers MSVC and Intel we can determine
+ the architecture of the compiler being used. This is because
+ the compilers do not have flags that can change the architecture,
+ but rather depend on which compiler is being used
+*/
+#if defined(_WIN32) && defined(_MSC_VER)
+# if defined(_M_IA64)
+# define ARCHITECTURE_ID "IA64"
+
+# elif defined(_M_ARM64EC)
+# define ARCHITECTURE_ID "ARM64EC"
+
+# elif defined(_M_X64) || defined(_M_AMD64)
+# define ARCHITECTURE_ID "x64"
+
+# elif defined(_M_IX86)
+# define ARCHITECTURE_ID "X86"
+
+# elif defined(_M_ARM64)
+# define ARCHITECTURE_ID "ARM64"
+
+# elif defined(_M_ARM)
+# if _M_ARM == 4
+# define ARCHITECTURE_ID "ARMV4I"
+# elif _M_ARM == 5
+# define ARCHITECTURE_ID "ARMV5I"
+# else
+# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM)
+# endif
+
+# elif defined(_M_MIPS)
+# define ARCHITECTURE_ID "MIPS"
+
+# elif defined(_M_SH)
+# define ARCHITECTURE_ID "SHx"
+
+# else /* unknown architecture */
+# define ARCHITECTURE_ID ""
+# endif
+
+#elif defined(__WATCOMC__)
+# if defined(_M_I86)
+# define ARCHITECTURE_ID "I86"
+
+# elif defined(_M_IX86)
+# define ARCHITECTURE_ID "X86"
+
+# else /* unknown architecture */
+# define ARCHITECTURE_ID ""
+# endif
+
+#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
+# if defined(__ICCARM__)
+# define ARCHITECTURE_ID "ARM"
+
+# elif defined(__ICCRX__)
+# define ARCHITECTURE_ID "RX"
+
+# elif defined(__ICCRH850__)
+# define ARCHITECTURE_ID "RH850"
+
+# elif defined(__ICCRL78__)
+# define ARCHITECTURE_ID "RL78"
+
+# elif defined(__ICCRISCV__)
+# define ARCHITECTURE_ID "RISCV"
+
+# elif defined(__ICCAVR__)
+# define ARCHITECTURE_ID "AVR"
+
+# elif defined(__ICC430__)
+# define ARCHITECTURE_ID "MSP430"
+
+# elif defined(__ICCV850__)
+# define ARCHITECTURE_ID "V850"
+
+# elif defined(__ICC8051__)
+# define ARCHITECTURE_ID "8051"
+
+# elif defined(__ICCSTM8__)
+# define ARCHITECTURE_ID "STM8"
+
+# else /* unknown architecture */
+# define ARCHITECTURE_ID ""
+# endif
+
+#elif defined(__ghs__)
+# if defined(__PPC64__)
+# define ARCHITECTURE_ID "PPC64"
+
+# elif defined(__ppc__)
+# define ARCHITECTURE_ID "PPC"
+
+# elif defined(__ARM__)
+# define ARCHITECTURE_ID "ARM"
+
+# elif defined(__x86_64__)
+# define ARCHITECTURE_ID "x64"
+
+# elif defined(__i386__)
+# define ARCHITECTURE_ID "X86"
+
+# else /* unknown architecture */
+# define ARCHITECTURE_ID ""
+# endif
+
+#elif defined(__TI_COMPILER_VERSION__)
+# if defined(__TI_ARM__)
+# define ARCHITECTURE_ID "ARM"
+
+# elif defined(__MSP430__)
+# define ARCHITECTURE_ID "MSP430"
+
+# elif defined(__TMS320C28XX__)
+# define ARCHITECTURE_ID "TMS320C28x"
+
+# elif defined(__TMS320C6X__) || defined(_TMS320C6X)
+# define ARCHITECTURE_ID "TMS320C6x"
+
+# else /* unknown architecture */
+# define ARCHITECTURE_ID ""
+# endif
+
+# elif defined(__ADSPSHARC__)
+# define ARCHITECTURE_ID "SHARC"
+
+# elif defined(__ADSPBLACKFIN__)
+# define ARCHITECTURE_ID "Blackfin"
+
+#elif defined(__TASKING__)
+
+# if defined(__CTC__) || defined(__CPTC__)
+# define ARCHITECTURE_ID "TriCore"
+
+# elif defined(__CMCS__)
+# define ARCHITECTURE_ID "MCS"
+
+# elif defined(__CARM__)
+# define ARCHITECTURE_ID "ARM"
+
+# elif defined(__CARC__)
+# define ARCHITECTURE_ID "ARC"
+
+# elif defined(__C51__)
+# define ARCHITECTURE_ID "8051"
+
+# elif defined(__CPCP__)
+# define ARCHITECTURE_ID "PCP"
+
+# else
+# define ARCHITECTURE_ID ""
+# endif
+
+#else
+# define ARCHITECTURE_ID
+#endif
+
+/* Convert integer to decimal digit literals. */
+#define DEC(n) \
+ ('0' + (((n) / 10000000)%10)), \
+ ('0' + (((n) / 1000000)%10)), \
+ ('0' + (((n) / 100000)%10)), \
+ ('0' + (((n) / 10000)%10)), \
+ ('0' + (((n) / 1000)%10)), \
+ ('0' + (((n) / 100)%10)), \
+ ('0' + (((n) / 10)%10)), \
+ ('0' + ((n) % 10))
+
+/* Convert integer to hex digit literals. */
+#define HEX(n) \
+ ('0' + ((n)>>28 & 0xF)), \
+ ('0' + ((n)>>24 & 0xF)), \
+ ('0' + ((n)>>20 & 0xF)), \
+ ('0' + ((n)>>16 & 0xF)), \
+ ('0' + ((n)>>12 & 0xF)), \
+ ('0' + ((n)>>8 & 0xF)), \
+ ('0' + ((n)>>4 & 0xF)), \
+ ('0' + ((n) & 0xF))
+
+/* Construct a string literal encoding the version number. */
+#ifdef COMPILER_VERSION
+char const* info_version = "INFO" ":" "compiler_version[" COMPILER_VERSION "]";
+
+/* Construct a string literal encoding the version number components. */
+#elif defined(COMPILER_VERSION_MAJOR)
+char const info_version[] = {
+ 'I', 'N', 'F', 'O', ':',
+ 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[',
+ COMPILER_VERSION_MAJOR,
+# ifdef COMPILER_VERSION_MINOR
+ '.', COMPILER_VERSION_MINOR,
+# ifdef COMPILER_VERSION_PATCH
+ '.', COMPILER_VERSION_PATCH,
+# ifdef COMPILER_VERSION_TWEAK
+ '.', COMPILER_VERSION_TWEAK,
+# endif
+# endif
+# endif
+ ']','\0'};
+#endif
+
+/* Construct a string literal encoding the internal version number. */
+#ifdef COMPILER_VERSION_INTERNAL
+char const info_version_internal[] = {
+ 'I', 'N', 'F', 'O', ':',
+ 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_',
+ 'i','n','t','e','r','n','a','l','[',
+ COMPILER_VERSION_INTERNAL,']','\0'};
+#elif defined(COMPILER_VERSION_INTERNAL_STR)
+char const* info_version_internal = "INFO" ":" "compiler_version_internal[" COMPILER_VERSION_INTERNAL_STR "]";
+#endif
+
+/* Construct a string literal encoding the version number components. */
+#ifdef SIMULATE_VERSION_MAJOR
+char const info_simulate_version[] = {
+ 'I', 'N', 'F', 'O', ':',
+ 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[',
+ SIMULATE_VERSION_MAJOR,
+# ifdef SIMULATE_VERSION_MINOR
+ '.', SIMULATE_VERSION_MINOR,
+# ifdef SIMULATE_VERSION_PATCH
+ '.', SIMULATE_VERSION_PATCH,
+# ifdef SIMULATE_VERSION_TWEAK
+ '.', SIMULATE_VERSION_TWEAK,
+# endif
+# endif
+# endif
+ ']','\0'};
+#endif
+
+/* Construct the string literal in pieces to prevent the source from
+ getting matched. Store it in a pointer rather than an array
+ because some compilers will just produce instructions to fill the
+ array rather than assigning a pointer to a static array. */
+char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]";
+char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]";
+
+
+
+#if defined(__INTEL_COMPILER) && defined(_MSVC_LANG) && _MSVC_LANG < 201403L
+# if defined(__INTEL_CXX11_MODE__)
+# if defined(__cpp_aggregate_nsdmi)
+# define CXX_STD 201402L
+# else
+# define CXX_STD 201103L
+# endif
+# else
+# define CXX_STD 199711L
+# endif
+#elif defined(_MSC_VER) && defined(_MSVC_LANG)
+# define CXX_STD _MSVC_LANG
+#else
+# define CXX_STD __cplusplus
+#endif
+
+const char* info_language_standard_default = "INFO" ":" "standard_default["
+#if CXX_STD > 202002L
+ "23"
+#elif CXX_STD > 201703L
+ "20"
+#elif CXX_STD >= 201703L
+ "17"
+#elif CXX_STD >= 201402L
+ "14"
+#elif CXX_STD >= 201103L
+ "11"
+#else
+ "98"
+#endif
+"]";
+
+const char* info_language_extensions_default = "INFO" ":" "extensions_default["
+#if (defined(__clang__) || defined(__GNUC__) || defined(__xlC__) || \
+ defined(__TI_COMPILER_VERSION__)) && \
+ !defined(__STRICT_ANSI__)
+ "ON"
+#else
+ "OFF"
+#endif
+"]";
+
+/*--------------------------------------------------------------------------*/
+
+int main(int argc, char* argv[])
+{
+ int require = 0;
+ require += info_compiler[argc];
+ require += info_platform[argc];
+ require += info_arch[argc];
+#ifdef COMPILER_VERSION_MAJOR
+ require += info_version[argc];
+#endif
+#ifdef COMPILER_VERSION_INTERNAL
+ require += info_version_internal[argc];
+#endif
+#ifdef SIMULATE_ID
+ require += info_simulate[argc];
+#endif
+#ifdef SIMULATE_VERSION_MAJOR
+ require += info_simulate_version[argc];
+#endif
+#if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
+ require += info_cray[argc];
+#endif
+ require += info_language_standard_default[argc];
+ require += info_language_extensions_default[argc];
+ (void)argv;
+ return require;
+}
diff --git a/REAPER/build/CMakeFiles/3.28.1/CompilerIdCXX/a.out b/REAPER/build/CMakeFiles/3.28.1/CompilerIdCXX/a.out
new file mode 100644
index 0000000000000000000000000000000000000000..3198cb5501f30e80dd93e973f17c96f57df3c5b3
Binary files /dev/null and b/REAPER/build/CMakeFiles/3.28.1/CompilerIdCXX/a.out differ
diff --git a/REAPER/build/CMakeFiles/CMakeConfigureLog.yaml b/REAPER/build/CMakeFiles/CMakeConfigureLog.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..b8662306b11d6872897f5d296c850f6df9045fd3
--- /dev/null
+++ b/REAPER/build/CMakeFiles/CMakeConfigureLog.yaml
@@ -0,0 +1,599 @@
+
+---
+events:
+ -
+ kind: "message-v1"
+ backtrace:
+ - "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeDetermineSystem.cmake:233 (message)"
+ - "CMakeLists.txt:2 (project)"
+ message: |
+ The system is: Linux - 5.4.0-121-generic - x86_64
+...
+
+---
+events:
+ -
+ kind: "message-v1"
+ backtrace:
+ - "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeDetermineCompilerId.cmake:17 (message)"
+ - "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeDetermineCompilerId.cmake:64 (__determine_compiler_id_test)"
+ - "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeDetermineCCompiler.cmake:123 (CMAKE_DETERMINE_COMPILER_ID)"
+ - "CMakeLists.txt:2 (project)"
+ message: |
+ Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
+ Compiler: /usr/bin/cc
+ Build flags:
+ Id flags:
+
+ The output was:
+ 0
+
+
+ Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.out"
+
+ The C compiler identification is GNU, found in:
+ /workspace/NeuCoSVC/REAPER/build/CMakeFiles/3.28.1/CompilerIdC/a.out
+
+ -
+ kind: "message-v1"
+ backtrace:
+ - "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeDetermineCompilerId.cmake:17 (message)"
+ - "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeDetermineCompilerId.cmake:64 (__determine_compiler_id_test)"
+ - "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeDetermineCXXCompiler.cmake:126 (CMAKE_DETERMINE_COMPILER_ID)"
+ - "CMakeLists.txt:2 (project)"
+ message: |
+ Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
+ Compiler: /usr/bin/c++
+ Build flags:
+ Id flags:
+
+ The output was:
+ 0
+
+
+ Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.out"
+
+ The CXX compiler identification is GNU, found in:
+ /workspace/NeuCoSVC/REAPER/build/CMakeFiles/3.28.1/CompilerIdCXX/a.out
+
+ -
+ kind: "try_compile-v1"
+ backtrace:
+ - "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeDetermineCompilerABI.cmake:57 (try_compile)"
+ - "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeTestCCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)"
+ - "CMakeLists.txt:2 (project)"
+ checks:
+ - "Detecting C compiler ABI info"
+ directories:
+ source: "/workspace/NeuCoSVC/REAPER/build/CMakeFiles/CMakeScratch/TryCompile-dBq53S"
+ binary: "/workspace/NeuCoSVC/REAPER/build/CMakeFiles/CMakeScratch/TryCompile-dBq53S"
+ cmakeVariables:
+ CMAKE_C_FLAGS: ""
+ buildResult:
+ variable: "CMAKE_C_ABI_COMPILED"
+ cached: true
+ stdout: |
+ Change Dir: '/workspace/NeuCoSVC/REAPER/build/CMakeFiles/CMakeScratch/TryCompile-dBq53S'
+
+ Run Build Command(s): /opt/conda/lib/python3.10/site-packages/cmake/data/bin/cmake -E env VERBOSE=1 /usr/bin/make -f Makefile cmTC_87981/fast
+ /usr/bin/make -f CMakeFiles/cmTC_87981.dir/build.make CMakeFiles/cmTC_87981.dir/build
+ make[1]: Entering directory '/workspace/NeuCoSVC/REAPER/build/CMakeFiles/CMakeScratch/TryCompile-dBq53S'
+ Building C object CMakeFiles/cmTC_87981.dir/CMakeCCompilerABI.c.o
+ /usr/bin/cc -v -o CMakeFiles/cmTC_87981.dir/CMakeCCompilerABI.c.o -c /opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeCCompilerABI.c
+ Using built-in specs.
+ COLLECT_GCC=/usr/bin/cc
+ OFFLOAD_TARGET_NAMES=nvptx-none:hsa
+ OFFLOAD_TARGET_DEFAULT=1
+ Target: x86_64-linux-gnu
+ Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~20.04.2' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-9QDOt0/gcc-9-9.4.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
+ Thread model: posix
+ gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.2)
+ COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_87981.dir/CMakeCCompilerABI.c.o' '-c' '-mtune=generic' '-march=x86-64'
+ /usr/lib/gcc/x86_64-linux-gnu/9/cc1 -quiet -v -imultiarch x86_64-linux-gnu /opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeCCompilerABI.c -quiet -dumpbase CMakeCCompilerABI.c -mtune=generic -march=x86-64 -auxbase-strip CMakeFiles/cmTC_87981.dir/CMakeCCompilerABI.c.o -version -fasynchronous-unwind-tables -fstack-protector-strong -Wformat -Wformat-security -fstack-clash-protection -fcf-protection -o /tmp/cc6h5swQ.s
+ GNU C17 (Ubuntu 9.4.0-1ubuntu1~20.04.2) version 9.4.0 (x86_64-linux-gnu)
+ compiled by GNU C version 9.4.0, GMP version 6.2.0, MPFR version 4.0.2, MPC version 1.1.0, isl version isl-0.22.1-GMP
+
+ GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
+ ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
+ ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/9/include-fixed"
+ ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/9/../../../../x86_64-linux-gnu/include"
+ #include "..." search starts here:
+ #include <...> search starts here:
+ /usr/lib/gcc/x86_64-linux-gnu/9/include
+ /usr/local/include
+ /usr/include/x86_64-linux-gnu
+ /usr/include
+ End of search list.
+ GNU C17 (Ubuntu 9.4.0-1ubuntu1~20.04.2) version 9.4.0 (x86_64-linux-gnu)
+ compiled by GNU C version 9.4.0, GMP version 6.2.0, MPFR version 4.0.2, MPC version 1.1.0, isl version isl-0.22.1-GMP
+
+ GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
+ Compiler executable checksum: 01da938ff5dc2163489aa33cb3b747a7
+ COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_87981.dir/CMakeCCompilerABI.c.o' '-c' '-mtune=generic' '-march=x86-64'
+ as -v --64 -o CMakeFiles/cmTC_87981.dir/CMakeCCompilerABI.c.o /tmp/cc6h5swQ.s
+ GNU assembler version 2.34 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.34
+ COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/
+ LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/
+ COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_87981.dir/CMakeCCompilerABI.c.o' '-c' '-mtune=generic' '-march=x86-64'
+ Linking C executable cmTC_87981
+ /opt/conda/lib/python3.10/site-packages/cmake/data/bin/cmake -E cmake_link_script CMakeFiles/cmTC_87981.dir/link.txt --verbose=1
+ /usr/bin/cc -v -rdynamic CMakeFiles/cmTC_87981.dir/CMakeCCompilerABI.c.o -o cmTC_87981
+ Using built-in specs.
+ COLLECT_GCC=/usr/bin/cc
+ COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
+ OFFLOAD_TARGET_NAMES=nvptx-none:hsa
+ OFFLOAD_TARGET_DEFAULT=1
+ Target: x86_64-linux-gnu
+ Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~20.04.2' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-9QDOt0/gcc-9-9.4.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
+ Thread model: posix
+ gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.2)
+ COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/
+ LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/
+ COLLECT_GCC_OPTIONS='-v' '-rdynamic' '-o' 'cmTC_87981' '-mtune=generic' '-march=x86-64'
+ /usr/lib/gcc/x86_64-linux-gnu/9/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/9/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper -plugin-opt=-fresolution=/tmp/cc3ihFig.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -z relro -o cmTC_87981 /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/9/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/9 -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/9/../../.. CMakeFiles/cmTC_87981.dir/CMakeCCompilerABI.c.o -lgcc --push-state --as-needed -lgcc_s --pop-state -lc -lgcc --push-state --as-needed -lgcc_s --pop-state /usr/lib/gcc/x86_64-linux-gnu/9/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crtn.o
+ COLLECT_GCC_OPTIONS='-v' '-rdynamic' '-o' 'cmTC_87981' '-mtune=generic' '-march=x86-64'
+ make[1]: Leaving directory '/workspace/NeuCoSVC/REAPER/build/CMakeFiles/CMakeScratch/TryCompile-dBq53S'
+
+ exitCode: 0
+ -
+ kind: "message-v1"
+ backtrace:
+ - "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeDetermineCompilerABI.cmake:127 (message)"
+ - "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeTestCCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)"
+ - "CMakeLists.txt:2 (project)"
+ message: |
+ Parsed C implicit include dir info: rv=done
+ found start of include info
+ found start of implicit include info
+ add: [/usr/lib/gcc/x86_64-linux-gnu/9/include]
+ add: [/usr/local/include]
+ add: [/usr/include/x86_64-linux-gnu]
+ add: [/usr/include]
+ end of search list found
+ collapse include dir [/usr/lib/gcc/x86_64-linux-gnu/9/include] ==> [/usr/lib/gcc/x86_64-linux-gnu/9/include]
+ collapse include dir [/usr/local/include] ==> [/usr/local/include]
+ collapse include dir [/usr/include/x86_64-linux-gnu] ==> [/usr/include/x86_64-linux-gnu]
+ collapse include dir [/usr/include] ==> [/usr/include]
+ implicit include dirs: [/usr/lib/gcc/x86_64-linux-gnu/9/include;/usr/local/include;/usr/include/x86_64-linux-gnu;/usr/include]
+
+
+ -
+ kind: "message-v1"
+ backtrace:
+ - "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeDetermineCompilerABI.cmake:159 (message)"
+ - "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeTestCCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)"
+ - "CMakeLists.txt:2 (project)"
+ message: |
+ Parsed C implicit link information:
+ link line regex: [^( *|.*[/\\])(ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\\]+-)?ld|collect2)[^/\\]*( |$)]
+ ignore line: [Change Dir: '/workspace/NeuCoSVC/REAPER/build/CMakeFiles/CMakeScratch/TryCompile-dBq53S']
+ ignore line: []
+ ignore line: [Run Build Command(s): /opt/conda/lib/python3.10/site-packages/cmake/data/bin/cmake -E env VERBOSE=1 /usr/bin/make -f Makefile cmTC_87981/fast]
+ ignore line: [/usr/bin/make -f CMakeFiles/cmTC_87981.dir/build.make CMakeFiles/cmTC_87981.dir/build]
+ ignore line: [make[1]: Entering directory '/workspace/NeuCoSVC/REAPER/build/CMakeFiles/CMakeScratch/TryCompile-dBq53S']
+ ignore line: [Building C object CMakeFiles/cmTC_87981.dir/CMakeCCompilerABI.c.o]
+ ignore line: [/usr/bin/cc -v -o CMakeFiles/cmTC_87981.dir/CMakeCCompilerABI.c.o -c /opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeCCompilerABI.c]
+ ignore line: [Using built-in specs.]
+ ignore line: [COLLECT_GCC=/usr/bin/cc]
+ ignore line: [OFFLOAD_TARGET_NAMES=nvptx-none:hsa]
+ ignore line: [OFFLOAD_TARGET_DEFAULT=1]
+ ignore line: [Target: x86_64-linux-gnu]
+ ignore line: [Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~20.04.2' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c ada c++ go brig d fortran objc obj-c++ gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32 m64 mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-9QDOt0/gcc-9-9.4.0/debian/tmp-nvptx/usr hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu]
+ ignore line: [Thread model: posix]
+ ignore line: [gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.2) ]
+ ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_87981.dir/CMakeCCompilerABI.c.o' '-c' '-mtune=generic' '-march=x86-64']
+ ignore line: [ /usr/lib/gcc/x86_64-linux-gnu/9/cc1 -quiet -v -imultiarch x86_64-linux-gnu /opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeCCompilerABI.c -quiet -dumpbase CMakeCCompilerABI.c -mtune=generic -march=x86-64 -auxbase-strip CMakeFiles/cmTC_87981.dir/CMakeCCompilerABI.c.o -version -fasynchronous-unwind-tables -fstack-protector-strong -Wformat -Wformat-security -fstack-clash-protection -fcf-protection -o /tmp/cc6h5swQ.s]
+ ignore line: [GNU C17 (Ubuntu 9.4.0-1ubuntu1~20.04.2) version 9.4.0 (x86_64-linux-gnu)]
+ ignore line: [ compiled by GNU C version 9.4.0 GMP version 6.2.0 MPFR version 4.0.2 MPC version 1.1.0 isl version isl-0.22.1-GMP]
+ ignore line: []
+ ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072]
+ ignore line: [ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"]
+ ignore line: [ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/9/include-fixed"]
+ ignore line: [ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/9/../../../../x86_64-linux-gnu/include"]
+ ignore line: [#include "..." search starts here:]
+ ignore line: [#include <...> search starts here:]
+ ignore line: [ /usr/lib/gcc/x86_64-linux-gnu/9/include]
+ ignore line: [ /usr/local/include]
+ ignore line: [ /usr/include/x86_64-linux-gnu]
+ ignore line: [ /usr/include]
+ ignore line: [End of search list.]
+ ignore line: [GNU C17 (Ubuntu 9.4.0-1ubuntu1~20.04.2) version 9.4.0 (x86_64-linux-gnu)]
+ ignore line: [ compiled by GNU C version 9.4.0 GMP version 6.2.0 MPFR version 4.0.2 MPC version 1.1.0 isl version isl-0.22.1-GMP]
+ ignore line: []
+ ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072]
+ ignore line: [Compiler executable checksum: 01da938ff5dc2163489aa33cb3b747a7]
+ ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_87981.dir/CMakeCCompilerABI.c.o' '-c' '-mtune=generic' '-march=x86-64']
+ ignore line: [ as -v --64 -o CMakeFiles/cmTC_87981.dir/CMakeCCompilerABI.c.o /tmp/cc6h5swQ.s]
+ ignore line: [GNU assembler version 2.34 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.34]
+ ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/]
+ ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/]
+ ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_87981.dir/CMakeCCompilerABI.c.o' '-c' '-mtune=generic' '-march=x86-64']
+ ignore line: [Linking C executable cmTC_87981]
+ ignore line: [/opt/conda/lib/python3.10/site-packages/cmake/data/bin/cmake -E cmake_link_script CMakeFiles/cmTC_87981.dir/link.txt --verbose=1]
+ ignore line: [/usr/bin/cc -v -rdynamic CMakeFiles/cmTC_87981.dir/CMakeCCompilerABI.c.o -o cmTC_87981 ]
+ ignore line: [Using built-in specs.]
+ ignore line: [COLLECT_GCC=/usr/bin/cc]
+ ignore line: [COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper]
+ ignore line: [OFFLOAD_TARGET_NAMES=nvptx-none:hsa]
+ ignore line: [OFFLOAD_TARGET_DEFAULT=1]
+ ignore line: [Target: x86_64-linux-gnu]
+ ignore line: [Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~20.04.2' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c ada c++ go brig d fortran objc obj-c++ gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32 m64 mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-9QDOt0/gcc-9-9.4.0/debian/tmp-nvptx/usr hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu]
+ ignore line: [Thread model: posix]
+ ignore line: [gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.2) ]
+ ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/]
+ ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/]
+ ignore line: [COLLECT_GCC_OPTIONS='-v' '-rdynamic' '-o' 'cmTC_87981' '-mtune=generic' '-march=x86-64']
+ link line: [ /usr/lib/gcc/x86_64-linux-gnu/9/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/9/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper -plugin-opt=-fresolution=/tmp/cc3ihFig.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -z relro -o cmTC_87981 /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/9/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/9 -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/9/../../.. CMakeFiles/cmTC_87981.dir/CMakeCCompilerABI.c.o -lgcc --push-state --as-needed -lgcc_s --pop-state -lc -lgcc --push-state --as-needed -lgcc_s --pop-state /usr/lib/gcc/x86_64-linux-gnu/9/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crtn.o]
+ arg [/usr/lib/gcc/x86_64-linux-gnu/9/collect2] ==> ignore
+ arg [-plugin] ==> ignore
+ arg [/usr/lib/gcc/x86_64-linux-gnu/9/liblto_plugin.so] ==> ignore
+ arg [-plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper] ==> ignore
+ arg [-plugin-opt=-fresolution=/tmp/cc3ihFig.res] ==> ignore
+ arg [-plugin-opt=-pass-through=-lgcc] ==> ignore
+ arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore
+ arg [-plugin-opt=-pass-through=-lc] ==> ignore
+ arg [-plugin-opt=-pass-through=-lgcc] ==> ignore
+ arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore
+ arg [--build-id] ==> ignore
+ arg [--eh-frame-hdr] ==> ignore
+ arg [-m] ==> ignore
+ arg [elf_x86_64] ==> ignore
+ arg [--hash-style=gnu] ==> ignore
+ arg [--as-needed] ==> ignore
+ arg [-export-dynamic] ==> ignore
+ arg [-dynamic-linker] ==> ignore
+ arg [/lib64/ld-linux-x86-64.so.2] ==> ignore
+ arg [-pie] ==> ignore
+ arg [-znow] ==> ignore
+ arg [-zrelro] ==> ignore
+ arg [-o] ==> ignore
+ arg [cmTC_87981] ==> ignore
+ arg [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o] ==> obj [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o]
+ arg [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o] ==> obj [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o]
+ arg [/usr/lib/gcc/x86_64-linux-gnu/9/crtbeginS.o] ==> obj [/usr/lib/gcc/x86_64-linux-gnu/9/crtbeginS.o]
+ arg [-L/usr/lib/gcc/x86_64-linux-gnu/9] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/9]
+ arg [-L/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu]
+ arg [-L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib]
+ arg [-L/lib/x86_64-linux-gnu] ==> dir [/lib/x86_64-linux-gnu]
+ arg [-L/lib/../lib] ==> dir [/lib/../lib]
+ arg [-L/usr/lib/x86_64-linux-gnu] ==> dir [/usr/lib/x86_64-linux-gnu]
+ arg [-L/usr/lib/../lib] ==> dir [/usr/lib/../lib]
+ arg [-L/usr/lib/gcc/x86_64-linux-gnu/9/../../..] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../..]
+ arg [CMakeFiles/cmTC_87981.dir/CMakeCCompilerABI.c.o] ==> ignore
+ arg [-lgcc] ==> lib [gcc]
+ arg [--push-state] ==> ignore
+ arg [--as-needed] ==> ignore
+ arg [-lgcc_s] ==> lib [gcc_s]
+ arg [--pop-state] ==> ignore
+ arg [-lc] ==> lib [c]
+ arg [-lgcc] ==> lib [gcc]
+ arg [--push-state] ==> ignore
+ arg [--as-needed] ==> ignore
+ arg [-lgcc_s] ==> lib [gcc_s]
+ arg [--pop-state] ==> ignore
+ arg [/usr/lib/gcc/x86_64-linux-gnu/9/crtendS.o] ==> obj [/usr/lib/gcc/x86_64-linux-gnu/9/crtendS.o]
+ arg [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crtn.o] ==> obj [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crtn.o]
+ collapse obj [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o] ==> [/usr/lib/x86_64-linux-gnu/Scrt1.o]
+ collapse obj [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o] ==> [/usr/lib/x86_64-linux-gnu/crti.o]
+ collapse obj [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crtn.o] ==> [/usr/lib/x86_64-linux-gnu/crtn.o]
+ collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/9] ==> [/usr/lib/gcc/x86_64-linux-gnu/9]
+ collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu]
+ collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib] ==> [/usr/lib]
+ collapse library dir [/lib/x86_64-linux-gnu] ==> [/lib/x86_64-linux-gnu]
+ collapse library dir [/lib/../lib] ==> [/lib]
+ collapse library dir [/usr/lib/x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu]
+ collapse library dir [/usr/lib/../lib] ==> [/usr/lib]
+ collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../..] ==> [/usr/lib]
+ implicit libs: [gcc;gcc_s;c;gcc;gcc_s]
+ implicit objs: [/usr/lib/x86_64-linux-gnu/Scrt1.o;/usr/lib/x86_64-linux-gnu/crti.o;/usr/lib/gcc/x86_64-linux-gnu/9/crtbeginS.o;/usr/lib/gcc/x86_64-linux-gnu/9/crtendS.o;/usr/lib/x86_64-linux-gnu/crtn.o]
+ implicit dirs: [/usr/lib/gcc/x86_64-linux-gnu/9;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib]
+ implicit fwks: []
+
+
+ -
+ kind: "try_compile-v1"
+ backtrace:
+ - "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeDetermineCompilerABI.cmake:57 (try_compile)"
+ - "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeTestCXXCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)"
+ - "CMakeLists.txt:2 (project)"
+ checks:
+ - "Detecting CXX compiler ABI info"
+ directories:
+ source: "/workspace/NeuCoSVC/REAPER/build/CMakeFiles/CMakeScratch/TryCompile-wBns3Q"
+ binary: "/workspace/NeuCoSVC/REAPER/build/CMakeFiles/CMakeScratch/TryCompile-wBns3Q"
+ cmakeVariables:
+ CMAKE_CXX_FLAGS: ""
+ buildResult:
+ variable: "CMAKE_CXX_ABI_COMPILED"
+ cached: true
+ stdout: |
+ Change Dir: '/workspace/NeuCoSVC/REAPER/build/CMakeFiles/CMakeScratch/TryCompile-wBns3Q'
+
+ Run Build Command(s): /opt/conda/lib/python3.10/site-packages/cmake/data/bin/cmake -E env VERBOSE=1 /usr/bin/make -f Makefile cmTC_4eddd/fast
+ /usr/bin/make -f CMakeFiles/cmTC_4eddd.dir/build.make CMakeFiles/cmTC_4eddd.dir/build
+ make[1]: Entering directory '/workspace/NeuCoSVC/REAPER/build/CMakeFiles/CMakeScratch/TryCompile-wBns3Q'
+ Building CXX object CMakeFiles/cmTC_4eddd.dir/CMakeCXXCompilerABI.cpp.o
+ /usr/bin/c++ -v -o CMakeFiles/cmTC_4eddd.dir/CMakeCXXCompilerABI.cpp.o -c /opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeCXXCompilerABI.cpp
+ Using built-in specs.
+ COLLECT_GCC=/usr/bin/c++
+ OFFLOAD_TARGET_NAMES=nvptx-none:hsa
+ OFFLOAD_TARGET_DEFAULT=1
+ Target: x86_64-linux-gnu
+ Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~20.04.2' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-9QDOt0/gcc-9-9.4.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
+ Thread model: posix
+ gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.2)
+ COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_4eddd.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
+ /usr/lib/gcc/x86_64-linux-gnu/9/cc1plus -quiet -v -imultiarch x86_64-linux-gnu -D_GNU_SOURCE /opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeCXXCompilerABI.cpp -quiet -dumpbase CMakeCXXCompilerABI.cpp -mtune=generic -march=x86-64 -auxbase-strip CMakeFiles/cmTC_4eddd.dir/CMakeCXXCompilerABI.cpp.o -version -fasynchronous-unwind-tables -fstack-protector-strong -Wformat -Wformat-security -fstack-clash-protection -fcf-protection -o /tmp/ccoViRFr.s
+ GNU C++14 (Ubuntu 9.4.0-1ubuntu1~20.04.2) version 9.4.0 (x86_64-linux-gnu)
+ compiled by GNU C version 9.4.0, GMP version 6.2.0, MPFR version 4.0.2, MPC version 1.1.0, isl version isl-0.22.1-GMP
+
+ GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
+ ignoring duplicate directory "/usr/include/x86_64-linux-gnu/c++/9"
+ ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
+ ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/9/include-fixed"
+ ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/9/../../../../x86_64-linux-gnu/include"
+ #include "..." search starts here:
+ #include <...> search starts here:
+ /usr/include/c++/9
+ /usr/include/x86_64-linux-gnu/c++/9
+ /usr/include/c++/9/backward
+ /usr/lib/gcc/x86_64-linux-gnu/9/include
+ /usr/local/include
+ /usr/include/x86_64-linux-gnu
+ /usr/include
+ End of search list.
+ GNU C++14 (Ubuntu 9.4.0-1ubuntu1~20.04.2) version 9.4.0 (x86_64-linux-gnu)
+ compiled by GNU C version 9.4.0, GMP version 6.2.0, MPFR version 4.0.2, MPC version 1.1.0, isl version isl-0.22.1-GMP
+
+ GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
+ Compiler executable checksum: 3d1eba838554fa2348dba760e4770469
+ COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_4eddd.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
+ as -v --64 -o CMakeFiles/cmTC_4eddd.dir/CMakeCXXCompilerABI.cpp.o /tmp/ccoViRFr.s
+ GNU assembler version 2.34 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.34
+ COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/
+ LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/
+ COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_4eddd.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
+ Linking CXX executable cmTC_4eddd
+ /opt/conda/lib/python3.10/site-packages/cmake/data/bin/cmake -E cmake_link_script CMakeFiles/cmTC_4eddd.dir/link.txt --verbose=1
+ /usr/bin/c++ -v -rdynamic CMakeFiles/cmTC_4eddd.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_4eddd
+ Using built-in specs.
+ COLLECT_GCC=/usr/bin/c++
+ COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
+ OFFLOAD_TARGET_NAMES=nvptx-none:hsa
+ OFFLOAD_TARGET_DEFAULT=1
+ Target: x86_64-linux-gnu
+ Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~20.04.2' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-9QDOt0/gcc-9-9.4.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
+ Thread model: posix
+ gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.2)
+ COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/
+ LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/
+ COLLECT_GCC_OPTIONS='-v' '-rdynamic' '-o' 'cmTC_4eddd' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
+ /usr/lib/gcc/x86_64-linux-gnu/9/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/9/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper -plugin-opt=-fresolution=/tmp/cctTOMDP.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -z relro -o cmTC_4eddd /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/9/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/9 -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/9/../../.. CMakeFiles/cmTC_4eddd.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/9/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crtn.o
+ COLLECT_GCC_OPTIONS='-v' '-rdynamic' '-o' 'cmTC_4eddd' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
+ make[1]: Leaving directory '/workspace/NeuCoSVC/REAPER/build/CMakeFiles/CMakeScratch/TryCompile-wBns3Q'
+
+ exitCode: 0
+ -
+ kind: "message-v1"
+ backtrace:
+ - "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeDetermineCompilerABI.cmake:127 (message)"
+ - "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeTestCXXCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)"
+ - "CMakeLists.txt:2 (project)"
+ message: |
+ Parsed CXX implicit include dir info: rv=done
+ found start of include info
+ found start of implicit include info
+ add: [/usr/include/c++/9]
+ add: [/usr/include/x86_64-linux-gnu/c++/9]
+ add: [/usr/include/c++/9/backward]
+ add: [/usr/lib/gcc/x86_64-linux-gnu/9/include]
+ add: [/usr/local/include]
+ add: [/usr/include/x86_64-linux-gnu]
+ add: [/usr/include]
+ end of search list found
+ collapse include dir [/usr/include/c++/9] ==> [/usr/include/c++/9]
+ collapse include dir [/usr/include/x86_64-linux-gnu/c++/9] ==> [/usr/include/x86_64-linux-gnu/c++/9]
+ collapse include dir [/usr/include/c++/9/backward] ==> [/usr/include/c++/9/backward]
+ collapse include dir [/usr/lib/gcc/x86_64-linux-gnu/9/include] ==> [/usr/lib/gcc/x86_64-linux-gnu/9/include]
+ collapse include dir [/usr/local/include] ==> [/usr/local/include]
+ collapse include dir [/usr/include/x86_64-linux-gnu] ==> [/usr/include/x86_64-linux-gnu]
+ collapse include dir [/usr/include] ==> [/usr/include]
+ implicit include dirs: [/usr/include/c++/9;/usr/include/x86_64-linux-gnu/c++/9;/usr/include/c++/9/backward;/usr/lib/gcc/x86_64-linux-gnu/9/include;/usr/local/include;/usr/include/x86_64-linux-gnu;/usr/include]
+
+
+ -
+ kind: "message-v1"
+ backtrace:
+ - "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeDetermineCompilerABI.cmake:159 (message)"
+ - "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeTestCXXCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)"
+ - "CMakeLists.txt:2 (project)"
+ message: |
+ Parsed CXX implicit link information:
+ link line regex: [^( *|.*[/\\])(ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\\]+-)?ld|collect2)[^/\\]*( |$)]
+ ignore line: [Change Dir: '/workspace/NeuCoSVC/REAPER/build/CMakeFiles/CMakeScratch/TryCompile-wBns3Q']
+ ignore line: []
+ ignore line: [Run Build Command(s): /opt/conda/lib/python3.10/site-packages/cmake/data/bin/cmake -E env VERBOSE=1 /usr/bin/make -f Makefile cmTC_4eddd/fast]
+ ignore line: [/usr/bin/make -f CMakeFiles/cmTC_4eddd.dir/build.make CMakeFiles/cmTC_4eddd.dir/build]
+ ignore line: [make[1]: Entering directory '/workspace/NeuCoSVC/REAPER/build/CMakeFiles/CMakeScratch/TryCompile-wBns3Q']
+ ignore line: [Building CXX object CMakeFiles/cmTC_4eddd.dir/CMakeCXXCompilerABI.cpp.o]
+ ignore line: [/usr/bin/c++ -v -o CMakeFiles/cmTC_4eddd.dir/CMakeCXXCompilerABI.cpp.o -c /opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeCXXCompilerABI.cpp]
+ ignore line: [Using built-in specs.]
+ ignore line: [COLLECT_GCC=/usr/bin/c++]
+ ignore line: [OFFLOAD_TARGET_NAMES=nvptx-none:hsa]
+ ignore line: [OFFLOAD_TARGET_DEFAULT=1]
+ ignore line: [Target: x86_64-linux-gnu]
+ ignore line: [Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~20.04.2' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c ada c++ go brig d fortran objc obj-c++ gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32 m64 mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-9QDOt0/gcc-9-9.4.0/debian/tmp-nvptx/usr hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu]
+ ignore line: [Thread model: posix]
+ ignore line: [gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.2) ]
+ ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_4eddd.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64']
+ ignore line: [ /usr/lib/gcc/x86_64-linux-gnu/9/cc1plus -quiet -v -imultiarch x86_64-linux-gnu -D_GNU_SOURCE /opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeCXXCompilerABI.cpp -quiet -dumpbase CMakeCXXCompilerABI.cpp -mtune=generic -march=x86-64 -auxbase-strip CMakeFiles/cmTC_4eddd.dir/CMakeCXXCompilerABI.cpp.o -version -fasynchronous-unwind-tables -fstack-protector-strong -Wformat -Wformat-security -fstack-clash-protection -fcf-protection -o /tmp/ccoViRFr.s]
+ ignore line: [GNU C++14 (Ubuntu 9.4.0-1ubuntu1~20.04.2) version 9.4.0 (x86_64-linux-gnu)]
+ ignore line: [ compiled by GNU C version 9.4.0 GMP version 6.2.0 MPFR version 4.0.2 MPC version 1.1.0 isl version isl-0.22.1-GMP]
+ ignore line: []
+ ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072]
+ ignore line: [ignoring duplicate directory "/usr/include/x86_64-linux-gnu/c++/9"]
+ ignore line: [ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"]
+ ignore line: [ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/9/include-fixed"]
+ ignore line: [ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/9/../../../../x86_64-linux-gnu/include"]
+ ignore line: [#include "..." search starts here:]
+ ignore line: [#include <...> search starts here:]
+ ignore line: [ /usr/include/c++/9]
+ ignore line: [ /usr/include/x86_64-linux-gnu/c++/9]
+ ignore line: [ /usr/include/c++/9/backward]
+ ignore line: [ /usr/lib/gcc/x86_64-linux-gnu/9/include]
+ ignore line: [ /usr/local/include]
+ ignore line: [ /usr/include/x86_64-linux-gnu]
+ ignore line: [ /usr/include]
+ ignore line: [End of search list.]
+ ignore line: [GNU C++14 (Ubuntu 9.4.0-1ubuntu1~20.04.2) version 9.4.0 (x86_64-linux-gnu)]
+ ignore line: [ compiled by GNU C version 9.4.0 GMP version 6.2.0 MPFR version 4.0.2 MPC version 1.1.0 isl version isl-0.22.1-GMP]
+ ignore line: []
+ ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072]
+ ignore line: [Compiler executable checksum: 3d1eba838554fa2348dba760e4770469]
+ ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_4eddd.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64']
+ ignore line: [ as -v --64 -o CMakeFiles/cmTC_4eddd.dir/CMakeCXXCompilerABI.cpp.o /tmp/ccoViRFr.s]
+ ignore line: [GNU assembler version 2.34 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.34]
+ ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/]
+ ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/]
+ ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_4eddd.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64']
+ ignore line: [Linking CXX executable cmTC_4eddd]
+ ignore line: [/opt/conda/lib/python3.10/site-packages/cmake/data/bin/cmake -E cmake_link_script CMakeFiles/cmTC_4eddd.dir/link.txt --verbose=1]
+ ignore line: [/usr/bin/c++ -v -rdynamic CMakeFiles/cmTC_4eddd.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_4eddd ]
+ ignore line: [Using built-in specs.]
+ ignore line: [COLLECT_GCC=/usr/bin/c++]
+ ignore line: [COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper]
+ ignore line: [OFFLOAD_TARGET_NAMES=nvptx-none:hsa]
+ ignore line: [OFFLOAD_TARGET_DEFAULT=1]
+ ignore line: [Target: x86_64-linux-gnu]
+ ignore line: [Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~20.04.2' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c ada c++ go brig d fortran objc obj-c++ gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32 m64 mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-9QDOt0/gcc-9-9.4.0/debian/tmp-nvptx/usr hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu]
+ ignore line: [Thread model: posix]
+ ignore line: [gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.2) ]
+ ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/]
+ ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/]
+ ignore line: [COLLECT_GCC_OPTIONS='-v' '-rdynamic' '-o' 'cmTC_4eddd' '-shared-libgcc' '-mtune=generic' '-march=x86-64']
+ link line: [ /usr/lib/gcc/x86_64-linux-gnu/9/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/9/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper -plugin-opt=-fresolution=/tmp/cctTOMDP.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -z relro -o cmTC_4eddd /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/9/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/9 -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/9/../../.. CMakeFiles/cmTC_4eddd.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/9/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crtn.o]
+ arg [/usr/lib/gcc/x86_64-linux-gnu/9/collect2] ==> ignore
+ arg [-plugin] ==> ignore
+ arg [/usr/lib/gcc/x86_64-linux-gnu/9/liblto_plugin.so] ==> ignore
+ arg [-plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper] ==> ignore
+ arg [-plugin-opt=-fresolution=/tmp/cctTOMDP.res] ==> ignore
+ arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore
+ arg [-plugin-opt=-pass-through=-lgcc] ==> ignore
+ arg [-plugin-opt=-pass-through=-lc] ==> ignore
+ arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore
+ arg [-plugin-opt=-pass-through=-lgcc] ==> ignore
+ arg [--build-id] ==> ignore
+ arg [--eh-frame-hdr] ==> ignore
+ arg [-m] ==> ignore
+ arg [elf_x86_64] ==> ignore
+ arg [--hash-style=gnu] ==> ignore
+ arg [--as-needed] ==> ignore
+ arg [-export-dynamic] ==> ignore
+ arg [-dynamic-linker] ==> ignore
+ arg [/lib64/ld-linux-x86-64.so.2] ==> ignore
+ arg [-pie] ==> ignore
+ arg [-znow] ==> ignore
+ arg [-zrelro] ==> ignore
+ arg [-o] ==> ignore
+ arg [cmTC_4eddd] ==> ignore
+ arg [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o] ==> obj [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o]
+ arg [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o] ==> obj [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o]
+ arg [/usr/lib/gcc/x86_64-linux-gnu/9/crtbeginS.o] ==> obj [/usr/lib/gcc/x86_64-linux-gnu/9/crtbeginS.o]
+ arg [-L/usr/lib/gcc/x86_64-linux-gnu/9] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/9]
+ arg [-L/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu]
+ arg [-L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib]
+ arg [-L/lib/x86_64-linux-gnu] ==> dir [/lib/x86_64-linux-gnu]
+ arg [-L/lib/../lib] ==> dir [/lib/../lib]
+ arg [-L/usr/lib/x86_64-linux-gnu] ==> dir [/usr/lib/x86_64-linux-gnu]
+ arg [-L/usr/lib/../lib] ==> dir [/usr/lib/../lib]
+ arg [-L/usr/lib/gcc/x86_64-linux-gnu/9/../../..] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../..]
+ arg [CMakeFiles/cmTC_4eddd.dir/CMakeCXXCompilerABI.cpp.o] ==> ignore
+ arg [-lstdc++] ==> lib [stdc++]
+ arg [-lm] ==> lib [m]
+ arg [-lgcc_s] ==> lib [gcc_s]
+ arg [-lgcc] ==> lib [gcc]
+ arg [-lc] ==> lib [c]
+ arg [-lgcc_s] ==> lib [gcc_s]
+ arg [-lgcc] ==> lib [gcc]
+ arg [/usr/lib/gcc/x86_64-linux-gnu/9/crtendS.o] ==> obj [/usr/lib/gcc/x86_64-linux-gnu/9/crtendS.o]
+ arg [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crtn.o] ==> obj [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crtn.o]
+ collapse obj [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o] ==> [/usr/lib/x86_64-linux-gnu/Scrt1.o]
+ collapse obj [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o] ==> [/usr/lib/x86_64-linux-gnu/crti.o]
+ collapse obj [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crtn.o] ==> [/usr/lib/x86_64-linux-gnu/crtn.o]
+ collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/9] ==> [/usr/lib/gcc/x86_64-linux-gnu/9]
+ collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu]
+ collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib] ==> [/usr/lib]
+ collapse library dir [/lib/x86_64-linux-gnu] ==> [/lib/x86_64-linux-gnu]
+ collapse library dir [/lib/../lib] ==> [/lib]
+ collapse library dir [/usr/lib/x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu]
+ collapse library dir [/usr/lib/../lib] ==> [/usr/lib]
+ collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../..] ==> [/usr/lib]
+ implicit libs: [stdc++;m;gcc_s;gcc;c;gcc_s;gcc]
+ implicit objs: [/usr/lib/x86_64-linux-gnu/Scrt1.o;/usr/lib/x86_64-linux-gnu/crti.o;/usr/lib/gcc/x86_64-linux-gnu/9/crtbeginS.o;/usr/lib/gcc/x86_64-linux-gnu/9/crtendS.o;/usr/lib/x86_64-linux-gnu/crtn.o]
+ implicit dirs: [/usr/lib/gcc/x86_64-linux-gnu/9;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib]
+ implicit fwks: []
+
+
+ -
+ kind: "try_compile-v1"
+ backtrace:
+ - "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Internal/CheckSourceCompiles.cmake:101 (try_compile)"
+ - "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Internal/CheckCompilerFlag.cmake:18 (cmake_check_source_compiles)"
+ - "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CheckCXXCompilerFlag.cmake:34 (cmake_check_compiler_flag)"
+ - "CMakeLists.txt:6 (CHECK_CXX_COMPILER_FLAG)"
+ checks:
+ - "Performing Test COMPILER_SUPPORTS_CXX11"
+ directories:
+ source: "/workspace/NeuCoSVC/REAPER/build/CMakeFiles/CMakeScratch/TryCompile-Iz5SKQ"
+ binary: "/workspace/NeuCoSVC/REAPER/build/CMakeFiles/CMakeScratch/TryCompile-Iz5SKQ"
+ cmakeVariables:
+ CMAKE_CXX_FLAGS: ""
+ buildResult:
+ variable: "COMPILER_SUPPORTS_CXX11"
+ cached: true
+ stdout: |
+ Change Dir: '/workspace/NeuCoSVC/REAPER/build/CMakeFiles/CMakeScratch/TryCompile-Iz5SKQ'
+
+ Run Build Command(s): /opt/conda/lib/python3.10/site-packages/cmake/data/bin/cmake -E env VERBOSE=1 /usr/bin/make -f Makefile cmTC_53182/fast
+ /usr/bin/make -f CMakeFiles/cmTC_53182.dir/build.make CMakeFiles/cmTC_53182.dir/build
+ make[1]: Entering directory '/workspace/NeuCoSVC/REAPER/build/CMakeFiles/CMakeScratch/TryCompile-Iz5SKQ'
+ Building CXX object CMakeFiles/cmTC_53182.dir/src.cxx.o
+ /usr/bin/c++ -DCOMPILER_SUPPORTS_CXX11 -std=c++11 -o CMakeFiles/cmTC_53182.dir/src.cxx.o -c /workspace/NeuCoSVC/REAPER/build/CMakeFiles/CMakeScratch/TryCompile-Iz5SKQ/src.cxx
+ Linking CXX executable cmTC_53182
+ /opt/conda/lib/python3.10/site-packages/cmake/data/bin/cmake -E cmake_link_script CMakeFiles/cmTC_53182.dir/link.txt --verbose=1
+ /usr/bin/c++ -rdynamic CMakeFiles/cmTC_53182.dir/src.cxx.o -o cmTC_53182
+ make[1]: Leaving directory '/workspace/NeuCoSVC/REAPER/build/CMakeFiles/CMakeScratch/TryCompile-Iz5SKQ'
+
+ exitCode: 0
+ -
+ kind: "try_compile-v1"
+ backtrace:
+ - "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Internal/CheckSourceCompiles.cmake:101 (try_compile)"
+ - "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Internal/CheckCompilerFlag.cmake:18 (cmake_check_source_compiles)"
+ - "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CheckCXXCompilerFlag.cmake:34 (cmake_check_compiler_flag)"
+ - "CMakeLists.txt:7 (CHECK_CXX_COMPILER_FLAG)"
+ checks:
+ - "Performing Test COMPILER_SUPPORTS_CXX0X"
+ directories:
+ source: "/workspace/NeuCoSVC/REAPER/build/CMakeFiles/CMakeScratch/TryCompile-lWLIhR"
+ binary: "/workspace/NeuCoSVC/REAPER/build/CMakeFiles/CMakeScratch/TryCompile-lWLIhR"
+ cmakeVariables:
+ CMAKE_CXX_FLAGS: ""
+ buildResult:
+ variable: "COMPILER_SUPPORTS_CXX0X"
+ cached: true
+ stdout: |
+ Change Dir: '/workspace/NeuCoSVC/REAPER/build/CMakeFiles/CMakeScratch/TryCompile-lWLIhR'
+
+ Run Build Command(s): /opt/conda/lib/python3.10/site-packages/cmake/data/bin/cmake -E env VERBOSE=1 /usr/bin/make -f Makefile cmTC_ceea7/fast
+ /usr/bin/make -f CMakeFiles/cmTC_ceea7.dir/build.make CMakeFiles/cmTC_ceea7.dir/build
+ make[1]: Entering directory '/workspace/NeuCoSVC/REAPER/build/CMakeFiles/CMakeScratch/TryCompile-lWLIhR'
+ Building CXX object CMakeFiles/cmTC_ceea7.dir/src.cxx.o
+ /usr/bin/c++ -DCOMPILER_SUPPORTS_CXX0X -std=c++0x -o CMakeFiles/cmTC_ceea7.dir/src.cxx.o -c /workspace/NeuCoSVC/REAPER/build/CMakeFiles/CMakeScratch/TryCompile-lWLIhR/src.cxx
+ Linking CXX executable cmTC_ceea7
+ /opt/conda/lib/python3.10/site-packages/cmake/data/bin/cmake -E cmake_link_script CMakeFiles/cmTC_ceea7.dir/link.txt --verbose=1
+ /usr/bin/c++ -rdynamic CMakeFiles/cmTC_ceea7.dir/src.cxx.o -o cmTC_ceea7
+ make[1]: Leaving directory '/workspace/NeuCoSVC/REAPER/build/CMakeFiles/CMakeScratch/TryCompile-lWLIhR'
+
+ exitCode: 0
+...
diff --git a/REAPER/build/CMakeFiles/CMakeDirectoryInformation.cmake b/REAPER/build/CMakeFiles/CMakeDirectoryInformation.cmake
new file mode 100644
index 0000000000000000000000000000000000000000..f479db19487b8c7173d700bf936fc088dede4899
--- /dev/null
+++ b/REAPER/build/CMakeFiles/CMakeDirectoryInformation.cmake
@@ -0,0 +1,16 @@
+# CMAKE generated file: DO NOT EDIT!
+# Generated by "Unix Makefiles" Generator, CMake Version 3.28
+
+# Relative path conversion top directories.
+set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/workspace/NeuCoSVC/REAPER")
+set(CMAKE_RELATIVE_PATH_TOP_BINARY "/workspace/NeuCoSVC/REAPER/build")
+
+# Force unix paths in dependencies.
+set(CMAKE_FORCE_UNIX_PATHS 1)
+
+
+# The C and CXX include file regular expressions for this directory.
+set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$")
+set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$")
+set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN})
+set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN})
diff --git a/REAPER/build/CMakeFiles/Makefile.cmake b/REAPER/build/CMakeFiles/Makefile.cmake
new file mode 100644
index 0000000000000000000000000000000000000000..1c3f6d86915bd152ec0602c9bfc85ab73e4976aa
--- /dev/null
+++ b/REAPER/build/CMakeFiles/Makefile.cmake
@@ -0,0 +1,136 @@
+# CMAKE generated file: DO NOT EDIT!
+# Generated by "Unix Makefiles" Generator, CMake Version 3.28
+
+# The generator used is:
+set(CMAKE_DEPENDS_GENERATOR "Unix Makefiles")
+
+# The top level Makefile was generated from the following files:
+set(CMAKE_MAKEFILE_DEPENDS
+ "CMakeCache.txt"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeCCompiler.cmake.in"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeCCompilerABI.c"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeCInformation.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeCXXCompiler.cmake.in"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeCXXCompilerABI.cpp"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeCXXInformation.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeCheckCompilerFlagCommonPatterns.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeCommonLanguageInclude.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeCompilerIdDetection.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeDetermineCCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeDetermineCXXCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeDetermineCompileFeatures.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeDetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeDetermineCompilerABI.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeDetermineCompilerId.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeFindBinUtils.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeGenericSystem.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeInitializeConfigs.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeLanguageInformation.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeParseImplicitIncludeInfo.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeParseImplicitLinkInfo.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeParseLibraryArchitecture.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeSystemSpecificInformation.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeSystemSpecificInitialize.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeTestCCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeTestCXXCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeTestCompilerCommon.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeUnixFindMake.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CheckCXXCompilerFlag.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CheckCXXSourceCompiles.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/ADSP-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/ARMCC-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/ARMClang-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/AppleClang-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/Borland-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/Bruce-C-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/CMakeCommonCompilerMacros.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/Clang-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/Clang-DetermineCompilerInternal.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/Comeau-CXX-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/Compaq-C-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/Compaq-CXX-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/Cray-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/CrayClang-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/Embarcadero-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/Fujitsu-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/FujitsuClang-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/GHS-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/GNU-C-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/GNU-C.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/GNU-CXX-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/GNU-CXX.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/GNU-FindBinUtils.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/GNU.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/HP-C-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/HP-CXX-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/IAR-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/IBMCPP-CXX-DetermineVersionInternal.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/IBMClang-C-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/IBMClang-CXX-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/Intel-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/IntelLLVM-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/LCC-C-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/LCC-CXX-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/MSVC-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/NVHPC-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/NVIDIA-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/OpenWatcom-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/OrangeC-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/PGI-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/PathScale-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/SCO-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/SDCC-C-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/SunPro-C-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/SunPro-CXX-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/TI-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/Tasking-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/TinyCC-C-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/VisualAge-C-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/VisualAge-CXX-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/Watcom-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/XL-C-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/XL-CXX-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/XLClang-C-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/XLClang-CXX-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/zOS-C-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Compiler/zOS-CXX-DetermineCompiler.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Internal/CheckCompilerFlag.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Internal/CheckFlagCommonConfig.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Internal/CheckSourceCompiles.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Internal/FeatureTesting.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Platform/Linux-Determine-CXX.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Platform/Linux-GNU-C.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Platform/Linux-GNU-CXX.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Platform/Linux-GNU.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Platform/Linux-Initialize.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Platform/Linux.cmake"
+ "/opt/conda/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/Platform/UnixPaths.cmake"
+ "/workspace/NeuCoSVC/REAPER/CMakeLists.txt"
+ "CMakeFiles/3.28.1/CMakeCCompiler.cmake"
+ "CMakeFiles/3.28.1/CMakeCXXCompiler.cmake"
+ "CMakeFiles/3.28.1/CMakeSystem.cmake"
+ )
+
+# The corresponding makefile is:
+set(CMAKE_MAKEFILE_OUTPUTS
+ "Makefile"
+ "CMakeFiles/cmake.check_cache"
+ )
+
+# Byproducts of CMake generate step:
+set(CMAKE_MAKEFILE_PRODUCTS
+ "CMakeFiles/3.28.1/CMakeCCompiler.cmake"
+ "CMakeFiles/3.28.1/CMakeCXXCompiler.cmake"
+ "CMakeFiles/3.28.1/CMakeCCompiler.cmake"
+ "CMakeFiles/3.28.1/CMakeCXXCompiler.cmake"
+ "CMakeFiles/CMakeDirectoryInformation.cmake"
+ )
+
+# Dependency information for all targets:
+set(CMAKE_DEPEND_INFO_FILES
+ "CMakeFiles/core.dir/DependInfo.cmake"
+ "CMakeFiles/wave.dir/DependInfo.cmake"
+ "CMakeFiles/epoch_tracker.dir/DependInfo.cmake"
+ "CMakeFiles/reaper.dir/DependInfo.cmake"
+ )
diff --git a/REAPER/build/CMakeFiles/Makefile2 b/REAPER/build/CMakeFiles/Makefile2
new file mode 100644
index 0000000000000000000000000000000000000000..562719cc09a319d80471dc9ba317087c9c600f5f
--- /dev/null
+++ b/REAPER/build/CMakeFiles/Makefile2
@@ -0,0 +1,199 @@
+# CMAKE generated file: DO NOT EDIT!
+# Generated by "Unix Makefiles" Generator, CMake Version 3.28
+
+# Default target executed when no arguments are given to make.
+default_target: all
+.PHONY : default_target
+
+#=============================================================================
+# Special targets provided by cmake.
+
+# Disable implicit rules so canonical targets will work.
+.SUFFIXES:
+
+# Disable VCS-based implicit rules.
+% : %,v
+
+# Disable VCS-based implicit rules.
+% : RCS/%
+
+# Disable VCS-based implicit rules.
+% : RCS/%,v
+
+# Disable VCS-based implicit rules.
+% : SCCS/s.%
+
+# Disable VCS-based implicit rules.
+% : s.%
+
+.SUFFIXES: .hpux_make_needs_suffix_list
+
+# Command-line flag to silence nested $(MAKE).
+$(VERBOSE)MAKESILENT = -s
+
+#Suppress display of executed commands.
+$(VERBOSE).SILENT:
+
+# A target that is always out of date.
+cmake_force:
+.PHONY : cmake_force
+
+#=============================================================================
+# Set environment variables for the build.
+
+# The shell in which to execute make rules.
+SHELL = /bin/sh
+
+# The CMake executable.
+CMAKE_COMMAND = /opt/conda/lib/python3.10/site-packages/cmake/data/bin/cmake
+
+# The command to remove a file.
+RM = /opt/conda/lib/python3.10/site-packages/cmake/data/bin/cmake -E rm -f
+
+# Escaping for special characters.
+EQUALS = =
+
+# The top-level source directory on which CMake was run.
+CMAKE_SOURCE_DIR = /workspace/NeuCoSVC/REAPER
+
+# The top-level build directory on which CMake was run.
+CMAKE_BINARY_DIR = /workspace/NeuCoSVC/REAPER/build
+
+#=============================================================================
+# Directory level rules for the build root directory
+
+# The main recursive "all" target.
+all: CMakeFiles/core.dir/all
+all: CMakeFiles/wave.dir/all
+all: CMakeFiles/epoch_tracker.dir/all
+all: CMakeFiles/reaper.dir/all
+.PHONY : all
+
+# The main recursive "preinstall" target.
+preinstall:
+.PHONY : preinstall
+
+# The main recursive "clean" target.
+clean: CMakeFiles/core.dir/clean
+clean: CMakeFiles/wave.dir/clean
+clean: CMakeFiles/epoch_tracker.dir/clean
+clean: CMakeFiles/reaper.dir/clean
+.PHONY : clean
+
+#=============================================================================
+# Target rules for target CMakeFiles/core.dir
+
+# All Build rule for target.
+CMakeFiles/core.dir/all:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/core.dir/build.make CMakeFiles/core.dir/depend
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/core.dir/build.make CMakeFiles/core.dir/build
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --progress-dir=/workspace/NeuCoSVC/REAPER/build/CMakeFiles --progress-num=1,2,3,4 "Built target core"
+.PHONY : CMakeFiles/core.dir/all
+
+# Build rule for subdir invocation for target.
+CMakeFiles/core.dir/rule: cmake_check_build_system
+ $(CMAKE_COMMAND) -E cmake_progress_start /workspace/NeuCoSVC/REAPER/build/CMakeFiles 4
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 CMakeFiles/core.dir/all
+ $(CMAKE_COMMAND) -E cmake_progress_start /workspace/NeuCoSVC/REAPER/build/CMakeFiles 0
+.PHONY : CMakeFiles/core.dir/rule
+
+# Convenience name for target.
+core: CMakeFiles/core.dir/rule
+.PHONY : core
+
+# clean rule for target.
+CMakeFiles/core.dir/clean:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/core.dir/build.make CMakeFiles/core.dir/clean
+.PHONY : CMakeFiles/core.dir/clean
+
+#=============================================================================
+# Target rules for target CMakeFiles/wave.dir
+
+# All Build rule for target.
+CMakeFiles/wave.dir/all: CMakeFiles/core.dir/all
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/wave.dir/build.make CMakeFiles/wave.dir/depend
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/wave.dir/build.make CMakeFiles/wave.dir/build
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --progress-dir=/workspace/NeuCoSVC/REAPER/build/CMakeFiles --progress-num=12,13,14,15 "Built target wave"
+.PHONY : CMakeFiles/wave.dir/all
+
+# Build rule for subdir invocation for target.
+CMakeFiles/wave.dir/rule: cmake_check_build_system
+ $(CMAKE_COMMAND) -E cmake_progress_start /workspace/NeuCoSVC/REAPER/build/CMakeFiles 8
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 CMakeFiles/wave.dir/all
+ $(CMAKE_COMMAND) -E cmake_progress_start /workspace/NeuCoSVC/REAPER/build/CMakeFiles 0
+.PHONY : CMakeFiles/wave.dir/rule
+
+# Convenience name for target.
+wave: CMakeFiles/wave.dir/rule
+.PHONY : wave
+
+# clean rule for target.
+CMakeFiles/wave.dir/clean:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/wave.dir/build.make CMakeFiles/wave.dir/clean
+.PHONY : CMakeFiles/wave.dir/clean
+
+#=============================================================================
+# Target rules for target CMakeFiles/epoch_tracker.dir
+
+# All Build rule for target.
+CMakeFiles/epoch_tracker.dir/all: CMakeFiles/core.dir/all
+CMakeFiles/epoch_tracker.dir/all: CMakeFiles/wave.dir/all
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/epoch_tracker.dir/build.make CMakeFiles/epoch_tracker.dir/depend
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/epoch_tracker.dir/build.make CMakeFiles/epoch_tracker.dir/build
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --progress-dir=/workspace/NeuCoSVC/REAPER/build/CMakeFiles --progress-num=5,6,7,8,9 "Built target epoch_tracker"
+.PHONY : CMakeFiles/epoch_tracker.dir/all
+
+# Build rule for subdir invocation for target.
+CMakeFiles/epoch_tracker.dir/rule: cmake_check_build_system
+ $(CMAKE_COMMAND) -E cmake_progress_start /workspace/NeuCoSVC/REAPER/build/CMakeFiles 13
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 CMakeFiles/epoch_tracker.dir/all
+ $(CMAKE_COMMAND) -E cmake_progress_start /workspace/NeuCoSVC/REAPER/build/CMakeFiles 0
+.PHONY : CMakeFiles/epoch_tracker.dir/rule
+
+# Convenience name for target.
+epoch_tracker: CMakeFiles/epoch_tracker.dir/rule
+.PHONY : epoch_tracker
+
+# clean rule for target.
+CMakeFiles/epoch_tracker.dir/clean:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/epoch_tracker.dir/build.make CMakeFiles/epoch_tracker.dir/clean
+.PHONY : CMakeFiles/epoch_tracker.dir/clean
+
+#=============================================================================
+# Target rules for target CMakeFiles/reaper.dir
+
+# All Build rule for target.
+CMakeFiles/reaper.dir/all: CMakeFiles/core.dir/all
+CMakeFiles/reaper.dir/all: CMakeFiles/epoch_tracker.dir/all
+CMakeFiles/reaper.dir/all: CMakeFiles/wave.dir/all
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/reaper.dir/build.make CMakeFiles/reaper.dir/depend
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/reaper.dir/build.make CMakeFiles/reaper.dir/build
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --progress-dir=/workspace/NeuCoSVC/REAPER/build/CMakeFiles --progress-num=10,11 "Built target reaper"
+.PHONY : CMakeFiles/reaper.dir/all
+
+# Build rule for subdir invocation for target.
+CMakeFiles/reaper.dir/rule: cmake_check_build_system
+ $(CMAKE_COMMAND) -E cmake_progress_start /workspace/NeuCoSVC/REAPER/build/CMakeFiles 15
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 CMakeFiles/reaper.dir/all
+ $(CMAKE_COMMAND) -E cmake_progress_start /workspace/NeuCoSVC/REAPER/build/CMakeFiles 0
+.PHONY : CMakeFiles/reaper.dir/rule
+
+# Convenience name for target.
+reaper: CMakeFiles/reaper.dir/rule
+.PHONY : reaper
+
+# clean rule for target.
+CMakeFiles/reaper.dir/clean:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/reaper.dir/build.make CMakeFiles/reaper.dir/clean
+.PHONY : CMakeFiles/reaper.dir/clean
+
+#=============================================================================
+# Special targets to cleanup operation of make.
+
+# Special rule to run CMake to check the build system integrity.
+# No rule that depends on this can have commands that come from listfiles
+# because they might be regenerated.
+cmake_check_build_system:
+ $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
+.PHONY : cmake_check_build_system
+
diff --git a/REAPER/build/CMakeFiles/TargetDirectories.txt b/REAPER/build/CMakeFiles/TargetDirectories.txt
new file mode 100644
index 0000000000000000000000000000000000000000..ca295064c346e184f3aae64f1c5fa10851e8483e
--- /dev/null
+++ b/REAPER/build/CMakeFiles/TargetDirectories.txt
@@ -0,0 +1,6 @@
+/workspace/NeuCoSVC/REAPER/build/CMakeFiles/core.dir
+/workspace/NeuCoSVC/REAPER/build/CMakeFiles/wave.dir
+/workspace/NeuCoSVC/REAPER/build/CMakeFiles/epoch_tracker.dir
+/workspace/NeuCoSVC/REAPER/build/CMakeFiles/reaper.dir
+/workspace/NeuCoSVC/REAPER/build/CMakeFiles/edit_cache.dir
+/workspace/NeuCoSVC/REAPER/build/CMakeFiles/rebuild_cache.dir
diff --git a/REAPER/build/CMakeFiles/cmake.check_cache b/REAPER/build/CMakeFiles/cmake.check_cache
new file mode 100644
index 0000000000000000000000000000000000000000..3dccd731726d7faa8b29d8d7dba3b981a53ca497
--- /dev/null
+++ b/REAPER/build/CMakeFiles/cmake.check_cache
@@ -0,0 +1 @@
+# This file is generated by cmake for dependency checking of the CMakeCache.txt file
diff --git a/REAPER/build/CMakeFiles/core.dir/DependInfo.cmake b/REAPER/build/CMakeFiles/core.dir/DependInfo.cmake
new file mode 100644
index 0000000000000000000000000000000000000000..82e5d930db33396c6b44f03d2061ccd9d590fbdc
--- /dev/null
+++ b/REAPER/build/CMakeFiles/core.dir/DependInfo.cmake
@@ -0,0 +1,25 @@
+
+# Consider dependencies only in project.
+set(CMAKE_DEPENDS_IN_PROJECT_ONLY OFF)
+
+# The set of languages for which implicit dependencies are needed:
+set(CMAKE_DEPENDS_LANGUAGES
+ )
+
+# The set of dependency files which are needed:
+set(CMAKE_DEPENDS_DEPENDENCY_FILES
+ "/workspace/NeuCoSVC/REAPER/core/file_resource.cc" "CMakeFiles/core.dir/core/file_resource.cc.o" "gcc" "CMakeFiles/core.dir/core/file_resource.cc.o.d"
+ "/workspace/NeuCoSVC/REAPER/core/float_matrix.cc" "CMakeFiles/core.dir/core/float_matrix.cc.o" "gcc" "CMakeFiles/core.dir/core/float_matrix.cc.o.d"
+ "/workspace/NeuCoSVC/REAPER/core/track.cc" "CMakeFiles/core.dir/core/track.cc.o" "gcc" "CMakeFiles/core.dir/core/track.cc.o.d"
+ )
+
+# Targets to which this target links which contain Fortran sources.
+set(CMAKE_Fortran_TARGET_LINKED_INFO_FILES
+ )
+
+# Targets to which this target links which contain Fortran sources.
+set(CMAKE_Fortran_TARGET_FORWARD_LINKED_INFO_FILES
+ )
+
+# Fortran module output directory.
+set(CMAKE_Fortran_TARGET_MODULE_DIR "")
diff --git a/REAPER/build/CMakeFiles/core.dir/build.make b/REAPER/build/CMakeFiles/core.dir/build.make
new file mode 100644
index 0000000000000000000000000000000000000000..49a823a2299f300bb39d8c9648089f176364048c
--- /dev/null
+++ b/REAPER/build/CMakeFiles/core.dir/build.make
@@ -0,0 +1,143 @@
+# CMAKE generated file: DO NOT EDIT!
+# Generated by "Unix Makefiles" Generator, CMake Version 3.28
+
+# Delete rule output on recipe failure.
+.DELETE_ON_ERROR:
+
+#=============================================================================
+# Special targets provided by cmake.
+
+# Disable implicit rules so canonical targets will work.
+.SUFFIXES:
+
+# Disable VCS-based implicit rules.
+% : %,v
+
+# Disable VCS-based implicit rules.
+% : RCS/%
+
+# Disable VCS-based implicit rules.
+% : RCS/%,v
+
+# Disable VCS-based implicit rules.
+% : SCCS/s.%
+
+# Disable VCS-based implicit rules.
+% : s.%
+
+.SUFFIXES: .hpux_make_needs_suffix_list
+
+# Command-line flag to silence nested $(MAKE).
+$(VERBOSE)MAKESILENT = -s
+
+#Suppress display of executed commands.
+$(VERBOSE).SILENT:
+
+# A target that is always out of date.
+cmake_force:
+.PHONY : cmake_force
+
+#=============================================================================
+# Set environment variables for the build.
+
+# The shell in which to execute make rules.
+SHELL = /bin/sh
+
+# The CMake executable.
+CMAKE_COMMAND = /opt/conda/lib/python3.10/site-packages/cmake/data/bin/cmake
+
+# The command to remove a file.
+RM = /opt/conda/lib/python3.10/site-packages/cmake/data/bin/cmake -E rm -f
+
+# Escaping for special characters.
+EQUALS = =
+
+# The top-level source directory on which CMake was run.
+CMAKE_SOURCE_DIR = /workspace/NeuCoSVC/REAPER
+
+# The top-level build directory on which CMake was run.
+CMAKE_BINARY_DIR = /workspace/NeuCoSVC/REAPER/build
+
+# Include any dependencies generated for this target.
+include CMakeFiles/core.dir/depend.make
+# Include any dependencies generated by the compiler for this target.
+include CMakeFiles/core.dir/compiler_depend.make
+
+# Include the progress variables for this target.
+include CMakeFiles/core.dir/progress.make
+
+# Include the compile flags for this target's objects.
+include CMakeFiles/core.dir/flags.make
+
+CMakeFiles/core.dir/core/file_resource.cc.o: CMakeFiles/core.dir/flags.make
+CMakeFiles/core.dir/core/file_resource.cc.o: /workspace/NeuCoSVC/REAPER/core/file_resource.cc
+CMakeFiles/core.dir/core/file_resource.cc.o: CMakeFiles/core.dir/compiler_depend.ts
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/workspace/NeuCoSVC/REAPER/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building CXX object CMakeFiles/core.dir/core/file_resource.cc.o"
+ /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/core.dir/core/file_resource.cc.o -MF CMakeFiles/core.dir/core/file_resource.cc.o.d -o CMakeFiles/core.dir/core/file_resource.cc.o -c /workspace/NeuCoSVC/REAPER/core/file_resource.cc
+
+CMakeFiles/core.dir/core/file_resource.cc.i: cmake_force
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/core.dir/core/file_resource.cc.i"
+ /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /workspace/NeuCoSVC/REAPER/core/file_resource.cc > CMakeFiles/core.dir/core/file_resource.cc.i
+
+CMakeFiles/core.dir/core/file_resource.cc.s: cmake_force
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/core.dir/core/file_resource.cc.s"
+ /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /workspace/NeuCoSVC/REAPER/core/file_resource.cc -o CMakeFiles/core.dir/core/file_resource.cc.s
+
+CMakeFiles/core.dir/core/float_matrix.cc.o: CMakeFiles/core.dir/flags.make
+CMakeFiles/core.dir/core/float_matrix.cc.o: /workspace/NeuCoSVC/REAPER/core/float_matrix.cc
+CMakeFiles/core.dir/core/float_matrix.cc.o: CMakeFiles/core.dir/compiler_depend.ts
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/workspace/NeuCoSVC/REAPER/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Building CXX object CMakeFiles/core.dir/core/float_matrix.cc.o"
+ /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/core.dir/core/float_matrix.cc.o -MF CMakeFiles/core.dir/core/float_matrix.cc.o.d -o CMakeFiles/core.dir/core/float_matrix.cc.o -c /workspace/NeuCoSVC/REAPER/core/float_matrix.cc
+
+CMakeFiles/core.dir/core/float_matrix.cc.i: cmake_force
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/core.dir/core/float_matrix.cc.i"
+ /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /workspace/NeuCoSVC/REAPER/core/float_matrix.cc > CMakeFiles/core.dir/core/float_matrix.cc.i
+
+CMakeFiles/core.dir/core/float_matrix.cc.s: cmake_force
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/core.dir/core/float_matrix.cc.s"
+ /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /workspace/NeuCoSVC/REAPER/core/float_matrix.cc -o CMakeFiles/core.dir/core/float_matrix.cc.s
+
+CMakeFiles/core.dir/core/track.cc.o: CMakeFiles/core.dir/flags.make
+CMakeFiles/core.dir/core/track.cc.o: /workspace/NeuCoSVC/REAPER/core/track.cc
+CMakeFiles/core.dir/core/track.cc.o: CMakeFiles/core.dir/compiler_depend.ts
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/workspace/NeuCoSVC/REAPER/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_3) "Building CXX object CMakeFiles/core.dir/core/track.cc.o"
+ /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/core.dir/core/track.cc.o -MF CMakeFiles/core.dir/core/track.cc.o.d -o CMakeFiles/core.dir/core/track.cc.o -c /workspace/NeuCoSVC/REAPER/core/track.cc
+
+CMakeFiles/core.dir/core/track.cc.i: cmake_force
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/core.dir/core/track.cc.i"
+ /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /workspace/NeuCoSVC/REAPER/core/track.cc > CMakeFiles/core.dir/core/track.cc.i
+
+CMakeFiles/core.dir/core/track.cc.s: cmake_force
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/core.dir/core/track.cc.s"
+ /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /workspace/NeuCoSVC/REAPER/core/track.cc -o CMakeFiles/core.dir/core/track.cc.s
+
+# Object files for target core
+core_OBJECTS = \
+"CMakeFiles/core.dir/core/file_resource.cc.o" \
+"CMakeFiles/core.dir/core/float_matrix.cc.o" \
+"CMakeFiles/core.dir/core/track.cc.o"
+
+# External object files for target core
+core_EXTERNAL_OBJECTS =
+
+libcore.a: CMakeFiles/core.dir/core/file_resource.cc.o
+libcore.a: CMakeFiles/core.dir/core/float_matrix.cc.o
+libcore.a: CMakeFiles/core.dir/core/track.cc.o
+libcore.a: CMakeFiles/core.dir/build.make
+libcore.a: CMakeFiles/core.dir/link.txt
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --bold --progress-dir=/workspace/NeuCoSVC/REAPER/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_4) "Linking CXX static library libcore.a"
+ $(CMAKE_COMMAND) -P CMakeFiles/core.dir/cmake_clean_target.cmake
+ $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/core.dir/link.txt --verbose=$(VERBOSE)
+
+# Rule to build all files generated by this target.
+CMakeFiles/core.dir/build: libcore.a
+.PHONY : CMakeFiles/core.dir/build
+
+CMakeFiles/core.dir/clean:
+ $(CMAKE_COMMAND) -P CMakeFiles/core.dir/cmake_clean.cmake
+.PHONY : CMakeFiles/core.dir/clean
+
+CMakeFiles/core.dir/depend:
+ cd /workspace/NeuCoSVC/REAPER/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /workspace/NeuCoSVC/REAPER /workspace/NeuCoSVC/REAPER /workspace/NeuCoSVC/REAPER/build /workspace/NeuCoSVC/REAPER/build /workspace/NeuCoSVC/REAPER/build/CMakeFiles/core.dir/DependInfo.cmake "--color=$(COLOR)"
+.PHONY : CMakeFiles/core.dir/depend
+
diff --git a/REAPER/build/CMakeFiles/core.dir/cmake_clean.cmake b/REAPER/build/CMakeFiles/core.dir/cmake_clean.cmake
new file mode 100644
index 0000000000000000000000000000000000000000..8b99cb10e49a2e5dbb10d322390dbad1a75b2b72
--- /dev/null
+++ b/REAPER/build/CMakeFiles/core.dir/cmake_clean.cmake
@@ -0,0 +1,15 @@
+file(REMOVE_RECURSE
+ "CMakeFiles/core.dir/core/file_resource.cc.o"
+ "CMakeFiles/core.dir/core/file_resource.cc.o.d"
+ "CMakeFiles/core.dir/core/float_matrix.cc.o"
+ "CMakeFiles/core.dir/core/float_matrix.cc.o.d"
+ "CMakeFiles/core.dir/core/track.cc.o"
+ "CMakeFiles/core.dir/core/track.cc.o.d"
+ "libcore.a"
+ "libcore.pdb"
+)
+
+# Per-language clean rules from dependency scanning.
+foreach(lang CXX)
+ include(CMakeFiles/core.dir/cmake_clean_${lang}.cmake OPTIONAL)
+endforeach()
diff --git a/REAPER/build/CMakeFiles/core.dir/cmake_clean_target.cmake b/REAPER/build/CMakeFiles/core.dir/cmake_clean_target.cmake
new file mode 100644
index 0000000000000000000000000000000000000000..40fd26100fdb0aabeeed9c99261341f4d1abd806
--- /dev/null
+++ b/REAPER/build/CMakeFiles/core.dir/cmake_clean_target.cmake
@@ -0,0 +1,3 @@
+file(REMOVE_RECURSE
+ "libcore.a"
+)
diff --git a/REAPER/build/CMakeFiles/core.dir/compiler_depend.make b/REAPER/build/CMakeFiles/core.dir/compiler_depend.make
new file mode 100644
index 0000000000000000000000000000000000000000..e0483068e84e4f704aa4209024084a240f7bf706
--- /dev/null
+++ b/REAPER/build/CMakeFiles/core.dir/compiler_depend.make
@@ -0,0 +1,2 @@
+# Empty compiler generated dependencies file for core.
+# This may be replaced when dependencies are built.
diff --git a/REAPER/build/CMakeFiles/core.dir/compiler_depend.ts b/REAPER/build/CMakeFiles/core.dir/compiler_depend.ts
new file mode 100644
index 0000000000000000000000000000000000000000..6d3a0200a5fe76d5f32c64f27458111e4d56eddd
--- /dev/null
+++ b/REAPER/build/CMakeFiles/core.dir/compiler_depend.ts
@@ -0,0 +1,2 @@
+# CMAKE generated file: DO NOT EDIT!
+# Timestamp file for compiler generated dependencies management for core.
diff --git a/REAPER/build/CMakeFiles/core.dir/core/file_resource.cc.o b/REAPER/build/CMakeFiles/core.dir/core/file_resource.cc.o
new file mode 100644
index 0000000000000000000000000000000000000000..8cab8d4b13eac6286444e702646cb505a29a8c48
Binary files /dev/null and b/REAPER/build/CMakeFiles/core.dir/core/file_resource.cc.o differ
diff --git a/REAPER/build/CMakeFiles/core.dir/core/file_resource.cc.o.d b/REAPER/build/CMakeFiles/core.dir/core/file_resource.cc.o.d
new file mode 100644
index 0000000000000000000000000000000000000000..eb2a3c63f5239a6039f760a20fd0f2f44504ba33
--- /dev/null
+++ b/REAPER/build/CMakeFiles/core.dir/core/file_resource.cc.o.d
@@ -0,0 +1,124 @@
+CMakeFiles/core.dir/core/file_resource.cc.o: \
+ /workspace/NeuCoSVC/REAPER/core/file_resource.cc \
+ /usr/include/stdc-predef.h \
+ /workspace/NeuCoSVC/REAPER/./core/file_resource.h /usr/include/stdio.h \
+ /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \
+ /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \
+ /usr/include/x86_64-linux-gnu/bits/wordsize.h \
+ /usr/include/x86_64-linux-gnu/bits/long-double.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
+ /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \
+ /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \
+ /usr/include/x86_64-linux-gnu/bits/types.h \
+ /usr/include/x86_64-linux-gnu/bits/timesize.h \
+ /usr/include/x86_64-linux-gnu/bits/typesizes.h \
+ /usr/include/x86_64-linux-gnu/bits/time64.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \
+ /usr/include/x86_64-linux-gnu/bits/types/FILE.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \
+ /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \
+ /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \
+ /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \
+ /usr/include/c++/9/string \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/c++config.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/os_defines.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/cpu_defines.h \
+ /usr/include/c++/9/bits/stringfwd.h /usr/include/c++/9/bits/memoryfwd.h \
+ /usr/include/c++/9/bits/char_traits.h \
+ /usr/include/c++/9/bits/stl_algobase.h \
+ /usr/include/c++/9/bits/functexcept.h \
+ /usr/include/c++/9/bits/exception_defines.h \
+ /usr/include/c++/9/bits/cpp_type_traits.h \
+ /usr/include/c++/9/ext/type_traits.h \
+ /usr/include/c++/9/ext/numeric_traits.h \
+ /usr/include/c++/9/bits/stl_pair.h /usr/include/c++/9/bits/move.h \
+ /usr/include/c++/9/bits/concept_check.h /usr/include/c++/9/type_traits \
+ /usr/include/c++/9/bits/stl_iterator_base_types.h \
+ /usr/include/c++/9/bits/stl_iterator_base_funcs.h \
+ /usr/include/c++/9/debug/assertions.h \
+ /usr/include/c++/9/bits/stl_iterator.h \
+ /usr/include/c++/9/bits/ptr_traits.h /usr/include/c++/9/debug/debug.h \
+ /usr/include/c++/9/bits/predefined_ops.h \
+ /usr/include/c++/9/bits/postypes.h /usr/include/c++/9/cwchar \
+ /usr/include/wchar.h /usr/include/x86_64-linux-gnu/bits/floatn.h \
+ /usr/include/x86_64-linux-gnu/bits/floatn-common.h \
+ /usr/include/x86_64-linux-gnu/bits/wchar.h \
+ /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \
+ /usr/include/c++/9/cstdint \
+ /usr/lib/gcc/x86_64-linux-gnu/9/include/stdint.h /usr/include/stdint.h \
+ /usr/include/x86_64-linux-gnu/bits/stdint-intn.h \
+ /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \
+ /usr/include/c++/9/bits/allocator.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/c++allocator.h \
+ /usr/include/c++/9/ext/new_allocator.h /usr/include/c++/9/new \
+ /usr/include/c++/9/exception /usr/include/c++/9/bits/exception.h \
+ /usr/include/c++/9/bits/exception_ptr.h \
+ /usr/include/c++/9/bits/cxxabi_init_exception.h \
+ /usr/include/c++/9/typeinfo /usr/include/c++/9/bits/hash_bytes.h \
+ /usr/include/c++/9/bits/nested_exception.h \
+ /usr/include/c++/9/bits/localefwd.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/c++locale.h \
+ /usr/include/c++/9/clocale /usr/include/locale.h \
+ /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/9/iosfwd \
+ /usr/include/c++/9/cctype /usr/include/ctype.h \
+ /usr/include/x86_64-linux-gnu/bits/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/endianness.h \
+ /usr/include/c++/9/bits/ostream_insert.h \
+ /usr/include/c++/9/bits/cxxabi_forced.h \
+ /usr/include/c++/9/bits/stl_function.h \
+ /usr/include/c++/9/backward/binders.h \
+ /usr/include/c++/9/bits/range_access.h \
+ /usr/include/c++/9/initializer_list \
+ /usr/include/c++/9/bits/basic_string.h \
+ /usr/include/c++/9/ext/atomicity.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/gthr.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h \
+ /usr/include/pthread.h /usr/include/sched.h \
+ /usr/include/x86_64-linux-gnu/bits/types/time_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \
+ /usr/include/x86_64-linux-gnu/bits/sched.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \
+ /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \
+ /usr/include/x86_64-linux-gnu/bits/time.h \
+ /usr/include/x86_64-linux-gnu/bits/timex.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \
+ /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \
+ /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \
+ /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \
+ /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \
+ /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \
+ /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \
+ /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \
+ /usr/include/x86_64-linux-gnu/bits/setjmp.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/atomic_word.h \
+ /usr/include/c++/9/ext/alloc_traits.h \
+ /usr/include/c++/9/bits/alloc_traits.h \
+ /usr/include/c++/9/ext/string_conversions.h /usr/include/c++/9/cstdlib \
+ /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \
+ /usr/include/x86_64-linux-gnu/bits/waitstatus.h \
+ /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/byteswap.h \
+ /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \
+ /usr/include/x86_64-linux-gnu/sys/select.h \
+ /usr/include/x86_64-linux-gnu/bits/select.h \
+ /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \
+ /usr/include/alloca.h /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \
+ /usr/include/c++/9/bits/std_abs.h /usr/include/c++/9/cstdio \
+ /usr/include/c++/9/cerrno /usr/include/errno.h \
+ /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \
+ /usr/include/x86_64-linux-gnu/asm/errno.h \
+ /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+ /usr/include/x86_64-linux-gnu/bits/types/error_t.h \
+ /usr/include/c++/9/bits/functional_hash.h \
+ /usr/include/c++/9/bits/basic_string.tcc
diff --git a/REAPER/build/CMakeFiles/core.dir/core/float_matrix.cc.o b/REAPER/build/CMakeFiles/core.dir/core/float_matrix.cc.o
new file mode 100644
index 0000000000000000000000000000000000000000..a19af2e4227f28a61d2671c2af05d79e355f15f4
Binary files /dev/null and b/REAPER/build/CMakeFiles/core.dir/core/float_matrix.cc.o differ
diff --git a/REAPER/build/CMakeFiles/core.dir/core/float_matrix.cc.o.d b/REAPER/build/CMakeFiles/core.dir/core/float_matrix.cc.o.d
new file mode 100644
index 0000000000000000000000000000000000000000..dec7c11821cb81a58feb80cd95bc8f54fd3b6b3c
--- /dev/null
+++ b/REAPER/build/CMakeFiles/core.dir/core/float_matrix.cc.o.d
@@ -0,0 +1,125 @@
+CMakeFiles/core.dir/core/float_matrix.cc.o: \
+ /workspace/NeuCoSVC/REAPER/core/float_matrix.cc \
+ /usr/include/stdc-predef.h \
+ /workspace/NeuCoSVC/REAPER/./core/float_matrix.h \
+ /usr/lib/gcc/x86_64-linux-gnu/9/include/stdint.h /usr/include/stdint.h \
+ /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \
+ /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \
+ /usr/include/x86_64-linux-gnu/bits/wordsize.h \
+ /usr/include/x86_64-linux-gnu/bits/long-double.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
+ /usr/include/x86_64-linux-gnu/bits/types.h \
+ /usr/include/x86_64-linux-gnu/bits/timesize.h \
+ /usr/include/x86_64-linux-gnu/bits/typesizes.h \
+ /usr/include/x86_64-linux-gnu/bits/time64.h \
+ /usr/include/x86_64-linux-gnu/bits/wchar.h \
+ /usr/include/x86_64-linux-gnu/bits/stdint-intn.h \
+ /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \
+ /usr/include/c++/9/string \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/c++config.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/os_defines.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/cpu_defines.h \
+ /usr/include/c++/9/bits/stringfwd.h /usr/include/c++/9/bits/memoryfwd.h \
+ /usr/include/c++/9/bits/char_traits.h \
+ /usr/include/c++/9/bits/stl_algobase.h \
+ /usr/include/c++/9/bits/functexcept.h \
+ /usr/include/c++/9/bits/exception_defines.h \
+ /usr/include/c++/9/bits/cpp_type_traits.h \
+ /usr/include/c++/9/ext/type_traits.h \
+ /usr/include/c++/9/ext/numeric_traits.h \
+ /usr/include/c++/9/bits/stl_pair.h /usr/include/c++/9/bits/move.h \
+ /usr/include/c++/9/bits/concept_check.h /usr/include/c++/9/type_traits \
+ /usr/include/c++/9/bits/stl_iterator_base_types.h \
+ /usr/include/c++/9/bits/stl_iterator_base_funcs.h \
+ /usr/include/c++/9/debug/assertions.h \
+ /usr/include/c++/9/bits/stl_iterator.h \
+ /usr/include/c++/9/bits/ptr_traits.h /usr/include/c++/9/debug/debug.h \
+ /usr/include/c++/9/bits/predefined_ops.h \
+ /usr/include/c++/9/bits/postypes.h /usr/include/c++/9/cwchar \
+ /usr/include/wchar.h /usr/include/x86_64-linux-gnu/bits/floatn.h \
+ /usr/include/x86_64-linux-gnu/bits/floatn-common.h \
+ /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \
+ /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \
+ /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \
+ /usr/include/x86_64-linux-gnu/bits/types/FILE.h \
+ /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \
+ /usr/include/c++/9/cstdint /usr/include/c++/9/bits/allocator.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/c++allocator.h \
+ /usr/include/c++/9/ext/new_allocator.h /usr/include/c++/9/new \
+ /usr/include/c++/9/exception /usr/include/c++/9/bits/exception.h \
+ /usr/include/c++/9/bits/exception_ptr.h \
+ /usr/include/c++/9/bits/cxxabi_init_exception.h \
+ /usr/include/c++/9/typeinfo /usr/include/c++/9/bits/hash_bytes.h \
+ /usr/include/c++/9/bits/nested_exception.h \
+ /usr/include/c++/9/bits/localefwd.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/c++locale.h \
+ /usr/include/c++/9/clocale /usr/include/locale.h \
+ /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/9/iosfwd \
+ /usr/include/c++/9/cctype /usr/include/ctype.h \
+ /usr/include/x86_64-linux-gnu/bits/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/endianness.h \
+ /usr/include/c++/9/bits/ostream_insert.h \
+ /usr/include/c++/9/bits/cxxabi_forced.h \
+ /usr/include/c++/9/bits/stl_function.h \
+ /usr/include/c++/9/backward/binders.h \
+ /usr/include/c++/9/bits/range_access.h \
+ /usr/include/c++/9/initializer_list \
+ /usr/include/c++/9/bits/basic_string.h \
+ /usr/include/c++/9/ext/atomicity.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/gthr.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h \
+ /usr/include/pthread.h /usr/include/sched.h \
+ /usr/include/x86_64-linux-gnu/bits/types/time_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \
+ /usr/include/x86_64-linux-gnu/bits/sched.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \
+ /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \
+ /usr/include/x86_64-linux-gnu/bits/time.h \
+ /usr/include/x86_64-linux-gnu/bits/timex.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \
+ /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \
+ /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \
+ /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \
+ /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \
+ /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \
+ /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \
+ /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \
+ /usr/include/x86_64-linux-gnu/bits/setjmp.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/atomic_word.h \
+ /usr/include/c++/9/ext/alloc_traits.h \
+ /usr/include/c++/9/bits/alloc_traits.h \
+ /usr/include/c++/9/ext/string_conversions.h /usr/include/c++/9/cstdlib \
+ /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \
+ /usr/include/x86_64-linux-gnu/bits/waitstatus.h \
+ /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/byteswap.h \
+ /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \
+ /usr/include/x86_64-linux-gnu/sys/select.h \
+ /usr/include/x86_64-linux-gnu/bits/select.h \
+ /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \
+ /usr/include/alloca.h /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \
+ /usr/include/c++/9/bits/std_abs.h /usr/include/c++/9/cstdio \
+ /usr/include/stdio.h /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \
+ /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \
+ /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \
+ /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \
+ /usr/include/c++/9/cerrno /usr/include/errno.h \
+ /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \
+ /usr/include/x86_64-linux-gnu/asm/errno.h \
+ /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+ /usr/include/x86_64-linux-gnu/bits/types/error_t.h \
+ /usr/include/c++/9/bits/functional_hash.h \
+ /usr/include/c++/9/bits/basic_string.tcc \
+ /workspace/NeuCoSVC/REAPER/./core/float_matrix-inl.h \
+ /usr/include/string.h /usr/include/strings.h
diff --git a/REAPER/build/CMakeFiles/core.dir/core/track.cc.o b/REAPER/build/CMakeFiles/core.dir/core/track.cc.o
new file mode 100644
index 0000000000000000000000000000000000000000..add155dcefe99fd5a9e657210b0775b1ca284117
Binary files /dev/null and b/REAPER/build/CMakeFiles/core.dir/core/track.cc.o differ
diff --git a/REAPER/build/CMakeFiles/core.dir/core/track.cc.o.d b/REAPER/build/CMakeFiles/core.dir/core/track.cc.o.d
new file mode 100644
index 0000000000000000000000000000000000000000..a724b6a6a7f651dedc2ebfbde8cf4fcbb6f942fc
--- /dev/null
+++ b/REAPER/build/CMakeFiles/core.dir/core/track.cc.o.d
@@ -0,0 +1,156 @@
+CMakeFiles/core.dir/core/track.cc.o: \
+ /workspace/NeuCoSVC/REAPER/core/track.cc /usr/include/stdc-predef.h \
+ /workspace/NeuCoSVC/REAPER/./core/track.h \
+ /usr/lib/gcc/x86_64-linux-gnu/9/include/stdint.h /usr/include/stdint.h \
+ /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \
+ /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \
+ /usr/include/x86_64-linux-gnu/bits/wordsize.h \
+ /usr/include/x86_64-linux-gnu/bits/long-double.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
+ /usr/include/x86_64-linux-gnu/bits/types.h \
+ /usr/include/x86_64-linux-gnu/bits/timesize.h \
+ /usr/include/x86_64-linux-gnu/bits/typesizes.h \
+ /usr/include/x86_64-linux-gnu/bits/time64.h \
+ /usr/include/x86_64-linux-gnu/bits/wchar.h \
+ /usr/include/x86_64-linux-gnu/bits/stdint-intn.h \
+ /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \
+ /usr/include/c++/9/string \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/c++config.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/os_defines.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/cpu_defines.h \
+ /usr/include/c++/9/bits/stringfwd.h /usr/include/c++/9/bits/memoryfwd.h \
+ /usr/include/c++/9/bits/char_traits.h \
+ /usr/include/c++/9/bits/stl_algobase.h \
+ /usr/include/c++/9/bits/functexcept.h \
+ /usr/include/c++/9/bits/exception_defines.h \
+ /usr/include/c++/9/bits/cpp_type_traits.h \
+ /usr/include/c++/9/ext/type_traits.h \
+ /usr/include/c++/9/ext/numeric_traits.h \
+ /usr/include/c++/9/bits/stl_pair.h /usr/include/c++/9/bits/move.h \
+ /usr/include/c++/9/bits/concept_check.h /usr/include/c++/9/type_traits \
+ /usr/include/c++/9/bits/stl_iterator_base_types.h \
+ /usr/include/c++/9/bits/stl_iterator_base_funcs.h \
+ /usr/include/c++/9/debug/assertions.h \
+ /usr/include/c++/9/bits/stl_iterator.h \
+ /usr/include/c++/9/bits/ptr_traits.h /usr/include/c++/9/debug/debug.h \
+ /usr/include/c++/9/bits/predefined_ops.h \
+ /usr/include/c++/9/bits/postypes.h /usr/include/c++/9/cwchar \
+ /usr/include/wchar.h /usr/include/x86_64-linux-gnu/bits/floatn.h \
+ /usr/include/x86_64-linux-gnu/bits/floatn-common.h \
+ /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \
+ /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \
+ /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \
+ /usr/include/x86_64-linux-gnu/bits/types/FILE.h \
+ /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \
+ /usr/include/c++/9/cstdint /usr/include/c++/9/bits/allocator.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/c++allocator.h \
+ /usr/include/c++/9/ext/new_allocator.h /usr/include/c++/9/new \
+ /usr/include/c++/9/exception /usr/include/c++/9/bits/exception.h \
+ /usr/include/c++/9/bits/exception_ptr.h \
+ /usr/include/c++/9/bits/cxxabi_init_exception.h \
+ /usr/include/c++/9/typeinfo /usr/include/c++/9/bits/hash_bytes.h \
+ /usr/include/c++/9/bits/nested_exception.h \
+ /usr/include/c++/9/bits/localefwd.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/c++locale.h \
+ /usr/include/c++/9/clocale /usr/include/locale.h \
+ /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/9/iosfwd \
+ /usr/include/c++/9/cctype /usr/include/ctype.h \
+ /usr/include/x86_64-linux-gnu/bits/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/endianness.h \
+ /usr/include/c++/9/bits/ostream_insert.h \
+ /usr/include/c++/9/bits/cxxabi_forced.h \
+ /usr/include/c++/9/bits/stl_function.h \
+ /usr/include/c++/9/backward/binders.h \
+ /usr/include/c++/9/bits/range_access.h \
+ /usr/include/c++/9/initializer_list \
+ /usr/include/c++/9/bits/basic_string.h \
+ /usr/include/c++/9/ext/atomicity.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/gthr.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h \
+ /usr/include/pthread.h /usr/include/sched.h \
+ /usr/include/x86_64-linux-gnu/bits/types/time_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \
+ /usr/include/x86_64-linux-gnu/bits/sched.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \
+ /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \
+ /usr/include/x86_64-linux-gnu/bits/time.h \
+ /usr/include/x86_64-linux-gnu/bits/timex.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \
+ /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \
+ /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \
+ /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \
+ /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \
+ /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \
+ /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \
+ /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \
+ /usr/include/x86_64-linux-gnu/bits/setjmp.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/atomic_word.h \
+ /usr/include/c++/9/ext/alloc_traits.h \
+ /usr/include/c++/9/bits/alloc_traits.h \
+ /usr/include/c++/9/ext/string_conversions.h /usr/include/c++/9/cstdlib \
+ /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \
+ /usr/include/x86_64-linux-gnu/bits/waitstatus.h \
+ /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/byteswap.h \
+ /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \
+ /usr/include/x86_64-linux-gnu/sys/select.h \
+ /usr/include/x86_64-linux-gnu/bits/select.h \
+ /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \
+ /usr/include/alloca.h /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \
+ /usr/include/c++/9/bits/std_abs.h /usr/include/c++/9/cstdio \
+ /usr/include/stdio.h /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \
+ /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \
+ /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \
+ /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \
+ /usr/include/c++/9/cerrno /usr/include/errno.h \
+ /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \
+ /usr/include/x86_64-linux-gnu/asm/errno.h \
+ /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+ /usr/include/x86_64-linux-gnu/bits/types/error_t.h \
+ /usr/include/c++/9/bits/functional_hash.h \
+ /usr/include/c++/9/bits/basic_string.tcc /usr/include/c++/9/vector \
+ /usr/include/c++/9/bits/stl_construct.h \
+ /usr/include/c++/9/bits/stl_uninitialized.h \
+ /usr/include/c++/9/bits/stl_vector.h \
+ /usr/include/c++/9/bits/stl_bvector.h /usr/include/c++/9/bits/vector.tcc \
+ /workspace/NeuCoSVC/REAPER/./core/file_resource.h \
+ /workspace/NeuCoSVC/REAPER/./core/float_matrix.h \
+ /workspace/NeuCoSVC/REAPER/./core/float_matrix-inl.h \
+ /usr/include/c++/9/math.h /usr/include/c++/9/cmath /usr/include/math.h \
+ /usr/include/x86_64-linux-gnu/bits/math-vector.h \
+ /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \
+ /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \
+ /usr/include/x86_64-linux-gnu/bits/fp-logb.h \
+ /usr/include/x86_64-linux-gnu/bits/fp-fast.h \
+ /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \
+ /usr/include/x86_64-linux-gnu/bits/mathcalls.h \
+ /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \
+ /usr/include/x86_64-linux-gnu/bits/iscanonical.h \
+ /usr/include/c++/9/memory /usr/include/c++/9/bits/stl_tempbuf.h \
+ /usr/include/c++/9/bits/stl_raw_storage_iter.h \
+ /usr/include/c++/9/ext/concurrence.h \
+ /usr/include/c++/9/bits/uses_allocator.h \
+ /usr/include/c++/9/bits/unique_ptr.h /usr/include/c++/9/utility \
+ /usr/include/c++/9/bits/stl_relops.h /usr/include/c++/9/tuple \
+ /usr/include/c++/9/array /usr/include/c++/9/stdexcept \
+ /usr/include/c++/9/bits/invoke.h /usr/include/c++/9/bits/shared_ptr.h \
+ /usr/include/c++/9/bits/shared_ptr_base.h \
+ /usr/include/c++/9/bits/allocated_ptr.h \
+ /usr/include/c++/9/bits/refwrap.h \
+ /usr/include/c++/9/ext/aligned_buffer.h \
+ /usr/include/c++/9/bits/shared_ptr_atomic.h \
+ /usr/include/c++/9/bits/atomic_base.h \
+ /usr/include/c++/9/bits/atomic_lockfree_defines.h \
+ /usr/include/c++/9/backward/auto_ptr.h /usr/include/c++/9/stdlib.h \
+ /usr/include/inttypes.h
diff --git a/REAPER/build/CMakeFiles/core.dir/depend.make b/REAPER/build/CMakeFiles/core.dir/depend.make
new file mode 100644
index 0000000000000000000000000000000000000000..e89a2a3e96284c6c376d1e048309462cca2dd216
--- /dev/null
+++ b/REAPER/build/CMakeFiles/core.dir/depend.make
@@ -0,0 +1,2 @@
+# Empty dependencies file for core.
+# This may be replaced when dependencies are built.
diff --git a/REAPER/build/CMakeFiles/core.dir/flags.make b/REAPER/build/CMakeFiles/core.dir/flags.make
new file mode 100644
index 0000000000000000000000000000000000000000..caa0babcc66dd9763c7a4a6f645fce48ec746d89
--- /dev/null
+++ b/REAPER/build/CMakeFiles/core.dir/flags.make
@@ -0,0 +1,10 @@
+# CMAKE generated file: DO NOT EDIT!
+# Generated by "Unix Makefiles" Generator, CMake Version 3.28
+
+# compile CXX with /usr/bin/c++
+CXX_DEFINES =
+
+CXX_INCLUDES = -I/workspace/NeuCoSVC/REAPER/.
+
+CXX_FLAGS = -std=c++11
+
diff --git a/REAPER/build/CMakeFiles/core.dir/link.txt b/REAPER/build/CMakeFiles/core.dir/link.txt
new file mode 100644
index 0000000000000000000000000000000000000000..819ae3cb73a53575bd90410f14c592a48572300d
--- /dev/null
+++ b/REAPER/build/CMakeFiles/core.dir/link.txt
@@ -0,0 +1,2 @@
+/usr/bin/ar qc libcore.a CMakeFiles/core.dir/core/file_resource.cc.o CMakeFiles/core.dir/core/float_matrix.cc.o CMakeFiles/core.dir/core/track.cc.o
+/usr/bin/ranlib libcore.a
diff --git a/REAPER/build/CMakeFiles/core.dir/progress.make b/REAPER/build/CMakeFiles/core.dir/progress.make
new file mode 100644
index 0000000000000000000000000000000000000000..a69a57e8e4ffee737b6054e9068354426a41030f
--- /dev/null
+++ b/REAPER/build/CMakeFiles/core.dir/progress.make
@@ -0,0 +1,5 @@
+CMAKE_PROGRESS_1 = 1
+CMAKE_PROGRESS_2 = 2
+CMAKE_PROGRESS_3 = 3
+CMAKE_PROGRESS_4 = 4
+
diff --git a/REAPER/build/CMakeFiles/epoch_tracker.dir/DependInfo.cmake b/REAPER/build/CMakeFiles/epoch_tracker.dir/DependInfo.cmake
new file mode 100644
index 0000000000000000000000000000000000000000..1072cb45161d03115b269e6df376dfa2e76249f0
--- /dev/null
+++ b/REAPER/build/CMakeFiles/epoch_tracker.dir/DependInfo.cmake
@@ -0,0 +1,26 @@
+
+# Consider dependencies only in project.
+set(CMAKE_DEPENDS_IN_PROJECT_ONLY OFF)
+
+# The set of languages for which implicit dependencies are needed:
+set(CMAKE_DEPENDS_LANGUAGES
+ )
+
+# The set of dependency files which are needed:
+set(CMAKE_DEPENDS_DEPENDENCY_FILES
+ "/workspace/NeuCoSVC/REAPER/epoch_tracker/epoch_tracker.cc" "CMakeFiles/epoch_tracker.dir/epoch_tracker/epoch_tracker.cc.o" "gcc" "CMakeFiles/epoch_tracker.dir/epoch_tracker/epoch_tracker.cc.o.d"
+ "/workspace/NeuCoSVC/REAPER/epoch_tracker/fd_filter.cc" "CMakeFiles/epoch_tracker.dir/epoch_tracker/fd_filter.cc.o" "gcc" "CMakeFiles/epoch_tracker.dir/epoch_tracker/fd_filter.cc.o.d"
+ "/workspace/NeuCoSVC/REAPER/epoch_tracker/fft.cc" "CMakeFiles/epoch_tracker.dir/epoch_tracker/fft.cc.o" "gcc" "CMakeFiles/epoch_tracker.dir/epoch_tracker/fft.cc.o.d"
+ "/workspace/NeuCoSVC/REAPER/epoch_tracker/lpc_analyzer.cc" "CMakeFiles/epoch_tracker.dir/epoch_tracker/lpc_analyzer.cc.o" "gcc" "CMakeFiles/epoch_tracker.dir/epoch_tracker/lpc_analyzer.cc.o.d"
+ )
+
+# Targets to which this target links which contain Fortran sources.
+set(CMAKE_Fortran_TARGET_LINKED_INFO_FILES
+ )
+
+# Targets to which this target links which contain Fortran sources.
+set(CMAKE_Fortran_TARGET_FORWARD_LINKED_INFO_FILES
+ )
+
+# Fortran module output directory.
+set(CMAKE_Fortran_TARGET_MODULE_DIR "")
diff --git a/REAPER/build/CMakeFiles/epoch_tracker.dir/build.make b/REAPER/build/CMakeFiles/epoch_tracker.dir/build.make
new file mode 100644
index 0000000000000000000000000000000000000000..b4b461874d3aa26bc5905b2ba8b24d5c621975a4
--- /dev/null
+++ b/REAPER/build/CMakeFiles/epoch_tracker.dir/build.make
@@ -0,0 +1,159 @@
+# CMAKE generated file: DO NOT EDIT!
+# Generated by "Unix Makefiles" Generator, CMake Version 3.28
+
+# Delete rule output on recipe failure.
+.DELETE_ON_ERROR:
+
+#=============================================================================
+# Special targets provided by cmake.
+
+# Disable implicit rules so canonical targets will work.
+.SUFFIXES:
+
+# Disable VCS-based implicit rules.
+% : %,v
+
+# Disable VCS-based implicit rules.
+% : RCS/%
+
+# Disable VCS-based implicit rules.
+% : RCS/%,v
+
+# Disable VCS-based implicit rules.
+% : SCCS/s.%
+
+# Disable VCS-based implicit rules.
+% : s.%
+
+.SUFFIXES: .hpux_make_needs_suffix_list
+
+# Command-line flag to silence nested $(MAKE).
+$(VERBOSE)MAKESILENT = -s
+
+#Suppress display of executed commands.
+$(VERBOSE).SILENT:
+
+# A target that is always out of date.
+cmake_force:
+.PHONY : cmake_force
+
+#=============================================================================
+# Set environment variables for the build.
+
+# The shell in which to execute make rules.
+SHELL = /bin/sh
+
+# The CMake executable.
+CMAKE_COMMAND = /opt/conda/lib/python3.10/site-packages/cmake/data/bin/cmake
+
+# The command to remove a file.
+RM = /opt/conda/lib/python3.10/site-packages/cmake/data/bin/cmake -E rm -f
+
+# Escaping for special characters.
+EQUALS = =
+
+# The top-level source directory on which CMake was run.
+CMAKE_SOURCE_DIR = /workspace/NeuCoSVC/REAPER
+
+# The top-level build directory on which CMake was run.
+CMAKE_BINARY_DIR = /workspace/NeuCoSVC/REAPER/build
+
+# Include any dependencies generated for this target.
+include CMakeFiles/epoch_tracker.dir/depend.make
+# Include any dependencies generated by the compiler for this target.
+include CMakeFiles/epoch_tracker.dir/compiler_depend.make
+
+# Include the progress variables for this target.
+include CMakeFiles/epoch_tracker.dir/progress.make
+
+# Include the compile flags for this target's objects.
+include CMakeFiles/epoch_tracker.dir/flags.make
+
+CMakeFiles/epoch_tracker.dir/epoch_tracker/fft.cc.o: CMakeFiles/epoch_tracker.dir/flags.make
+CMakeFiles/epoch_tracker.dir/epoch_tracker/fft.cc.o: /workspace/NeuCoSVC/REAPER/epoch_tracker/fft.cc
+CMakeFiles/epoch_tracker.dir/epoch_tracker/fft.cc.o: CMakeFiles/epoch_tracker.dir/compiler_depend.ts
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/workspace/NeuCoSVC/REAPER/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building CXX object CMakeFiles/epoch_tracker.dir/epoch_tracker/fft.cc.o"
+ /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/epoch_tracker.dir/epoch_tracker/fft.cc.o -MF CMakeFiles/epoch_tracker.dir/epoch_tracker/fft.cc.o.d -o CMakeFiles/epoch_tracker.dir/epoch_tracker/fft.cc.o -c /workspace/NeuCoSVC/REAPER/epoch_tracker/fft.cc
+
+CMakeFiles/epoch_tracker.dir/epoch_tracker/fft.cc.i: cmake_force
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/epoch_tracker.dir/epoch_tracker/fft.cc.i"
+ /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /workspace/NeuCoSVC/REAPER/epoch_tracker/fft.cc > CMakeFiles/epoch_tracker.dir/epoch_tracker/fft.cc.i
+
+CMakeFiles/epoch_tracker.dir/epoch_tracker/fft.cc.s: cmake_force
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/epoch_tracker.dir/epoch_tracker/fft.cc.s"
+ /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /workspace/NeuCoSVC/REAPER/epoch_tracker/fft.cc -o CMakeFiles/epoch_tracker.dir/epoch_tracker/fft.cc.s
+
+CMakeFiles/epoch_tracker.dir/epoch_tracker/fd_filter.cc.o: CMakeFiles/epoch_tracker.dir/flags.make
+CMakeFiles/epoch_tracker.dir/epoch_tracker/fd_filter.cc.o: /workspace/NeuCoSVC/REAPER/epoch_tracker/fd_filter.cc
+CMakeFiles/epoch_tracker.dir/epoch_tracker/fd_filter.cc.o: CMakeFiles/epoch_tracker.dir/compiler_depend.ts
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/workspace/NeuCoSVC/REAPER/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Building CXX object CMakeFiles/epoch_tracker.dir/epoch_tracker/fd_filter.cc.o"
+ /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/epoch_tracker.dir/epoch_tracker/fd_filter.cc.o -MF CMakeFiles/epoch_tracker.dir/epoch_tracker/fd_filter.cc.o.d -o CMakeFiles/epoch_tracker.dir/epoch_tracker/fd_filter.cc.o -c /workspace/NeuCoSVC/REAPER/epoch_tracker/fd_filter.cc
+
+CMakeFiles/epoch_tracker.dir/epoch_tracker/fd_filter.cc.i: cmake_force
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/epoch_tracker.dir/epoch_tracker/fd_filter.cc.i"
+ /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /workspace/NeuCoSVC/REAPER/epoch_tracker/fd_filter.cc > CMakeFiles/epoch_tracker.dir/epoch_tracker/fd_filter.cc.i
+
+CMakeFiles/epoch_tracker.dir/epoch_tracker/fd_filter.cc.s: cmake_force
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/epoch_tracker.dir/epoch_tracker/fd_filter.cc.s"
+ /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /workspace/NeuCoSVC/REAPER/epoch_tracker/fd_filter.cc -o CMakeFiles/epoch_tracker.dir/epoch_tracker/fd_filter.cc.s
+
+CMakeFiles/epoch_tracker.dir/epoch_tracker/lpc_analyzer.cc.o: CMakeFiles/epoch_tracker.dir/flags.make
+CMakeFiles/epoch_tracker.dir/epoch_tracker/lpc_analyzer.cc.o: /workspace/NeuCoSVC/REAPER/epoch_tracker/lpc_analyzer.cc
+CMakeFiles/epoch_tracker.dir/epoch_tracker/lpc_analyzer.cc.o: CMakeFiles/epoch_tracker.dir/compiler_depend.ts
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/workspace/NeuCoSVC/REAPER/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_3) "Building CXX object CMakeFiles/epoch_tracker.dir/epoch_tracker/lpc_analyzer.cc.o"
+ /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/epoch_tracker.dir/epoch_tracker/lpc_analyzer.cc.o -MF CMakeFiles/epoch_tracker.dir/epoch_tracker/lpc_analyzer.cc.o.d -o CMakeFiles/epoch_tracker.dir/epoch_tracker/lpc_analyzer.cc.o -c /workspace/NeuCoSVC/REAPER/epoch_tracker/lpc_analyzer.cc
+
+CMakeFiles/epoch_tracker.dir/epoch_tracker/lpc_analyzer.cc.i: cmake_force
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/epoch_tracker.dir/epoch_tracker/lpc_analyzer.cc.i"
+ /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /workspace/NeuCoSVC/REAPER/epoch_tracker/lpc_analyzer.cc > CMakeFiles/epoch_tracker.dir/epoch_tracker/lpc_analyzer.cc.i
+
+CMakeFiles/epoch_tracker.dir/epoch_tracker/lpc_analyzer.cc.s: cmake_force
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/epoch_tracker.dir/epoch_tracker/lpc_analyzer.cc.s"
+ /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /workspace/NeuCoSVC/REAPER/epoch_tracker/lpc_analyzer.cc -o CMakeFiles/epoch_tracker.dir/epoch_tracker/lpc_analyzer.cc.s
+
+CMakeFiles/epoch_tracker.dir/epoch_tracker/epoch_tracker.cc.o: CMakeFiles/epoch_tracker.dir/flags.make
+CMakeFiles/epoch_tracker.dir/epoch_tracker/epoch_tracker.cc.o: /workspace/NeuCoSVC/REAPER/epoch_tracker/epoch_tracker.cc
+CMakeFiles/epoch_tracker.dir/epoch_tracker/epoch_tracker.cc.o: CMakeFiles/epoch_tracker.dir/compiler_depend.ts
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/workspace/NeuCoSVC/REAPER/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_4) "Building CXX object CMakeFiles/epoch_tracker.dir/epoch_tracker/epoch_tracker.cc.o"
+ /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/epoch_tracker.dir/epoch_tracker/epoch_tracker.cc.o -MF CMakeFiles/epoch_tracker.dir/epoch_tracker/epoch_tracker.cc.o.d -o CMakeFiles/epoch_tracker.dir/epoch_tracker/epoch_tracker.cc.o -c /workspace/NeuCoSVC/REAPER/epoch_tracker/epoch_tracker.cc
+
+CMakeFiles/epoch_tracker.dir/epoch_tracker/epoch_tracker.cc.i: cmake_force
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/epoch_tracker.dir/epoch_tracker/epoch_tracker.cc.i"
+ /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /workspace/NeuCoSVC/REAPER/epoch_tracker/epoch_tracker.cc > CMakeFiles/epoch_tracker.dir/epoch_tracker/epoch_tracker.cc.i
+
+CMakeFiles/epoch_tracker.dir/epoch_tracker/epoch_tracker.cc.s: cmake_force
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/epoch_tracker.dir/epoch_tracker/epoch_tracker.cc.s"
+ /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /workspace/NeuCoSVC/REAPER/epoch_tracker/epoch_tracker.cc -o CMakeFiles/epoch_tracker.dir/epoch_tracker/epoch_tracker.cc.s
+
+# Object files for target epoch_tracker
+epoch_tracker_OBJECTS = \
+"CMakeFiles/epoch_tracker.dir/epoch_tracker/fft.cc.o" \
+"CMakeFiles/epoch_tracker.dir/epoch_tracker/fd_filter.cc.o" \
+"CMakeFiles/epoch_tracker.dir/epoch_tracker/lpc_analyzer.cc.o" \
+"CMakeFiles/epoch_tracker.dir/epoch_tracker/epoch_tracker.cc.o"
+
+# External object files for target epoch_tracker
+epoch_tracker_EXTERNAL_OBJECTS =
+
+libepoch_tracker.a: CMakeFiles/epoch_tracker.dir/epoch_tracker/fft.cc.o
+libepoch_tracker.a: CMakeFiles/epoch_tracker.dir/epoch_tracker/fd_filter.cc.o
+libepoch_tracker.a: CMakeFiles/epoch_tracker.dir/epoch_tracker/lpc_analyzer.cc.o
+libepoch_tracker.a: CMakeFiles/epoch_tracker.dir/epoch_tracker/epoch_tracker.cc.o
+libepoch_tracker.a: CMakeFiles/epoch_tracker.dir/build.make
+libepoch_tracker.a: CMakeFiles/epoch_tracker.dir/link.txt
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --bold --progress-dir=/workspace/NeuCoSVC/REAPER/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_5) "Linking CXX static library libepoch_tracker.a"
+ $(CMAKE_COMMAND) -P CMakeFiles/epoch_tracker.dir/cmake_clean_target.cmake
+ $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/epoch_tracker.dir/link.txt --verbose=$(VERBOSE)
+
+# Rule to build all files generated by this target.
+CMakeFiles/epoch_tracker.dir/build: libepoch_tracker.a
+.PHONY : CMakeFiles/epoch_tracker.dir/build
+
+CMakeFiles/epoch_tracker.dir/clean:
+ $(CMAKE_COMMAND) -P CMakeFiles/epoch_tracker.dir/cmake_clean.cmake
+.PHONY : CMakeFiles/epoch_tracker.dir/clean
+
+CMakeFiles/epoch_tracker.dir/depend:
+ cd /workspace/NeuCoSVC/REAPER/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /workspace/NeuCoSVC/REAPER /workspace/NeuCoSVC/REAPER /workspace/NeuCoSVC/REAPER/build /workspace/NeuCoSVC/REAPER/build /workspace/NeuCoSVC/REAPER/build/CMakeFiles/epoch_tracker.dir/DependInfo.cmake "--color=$(COLOR)"
+.PHONY : CMakeFiles/epoch_tracker.dir/depend
+
diff --git a/REAPER/build/CMakeFiles/epoch_tracker.dir/cmake_clean.cmake b/REAPER/build/CMakeFiles/epoch_tracker.dir/cmake_clean.cmake
new file mode 100644
index 0000000000000000000000000000000000000000..80e69f0cc840f57077f4830cf9439475371c3687
--- /dev/null
+++ b/REAPER/build/CMakeFiles/epoch_tracker.dir/cmake_clean.cmake
@@ -0,0 +1,17 @@
+file(REMOVE_RECURSE
+ "CMakeFiles/epoch_tracker.dir/epoch_tracker/epoch_tracker.cc.o"
+ "CMakeFiles/epoch_tracker.dir/epoch_tracker/epoch_tracker.cc.o.d"
+ "CMakeFiles/epoch_tracker.dir/epoch_tracker/fd_filter.cc.o"
+ "CMakeFiles/epoch_tracker.dir/epoch_tracker/fd_filter.cc.o.d"
+ "CMakeFiles/epoch_tracker.dir/epoch_tracker/fft.cc.o"
+ "CMakeFiles/epoch_tracker.dir/epoch_tracker/fft.cc.o.d"
+ "CMakeFiles/epoch_tracker.dir/epoch_tracker/lpc_analyzer.cc.o"
+ "CMakeFiles/epoch_tracker.dir/epoch_tracker/lpc_analyzer.cc.o.d"
+ "libepoch_tracker.a"
+ "libepoch_tracker.pdb"
+)
+
+# Per-language clean rules from dependency scanning.
+foreach(lang CXX)
+ include(CMakeFiles/epoch_tracker.dir/cmake_clean_${lang}.cmake OPTIONAL)
+endforeach()
diff --git a/REAPER/build/CMakeFiles/epoch_tracker.dir/cmake_clean_target.cmake b/REAPER/build/CMakeFiles/epoch_tracker.dir/cmake_clean_target.cmake
new file mode 100644
index 0000000000000000000000000000000000000000..b2d3e82c94bf5d353678f2312be1b4dbf43f69b4
--- /dev/null
+++ b/REAPER/build/CMakeFiles/epoch_tracker.dir/cmake_clean_target.cmake
@@ -0,0 +1,3 @@
+file(REMOVE_RECURSE
+ "libepoch_tracker.a"
+)
diff --git a/REAPER/build/CMakeFiles/epoch_tracker.dir/compiler_depend.make b/REAPER/build/CMakeFiles/epoch_tracker.dir/compiler_depend.make
new file mode 100644
index 0000000000000000000000000000000000000000..de2619d0b192c0c1b73a6657921323f11de3b35b
--- /dev/null
+++ b/REAPER/build/CMakeFiles/epoch_tracker.dir/compiler_depend.make
@@ -0,0 +1,2 @@
+# Empty compiler generated dependencies file for epoch_tracker.
+# This may be replaced when dependencies are built.
diff --git a/REAPER/build/CMakeFiles/epoch_tracker.dir/compiler_depend.ts b/REAPER/build/CMakeFiles/epoch_tracker.dir/compiler_depend.ts
new file mode 100644
index 0000000000000000000000000000000000000000..68d3f87cc4f605d06e5b8399e1c501614f21df2b
--- /dev/null
+++ b/REAPER/build/CMakeFiles/epoch_tracker.dir/compiler_depend.ts
@@ -0,0 +1,2 @@
+# CMAKE generated file: DO NOT EDIT!
+# Timestamp file for compiler generated dependencies management for epoch_tracker.
diff --git a/REAPER/build/CMakeFiles/epoch_tracker.dir/depend.make b/REAPER/build/CMakeFiles/epoch_tracker.dir/depend.make
new file mode 100644
index 0000000000000000000000000000000000000000..bc3af85bc12bc9bc374db3f1a968265412020843
--- /dev/null
+++ b/REAPER/build/CMakeFiles/epoch_tracker.dir/depend.make
@@ -0,0 +1,2 @@
+# Empty dependencies file for epoch_tracker.
+# This may be replaced when dependencies are built.
diff --git a/REAPER/build/CMakeFiles/epoch_tracker.dir/epoch_tracker/epoch_tracker.cc.o b/REAPER/build/CMakeFiles/epoch_tracker.dir/epoch_tracker/epoch_tracker.cc.o
new file mode 100644
index 0000000000000000000000000000000000000000..c7c7e0a393374c7d8166e6822a8efa00481dd07d
Binary files /dev/null and b/REAPER/build/CMakeFiles/epoch_tracker.dir/epoch_tracker/epoch_tracker.cc.o differ
diff --git a/REAPER/build/CMakeFiles/epoch_tracker.dir/epoch_tracker/epoch_tracker.cc.o.d b/REAPER/build/CMakeFiles/epoch_tracker.dir/epoch_tracker/epoch_tracker.cc.o.d
new file mode 100644
index 0000000000000000000000000000000000000000..9908467de85041d96bd7fc0be7f936e14ebd3476
--- /dev/null
+++ b/REAPER/build/CMakeFiles/epoch_tracker.dir/epoch_tracker/epoch_tracker.cc.o.d
@@ -0,0 +1,156 @@
+CMakeFiles/epoch_tracker.dir/epoch_tracker/epoch_tracker.cc.o: \
+ /workspace/NeuCoSVC/REAPER/epoch_tracker/epoch_tracker.cc \
+ /usr/include/stdc-predef.h \
+ /workspace/NeuCoSVC/REAPER/./epoch_tracker/epoch_tracker.h \
+ /usr/include/c++/9/memory /usr/include/c++/9/bits/stl_algobase.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/c++config.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/os_defines.h \
+ /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \
+ /usr/include/x86_64-linux-gnu/bits/wordsize.h \
+ /usr/include/x86_64-linux-gnu/bits/long-double.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/cpu_defines.h \
+ /usr/include/c++/9/bits/functexcept.h \
+ /usr/include/c++/9/bits/exception_defines.h \
+ /usr/include/c++/9/bits/cpp_type_traits.h \
+ /usr/include/c++/9/ext/type_traits.h \
+ /usr/include/c++/9/ext/numeric_traits.h \
+ /usr/include/c++/9/bits/stl_pair.h /usr/include/c++/9/bits/move.h \
+ /usr/include/c++/9/bits/concept_check.h /usr/include/c++/9/type_traits \
+ /usr/include/c++/9/bits/stl_iterator_base_types.h \
+ /usr/include/c++/9/bits/stl_iterator_base_funcs.h \
+ /usr/include/c++/9/debug/assertions.h \
+ /usr/include/c++/9/bits/stl_iterator.h \
+ /usr/include/c++/9/bits/ptr_traits.h /usr/include/c++/9/debug/debug.h \
+ /usr/include/c++/9/bits/predefined_ops.h \
+ /usr/include/c++/9/bits/allocator.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/c++allocator.h \
+ /usr/include/c++/9/ext/new_allocator.h /usr/include/c++/9/new \
+ /usr/include/c++/9/exception /usr/include/c++/9/bits/exception.h \
+ /usr/include/c++/9/bits/exception_ptr.h \
+ /usr/include/c++/9/bits/cxxabi_init_exception.h \
+ /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \
+ /usr/include/c++/9/typeinfo /usr/include/c++/9/bits/hash_bytes.h \
+ /usr/include/c++/9/bits/nested_exception.h \
+ /usr/include/c++/9/bits/memoryfwd.h \
+ /usr/include/c++/9/bits/stl_construct.h \
+ /usr/include/c++/9/ext/alloc_traits.h \
+ /usr/include/c++/9/bits/alloc_traits.h \
+ /usr/include/c++/9/bits/stl_uninitialized.h \
+ /usr/include/c++/9/bits/stl_tempbuf.h \
+ /usr/include/c++/9/bits/stl_raw_storage_iter.h /usr/include/c++/9/iosfwd \
+ /usr/include/c++/9/bits/stringfwd.h /usr/include/c++/9/bits/postypes.h \
+ /usr/include/c++/9/cwchar /usr/include/wchar.h \
+ /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \
+ /usr/include/x86_64-linux-gnu/bits/floatn.h \
+ /usr/include/x86_64-linux-gnu/bits/floatn-common.h \
+ /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \
+ /usr/include/x86_64-linux-gnu/bits/wchar.h \
+ /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \
+ /usr/include/x86_64-linux-gnu/bits/types/FILE.h \
+ /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \
+ /usr/include/c++/9/ext/atomicity.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/gthr.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h \
+ /usr/include/pthread.h /usr/include/sched.h \
+ /usr/include/x86_64-linux-gnu/bits/types.h \
+ /usr/include/x86_64-linux-gnu/bits/timesize.h \
+ /usr/include/x86_64-linux-gnu/bits/typesizes.h \
+ /usr/include/x86_64-linux-gnu/bits/time64.h \
+ /usr/include/x86_64-linux-gnu/bits/types/time_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \
+ /usr/include/x86_64-linux-gnu/bits/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/endianness.h \
+ /usr/include/x86_64-linux-gnu/bits/sched.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \
+ /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \
+ /usr/include/x86_64-linux-gnu/bits/time.h \
+ /usr/include/x86_64-linux-gnu/bits/timex.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \
+ /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \
+ /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \
+ /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \
+ /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \
+ /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \
+ /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \
+ /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \
+ /usr/include/x86_64-linux-gnu/bits/setjmp.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/atomic_word.h \
+ /usr/include/c++/9/ext/concurrence.h \
+ /usr/include/c++/9/bits/stl_function.h \
+ /usr/include/c++/9/backward/binders.h \
+ /usr/include/c++/9/bits/uses_allocator.h \
+ /usr/include/c++/9/bits/unique_ptr.h /usr/include/c++/9/utility \
+ /usr/include/c++/9/bits/stl_relops.h /usr/include/c++/9/initializer_list \
+ /usr/include/c++/9/tuple /usr/include/c++/9/array \
+ /usr/include/c++/9/stdexcept /usr/include/c++/9/string \
+ /usr/include/c++/9/bits/char_traits.h /usr/include/c++/9/cstdint \
+ /usr/lib/gcc/x86_64-linux-gnu/9/include/stdint.h /usr/include/stdint.h \
+ /usr/include/x86_64-linux-gnu/bits/stdint-intn.h \
+ /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \
+ /usr/include/c++/9/bits/localefwd.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/c++locale.h \
+ /usr/include/c++/9/clocale /usr/include/locale.h \
+ /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/9/cctype \
+ /usr/include/ctype.h /usr/include/c++/9/bits/ostream_insert.h \
+ /usr/include/c++/9/bits/cxxabi_forced.h \
+ /usr/include/c++/9/bits/range_access.h \
+ /usr/include/c++/9/bits/basic_string.h \
+ /usr/include/c++/9/ext/string_conversions.h /usr/include/c++/9/cstdlib \
+ /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \
+ /usr/include/x86_64-linux-gnu/bits/waitstatus.h \
+ /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/byteswap.h \
+ /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \
+ /usr/include/x86_64-linux-gnu/sys/select.h \
+ /usr/include/x86_64-linux-gnu/bits/select.h \
+ /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \
+ /usr/include/alloca.h /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \
+ /usr/include/c++/9/bits/std_abs.h /usr/include/c++/9/cstdio \
+ /usr/include/stdio.h /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \
+ /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \
+ /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \
+ /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \
+ /usr/include/c++/9/cerrno /usr/include/errno.h \
+ /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \
+ /usr/include/x86_64-linux-gnu/asm/errno.h \
+ /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+ /usr/include/x86_64-linux-gnu/bits/types/error_t.h \
+ /usr/include/c++/9/bits/functional_hash.h \
+ /usr/include/c++/9/bits/basic_string.tcc \
+ /usr/include/c++/9/bits/invoke.h /usr/include/c++/9/bits/shared_ptr.h \
+ /usr/include/c++/9/bits/shared_ptr_base.h \
+ /usr/include/c++/9/bits/allocated_ptr.h \
+ /usr/include/c++/9/bits/refwrap.h \
+ /usr/include/c++/9/ext/aligned_buffer.h \
+ /usr/include/c++/9/bits/shared_ptr_atomic.h \
+ /usr/include/c++/9/bits/atomic_base.h \
+ /usr/include/c++/9/bits/atomic_lockfree_defines.h \
+ /usr/include/c++/9/backward/auto_ptr.h /usr/include/c++/9/vector \
+ /usr/include/c++/9/bits/stl_vector.h \
+ /usr/include/c++/9/bits/stl_bvector.h /usr/include/c++/9/bits/vector.tcc \
+ /workspace/NeuCoSVC/REAPER/./epoch_tracker/fd_filter.h \
+ /workspace/NeuCoSVC/REAPER/./epoch_tracker/lpc_analyzer.h \
+ /workspace/NeuCoSVC/REAPER/./epoch_tracker/fft.h \
+ /usr/include/c++/9/math.h /usr/include/c++/9/cmath /usr/include/math.h \
+ /usr/include/x86_64-linux-gnu/bits/math-vector.h \
+ /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \
+ /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \
+ /usr/include/x86_64-linux-gnu/bits/fp-logb.h \
+ /usr/include/x86_64-linux-gnu/bits/fp-fast.h \
+ /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \
+ /usr/include/x86_64-linux-gnu/bits/mathcalls.h \
+ /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \
+ /usr/include/x86_64-linux-gnu/bits/iscanonical.h \
+ /usr/include/c++/9/stdlib.h
diff --git a/REAPER/build/CMakeFiles/epoch_tracker.dir/epoch_tracker/fd_filter.cc.o b/REAPER/build/CMakeFiles/epoch_tracker.dir/epoch_tracker/fd_filter.cc.o
new file mode 100644
index 0000000000000000000000000000000000000000..d44ff7a62dcb0ca8d82e441236f7e3ae14b95063
Binary files /dev/null and b/REAPER/build/CMakeFiles/epoch_tracker.dir/epoch_tracker/fd_filter.cc.o differ
diff --git a/REAPER/build/CMakeFiles/epoch_tracker.dir/epoch_tracker/fd_filter.cc.o.d b/REAPER/build/CMakeFiles/epoch_tracker.dir/epoch_tracker/fd_filter.cc.o.d
new file mode 100644
index 0000000000000000000000000000000000000000..30d95de5ec1a96ad6c28145bd93331f8287e0299
--- /dev/null
+++ b/REAPER/build/CMakeFiles/epoch_tracker.dir/epoch_tracker/fd_filter.cc.o.d
@@ -0,0 +1,75 @@
+CMakeFiles/epoch_tracker.dir/epoch_tracker/fd_filter.cc.o: \
+ /workspace/NeuCoSVC/REAPER/epoch_tracker/fd_filter.cc \
+ /usr/include/stdc-predef.h \
+ /workspace/NeuCoSVC/REAPER/./epoch_tracker/fd_filter.h \
+ /usr/include/stdio.h \
+ /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \
+ /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \
+ /usr/include/x86_64-linux-gnu/bits/wordsize.h \
+ /usr/include/x86_64-linux-gnu/bits/long-double.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
+ /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \
+ /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \
+ /usr/include/x86_64-linux-gnu/bits/types.h \
+ /usr/include/x86_64-linux-gnu/bits/timesize.h \
+ /usr/include/x86_64-linux-gnu/bits/typesizes.h \
+ /usr/include/x86_64-linux-gnu/bits/time64.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \
+ /usr/include/x86_64-linux-gnu/bits/types/FILE.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \
+ /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \
+ /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \
+ /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \
+ /usr/lib/gcc/x86_64-linux-gnu/9/include/stdint.h /usr/include/stdint.h \
+ /usr/include/x86_64-linux-gnu/bits/wchar.h \
+ /usr/include/x86_64-linux-gnu/bits/stdint-intn.h \
+ /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \
+ /usr/include/c++/9/math.h /usr/include/c++/9/cmath \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/c++config.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/os_defines.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/cpu_defines.h \
+ /usr/include/c++/9/bits/cpp_type_traits.h \
+ /usr/include/c++/9/ext/type_traits.h /usr/include/math.h \
+ /usr/include/x86_64-linux-gnu/bits/math-vector.h \
+ /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \
+ /usr/include/x86_64-linux-gnu/bits/floatn.h \
+ /usr/include/x86_64-linux-gnu/bits/floatn-common.h \
+ /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \
+ /usr/include/x86_64-linux-gnu/bits/fp-logb.h \
+ /usr/include/x86_64-linux-gnu/bits/fp-fast.h \
+ /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \
+ /usr/include/x86_64-linux-gnu/bits/mathcalls.h \
+ /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \
+ /usr/include/x86_64-linux-gnu/bits/iscanonical.h \
+ /usr/include/c++/9/bits/std_abs.h /usr/include/stdlib.h \
+ /usr/include/x86_64-linux-gnu/bits/waitflags.h \
+ /usr/include/x86_64-linux-gnu/bits/waitstatus.h \
+ /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \
+ /usr/include/x86_64-linux-gnu/sys/types.h \
+ /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/time_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/timer_t.h /usr/include/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/endianness.h \
+ /usr/include/x86_64-linux-gnu/bits/byteswap.h \
+ /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \
+ /usr/include/x86_64-linux-gnu/sys/select.h \
+ /usr/include/x86_64-linux-gnu/bits/select.h \
+ /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \
+ /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \
+ /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \
+ /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \
+ /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \
+ /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \
+ /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \
+ /workspace/NeuCoSVC/REAPER/./epoch_tracker/fft.h \
+ /usr/include/c++/9/stdlib.h /usr/include/c++/9/cstdlib
diff --git a/REAPER/build/CMakeFiles/epoch_tracker.dir/epoch_tracker/fft.cc.o b/REAPER/build/CMakeFiles/epoch_tracker.dir/epoch_tracker/fft.cc.o
new file mode 100644
index 0000000000000000000000000000000000000000..31828093bb8792186c95169a76d2ae9b0f02d8aa
Binary files /dev/null and b/REAPER/build/CMakeFiles/epoch_tracker.dir/epoch_tracker/fft.cc.o differ
diff --git a/REAPER/build/CMakeFiles/epoch_tracker.dir/epoch_tracker/fft.cc.o.d b/REAPER/build/CMakeFiles/epoch_tracker.dir/epoch_tracker/fft.cc.o.d
new file mode 100644
index 0000000000000000000000000000000000000000..a236044185446515ffc39fd249f632baa8e17f9c
--- /dev/null
+++ b/REAPER/build/CMakeFiles/epoch_tracker.dir/epoch_tracker/fft.cc.o.d
@@ -0,0 +1,70 @@
+CMakeFiles/epoch_tracker.dir/epoch_tracker/fft.cc.o: \
+ /workspace/NeuCoSVC/REAPER/epoch_tracker/fft.cc \
+ /usr/include/stdc-predef.h \
+ /workspace/NeuCoSVC/REAPER/./epoch_tracker/fft.h \
+ /usr/include/c++/9/math.h /usr/include/c++/9/cmath \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/c++config.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/os_defines.h \
+ /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \
+ /usr/include/x86_64-linux-gnu/bits/wordsize.h \
+ /usr/include/x86_64-linux-gnu/bits/long-double.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/cpu_defines.h \
+ /usr/include/c++/9/bits/cpp_type_traits.h \
+ /usr/include/c++/9/ext/type_traits.h /usr/include/math.h \
+ /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \
+ /usr/include/x86_64-linux-gnu/bits/types.h \
+ /usr/include/x86_64-linux-gnu/bits/timesize.h \
+ /usr/include/x86_64-linux-gnu/bits/typesizes.h \
+ /usr/include/x86_64-linux-gnu/bits/time64.h \
+ /usr/include/x86_64-linux-gnu/bits/math-vector.h \
+ /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \
+ /usr/include/x86_64-linux-gnu/bits/floatn.h \
+ /usr/include/x86_64-linux-gnu/bits/floatn-common.h \
+ /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \
+ /usr/include/x86_64-linux-gnu/bits/fp-logb.h \
+ /usr/include/x86_64-linux-gnu/bits/fp-fast.h \
+ /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \
+ /usr/include/x86_64-linux-gnu/bits/mathcalls.h \
+ /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \
+ /usr/include/x86_64-linux-gnu/bits/iscanonical.h \
+ /usr/include/c++/9/bits/std_abs.h /usr/include/stdlib.h \
+ /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \
+ /usr/include/x86_64-linux-gnu/bits/waitflags.h \
+ /usr/include/x86_64-linux-gnu/bits/waitstatus.h \
+ /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \
+ /usr/include/x86_64-linux-gnu/sys/types.h \
+ /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/time_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \
+ /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/endianness.h \
+ /usr/include/x86_64-linux-gnu/bits/byteswap.h \
+ /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \
+ /usr/include/x86_64-linux-gnu/sys/select.h \
+ /usr/include/x86_64-linux-gnu/bits/select.h \
+ /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \
+ /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \
+ /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \
+ /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \
+ /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \
+ /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \
+ /usr/include/x86_64-linux-gnu/bits/stdlib-float.h /usr/include/stdio.h \
+ /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \
+ /usr/include/x86_64-linux-gnu/bits/types/FILE.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \
+ /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \
+ /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \
+ /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \
+ /usr/include/c++/9/stdlib.h /usr/include/c++/9/cstdlib
diff --git a/REAPER/build/CMakeFiles/epoch_tracker.dir/epoch_tracker/lpc_analyzer.cc.o b/REAPER/build/CMakeFiles/epoch_tracker.dir/epoch_tracker/lpc_analyzer.cc.o
new file mode 100644
index 0000000000000000000000000000000000000000..0eb50fd00071e1ce49c3d54cdf0fc97de2cff1b8
Binary files /dev/null and b/REAPER/build/CMakeFiles/epoch_tracker.dir/epoch_tracker/lpc_analyzer.cc.o differ
diff --git a/REAPER/build/CMakeFiles/epoch_tracker.dir/epoch_tracker/lpc_analyzer.cc.o.d b/REAPER/build/CMakeFiles/epoch_tracker.dir/epoch_tracker/lpc_analyzer.cc.o.d
new file mode 100644
index 0000000000000000000000000000000000000000..522bf102508dc5f6dee9b884d167beae176438db
--- /dev/null
+++ b/REAPER/build/CMakeFiles/epoch_tracker.dir/epoch_tracker/lpc_analyzer.cc.o.d
@@ -0,0 +1,90 @@
+CMakeFiles/epoch_tracker.dir/epoch_tracker/lpc_analyzer.cc.o: \
+ /workspace/NeuCoSVC/REAPER/epoch_tracker/lpc_analyzer.cc \
+ /usr/include/stdc-predef.h \
+ /workspace/NeuCoSVC/REAPER/./epoch_tracker/lpc_analyzer.h \
+ /usr/include/c++/9/vector /usr/include/c++/9/bits/stl_algobase.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/c++config.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/os_defines.h \
+ /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \
+ /usr/include/x86_64-linux-gnu/bits/wordsize.h \
+ /usr/include/x86_64-linux-gnu/bits/long-double.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/cpu_defines.h \
+ /usr/include/c++/9/bits/functexcept.h \
+ /usr/include/c++/9/bits/exception_defines.h \
+ /usr/include/c++/9/bits/cpp_type_traits.h \
+ /usr/include/c++/9/ext/type_traits.h \
+ /usr/include/c++/9/ext/numeric_traits.h \
+ /usr/include/c++/9/bits/stl_pair.h /usr/include/c++/9/bits/move.h \
+ /usr/include/c++/9/bits/concept_check.h /usr/include/c++/9/type_traits \
+ /usr/include/c++/9/bits/stl_iterator_base_types.h \
+ /usr/include/c++/9/bits/stl_iterator_base_funcs.h \
+ /usr/include/c++/9/debug/assertions.h \
+ /usr/include/c++/9/bits/stl_iterator.h \
+ /usr/include/c++/9/bits/ptr_traits.h /usr/include/c++/9/debug/debug.h \
+ /usr/include/c++/9/bits/predefined_ops.h \
+ /usr/include/c++/9/bits/allocator.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/c++allocator.h \
+ /usr/include/c++/9/ext/new_allocator.h /usr/include/c++/9/new \
+ /usr/include/c++/9/exception /usr/include/c++/9/bits/exception.h \
+ /usr/include/c++/9/bits/exception_ptr.h \
+ /usr/include/c++/9/bits/cxxabi_init_exception.h \
+ /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \
+ /usr/include/c++/9/typeinfo /usr/include/c++/9/bits/hash_bytes.h \
+ /usr/include/c++/9/bits/nested_exception.h \
+ /usr/include/c++/9/bits/memoryfwd.h \
+ /usr/include/c++/9/bits/stl_construct.h \
+ /usr/include/c++/9/ext/alloc_traits.h \
+ /usr/include/c++/9/bits/alloc_traits.h \
+ /usr/include/c++/9/bits/stl_uninitialized.h \
+ /usr/include/c++/9/bits/stl_vector.h /usr/include/c++/9/initializer_list \
+ /usr/include/c++/9/bits/stl_bvector.h \
+ /usr/include/c++/9/bits/functional_hash.h \
+ /usr/include/c++/9/bits/range_access.h \
+ /usr/include/c++/9/bits/vector.tcc /usr/include/c++/9/stdlib.h \
+ /usr/include/c++/9/cstdlib /usr/include/stdlib.h \
+ /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \
+ /usr/include/x86_64-linux-gnu/bits/waitflags.h \
+ /usr/include/x86_64-linux-gnu/bits/waitstatus.h \
+ /usr/include/x86_64-linux-gnu/bits/floatn.h \
+ /usr/include/x86_64-linux-gnu/bits/floatn-common.h \
+ /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \
+ /usr/include/x86_64-linux-gnu/sys/types.h \
+ /usr/include/x86_64-linux-gnu/bits/types.h \
+ /usr/include/x86_64-linux-gnu/bits/timesize.h \
+ /usr/include/x86_64-linux-gnu/bits/typesizes.h \
+ /usr/include/x86_64-linux-gnu/bits/time64.h \
+ /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/time_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \
+ /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/endianness.h \
+ /usr/include/x86_64-linux-gnu/bits/byteswap.h \
+ /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \
+ /usr/include/x86_64-linux-gnu/sys/select.h \
+ /usr/include/x86_64-linux-gnu/bits/select.h \
+ /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \
+ /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \
+ /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \
+ /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \
+ /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \
+ /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \
+ /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \
+ /usr/include/c++/9/bits/std_abs.h /usr/include/c++/9/math.h \
+ /usr/include/c++/9/cmath /usr/include/math.h \
+ /usr/include/x86_64-linux-gnu/bits/math-vector.h \
+ /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \
+ /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \
+ /usr/include/x86_64-linux-gnu/bits/fp-logb.h \
+ /usr/include/x86_64-linux-gnu/bits/fp-fast.h \
+ /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \
+ /usr/include/x86_64-linux-gnu/bits/mathcalls.h \
+ /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \
+ /usr/include/x86_64-linux-gnu/bits/iscanonical.h
diff --git a/REAPER/build/CMakeFiles/epoch_tracker.dir/flags.make b/REAPER/build/CMakeFiles/epoch_tracker.dir/flags.make
new file mode 100644
index 0000000000000000000000000000000000000000..caa0babcc66dd9763c7a4a6f645fce48ec746d89
--- /dev/null
+++ b/REAPER/build/CMakeFiles/epoch_tracker.dir/flags.make
@@ -0,0 +1,10 @@
+# CMAKE generated file: DO NOT EDIT!
+# Generated by "Unix Makefiles" Generator, CMake Version 3.28
+
+# compile CXX with /usr/bin/c++
+CXX_DEFINES =
+
+CXX_INCLUDES = -I/workspace/NeuCoSVC/REAPER/.
+
+CXX_FLAGS = -std=c++11
+
diff --git a/REAPER/build/CMakeFiles/epoch_tracker.dir/link.txt b/REAPER/build/CMakeFiles/epoch_tracker.dir/link.txt
new file mode 100644
index 0000000000000000000000000000000000000000..cbcab38068de8060288c896605f3506aa7419e59
--- /dev/null
+++ b/REAPER/build/CMakeFiles/epoch_tracker.dir/link.txt
@@ -0,0 +1,2 @@
+/usr/bin/ar qc libepoch_tracker.a CMakeFiles/epoch_tracker.dir/epoch_tracker/fft.cc.o CMakeFiles/epoch_tracker.dir/epoch_tracker/fd_filter.cc.o CMakeFiles/epoch_tracker.dir/epoch_tracker/lpc_analyzer.cc.o CMakeFiles/epoch_tracker.dir/epoch_tracker/epoch_tracker.cc.o
+/usr/bin/ranlib libepoch_tracker.a
diff --git a/REAPER/build/CMakeFiles/epoch_tracker.dir/progress.make b/REAPER/build/CMakeFiles/epoch_tracker.dir/progress.make
new file mode 100644
index 0000000000000000000000000000000000000000..d79b0814ce410e79343cfcb41f806c483d9d7003
--- /dev/null
+++ b/REAPER/build/CMakeFiles/epoch_tracker.dir/progress.make
@@ -0,0 +1,6 @@
+CMAKE_PROGRESS_1 = 5
+CMAKE_PROGRESS_2 = 6
+CMAKE_PROGRESS_3 = 7
+CMAKE_PROGRESS_4 = 8
+CMAKE_PROGRESS_5 = 9
+
diff --git a/REAPER/build/CMakeFiles/progress.marks b/REAPER/build/CMakeFiles/progress.marks
new file mode 100644
index 0000000000000000000000000000000000000000..60d3b2f4a4cd5f1637eba020358bfe5ecb5edcf2
--- /dev/null
+++ b/REAPER/build/CMakeFiles/progress.marks
@@ -0,0 +1 @@
+15
diff --git a/REAPER/build/CMakeFiles/reaper.dir/DependInfo.cmake b/REAPER/build/CMakeFiles/reaper.dir/DependInfo.cmake
new file mode 100644
index 0000000000000000000000000000000000000000..dd60abe5a063ed0367f07de948d460355aead16a
--- /dev/null
+++ b/REAPER/build/CMakeFiles/reaper.dir/DependInfo.cmake
@@ -0,0 +1,23 @@
+
+# Consider dependencies only in project.
+set(CMAKE_DEPENDS_IN_PROJECT_ONLY OFF)
+
+# The set of languages for which implicit dependencies are needed:
+set(CMAKE_DEPENDS_LANGUAGES
+ )
+
+# The set of dependency files which are needed:
+set(CMAKE_DEPENDS_DEPENDENCY_FILES
+ "/workspace/NeuCoSVC/REAPER/epoch_tracker_main.cc" "CMakeFiles/reaper.dir/epoch_tracker_main.cc.o" "gcc" "CMakeFiles/reaper.dir/epoch_tracker_main.cc.o.d"
+ )
+
+# Targets to which this target links which contain Fortran sources.
+set(CMAKE_Fortran_TARGET_LINKED_INFO_FILES
+ )
+
+# Targets to which this target links which contain Fortran sources.
+set(CMAKE_Fortran_TARGET_FORWARD_LINKED_INFO_FILES
+ )
+
+# Fortran module output directory.
+set(CMAKE_Fortran_TARGET_MODULE_DIR "")
diff --git a/REAPER/build/CMakeFiles/reaper.dir/build.make b/REAPER/build/CMakeFiles/reaper.dir/build.make
new file mode 100644
index 0000000000000000000000000000000000000000..4a210b757cd9bacfde748824e962d8502c1997cc
--- /dev/null
+++ b/REAPER/build/CMakeFiles/reaper.dir/build.make
@@ -0,0 +1,113 @@
+# CMAKE generated file: DO NOT EDIT!
+# Generated by "Unix Makefiles" Generator, CMake Version 3.28
+
+# Delete rule output on recipe failure.
+.DELETE_ON_ERROR:
+
+#=============================================================================
+# Special targets provided by cmake.
+
+# Disable implicit rules so canonical targets will work.
+.SUFFIXES:
+
+# Disable VCS-based implicit rules.
+% : %,v
+
+# Disable VCS-based implicit rules.
+% : RCS/%
+
+# Disable VCS-based implicit rules.
+% : RCS/%,v
+
+# Disable VCS-based implicit rules.
+% : SCCS/s.%
+
+# Disable VCS-based implicit rules.
+% : s.%
+
+.SUFFIXES: .hpux_make_needs_suffix_list
+
+# Command-line flag to silence nested $(MAKE).
+$(VERBOSE)MAKESILENT = -s
+
+#Suppress display of executed commands.
+$(VERBOSE).SILENT:
+
+# A target that is always out of date.
+cmake_force:
+.PHONY : cmake_force
+
+#=============================================================================
+# Set environment variables for the build.
+
+# The shell in which to execute make rules.
+SHELL = /bin/sh
+
+# The CMake executable.
+CMAKE_COMMAND = /opt/conda/lib/python3.10/site-packages/cmake/data/bin/cmake
+
+# The command to remove a file.
+RM = /opt/conda/lib/python3.10/site-packages/cmake/data/bin/cmake -E rm -f
+
+# Escaping for special characters.
+EQUALS = =
+
+# The top-level source directory on which CMake was run.
+CMAKE_SOURCE_DIR = /workspace/NeuCoSVC/REAPER
+
+# The top-level build directory on which CMake was run.
+CMAKE_BINARY_DIR = /workspace/NeuCoSVC/REAPER/build
+
+# Include any dependencies generated for this target.
+include CMakeFiles/reaper.dir/depend.make
+# Include any dependencies generated by the compiler for this target.
+include CMakeFiles/reaper.dir/compiler_depend.make
+
+# Include the progress variables for this target.
+include CMakeFiles/reaper.dir/progress.make
+
+# Include the compile flags for this target's objects.
+include CMakeFiles/reaper.dir/flags.make
+
+CMakeFiles/reaper.dir/epoch_tracker_main.cc.o: CMakeFiles/reaper.dir/flags.make
+CMakeFiles/reaper.dir/epoch_tracker_main.cc.o: /workspace/NeuCoSVC/REAPER/epoch_tracker_main.cc
+CMakeFiles/reaper.dir/epoch_tracker_main.cc.o: CMakeFiles/reaper.dir/compiler_depend.ts
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/workspace/NeuCoSVC/REAPER/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building CXX object CMakeFiles/reaper.dir/epoch_tracker_main.cc.o"
+ /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/reaper.dir/epoch_tracker_main.cc.o -MF CMakeFiles/reaper.dir/epoch_tracker_main.cc.o.d -o CMakeFiles/reaper.dir/epoch_tracker_main.cc.o -c /workspace/NeuCoSVC/REAPER/epoch_tracker_main.cc
+
+CMakeFiles/reaper.dir/epoch_tracker_main.cc.i: cmake_force
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/reaper.dir/epoch_tracker_main.cc.i"
+ /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /workspace/NeuCoSVC/REAPER/epoch_tracker_main.cc > CMakeFiles/reaper.dir/epoch_tracker_main.cc.i
+
+CMakeFiles/reaper.dir/epoch_tracker_main.cc.s: cmake_force
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/reaper.dir/epoch_tracker_main.cc.s"
+ /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /workspace/NeuCoSVC/REAPER/epoch_tracker_main.cc -o CMakeFiles/reaper.dir/epoch_tracker_main.cc.s
+
+# Object files for target reaper
+reaper_OBJECTS = \
+"CMakeFiles/reaper.dir/epoch_tracker_main.cc.o"
+
+# External object files for target reaper
+reaper_EXTERNAL_OBJECTS =
+
+reaper: CMakeFiles/reaper.dir/epoch_tracker_main.cc.o
+reaper: CMakeFiles/reaper.dir/build.make
+reaper: libepoch_tracker.a
+reaper: libwave.a
+reaper: libcore.a
+reaper: CMakeFiles/reaper.dir/link.txt
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --bold --progress-dir=/workspace/NeuCoSVC/REAPER/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Linking CXX executable reaper"
+ $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/reaper.dir/link.txt --verbose=$(VERBOSE)
+
+# Rule to build all files generated by this target.
+CMakeFiles/reaper.dir/build: reaper
+.PHONY : CMakeFiles/reaper.dir/build
+
+CMakeFiles/reaper.dir/clean:
+ $(CMAKE_COMMAND) -P CMakeFiles/reaper.dir/cmake_clean.cmake
+.PHONY : CMakeFiles/reaper.dir/clean
+
+CMakeFiles/reaper.dir/depend:
+ cd /workspace/NeuCoSVC/REAPER/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /workspace/NeuCoSVC/REAPER /workspace/NeuCoSVC/REAPER /workspace/NeuCoSVC/REAPER/build /workspace/NeuCoSVC/REAPER/build /workspace/NeuCoSVC/REAPER/build/CMakeFiles/reaper.dir/DependInfo.cmake "--color=$(COLOR)"
+.PHONY : CMakeFiles/reaper.dir/depend
+
diff --git a/REAPER/build/CMakeFiles/reaper.dir/cmake_clean.cmake b/REAPER/build/CMakeFiles/reaper.dir/cmake_clean.cmake
new file mode 100644
index 0000000000000000000000000000000000000000..c2e2dbca88bd11782c2af2f12a79d20b47c6610f
--- /dev/null
+++ b/REAPER/build/CMakeFiles/reaper.dir/cmake_clean.cmake
@@ -0,0 +1,11 @@
+file(REMOVE_RECURSE
+ "CMakeFiles/reaper.dir/epoch_tracker_main.cc.o"
+ "CMakeFiles/reaper.dir/epoch_tracker_main.cc.o.d"
+ "reaper"
+ "reaper.pdb"
+)
+
+# Per-language clean rules from dependency scanning.
+foreach(lang CXX)
+ include(CMakeFiles/reaper.dir/cmake_clean_${lang}.cmake OPTIONAL)
+endforeach()
diff --git a/REAPER/build/CMakeFiles/reaper.dir/compiler_depend.make b/REAPER/build/CMakeFiles/reaper.dir/compiler_depend.make
new file mode 100644
index 0000000000000000000000000000000000000000..a63742159bcbc46eca9d55aa2e4c8d46b2a89eea
--- /dev/null
+++ b/REAPER/build/CMakeFiles/reaper.dir/compiler_depend.make
@@ -0,0 +1,2 @@
+# Empty compiler generated dependencies file for reaper.
+# This may be replaced when dependencies are built.
diff --git a/REAPER/build/CMakeFiles/reaper.dir/compiler_depend.ts b/REAPER/build/CMakeFiles/reaper.dir/compiler_depend.ts
new file mode 100644
index 0000000000000000000000000000000000000000..45643c2a862712af5abdd3b040241fa68f9ff279
--- /dev/null
+++ b/REAPER/build/CMakeFiles/reaper.dir/compiler_depend.ts
@@ -0,0 +1,2 @@
+# CMAKE generated file: DO NOT EDIT!
+# Timestamp file for compiler generated dependencies management for reaper.
diff --git a/REAPER/build/CMakeFiles/reaper.dir/depend.make b/REAPER/build/CMakeFiles/reaper.dir/depend.make
new file mode 100644
index 0000000000000000000000000000000000000000..3547a7b6ef5d64a161207bb9943d87c7f85bc3d9
--- /dev/null
+++ b/REAPER/build/CMakeFiles/reaper.dir/depend.make
@@ -0,0 +1,2 @@
+# Empty dependencies file for reaper.
+# This may be replaced when dependencies are built.
diff --git a/REAPER/build/CMakeFiles/reaper.dir/epoch_tracker_main.cc.o b/REAPER/build/CMakeFiles/reaper.dir/epoch_tracker_main.cc.o
new file mode 100644
index 0000000000000000000000000000000000000000..772caf0fc632fac1187dde6e8559dc8a3327fd57
Binary files /dev/null and b/REAPER/build/CMakeFiles/reaper.dir/epoch_tracker_main.cc.o differ
diff --git a/REAPER/build/CMakeFiles/reaper.dir/epoch_tracker_main.cc.o.d b/REAPER/build/CMakeFiles/reaper.dir/epoch_tracker_main.cc.o.d
new file mode 100644
index 0000000000000000000000000000000000000000..6f82882cd6ad5c5adb53a6eca6911a869a785e26
--- /dev/null
+++ b/REAPER/build/CMakeFiles/reaper.dir/epoch_tracker_main.cc.o.d
@@ -0,0 +1,155 @@
+CMakeFiles/reaper.dir/epoch_tracker_main.cc.o: \
+ /workspace/NeuCoSVC/REAPER/epoch_tracker_main.cc \
+ /usr/include/stdc-predef.h /usr/include/c++/9/memory \
+ /usr/include/c++/9/bits/stl_algobase.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/c++config.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/os_defines.h \
+ /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \
+ /usr/include/x86_64-linux-gnu/bits/wordsize.h \
+ /usr/include/x86_64-linux-gnu/bits/long-double.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/cpu_defines.h \
+ /usr/include/c++/9/bits/functexcept.h \
+ /usr/include/c++/9/bits/exception_defines.h \
+ /usr/include/c++/9/bits/cpp_type_traits.h \
+ /usr/include/c++/9/ext/type_traits.h \
+ /usr/include/c++/9/ext/numeric_traits.h \
+ /usr/include/c++/9/bits/stl_pair.h /usr/include/c++/9/bits/move.h \
+ /usr/include/c++/9/bits/concept_check.h /usr/include/c++/9/type_traits \
+ /usr/include/c++/9/bits/stl_iterator_base_types.h \
+ /usr/include/c++/9/bits/stl_iterator_base_funcs.h \
+ /usr/include/c++/9/debug/assertions.h \
+ /usr/include/c++/9/bits/stl_iterator.h \
+ /usr/include/c++/9/bits/ptr_traits.h /usr/include/c++/9/debug/debug.h \
+ /usr/include/c++/9/bits/predefined_ops.h \
+ /usr/include/c++/9/bits/allocator.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/c++allocator.h \
+ /usr/include/c++/9/ext/new_allocator.h /usr/include/c++/9/new \
+ /usr/include/c++/9/exception /usr/include/c++/9/bits/exception.h \
+ /usr/include/c++/9/bits/exception_ptr.h \
+ /usr/include/c++/9/bits/cxxabi_init_exception.h \
+ /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \
+ /usr/include/c++/9/typeinfo /usr/include/c++/9/bits/hash_bytes.h \
+ /usr/include/c++/9/bits/nested_exception.h \
+ /usr/include/c++/9/bits/memoryfwd.h \
+ /usr/include/c++/9/bits/stl_construct.h \
+ /usr/include/c++/9/ext/alloc_traits.h \
+ /usr/include/c++/9/bits/alloc_traits.h \
+ /usr/include/c++/9/bits/stl_uninitialized.h \
+ /usr/include/c++/9/bits/stl_tempbuf.h \
+ /usr/include/c++/9/bits/stl_raw_storage_iter.h /usr/include/c++/9/iosfwd \
+ /usr/include/c++/9/bits/stringfwd.h /usr/include/c++/9/bits/postypes.h \
+ /usr/include/c++/9/cwchar /usr/include/wchar.h \
+ /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \
+ /usr/include/x86_64-linux-gnu/bits/floatn.h \
+ /usr/include/x86_64-linux-gnu/bits/floatn-common.h \
+ /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \
+ /usr/include/x86_64-linux-gnu/bits/wchar.h \
+ /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \
+ /usr/include/x86_64-linux-gnu/bits/types/FILE.h \
+ /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \
+ /usr/include/c++/9/ext/atomicity.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/gthr.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h \
+ /usr/include/pthread.h /usr/include/sched.h \
+ /usr/include/x86_64-linux-gnu/bits/types.h \
+ /usr/include/x86_64-linux-gnu/bits/timesize.h \
+ /usr/include/x86_64-linux-gnu/bits/typesizes.h \
+ /usr/include/x86_64-linux-gnu/bits/time64.h \
+ /usr/include/x86_64-linux-gnu/bits/types/time_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \
+ /usr/include/x86_64-linux-gnu/bits/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/endianness.h \
+ /usr/include/x86_64-linux-gnu/bits/sched.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \
+ /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \
+ /usr/include/x86_64-linux-gnu/bits/time.h \
+ /usr/include/x86_64-linux-gnu/bits/timex.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \
+ /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \
+ /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \
+ /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \
+ /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \
+ /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \
+ /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \
+ /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \
+ /usr/include/x86_64-linux-gnu/bits/setjmp.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/atomic_word.h \
+ /usr/include/c++/9/ext/concurrence.h \
+ /usr/include/c++/9/bits/stl_function.h \
+ /usr/include/c++/9/backward/binders.h \
+ /usr/include/c++/9/bits/uses_allocator.h \
+ /usr/include/c++/9/bits/unique_ptr.h /usr/include/c++/9/utility \
+ /usr/include/c++/9/bits/stl_relops.h /usr/include/c++/9/initializer_list \
+ /usr/include/c++/9/tuple /usr/include/c++/9/array \
+ /usr/include/c++/9/stdexcept /usr/include/c++/9/string \
+ /usr/include/c++/9/bits/char_traits.h /usr/include/c++/9/cstdint \
+ /usr/lib/gcc/x86_64-linux-gnu/9/include/stdint.h /usr/include/stdint.h \
+ /usr/include/x86_64-linux-gnu/bits/stdint-intn.h \
+ /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \
+ /usr/include/c++/9/bits/localefwd.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/c++locale.h \
+ /usr/include/c++/9/clocale /usr/include/locale.h \
+ /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/9/cctype \
+ /usr/include/ctype.h /usr/include/c++/9/bits/ostream_insert.h \
+ /usr/include/c++/9/bits/cxxabi_forced.h \
+ /usr/include/c++/9/bits/range_access.h \
+ /usr/include/c++/9/bits/basic_string.h \
+ /usr/include/c++/9/ext/string_conversions.h /usr/include/c++/9/cstdlib \
+ /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \
+ /usr/include/x86_64-linux-gnu/bits/waitstatus.h \
+ /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/byteswap.h \
+ /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \
+ /usr/include/x86_64-linux-gnu/sys/select.h \
+ /usr/include/x86_64-linux-gnu/bits/select.h \
+ /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \
+ /usr/include/alloca.h /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \
+ /usr/include/c++/9/bits/std_abs.h /usr/include/c++/9/cstdio \
+ /usr/include/stdio.h /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \
+ /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \
+ /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \
+ /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \
+ /usr/include/c++/9/cerrno /usr/include/errno.h \
+ /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \
+ /usr/include/x86_64-linux-gnu/asm/errno.h \
+ /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+ /usr/include/x86_64-linux-gnu/bits/types/error_t.h \
+ /usr/include/c++/9/bits/functional_hash.h \
+ /usr/include/c++/9/bits/basic_string.tcc \
+ /usr/include/c++/9/bits/invoke.h /usr/include/c++/9/bits/shared_ptr.h \
+ /usr/include/c++/9/bits/shared_ptr_base.h \
+ /usr/include/c++/9/bits/allocated_ptr.h \
+ /usr/include/c++/9/bits/refwrap.h \
+ /usr/include/c++/9/ext/aligned_buffer.h \
+ /usr/include/c++/9/bits/shared_ptr_atomic.h \
+ /usr/include/c++/9/bits/atomic_base.h \
+ /usr/include/c++/9/bits/atomic_lockfree_defines.h \
+ /usr/include/c++/9/backward/auto_ptr.h /usr/include/unistd.h \
+ /usr/include/x86_64-linux-gnu/bits/posix_opt.h \
+ /usr/include/x86_64-linux-gnu/bits/environments.h \
+ /usr/include/x86_64-linux-gnu/bits/confname.h \
+ /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \
+ /usr/include/x86_64-linux-gnu/bits/getopt_core.h \
+ /usr/include/x86_64-linux-gnu/bits/unistd_ext.h \
+ /usr/include/c++/9/stdlib.h \
+ /workspace/NeuCoSVC/REAPER/core/file_resource.h \
+ /workspace/NeuCoSVC/REAPER/core/track.h /usr/include/c++/9/vector \
+ /usr/include/c++/9/bits/stl_vector.h \
+ /usr/include/c++/9/bits/stl_bvector.h /usr/include/c++/9/bits/vector.tcc \
+ /workspace/NeuCoSVC/REAPER/./core/file_resource.h \
+ /workspace/NeuCoSVC/REAPER/./core/float_matrix.h \
+ /workspace/NeuCoSVC/REAPER/./core/float_matrix-inl.h \
+ /workspace/NeuCoSVC/REAPER/epoch_tracker/epoch_tracker.h \
+ /workspace/NeuCoSVC/REAPER/wave/wave.h
diff --git a/REAPER/build/CMakeFiles/reaper.dir/flags.make b/REAPER/build/CMakeFiles/reaper.dir/flags.make
new file mode 100644
index 0000000000000000000000000000000000000000..caa0babcc66dd9763c7a4a6f645fce48ec746d89
--- /dev/null
+++ b/REAPER/build/CMakeFiles/reaper.dir/flags.make
@@ -0,0 +1,10 @@
+# CMAKE generated file: DO NOT EDIT!
+# Generated by "Unix Makefiles" Generator, CMake Version 3.28
+
+# compile CXX with /usr/bin/c++
+CXX_DEFINES =
+
+CXX_INCLUDES = -I/workspace/NeuCoSVC/REAPER/.
+
+CXX_FLAGS = -std=c++11
+
diff --git a/REAPER/build/CMakeFiles/reaper.dir/link.txt b/REAPER/build/CMakeFiles/reaper.dir/link.txt
new file mode 100644
index 0000000000000000000000000000000000000000..eb592595934e33db2577460ef633c13f14c03e90
--- /dev/null
+++ b/REAPER/build/CMakeFiles/reaper.dir/link.txt
@@ -0,0 +1 @@
+/usr/bin/c++ -std=c++11 -rdynamic CMakeFiles/reaper.dir/epoch_tracker_main.cc.o -o reaper libepoch_tracker.a libwave.a libcore.a
diff --git a/REAPER/build/CMakeFiles/reaper.dir/progress.make b/REAPER/build/CMakeFiles/reaper.dir/progress.make
new file mode 100644
index 0000000000000000000000000000000000000000..17875e3238da3ecdefe39c6875b6b441dc576689
--- /dev/null
+++ b/REAPER/build/CMakeFiles/reaper.dir/progress.make
@@ -0,0 +1,3 @@
+CMAKE_PROGRESS_1 = 10
+CMAKE_PROGRESS_2 = 11
+
diff --git a/REAPER/build/CMakeFiles/wave.dir/DependInfo.cmake b/REAPER/build/CMakeFiles/wave.dir/DependInfo.cmake
new file mode 100644
index 0000000000000000000000000000000000000000..0734f499bf05657929fc67225f32945d61c0e11b
--- /dev/null
+++ b/REAPER/build/CMakeFiles/wave.dir/DependInfo.cmake
@@ -0,0 +1,25 @@
+
+# Consider dependencies only in project.
+set(CMAKE_DEPENDS_IN_PROJECT_ONLY OFF)
+
+# The set of languages for which implicit dependencies are needed:
+set(CMAKE_DEPENDS_LANGUAGES
+ )
+
+# The set of dependency files which are needed:
+set(CMAKE_DEPENDS_DEPENDENCY_FILES
+ "/workspace/NeuCoSVC/REAPER/wave/codec_riff.cc" "CMakeFiles/wave.dir/wave/codec_riff.cc.o" "gcc" "CMakeFiles/wave.dir/wave/codec_riff.cc.o.d"
+ "/workspace/NeuCoSVC/REAPER/wave/wave.cc" "CMakeFiles/wave.dir/wave/wave.cc.o" "gcc" "CMakeFiles/wave.dir/wave/wave.cc.o.d"
+ "/workspace/NeuCoSVC/REAPER/wave/wave_io.cc" "CMakeFiles/wave.dir/wave/wave_io.cc.o" "gcc" "CMakeFiles/wave.dir/wave/wave_io.cc.o.d"
+ )
+
+# Targets to which this target links which contain Fortran sources.
+set(CMAKE_Fortran_TARGET_LINKED_INFO_FILES
+ )
+
+# Targets to which this target links which contain Fortran sources.
+set(CMAKE_Fortran_TARGET_FORWARD_LINKED_INFO_FILES
+ )
+
+# Fortran module output directory.
+set(CMAKE_Fortran_TARGET_MODULE_DIR "")
diff --git a/REAPER/build/CMakeFiles/wave.dir/build.make b/REAPER/build/CMakeFiles/wave.dir/build.make
new file mode 100644
index 0000000000000000000000000000000000000000..c507652c7833e7afb728493957dd1c654f6a8a48
--- /dev/null
+++ b/REAPER/build/CMakeFiles/wave.dir/build.make
@@ -0,0 +1,143 @@
+# CMAKE generated file: DO NOT EDIT!
+# Generated by "Unix Makefiles" Generator, CMake Version 3.28
+
+# Delete rule output on recipe failure.
+.DELETE_ON_ERROR:
+
+#=============================================================================
+# Special targets provided by cmake.
+
+# Disable implicit rules so canonical targets will work.
+.SUFFIXES:
+
+# Disable VCS-based implicit rules.
+% : %,v
+
+# Disable VCS-based implicit rules.
+% : RCS/%
+
+# Disable VCS-based implicit rules.
+% : RCS/%,v
+
+# Disable VCS-based implicit rules.
+% : SCCS/s.%
+
+# Disable VCS-based implicit rules.
+% : s.%
+
+.SUFFIXES: .hpux_make_needs_suffix_list
+
+# Command-line flag to silence nested $(MAKE).
+$(VERBOSE)MAKESILENT = -s
+
+#Suppress display of executed commands.
+$(VERBOSE).SILENT:
+
+# A target that is always out of date.
+cmake_force:
+.PHONY : cmake_force
+
+#=============================================================================
+# Set environment variables for the build.
+
+# The shell in which to execute make rules.
+SHELL = /bin/sh
+
+# The CMake executable.
+CMAKE_COMMAND = /opt/conda/lib/python3.10/site-packages/cmake/data/bin/cmake
+
+# The command to remove a file.
+RM = /opt/conda/lib/python3.10/site-packages/cmake/data/bin/cmake -E rm -f
+
+# Escaping for special characters.
+EQUALS = =
+
+# The top-level source directory on which CMake was run.
+CMAKE_SOURCE_DIR = /workspace/NeuCoSVC/REAPER
+
+# The top-level build directory on which CMake was run.
+CMAKE_BINARY_DIR = /workspace/NeuCoSVC/REAPER/build
+
+# Include any dependencies generated for this target.
+include CMakeFiles/wave.dir/depend.make
+# Include any dependencies generated by the compiler for this target.
+include CMakeFiles/wave.dir/compiler_depend.make
+
+# Include the progress variables for this target.
+include CMakeFiles/wave.dir/progress.make
+
+# Include the compile flags for this target's objects.
+include CMakeFiles/wave.dir/flags.make
+
+CMakeFiles/wave.dir/wave/codec_riff.cc.o: CMakeFiles/wave.dir/flags.make
+CMakeFiles/wave.dir/wave/codec_riff.cc.o: /workspace/NeuCoSVC/REAPER/wave/codec_riff.cc
+CMakeFiles/wave.dir/wave/codec_riff.cc.o: CMakeFiles/wave.dir/compiler_depend.ts
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/workspace/NeuCoSVC/REAPER/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building CXX object CMakeFiles/wave.dir/wave/codec_riff.cc.o"
+ /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/wave.dir/wave/codec_riff.cc.o -MF CMakeFiles/wave.dir/wave/codec_riff.cc.o.d -o CMakeFiles/wave.dir/wave/codec_riff.cc.o -c /workspace/NeuCoSVC/REAPER/wave/codec_riff.cc
+
+CMakeFiles/wave.dir/wave/codec_riff.cc.i: cmake_force
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/wave.dir/wave/codec_riff.cc.i"
+ /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /workspace/NeuCoSVC/REAPER/wave/codec_riff.cc > CMakeFiles/wave.dir/wave/codec_riff.cc.i
+
+CMakeFiles/wave.dir/wave/codec_riff.cc.s: cmake_force
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/wave.dir/wave/codec_riff.cc.s"
+ /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /workspace/NeuCoSVC/REAPER/wave/codec_riff.cc -o CMakeFiles/wave.dir/wave/codec_riff.cc.s
+
+CMakeFiles/wave.dir/wave/wave.cc.o: CMakeFiles/wave.dir/flags.make
+CMakeFiles/wave.dir/wave/wave.cc.o: /workspace/NeuCoSVC/REAPER/wave/wave.cc
+CMakeFiles/wave.dir/wave/wave.cc.o: CMakeFiles/wave.dir/compiler_depend.ts
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/workspace/NeuCoSVC/REAPER/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Building CXX object CMakeFiles/wave.dir/wave/wave.cc.o"
+ /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/wave.dir/wave/wave.cc.o -MF CMakeFiles/wave.dir/wave/wave.cc.o.d -o CMakeFiles/wave.dir/wave/wave.cc.o -c /workspace/NeuCoSVC/REAPER/wave/wave.cc
+
+CMakeFiles/wave.dir/wave/wave.cc.i: cmake_force
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/wave.dir/wave/wave.cc.i"
+ /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /workspace/NeuCoSVC/REAPER/wave/wave.cc > CMakeFiles/wave.dir/wave/wave.cc.i
+
+CMakeFiles/wave.dir/wave/wave.cc.s: cmake_force
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/wave.dir/wave/wave.cc.s"
+ /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /workspace/NeuCoSVC/REAPER/wave/wave.cc -o CMakeFiles/wave.dir/wave/wave.cc.s
+
+CMakeFiles/wave.dir/wave/wave_io.cc.o: CMakeFiles/wave.dir/flags.make
+CMakeFiles/wave.dir/wave/wave_io.cc.o: /workspace/NeuCoSVC/REAPER/wave/wave_io.cc
+CMakeFiles/wave.dir/wave/wave_io.cc.o: CMakeFiles/wave.dir/compiler_depend.ts
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/workspace/NeuCoSVC/REAPER/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_3) "Building CXX object CMakeFiles/wave.dir/wave/wave_io.cc.o"
+ /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/wave.dir/wave/wave_io.cc.o -MF CMakeFiles/wave.dir/wave/wave_io.cc.o.d -o CMakeFiles/wave.dir/wave/wave_io.cc.o -c /workspace/NeuCoSVC/REAPER/wave/wave_io.cc
+
+CMakeFiles/wave.dir/wave/wave_io.cc.i: cmake_force
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/wave.dir/wave/wave_io.cc.i"
+ /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /workspace/NeuCoSVC/REAPER/wave/wave_io.cc > CMakeFiles/wave.dir/wave/wave_io.cc.i
+
+CMakeFiles/wave.dir/wave/wave_io.cc.s: cmake_force
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/wave.dir/wave/wave_io.cc.s"
+ /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /workspace/NeuCoSVC/REAPER/wave/wave_io.cc -o CMakeFiles/wave.dir/wave/wave_io.cc.s
+
+# Object files for target wave
+wave_OBJECTS = \
+"CMakeFiles/wave.dir/wave/codec_riff.cc.o" \
+"CMakeFiles/wave.dir/wave/wave.cc.o" \
+"CMakeFiles/wave.dir/wave/wave_io.cc.o"
+
+# External object files for target wave
+wave_EXTERNAL_OBJECTS =
+
+libwave.a: CMakeFiles/wave.dir/wave/codec_riff.cc.o
+libwave.a: CMakeFiles/wave.dir/wave/wave.cc.o
+libwave.a: CMakeFiles/wave.dir/wave/wave_io.cc.o
+libwave.a: CMakeFiles/wave.dir/build.make
+libwave.a: CMakeFiles/wave.dir/link.txt
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --bold --progress-dir=/workspace/NeuCoSVC/REAPER/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_4) "Linking CXX static library libwave.a"
+ $(CMAKE_COMMAND) -P CMakeFiles/wave.dir/cmake_clean_target.cmake
+ $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/wave.dir/link.txt --verbose=$(VERBOSE)
+
+# Rule to build all files generated by this target.
+CMakeFiles/wave.dir/build: libwave.a
+.PHONY : CMakeFiles/wave.dir/build
+
+CMakeFiles/wave.dir/clean:
+ $(CMAKE_COMMAND) -P CMakeFiles/wave.dir/cmake_clean.cmake
+.PHONY : CMakeFiles/wave.dir/clean
+
+CMakeFiles/wave.dir/depend:
+ cd /workspace/NeuCoSVC/REAPER/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /workspace/NeuCoSVC/REAPER /workspace/NeuCoSVC/REAPER /workspace/NeuCoSVC/REAPER/build /workspace/NeuCoSVC/REAPER/build /workspace/NeuCoSVC/REAPER/build/CMakeFiles/wave.dir/DependInfo.cmake "--color=$(COLOR)"
+.PHONY : CMakeFiles/wave.dir/depend
+
diff --git a/REAPER/build/CMakeFiles/wave.dir/cmake_clean.cmake b/REAPER/build/CMakeFiles/wave.dir/cmake_clean.cmake
new file mode 100644
index 0000000000000000000000000000000000000000..60e16089d7c52c347fb1c4b0e15584bf171d7bb4
--- /dev/null
+++ b/REAPER/build/CMakeFiles/wave.dir/cmake_clean.cmake
@@ -0,0 +1,15 @@
+file(REMOVE_RECURSE
+ "CMakeFiles/wave.dir/wave/codec_riff.cc.o"
+ "CMakeFiles/wave.dir/wave/codec_riff.cc.o.d"
+ "CMakeFiles/wave.dir/wave/wave.cc.o"
+ "CMakeFiles/wave.dir/wave/wave.cc.o.d"
+ "CMakeFiles/wave.dir/wave/wave_io.cc.o"
+ "CMakeFiles/wave.dir/wave/wave_io.cc.o.d"
+ "libwave.a"
+ "libwave.pdb"
+)
+
+# Per-language clean rules from dependency scanning.
+foreach(lang CXX)
+ include(CMakeFiles/wave.dir/cmake_clean_${lang}.cmake OPTIONAL)
+endforeach()
diff --git a/REAPER/build/CMakeFiles/wave.dir/cmake_clean_target.cmake b/REAPER/build/CMakeFiles/wave.dir/cmake_clean_target.cmake
new file mode 100644
index 0000000000000000000000000000000000000000..04321a91a15e2273b6f7d39be3155e0c412745e5
--- /dev/null
+++ b/REAPER/build/CMakeFiles/wave.dir/cmake_clean_target.cmake
@@ -0,0 +1,3 @@
+file(REMOVE_RECURSE
+ "libwave.a"
+)
diff --git a/REAPER/build/CMakeFiles/wave.dir/compiler_depend.make b/REAPER/build/CMakeFiles/wave.dir/compiler_depend.make
new file mode 100644
index 0000000000000000000000000000000000000000..8ea0b5e1428762de877dbdb0e6e94e5005f5d22d
--- /dev/null
+++ b/REAPER/build/CMakeFiles/wave.dir/compiler_depend.make
@@ -0,0 +1,2 @@
+# Empty compiler generated dependencies file for wave.
+# This may be replaced when dependencies are built.
diff --git a/REAPER/build/CMakeFiles/wave.dir/compiler_depend.ts b/REAPER/build/CMakeFiles/wave.dir/compiler_depend.ts
new file mode 100644
index 0000000000000000000000000000000000000000..13fd1d8d3651c8c17ad51a112917ec8d3ec07582
--- /dev/null
+++ b/REAPER/build/CMakeFiles/wave.dir/compiler_depend.ts
@@ -0,0 +1,2 @@
+# CMAKE generated file: DO NOT EDIT!
+# Timestamp file for compiler generated dependencies management for wave.
diff --git a/REAPER/build/CMakeFiles/wave.dir/depend.make b/REAPER/build/CMakeFiles/wave.dir/depend.make
new file mode 100644
index 0000000000000000000000000000000000000000..aca36073baed5f80498f90a023ceb2ca6d5e2ea7
--- /dev/null
+++ b/REAPER/build/CMakeFiles/wave.dir/depend.make
@@ -0,0 +1,2 @@
+# Empty dependencies file for wave.
+# This may be replaced when dependencies are built.
diff --git a/REAPER/build/CMakeFiles/wave.dir/flags.make b/REAPER/build/CMakeFiles/wave.dir/flags.make
new file mode 100644
index 0000000000000000000000000000000000000000..caa0babcc66dd9763c7a4a6f645fce48ec746d89
--- /dev/null
+++ b/REAPER/build/CMakeFiles/wave.dir/flags.make
@@ -0,0 +1,10 @@
+# CMAKE generated file: DO NOT EDIT!
+# Generated by "Unix Makefiles" Generator, CMake Version 3.28
+
+# compile CXX with /usr/bin/c++
+CXX_DEFINES =
+
+CXX_INCLUDES = -I/workspace/NeuCoSVC/REAPER/.
+
+CXX_FLAGS = -std=c++11
+
diff --git a/REAPER/build/CMakeFiles/wave.dir/link.txt b/REAPER/build/CMakeFiles/wave.dir/link.txt
new file mode 100644
index 0000000000000000000000000000000000000000..acdbe2c9717302cfe17b3c88ddf7617a56b2d3f3
--- /dev/null
+++ b/REAPER/build/CMakeFiles/wave.dir/link.txt
@@ -0,0 +1,2 @@
+/usr/bin/ar qc libwave.a CMakeFiles/wave.dir/wave/codec_riff.cc.o CMakeFiles/wave.dir/wave/wave.cc.o CMakeFiles/wave.dir/wave/wave_io.cc.o
+/usr/bin/ranlib libwave.a
diff --git a/REAPER/build/CMakeFiles/wave.dir/progress.make b/REAPER/build/CMakeFiles/wave.dir/progress.make
new file mode 100644
index 0000000000000000000000000000000000000000..3938ebe59acc5fbdda79ddd3fd2933d0f80bb4b2
--- /dev/null
+++ b/REAPER/build/CMakeFiles/wave.dir/progress.make
@@ -0,0 +1,5 @@
+CMAKE_PROGRESS_1 = 12
+CMAKE_PROGRESS_2 = 13
+CMAKE_PROGRESS_3 = 14
+CMAKE_PROGRESS_4 = 15
+
diff --git a/REAPER/build/CMakeFiles/wave.dir/wave/codec_riff.cc.o b/REAPER/build/CMakeFiles/wave.dir/wave/codec_riff.cc.o
new file mode 100644
index 0000000000000000000000000000000000000000..370db1add499cb8d54d45afc6e0eeb9ce516169a
Binary files /dev/null and b/REAPER/build/CMakeFiles/wave.dir/wave/codec_riff.cc.o differ
diff --git a/REAPER/build/CMakeFiles/wave.dir/wave/codec_riff.cc.o.d b/REAPER/build/CMakeFiles/wave.dir/wave/codec_riff.cc.o.d
new file mode 100644
index 0000000000000000000000000000000000000000..0ace83f5fd7293cefb1bd3d389ffc6aa0ff58d68
--- /dev/null
+++ b/REAPER/build/CMakeFiles/wave.dir/wave/codec_riff.cc.o.d
@@ -0,0 +1,128 @@
+CMakeFiles/wave.dir/wave/codec_riff.cc.o: \
+ /workspace/NeuCoSVC/REAPER/wave/codec_riff.cc /usr/include/stdc-predef.h \
+ /workspace/NeuCoSVC/REAPER/./wave/codec_riff.h \
+ /usr/lib/gcc/x86_64-linux-gnu/9/include/stdint.h /usr/include/stdint.h \
+ /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \
+ /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \
+ /usr/include/x86_64-linux-gnu/bits/wordsize.h \
+ /usr/include/x86_64-linux-gnu/bits/long-double.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
+ /usr/include/x86_64-linux-gnu/bits/types.h \
+ /usr/include/x86_64-linux-gnu/bits/timesize.h \
+ /usr/include/x86_64-linux-gnu/bits/typesizes.h \
+ /usr/include/x86_64-linux-gnu/bits/time64.h \
+ /usr/include/x86_64-linux-gnu/bits/wchar.h \
+ /usr/include/x86_64-linux-gnu/bits/stdint-intn.h \
+ /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \
+ /usr/include/c++/9/string \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/c++config.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/os_defines.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/cpu_defines.h \
+ /usr/include/c++/9/bits/stringfwd.h /usr/include/c++/9/bits/memoryfwd.h \
+ /usr/include/c++/9/bits/char_traits.h \
+ /usr/include/c++/9/bits/stl_algobase.h \
+ /usr/include/c++/9/bits/functexcept.h \
+ /usr/include/c++/9/bits/exception_defines.h \
+ /usr/include/c++/9/bits/cpp_type_traits.h \
+ /usr/include/c++/9/ext/type_traits.h \
+ /usr/include/c++/9/ext/numeric_traits.h \
+ /usr/include/c++/9/bits/stl_pair.h /usr/include/c++/9/bits/move.h \
+ /usr/include/c++/9/bits/concept_check.h /usr/include/c++/9/type_traits \
+ /usr/include/c++/9/bits/stl_iterator_base_types.h \
+ /usr/include/c++/9/bits/stl_iterator_base_funcs.h \
+ /usr/include/c++/9/debug/assertions.h \
+ /usr/include/c++/9/bits/stl_iterator.h \
+ /usr/include/c++/9/bits/ptr_traits.h /usr/include/c++/9/debug/debug.h \
+ /usr/include/c++/9/bits/predefined_ops.h \
+ /usr/include/c++/9/bits/postypes.h /usr/include/c++/9/cwchar \
+ /usr/include/wchar.h /usr/include/x86_64-linux-gnu/bits/floatn.h \
+ /usr/include/x86_64-linux-gnu/bits/floatn-common.h \
+ /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \
+ /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \
+ /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \
+ /usr/include/x86_64-linux-gnu/bits/types/FILE.h \
+ /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \
+ /usr/include/c++/9/cstdint /usr/include/c++/9/bits/allocator.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/c++allocator.h \
+ /usr/include/c++/9/ext/new_allocator.h /usr/include/c++/9/new \
+ /usr/include/c++/9/exception /usr/include/c++/9/bits/exception.h \
+ /usr/include/c++/9/bits/exception_ptr.h \
+ /usr/include/c++/9/bits/cxxabi_init_exception.h \
+ /usr/include/c++/9/typeinfo /usr/include/c++/9/bits/hash_bytes.h \
+ /usr/include/c++/9/bits/nested_exception.h \
+ /usr/include/c++/9/bits/localefwd.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/c++locale.h \
+ /usr/include/c++/9/clocale /usr/include/locale.h \
+ /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/9/iosfwd \
+ /usr/include/c++/9/cctype /usr/include/ctype.h \
+ /usr/include/x86_64-linux-gnu/bits/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/endianness.h \
+ /usr/include/c++/9/bits/ostream_insert.h \
+ /usr/include/c++/9/bits/cxxabi_forced.h \
+ /usr/include/c++/9/bits/stl_function.h \
+ /usr/include/c++/9/backward/binders.h \
+ /usr/include/c++/9/bits/range_access.h \
+ /usr/include/c++/9/initializer_list \
+ /usr/include/c++/9/bits/basic_string.h \
+ /usr/include/c++/9/ext/atomicity.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/gthr.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h \
+ /usr/include/pthread.h /usr/include/sched.h \
+ /usr/include/x86_64-linux-gnu/bits/types/time_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \
+ /usr/include/x86_64-linux-gnu/bits/sched.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \
+ /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \
+ /usr/include/x86_64-linux-gnu/bits/time.h \
+ /usr/include/x86_64-linux-gnu/bits/timex.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \
+ /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \
+ /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \
+ /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \
+ /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \
+ /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \
+ /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \
+ /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \
+ /usr/include/x86_64-linux-gnu/bits/setjmp.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/atomic_word.h \
+ /usr/include/c++/9/ext/alloc_traits.h \
+ /usr/include/c++/9/bits/alloc_traits.h \
+ /usr/include/c++/9/ext/string_conversions.h /usr/include/c++/9/cstdlib \
+ /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \
+ /usr/include/x86_64-linux-gnu/bits/waitstatus.h \
+ /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/byteswap.h \
+ /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \
+ /usr/include/x86_64-linux-gnu/sys/select.h \
+ /usr/include/x86_64-linux-gnu/bits/select.h \
+ /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \
+ /usr/include/alloca.h /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \
+ /usr/include/c++/9/bits/std_abs.h /usr/include/c++/9/cstdio \
+ /usr/include/stdio.h /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \
+ /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \
+ /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \
+ /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \
+ /usr/include/c++/9/cerrno /usr/include/errno.h \
+ /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \
+ /usr/include/x86_64-linux-gnu/asm/errno.h \
+ /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+ /usr/include/x86_64-linux-gnu/bits/types/error_t.h \
+ /usr/include/c++/9/bits/functional_hash.h \
+ /usr/include/c++/9/bits/basic_string.tcc /usr/include/c++/9/vector \
+ /usr/include/c++/9/bits/stl_construct.h \
+ /usr/include/c++/9/bits/stl_uninitialized.h \
+ /usr/include/c++/9/bits/stl_vector.h \
+ /usr/include/c++/9/bits/stl_bvector.h /usr/include/c++/9/bits/vector.tcc \
+ /usr/include/c++/9/limits \
+ /workspace/NeuCoSVC/REAPER/./core/file_resource.h
diff --git a/REAPER/build/CMakeFiles/wave.dir/wave/wave.cc.o b/REAPER/build/CMakeFiles/wave.dir/wave/wave.cc.o
new file mode 100644
index 0000000000000000000000000000000000000000..a67af2991c895865300630528f35c3d87f66b0ad
Binary files /dev/null and b/REAPER/build/CMakeFiles/wave.dir/wave/wave.cc.o differ
diff --git a/REAPER/build/CMakeFiles/wave.dir/wave/wave.cc.o.d b/REAPER/build/CMakeFiles/wave.dir/wave/wave.cc.o.d
new file mode 100644
index 0000000000000000000000000000000000000000..da42a08420ab3d5d90f190bb1112b33ec1c6f2b9
--- /dev/null
+++ b/REAPER/build/CMakeFiles/wave.dir/wave/wave.cc.o.d
@@ -0,0 +1,134 @@
+CMakeFiles/wave.dir/wave/wave.cc.o: \
+ /workspace/NeuCoSVC/REAPER/wave/wave.cc /usr/include/stdc-predef.h \
+ /workspace/NeuCoSVC/REAPER/./wave/wave.h \
+ /workspace/NeuCoSVC/REAPER/./core/file_resource.h /usr/include/stdio.h \
+ /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \
+ /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \
+ /usr/include/x86_64-linux-gnu/bits/wordsize.h \
+ /usr/include/x86_64-linux-gnu/bits/long-double.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
+ /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \
+ /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \
+ /usr/include/x86_64-linux-gnu/bits/types.h \
+ /usr/include/x86_64-linux-gnu/bits/timesize.h \
+ /usr/include/x86_64-linux-gnu/bits/typesizes.h \
+ /usr/include/x86_64-linux-gnu/bits/time64.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \
+ /usr/include/x86_64-linux-gnu/bits/types/FILE.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \
+ /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \
+ /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \
+ /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \
+ /usr/include/c++/9/string \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/c++config.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/os_defines.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/cpu_defines.h \
+ /usr/include/c++/9/bits/stringfwd.h /usr/include/c++/9/bits/memoryfwd.h \
+ /usr/include/c++/9/bits/char_traits.h \
+ /usr/include/c++/9/bits/stl_algobase.h \
+ /usr/include/c++/9/bits/functexcept.h \
+ /usr/include/c++/9/bits/exception_defines.h \
+ /usr/include/c++/9/bits/cpp_type_traits.h \
+ /usr/include/c++/9/ext/type_traits.h \
+ /usr/include/c++/9/ext/numeric_traits.h \
+ /usr/include/c++/9/bits/stl_pair.h /usr/include/c++/9/bits/move.h \
+ /usr/include/c++/9/bits/concept_check.h /usr/include/c++/9/type_traits \
+ /usr/include/c++/9/bits/stl_iterator_base_types.h \
+ /usr/include/c++/9/bits/stl_iterator_base_funcs.h \
+ /usr/include/c++/9/debug/assertions.h \
+ /usr/include/c++/9/bits/stl_iterator.h \
+ /usr/include/c++/9/bits/ptr_traits.h /usr/include/c++/9/debug/debug.h \
+ /usr/include/c++/9/bits/predefined_ops.h \
+ /usr/include/c++/9/bits/postypes.h /usr/include/c++/9/cwchar \
+ /usr/include/wchar.h /usr/include/x86_64-linux-gnu/bits/floatn.h \
+ /usr/include/x86_64-linux-gnu/bits/floatn-common.h \
+ /usr/include/x86_64-linux-gnu/bits/wchar.h \
+ /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \
+ /usr/include/c++/9/cstdint \
+ /usr/lib/gcc/x86_64-linux-gnu/9/include/stdint.h /usr/include/stdint.h \
+ /usr/include/x86_64-linux-gnu/bits/stdint-intn.h \
+ /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \
+ /usr/include/c++/9/bits/allocator.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/c++allocator.h \
+ /usr/include/c++/9/ext/new_allocator.h /usr/include/c++/9/new \
+ /usr/include/c++/9/exception /usr/include/c++/9/bits/exception.h \
+ /usr/include/c++/9/bits/exception_ptr.h \
+ /usr/include/c++/9/bits/cxxabi_init_exception.h \
+ /usr/include/c++/9/typeinfo /usr/include/c++/9/bits/hash_bytes.h \
+ /usr/include/c++/9/bits/nested_exception.h \
+ /usr/include/c++/9/bits/localefwd.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/c++locale.h \
+ /usr/include/c++/9/clocale /usr/include/locale.h \
+ /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/9/iosfwd \
+ /usr/include/c++/9/cctype /usr/include/ctype.h \
+ /usr/include/x86_64-linux-gnu/bits/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/endianness.h \
+ /usr/include/c++/9/bits/ostream_insert.h \
+ /usr/include/c++/9/bits/cxxabi_forced.h \
+ /usr/include/c++/9/bits/stl_function.h \
+ /usr/include/c++/9/backward/binders.h \
+ /usr/include/c++/9/bits/range_access.h \
+ /usr/include/c++/9/initializer_list \
+ /usr/include/c++/9/bits/basic_string.h \
+ /usr/include/c++/9/ext/atomicity.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/gthr.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h \
+ /usr/include/pthread.h /usr/include/sched.h \
+ /usr/include/x86_64-linux-gnu/bits/types/time_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \
+ /usr/include/x86_64-linux-gnu/bits/sched.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \
+ /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \
+ /usr/include/x86_64-linux-gnu/bits/time.h \
+ /usr/include/x86_64-linux-gnu/bits/timex.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \
+ /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \
+ /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \
+ /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \
+ /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \
+ /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \
+ /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \
+ /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \
+ /usr/include/x86_64-linux-gnu/bits/setjmp.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/atomic_word.h \
+ /usr/include/c++/9/ext/alloc_traits.h \
+ /usr/include/c++/9/bits/alloc_traits.h \
+ /usr/include/c++/9/ext/string_conversions.h /usr/include/c++/9/cstdlib \
+ /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \
+ /usr/include/x86_64-linux-gnu/bits/waitstatus.h \
+ /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/byteswap.h \
+ /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \
+ /usr/include/x86_64-linux-gnu/sys/select.h \
+ /usr/include/x86_64-linux-gnu/bits/select.h \
+ /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \
+ /usr/include/alloca.h /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \
+ /usr/include/c++/9/bits/std_abs.h /usr/include/c++/9/cstdio \
+ /usr/include/c++/9/cerrno /usr/include/errno.h \
+ /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \
+ /usr/include/x86_64-linux-gnu/asm/errno.h \
+ /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+ /usr/include/x86_64-linux-gnu/bits/types/error_t.h \
+ /usr/include/c++/9/bits/functional_hash.h \
+ /usr/include/c++/9/bits/basic_string.tcc /usr/include/c++/9/vector \
+ /usr/include/c++/9/bits/stl_construct.h \
+ /usr/include/c++/9/bits/stl_uninitialized.h \
+ /usr/include/c++/9/bits/stl_vector.h \
+ /usr/include/c++/9/bits/stl_bvector.h /usr/include/c++/9/bits/vector.tcc \
+ /usr/include/c++/9/limits /usr/include/c++/9/stdlib.h \
+ /workspace/NeuCoSVC/REAPER/./wave/wave_io.h \
+ /workspace/NeuCoSVC/REAPER/./wave/codec_api.h \
+ /workspace/NeuCoSVC/REAPER/./wave/codec_riff.h \
+ /workspace/NeuCoSVC/REAPER/./wave/codec_api-inl.h \
+ /workspace/NeuCoSVC/REAPER/./wave/wave_io-inl.h
diff --git a/REAPER/build/CMakeFiles/wave.dir/wave/wave_io.cc.o b/REAPER/build/CMakeFiles/wave.dir/wave/wave_io.cc.o
new file mode 100644
index 0000000000000000000000000000000000000000..5423a1c4091543ab293c5bbddcad1067d6135dd7
Binary files /dev/null and b/REAPER/build/CMakeFiles/wave.dir/wave/wave_io.cc.o differ
diff --git a/REAPER/build/CMakeFiles/wave.dir/wave/wave_io.cc.o.d b/REAPER/build/CMakeFiles/wave.dir/wave/wave_io.cc.o.d
new file mode 100644
index 0000000000000000000000000000000000000000..2616d898391e6307953cbe14c303fb33f0356854
--- /dev/null
+++ b/REAPER/build/CMakeFiles/wave.dir/wave/wave_io.cc.o.d
@@ -0,0 +1,132 @@
+CMakeFiles/wave.dir/wave/wave_io.cc.o: \
+ /workspace/NeuCoSVC/REAPER/wave/wave_io.cc /usr/include/stdc-predef.h \
+ /workspace/NeuCoSVC/REAPER/./wave/wave_io.h \
+ /workspace/NeuCoSVC/REAPER/./wave/codec_api.h \
+ /usr/lib/gcc/x86_64-linux-gnu/9/include/stdint.h /usr/include/stdint.h \
+ /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \
+ /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \
+ /usr/include/x86_64-linux-gnu/bits/wordsize.h \
+ /usr/include/x86_64-linux-gnu/bits/long-double.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
+ /usr/include/x86_64-linux-gnu/bits/types.h \
+ /usr/include/x86_64-linux-gnu/bits/timesize.h \
+ /usr/include/x86_64-linux-gnu/bits/typesizes.h \
+ /usr/include/x86_64-linux-gnu/bits/time64.h \
+ /usr/include/x86_64-linux-gnu/bits/wchar.h \
+ /usr/include/x86_64-linux-gnu/bits/stdint-intn.h \
+ /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \
+ /usr/include/c++/9/string \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/c++config.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/os_defines.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/cpu_defines.h \
+ /usr/include/c++/9/bits/stringfwd.h /usr/include/c++/9/bits/memoryfwd.h \
+ /usr/include/c++/9/bits/char_traits.h \
+ /usr/include/c++/9/bits/stl_algobase.h \
+ /usr/include/c++/9/bits/functexcept.h \
+ /usr/include/c++/9/bits/exception_defines.h \
+ /usr/include/c++/9/bits/cpp_type_traits.h \
+ /usr/include/c++/9/ext/type_traits.h \
+ /usr/include/c++/9/ext/numeric_traits.h \
+ /usr/include/c++/9/bits/stl_pair.h /usr/include/c++/9/bits/move.h \
+ /usr/include/c++/9/bits/concept_check.h /usr/include/c++/9/type_traits \
+ /usr/include/c++/9/bits/stl_iterator_base_types.h \
+ /usr/include/c++/9/bits/stl_iterator_base_funcs.h \
+ /usr/include/c++/9/debug/assertions.h \
+ /usr/include/c++/9/bits/stl_iterator.h \
+ /usr/include/c++/9/bits/ptr_traits.h /usr/include/c++/9/debug/debug.h \
+ /usr/include/c++/9/bits/predefined_ops.h \
+ /usr/include/c++/9/bits/postypes.h /usr/include/c++/9/cwchar \
+ /usr/include/wchar.h /usr/include/x86_64-linux-gnu/bits/floatn.h \
+ /usr/include/x86_64-linux-gnu/bits/floatn-common.h \
+ /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \
+ /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \
+ /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \
+ /usr/include/x86_64-linux-gnu/bits/types/FILE.h \
+ /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \
+ /usr/include/c++/9/cstdint /usr/include/c++/9/bits/allocator.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/c++allocator.h \
+ /usr/include/c++/9/ext/new_allocator.h /usr/include/c++/9/new \
+ /usr/include/c++/9/exception /usr/include/c++/9/bits/exception.h \
+ /usr/include/c++/9/bits/exception_ptr.h \
+ /usr/include/c++/9/bits/cxxabi_init_exception.h \
+ /usr/include/c++/9/typeinfo /usr/include/c++/9/bits/hash_bytes.h \
+ /usr/include/c++/9/bits/nested_exception.h \
+ /usr/include/c++/9/bits/localefwd.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/c++locale.h \
+ /usr/include/c++/9/clocale /usr/include/locale.h \
+ /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/9/iosfwd \
+ /usr/include/c++/9/cctype /usr/include/ctype.h \
+ /usr/include/x86_64-linux-gnu/bits/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/endianness.h \
+ /usr/include/c++/9/bits/ostream_insert.h \
+ /usr/include/c++/9/bits/cxxabi_forced.h \
+ /usr/include/c++/9/bits/stl_function.h \
+ /usr/include/c++/9/backward/binders.h \
+ /usr/include/c++/9/bits/range_access.h \
+ /usr/include/c++/9/initializer_list \
+ /usr/include/c++/9/bits/basic_string.h \
+ /usr/include/c++/9/ext/atomicity.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/gthr.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h \
+ /usr/include/pthread.h /usr/include/sched.h \
+ /usr/include/x86_64-linux-gnu/bits/types/time_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \
+ /usr/include/x86_64-linux-gnu/bits/sched.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \
+ /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \
+ /usr/include/x86_64-linux-gnu/bits/time.h \
+ /usr/include/x86_64-linux-gnu/bits/timex.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \
+ /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \
+ /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \
+ /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \
+ /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \
+ /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \
+ /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \
+ /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \
+ /usr/include/x86_64-linux-gnu/bits/setjmp.h \
+ /usr/include/x86_64-linux-gnu/c++/9/bits/atomic_word.h \
+ /usr/include/c++/9/ext/alloc_traits.h \
+ /usr/include/c++/9/bits/alloc_traits.h \
+ /usr/include/c++/9/ext/string_conversions.h /usr/include/c++/9/cstdlib \
+ /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \
+ /usr/include/x86_64-linux-gnu/bits/waitstatus.h \
+ /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/byteswap.h \
+ /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \
+ /usr/include/x86_64-linux-gnu/sys/select.h \
+ /usr/include/x86_64-linux-gnu/bits/select.h \
+ /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \
+ /usr/include/alloca.h /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \
+ /usr/include/c++/9/bits/std_abs.h /usr/include/c++/9/cstdio \
+ /usr/include/stdio.h /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \
+ /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \
+ /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \
+ /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \
+ /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \
+ /usr/include/c++/9/cerrno /usr/include/errno.h \
+ /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \
+ /usr/include/x86_64-linux-gnu/asm/errno.h \
+ /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+ /usr/include/x86_64-linux-gnu/bits/types/error_t.h \
+ /usr/include/c++/9/bits/functional_hash.h \
+ /usr/include/c++/9/bits/basic_string.tcc /usr/include/c++/9/vector \
+ /usr/include/c++/9/bits/stl_construct.h \
+ /usr/include/c++/9/bits/stl_uninitialized.h \
+ /usr/include/c++/9/bits/stl_vector.h \
+ /usr/include/c++/9/bits/stl_bvector.h /usr/include/c++/9/bits/vector.tcc \
+ /workspace/NeuCoSVC/REAPER/./wave/codec_riff.h \
+ /workspace/NeuCoSVC/REAPER/./wave/codec_api-inl.h \
+ /workspace/NeuCoSVC/REAPER/./core/file_resource.h \
+ /workspace/NeuCoSVC/REAPER/./wave/wave_io-inl.h \
+ /usr/include/c++/9/limits
diff --git a/REAPER/build/Makefile b/REAPER/build/Makefile
new file mode 100644
index 0000000000000000000000000000000000000000..5e7c437653d7e2f0fda3153b9e26ea2cb8eedf30
--- /dev/null
+++ b/REAPER/build/Makefile
@@ -0,0 +1,493 @@
+# CMAKE generated file: DO NOT EDIT!
+# Generated by "Unix Makefiles" Generator, CMake Version 3.28
+
+# Default target executed when no arguments are given to make.
+default_target: all
+.PHONY : default_target
+
+# Allow only one "make -f Makefile2" at a time, but pass parallelism.
+.NOTPARALLEL:
+
+#=============================================================================
+# Special targets provided by cmake.
+
+# Disable implicit rules so canonical targets will work.
+.SUFFIXES:
+
+# Disable VCS-based implicit rules.
+% : %,v
+
+# Disable VCS-based implicit rules.
+% : RCS/%
+
+# Disable VCS-based implicit rules.
+% : RCS/%,v
+
+# Disable VCS-based implicit rules.
+% : SCCS/s.%
+
+# Disable VCS-based implicit rules.
+% : s.%
+
+.SUFFIXES: .hpux_make_needs_suffix_list
+
+# Command-line flag to silence nested $(MAKE).
+$(VERBOSE)MAKESILENT = -s
+
+#Suppress display of executed commands.
+$(VERBOSE).SILENT:
+
+# A target that is always out of date.
+cmake_force:
+.PHONY : cmake_force
+
+#=============================================================================
+# Set environment variables for the build.
+
+# The shell in which to execute make rules.
+SHELL = /bin/sh
+
+# The CMake executable.
+CMAKE_COMMAND = /opt/conda/lib/python3.10/site-packages/cmake/data/bin/cmake
+
+# The command to remove a file.
+RM = /opt/conda/lib/python3.10/site-packages/cmake/data/bin/cmake -E rm -f
+
+# Escaping for special characters.
+EQUALS = =
+
+# The top-level source directory on which CMake was run.
+CMAKE_SOURCE_DIR = /workspace/NeuCoSVC/REAPER
+
+# The top-level build directory on which CMake was run.
+CMAKE_BINARY_DIR = /workspace/NeuCoSVC/REAPER/build
+
+#=============================================================================
+# Targets provided globally by CMake.
+
+# Special rule for the target edit_cache
+edit_cache:
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "No interactive CMake dialog available..."
+ /opt/conda/lib/python3.10/site-packages/cmake/data/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available.
+.PHONY : edit_cache
+
+# Special rule for the target edit_cache
+edit_cache/fast: edit_cache
+.PHONY : edit_cache/fast
+
+# Special rule for the target rebuild_cache
+rebuild_cache:
+ @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake to regenerate build system..."
+ /opt/conda/lib/python3.10/site-packages/cmake/data/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
+.PHONY : rebuild_cache
+
+# Special rule for the target rebuild_cache
+rebuild_cache/fast: rebuild_cache
+.PHONY : rebuild_cache/fast
+
+# The main all target
+all: cmake_check_build_system
+ $(CMAKE_COMMAND) -E cmake_progress_start /workspace/NeuCoSVC/REAPER/build/CMakeFiles /workspace/NeuCoSVC/REAPER/build//CMakeFiles/progress.marks
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 all
+ $(CMAKE_COMMAND) -E cmake_progress_start /workspace/NeuCoSVC/REAPER/build/CMakeFiles 0
+.PHONY : all
+
+# The main clean target
+clean:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 clean
+.PHONY : clean
+
+# The main clean target
+clean/fast: clean
+.PHONY : clean/fast
+
+# Prepare targets for installation.
+preinstall: all
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 preinstall
+.PHONY : preinstall
+
+# Prepare targets for installation.
+preinstall/fast:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 preinstall
+.PHONY : preinstall/fast
+
+# clear depends
+depend:
+ $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
+.PHONY : depend
+
+#=============================================================================
+# Target rules for targets named core
+
+# Build rule for target.
+core: cmake_check_build_system
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 core
+.PHONY : core
+
+# fast build rule for target.
+core/fast:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/core.dir/build.make CMakeFiles/core.dir/build
+.PHONY : core/fast
+
+#=============================================================================
+# Target rules for targets named wave
+
+# Build rule for target.
+wave: cmake_check_build_system
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 wave
+.PHONY : wave
+
+# fast build rule for target.
+wave/fast:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/wave.dir/build.make CMakeFiles/wave.dir/build
+.PHONY : wave/fast
+
+#=============================================================================
+# Target rules for targets named epoch_tracker
+
+# Build rule for target.
+epoch_tracker: cmake_check_build_system
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 epoch_tracker
+.PHONY : epoch_tracker
+
+# fast build rule for target.
+epoch_tracker/fast:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/epoch_tracker.dir/build.make CMakeFiles/epoch_tracker.dir/build
+.PHONY : epoch_tracker/fast
+
+#=============================================================================
+# Target rules for targets named reaper
+
+# Build rule for target.
+reaper: cmake_check_build_system
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 reaper
+.PHONY : reaper
+
+# fast build rule for target.
+reaper/fast:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/reaper.dir/build.make CMakeFiles/reaper.dir/build
+.PHONY : reaper/fast
+
+core/file_resource.o: core/file_resource.cc.o
+.PHONY : core/file_resource.o
+
+# target to build an object file
+core/file_resource.cc.o:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/core.dir/build.make CMakeFiles/core.dir/core/file_resource.cc.o
+.PHONY : core/file_resource.cc.o
+
+core/file_resource.i: core/file_resource.cc.i
+.PHONY : core/file_resource.i
+
+# target to preprocess a source file
+core/file_resource.cc.i:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/core.dir/build.make CMakeFiles/core.dir/core/file_resource.cc.i
+.PHONY : core/file_resource.cc.i
+
+core/file_resource.s: core/file_resource.cc.s
+.PHONY : core/file_resource.s
+
+# target to generate assembly for a file
+core/file_resource.cc.s:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/core.dir/build.make CMakeFiles/core.dir/core/file_resource.cc.s
+.PHONY : core/file_resource.cc.s
+
+core/float_matrix.o: core/float_matrix.cc.o
+.PHONY : core/float_matrix.o
+
+# target to build an object file
+core/float_matrix.cc.o:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/core.dir/build.make CMakeFiles/core.dir/core/float_matrix.cc.o
+.PHONY : core/float_matrix.cc.o
+
+core/float_matrix.i: core/float_matrix.cc.i
+.PHONY : core/float_matrix.i
+
+# target to preprocess a source file
+core/float_matrix.cc.i:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/core.dir/build.make CMakeFiles/core.dir/core/float_matrix.cc.i
+.PHONY : core/float_matrix.cc.i
+
+core/float_matrix.s: core/float_matrix.cc.s
+.PHONY : core/float_matrix.s
+
+# target to generate assembly for a file
+core/float_matrix.cc.s:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/core.dir/build.make CMakeFiles/core.dir/core/float_matrix.cc.s
+.PHONY : core/float_matrix.cc.s
+
+core/track.o: core/track.cc.o
+.PHONY : core/track.o
+
+# target to build an object file
+core/track.cc.o:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/core.dir/build.make CMakeFiles/core.dir/core/track.cc.o
+.PHONY : core/track.cc.o
+
+core/track.i: core/track.cc.i
+.PHONY : core/track.i
+
+# target to preprocess a source file
+core/track.cc.i:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/core.dir/build.make CMakeFiles/core.dir/core/track.cc.i
+.PHONY : core/track.cc.i
+
+core/track.s: core/track.cc.s
+.PHONY : core/track.s
+
+# target to generate assembly for a file
+core/track.cc.s:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/core.dir/build.make CMakeFiles/core.dir/core/track.cc.s
+.PHONY : core/track.cc.s
+
+epoch_tracker/epoch_tracker.o: epoch_tracker/epoch_tracker.cc.o
+.PHONY : epoch_tracker/epoch_tracker.o
+
+# target to build an object file
+epoch_tracker/epoch_tracker.cc.o:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/epoch_tracker.dir/build.make CMakeFiles/epoch_tracker.dir/epoch_tracker/epoch_tracker.cc.o
+.PHONY : epoch_tracker/epoch_tracker.cc.o
+
+epoch_tracker/epoch_tracker.i: epoch_tracker/epoch_tracker.cc.i
+.PHONY : epoch_tracker/epoch_tracker.i
+
+# target to preprocess a source file
+epoch_tracker/epoch_tracker.cc.i:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/epoch_tracker.dir/build.make CMakeFiles/epoch_tracker.dir/epoch_tracker/epoch_tracker.cc.i
+.PHONY : epoch_tracker/epoch_tracker.cc.i
+
+epoch_tracker/epoch_tracker.s: epoch_tracker/epoch_tracker.cc.s
+.PHONY : epoch_tracker/epoch_tracker.s
+
+# target to generate assembly for a file
+epoch_tracker/epoch_tracker.cc.s:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/epoch_tracker.dir/build.make CMakeFiles/epoch_tracker.dir/epoch_tracker/epoch_tracker.cc.s
+.PHONY : epoch_tracker/epoch_tracker.cc.s
+
+epoch_tracker/fd_filter.o: epoch_tracker/fd_filter.cc.o
+.PHONY : epoch_tracker/fd_filter.o
+
+# target to build an object file
+epoch_tracker/fd_filter.cc.o:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/epoch_tracker.dir/build.make CMakeFiles/epoch_tracker.dir/epoch_tracker/fd_filter.cc.o
+.PHONY : epoch_tracker/fd_filter.cc.o
+
+epoch_tracker/fd_filter.i: epoch_tracker/fd_filter.cc.i
+.PHONY : epoch_tracker/fd_filter.i
+
+# target to preprocess a source file
+epoch_tracker/fd_filter.cc.i:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/epoch_tracker.dir/build.make CMakeFiles/epoch_tracker.dir/epoch_tracker/fd_filter.cc.i
+.PHONY : epoch_tracker/fd_filter.cc.i
+
+epoch_tracker/fd_filter.s: epoch_tracker/fd_filter.cc.s
+.PHONY : epoch_tracker/fd_filter.s
+
+# target to generate assembly for a file
+epoch_tracker/fd_filter.cc.s:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/epoch_tracker.dir/build.make CMakeFiles/epoch_tracker.dir/epoch_tracker/fd_filter.cc.s
+.PHONY : epoch_tracker/fd_filter.cc.s
+
+epoch_tracker/fft.o: epoch_tracker/fft.cc.o
+.PHONY : epoch_tracker/fft.o
+
+# target to build an object file
+epoch_tracker/fft.cc.o:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/epoch_tracker.dir/build.make CMakeFiles/epoch_tracker.dir/epoch_tracker/fft.cc.o
+.PHONY : epoch_tracker/fft.cc.o
+
+epoch_tracker/fft.i: epoch_tracker/fft.cc.i
+.PHONY : epoch_tracker/fft.i
+
+# target to preprocess a source file
+epoch_tracker/fft.cc.i:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/epoch_tracker.dir/build.make CMakeFiles/epoch_tracker.dir/epoch_tracker/fft.cc.i
+.PHONY : epoch_tracker/fft.cc.i
+
+epoch_tracker/fft.s: epoch_tracker/fft.cc.s
+.PHONY : epoch_tracker/fft.s
+
+# target to generate assembly for a file
+epoch_tracker/fft.cc.s:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/epoch_tracker.dir/build.make CMakeFiles/epoch_tracker.dir/epoch_tracker/fft.cc.s
+.PHONY : epoch_tracker/fft.cc.s
+
+epoch_tracker/lpc_analyzer.o: epoch_tracker/lpc_analyzer.cc.o
+.PHONY : epoch_tracker/lpc_analyzer.o
+
+# target to build an object file
+epoch_tracker/lpc_analyzer.cc.o:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/epoch_tracker.dir/build.make CMakeFiles/epoch_tracker.dir/epoch_tracker/lpc_analyzer.cc.o
+.PHONY : epoch_tracker/lpc_analyzer.cc.o
+
+epoch_tracker/lpc_analyzer.i: epoch_tracker/lpc_analyzer.cc.i
+.PHONY : epoch_tracker/lpc_analyzer.i
+
+# target to preprocess a source file
+epoch_tracker/lpc_analyzer.cc.i:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/epoch_tracker.dir/build.make CMakeFiles/epoch_tracker.dir/epoch_tracker/lpc_analyzer.cc.i
+.PHONY : epoch_tracker/lpc_analyzer.cc.i
+
+epoch_tracker/lpc_analyzer.s: epoch_tracker/lpc_analyzer.cc.s
+.PHONY : epoch_tracker/lpc_analyzer.s
+
+# target to generate assembly for a file
+epoch_tracker/lpc_analyzer.cc.s:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/epoch_tracker.dir/build.make CMakeFiles/epoch_tracker.dir/epoch_tracker/lpc_analyzer.cc.s
+.PHONY : epoch_tracker/lpc_analyzer.cc.s
+
+epoch_tracker_main.o: epoch_tracker_main.cc.o
+.PHONY : epoch_tracker_main.o
+
+# target to build an object file
+epoch_tracker_main.cc.o:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/reaper.dir/build.make CMakeFiles/reaper.dir/epoch_tracker_main.cc.o
+.PHONY : epoch_tracker_main.cc.o
+
+epoch_tracker_main.i: epoch_tracker_main.cc.i
+.PHONY : epoch_tracker_main.i
+
+# target to preprocess a source file
+epoch_tracker_main.cc.i:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/reaper.dir/build.make CMakeFiles/reaper.dir/epoch_tracker_main.cc.i
+.PHONY : epoch_tracker_main.cc.i
+
+epoch_tracker_main.s: epoch_tracker_main.cc.s
+.PHONY : epoch_tracker_main.s
+
+# target to generate assembly for a file
+epoch_tracker_main.cc.s:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/reaper.dir/build.make CMakeFiles/reaper.dir/epoch_tracker_main.cc.s
+.PHONY : epoch_tracker_main.cc.s
+
+wave/codec_riff.o: wave/codec_riff.cc.o
+.PHONY : wave/codec_riff.o
+
+# target to build an object file
+wave/codec_riff.cc.o:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/wave.dir/build.make CMakeFiles/wave.dir/wave/codec_riff.cc.o
+.PHONY : wave/codec_riff.cc.o
+
+wave/codec_riff.i: wave/codec_riff.cc.i
+.PHONY : wave/codec_riff.i
+
+# target to preprocess a source file
+wave/codec_riff.cc.i:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/wave.dir/build.make CMakeFiles/wave.dir/wave/codec_riff.cc.i
+.PHONY : wave/codec_riff.cc.i
+
+wave/codec_riff.s: wave/codec_riff.cc.s
+.PHONY : wave/codec_riff.s
+
+# target to generate assembly for a file
+wave/codec_riff.cc.s:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/wave.dir/build.make CMakeFiles/wave.dir/wave/codec_riff.cc.s
+.PHONY : wave/codec_riff.cc.s
+
+wave/wave.o: wave/wave.cc.o
+.PHONY : wave/wave.o
+
+# target to build an object file
+wave/wave.cc.o:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/wave.dir/build.make CMakeFiles/wave.dir/wave/wave.cc.o
+.PHONY : wave/wave.cc.o
+
+wave/wave.i: wave/wave.cc.i
+.PHONY : wave/wave.i
+
+# target to preprocess a source file
+wave/wave.cc.i:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/wave.dir/build.make CMakeFiles/wave.dir/wave/wave.cc.i
+.PHONY : wave/wave.cc.i
+
+wave/wave.s: wave/wave.cc.s
+.PHONY : wave/wave.s
+
+# target to generate assembly for a file
+wave/wave.cc.s:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/wave.dir/build.make CMakeFiles/wave.dir/wave/wave.cc.s
+.PHONY : wave/wave.cc.s
+
+wave/wave_io.o: wave/wave_io.cc.o
+.PHONY : wave/wave_io.o
+
+# target to build an object file
+wave/wave_io.cc.o:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/wave.dir/build.make CMakeFiles/wave.dir/wave/wave_io.cc.o
+.PHONY : wave/wave_io.cc.o
+
+wave/wave_io.i: wave/wave_io.cc.i
+.PHONY : wave/wave_io.i
+
+# target to preprocess a source file
+wave/wave_io.cc.i:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/wave.dir/build.make CMakeFiles/wave.dir/wave/wave_io.cc.i
+.PHONY : wave/wave_io.cc.i
+
+wave/wave_io.s: wave/wave_io.cc.s
+.PHONY : wave/wave_io.s
+
+# target to generate assembly for a file
+wave/wave_io.cc.s:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/wave.dir/build.make CMakeFiles/wave.dir/wave/wave_io.cc.s
+.PHONY : wave/wave_io.cc.s
+
+# Help Target
+help:
+ @echo "The following are some of the valid targets for this Makefile:"
+ @echo "... all (the default if no target is provided)"
+ @echo "... clean"
+ @echo "... depend"
+ @echo "... edit_cache"
+ @echo "... rebuild_cache"
+ @echo "... core"
+ @echo "... epoch_tracker"
+ @echo "... reaper"
+ @echo "... wave"
+ @echo "... core/file_resource.o"
+ @echo "... core/file_resource.i"
+ @echo "... core/file_resource.s"
+ @echo "... core/float_matrix.o"
+ @echo "... core/float_matrix.i"
+ @echo "... core/float_matrix.s"
+ @echo "... core/track.o"
+ @echo "... core/track.i"
+ @echo "... core/track.s"
+ @echo "... epoch_tracker/epoch_tracker.o"
+ @echo "... epoch_tracker/epoch_tracker.i"
+ @echo "... epoch_tracker/epoch_tracker.s"
+ @echo "... epoch_tracker/fd_filter.o"
+ @echo "... epoch_tracker/fd_filter.i"
+ @echo "... epoch_tracker/fd_filter.s"
+ @echo "... epoch_tracker/fft.o"
+ @echo "... epoch_tracker/fft.i"
+ @echo "... epoch_tracker/fft.s"
+ @echo "... epoch_tracker/lpc_analyzer.o"
+ @echo "... epoch_tracker/lpc_analyzer.i"
+ @echo "... epoch_tracker/lpc_analyzer.s"
+ @echo "... epoch_tracker_main.o"
+ @echo "... epoch_tracker_main.i"
+ @echo "... epoch_tracker_main.s"
+ @echo "... wave/codec_riff.o"
+ @echo "... wave/codec_riff.i"
+ @echo "... wave/codec_riff.s"
+ @echo "... wave/wave.o"
+ @echo "... wave/wave.i"
+ @echo "... wave/wave.s"
+ @echo "... wave/wave_io.o"
+ @echo "... wave/wave_io.i"
+ @echo "... wave/wave_io.s"
+.PHONY : help
+
+
+
+#=============================================================================
+# Special targets to cleanup operation of make.
+
+# Special rule to run CMake to check the build system integrity.
+# No rule that depends on this can have commands that come from listfiles
+# because they might be regenerated.
+cmake_check_build_system:
+ $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
+.PHONY : cmake_check_build_system
+
diff --git a/REAPER/build/cmake_install.cmake b/REAPER/build/cmake_install.cmake
new file mode 100644
index 0000000000000000000000000000000000000000..15165789ffdc9a8de695febf4ca8f437e915a761
--- /dev/null
+++ b/REAPER/build/cmake_install.cmake
@@ -0,0 +1,54 @@
+# Install script for directory: /workspace/NeuCoSVC/REAPER
+
+# Set the install prefix
+if(NOT DEFINED CMAKE_INSTALL_PREFIX)
+ set(CMAKE_INSTALL_PREFIX "/usr/local")
+endif()
+string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
+
+# Set the install configuration name.
+if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
+ if(BUILD_TYPE)
+ string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
+ CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
+ else()
+ set(CMAKE_INSTALL_CONFIG_NAME "")
+ endif()
+ message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
+endif()
+
+# Set the component getting installed.
+if(NOT CMAKE_INSTALL_COMPONENT)
+ if(COMPONENT)
+ message(STATUS "Install component: \"${COMPONENT}\"")
+ set(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
+ else()
+ set(CMAKE_INSTALL_COMPONENT)
+ endif()
+endif()
+
+# Install shared libraries without execute permission?
+if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
+ set(CMAKE_INSTALL_SO_NO_EXE "1")
+endif()
+
+# Is this installation the result of a crosscompile?
+if(NOT DEFINED CMAKE_CROSSCOMPILING)
+ set(CMAKE_CROSSCOMPILING "FALSE")
+endif()
+
+# Set default install directory permissions.
+if(NOT DEFINED CMAKE_OBJDUMP)
+ set(CMAKE_OBJDUMP "/usr/bin/objdump")
+endif()
+
+if(CMAKE_INSTALL_COMPONENT)
+ set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt")
+else()
+ set(CMAKE_INSTALL_MANIFEST "install_manifest.txt")
+endif()
+
+string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT
+ "${CMAKE_INSTALL_MANIFEST_FILES}")
+file(WRITE "/workspace/NeuCoSVC/REAPER/build/${CMAKE_INSTALL_MANIFEST}"
+ "${CMAKE_INSTALL_MANIFEST_CONTENT}")
diff --git a/REAPER/build/libcore.a b/REAPER/build/libcore.a
new file mode 100644
index 0000000000000000000000000000000000000000..644354b7d017924d253d244bb1eb1e212eb4d4ef
Binary files /dev/null and b/REAPER/build/libcore.a differ
diff --git a/REAPER/build/libepoch_tracker.a b/REAPER/build/libepoch_tracker.a
new file mode 100644
index 0000000000000000000000000000000000000000..8d89d17aeb680ee78f5d7cf54e8c61edd7504c78
Binary files /dev/null and b/REAPER/build/libepoch_tracker.a differ
diff --git a/REAPER/build/libwave.a b/REAPER/build/libwave.a
new file mode 100644
index 0000000000000000000000000000000000000000..a5591a82a0aa115163816e18c6cf1f70fa63570d
Binary files /dev/null and b/REAPER/build/libwave.a differ
diff --git a/REAPER/build/reaper b/REAPER/build/reaper
new file mode 100644
index 0000000000000000000000000000000000000000..6cdbc69a74145d6a1135f3bb4a7718fb32c1ca1d
Binary files /dev/null and b/REAPER/build/reaper differ
diff --git a/REAPER/core/file_resource.cc b/REAPER/core/file_resource.cc
new file mode 100644
index 0000000000000000000000000000000000000000..aea9fa87e8364d53cc17d51b3d33e46ec6d82c58
--- /dev/null
+++ b/REAPER/core/file_resource.cc
@@ -0,0 +1,30 @@
+/*
+Copyright 2015 Google Inc. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+#include "core/file_resource.h"
+
+FileResource::FileResource(const std::string &filename, const std::string &mode)
+ : filename_(filename), mode_(mode) {
+}
+
+FileResource::~FileResource() {
+ fclose(fp_);
+}
+
+bool FileResource::Get() {
+ fp_ = fopen(filename_.c_str(), mode_.c_str());
+ return fp_ != NULL;
+}
diff --git a/REAPER/core/file_resource.h b/REAPER/core/file_resource.h
new file mode 100644
index 0000000000000000000000000000000000000000..271e9ce660700eb64de8281ccc14d95f16fa5f3c
--- /dev/null
+++ b/REAPER/core/file_resource.h
@@ -0,0 +1,44 @@
+/*
+Copyright 2015 Google Inc. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+#ifndef _FILE_RESOURCE_H_
+#define _FILE_RESOURCE_H_
+
+#include
+#include
+
+class FileResource {
+ public:
+ // Mode follows the standard (eg. "wb", "r").
+ FileResource(const std::string &filename, const std::string &mode);
+ ~FileResource();
+
+ // Opens a file with the specified mode. Returns false if it fails.
+ bool Get();
+
+ FILE *fp() { return fp_; }
+
+ bool eof() const {
+ return feof(fp_) != 0;
+ }
+
+ private:
+ std::string filename_;
+ std::string mode_;
+ FILE *fp_;
+};
+
+#endif // _FILE_RESOURCE_H_
diff --git a/REAPER/core/float_matrix-inl.h b/REAPER/core/float_matrix-inl.h
new file mode 100644
index 0000000000000000000000000000000000000000..86cb13fce94a2fdaf1c556f21f31bac846278dd9
--- /dev/null
+++ b/REAPER/core/float_matrix-inl.h
@@ -0,0 +1,72 @@
+/*
+Copyright 2015 Google Inc. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+#ifndef _FLOAT_MATRIX_INL_H_
+#define _FLOAT_MATRIX_INL_H_
+
+// IWYU pragma: private, include "float_matrix.h"
+
+
+
+inline uint32_t FloatMatrix::get_x_size(void) const {
+ return x_size_;
+}
+
+inline uint32_t FloatMatrix::get_y_size(void) const {
+ return y_size_;
+}
+
+// y1x1 y1x2 y1x3 y1x4 y2x1 y2x2 y2x3 y2x4
+inline float FloatMatrix::Get(uint32_t x, uint32_t y) const {
+ return data_[y * x_size_ + x];
+}
+
+inline float &FloatMatrix::Get(uint32_t x, uint32_t y) {
+#ifdef _DEBUG
+ if (y >= y_size_ || x >= x_size_) {
+ fprintf(stderr, "Matrix boundary overrun error");
+ }
+#endif
+ return data_[y * x_size_ + x];
+}
+
+inline void FloatMatrix::Set(uint32_t x, uint32_t y, float val) {
+#ifdef _DEBUG
+ if (y >= y_size_ || x >= x_size_) {
+ fprintf(stderr, "Matrix boundary overrun error");
+ }
+#endif
+ data_[y *x_size_ + x] = val;
+}
+
+inline uint32_t FloatMatrix::size() const {
+ return x_size_ * y_size_;
+}
+
+inline const float *FloatMatrix::data(void) const {
+ return data_;
+}
+
+inline void FloatMatrix::StringWrite(std::string *out) const {
+ if (size()) {
+ char *source = reinterpret_cast(data_);
+ out->append(source, size() * sizeof(*data_));
+ }
+}
+
+
+
+#endif // SPEECH_PATTS_ENGINE_COMMON_CORE_FLOAT_MATRIX_INL_H_
diff --git a/REAPER/core/float_matrix.cc b/REAPER/core/float_matrix.cc
new file mode 100644
index 0000000000000000000000000000000000000000..ab163ee6b43ccaa117d07100fb604797f08825e5
--- /dev/null
+++ b/REAPER/core/float_matrix.cc
@@ -0,0 +1,78 @@
+/*
+Copyright 2015 Google Inc. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+#include "core/float_matrix.h"
+
+#include
+
+
+
+FloatMatrix::FloatMatrix() {
+ data_ = NULL;
+ x_size_ = 0;
+ y_size_ = 0;
+}
+
+FloatMatrix::FloatMatrix(const FloatMatrix &m) {
+ clear();
+ resize(m.x_size_, m.y_size_);
+ for (uint32_t i = 0; i < x_size_ * y_size_; i++) {
+ data_[i] = m.data_[i];
+ }
+}
+
+FloatMatrix::~FloatMatrix() {
+ clear();
+}
+
+void FloatMatrix::operator=(const FloatMatrix &m) {
+ clear();
+ resize(m.x_size_, m.y_size_);
+ for (uint32_t i = 0; i < x_size_ * y_size_; i++) {
+ data_[i] = m.data_[i];
+ }
+}
+
+void FloatMatrix::clear() {
+ if (data_ != NULL) {
+ delete [] data_;
+ data_ = NULL;
+ }
+ x_size_ = 0;
+ y_size_ = 0;
+}
+
+void FloatMatrix::resize(uint32_t x_size, uint32_t y_size) {
+ if (data_ == NULL) {
+ data_ = new float [x_size * y_size];
+ memset(data_, 0, sizeof(float)*x_size * y_size);
+ } else if (x_size == x_size_ && y_size == y_size_) {
+ return;
+ } else {
+ float *newdata = new float [x_size * y_size];
+ memset(newdata, 0, sizeof(float) * x_size * y_size);
+ int min_x = x_size < x_size_ ? x_size : x_size_;
+ int min_y = y_size < y_size_ ? y_size : y_size_;
+ for (int y = 0; y < min_y; y++) {
+ memcpy(newdata + y * x_size, data_ + y * x_size_, min_x * sizeof(float));
+ }
+ delete [] data_;
+ data_ = newdata;
+ }
+
+ x_size_ = x_size;
+ y_size_ = y_size;
+}
diff --git a/REAPER/core/float_matrix.h b/REAPER/core/float_matrix.h
new file mode 100644
index 0000000000000000000000000000000000000000..8b253757ae2afe057f375e9691d413a00eec89ff
--- /dev/null
+++ b/REAPER/core/float_matrix.h
@@ -0,0 +1,57 @@
+/*
+Copyright 2015 Google Inc. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+// A memory mappable float matrix with restricted use, composite audio and
+// track classes being its current uses. Its further use should be avoided
+// as its designed to meet the specific needs of these classes.
+
+#ifndef _FLOAT_MATRIX_H_
+#define _FLOAT_MATRIX_H_
+
+#include
+#include
+
+class FloatMatrix {
+ public:
+ FloatMatrix();
+ FloatMatrix(const FloatMatrix &);
+ ~FloatMatrix();
+
+ void operator = (const FloatMatrix &);
+
+ void resize(uint32_t x_size, uint32_t y_size);
+ void clear();
+
+ float Get(uint32_t x, uint32_t y) const;
+ float &Get(uint32_t x, uint32_t y);
+ void Set(uint32_t x, uint32_t y, float val);
+
+ uint32_t get_x_size() const;
+ uint32_t get_y_size() const;
+
+ uint32_t size() const;
+ const float *data(void) const;
+
+ void StringWrite(std::string *out) const;
+
+ private:
+ float *data_;
+ uint32_t x_size_;
+ uint32_t y_size_;
+};
+
+#include "float_matrix-inl.h"
+
+#endif // _FLOAT_MATRIX_H_
diff --git a/REAPER/core/track.cc b/REAPER/core/track.cc
new file mode 100644
index 0000000000000000000000000000000000000000..1ab0a995e4e37e042015d597124b1dded4738eb7
--- /dev/null
+++ b/REAPER/core/track.cc
@@ -0,0 +1,581 @@
+/*
+Copyright 2015 Google Inc. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+#include "core/track.h"
+
+#include
+#include
+#include
+
+#define __STDC_FORMAT_MACROS
+#include
+
+#if !defined(INVALID_LOG)
+#define INVALID_LOG -1.0E+10F
+#endif // INVALID_LOG
+
+namespace {
+
+int ToInt(const std::string &s) {
+ char *p = 0;
+ int32_t r = strtol(s.c_str(), &p, 10);
+ return static_cast(r);
+}
+
+std::string ToString(float n, int p) {
+ char buf[1000];
+ buf[0] = 0;
+ snprintf(buf, sizeof(buf), "%.*f", p, n);
+ return buf;
+}
+
+std::string ToString(uint32_t n) {
+ char buf[1000];
+ buf[0] = 0;
+ snprintf(buf, sizeof(buf), "%" PRIu32, n);
+ return buf;
+}
+
+double ToDouble(const std::string &s) {
+ char *p = 0;
+ return strtod(s.c_str(), &p);
+}
+
+float ToFloat(const std::string &s) {
+ return static_cast(ToDouble(s));
+}
+
+//
+// Default size of character I/O buffers:
+//
+const uint32_t kMaxCharBufSize = 8192; // 8k
+
+std::string GetToken(FileResource *fr) {
+ char buff[kMaxCharBufSize];
+ uint32_t i = 0;
+ bool foundData = false;
+ do {
+ buff[i] = fgetc(fr->fp());
+ if ((iscntrl((unsigned char)buff[i]) || isspace((unsigned char)buff[i])) &&
+ !foundData) {
+ continue;
+ }
+ foundData = true;
+ if (iscntrl((unsigned char)buff[i]) || isspace((unsigned char)buff[i])) {
+ break;
+ }
+ i++;
+ } while (i < kMaxCharBufSize && !fr->eof());
+ buff[i] = 0;
+ return std::string(buff);
+}
+
+// Find the first whitespace/newline delimited token in the character
+// array c. Return the stripped token in s. return the position of
+// the first character following the token in tok_end. If the end of
+// c is found during the search, return true, else return false. If no
+// token is found, return 0 in tok_end.
+bool GetTokenFromChars(const char *c, std::string *s, int32_t *tok_end) {
+ int32_t i = 0;
+ s->clear();
+ *tok_end = 0;
+ // skip initial whitespace
+ while (c[i] && ((c[i] == ' ') || (c[i] == '\t') || (c[i] == '\n'))) {
+ i++;
+ }
+ if (!c[i]) {
+ return true;
+ }
+ int32_t start = i;
+ while (c[i] && (c[i] != ' ') && (c[i] != '\t') && (c[i] != '\n')) {
+ i++;
+ }
+ *tok_end = i;
+
+ if (c[i-1] == '\r') {
+ --i;
+ }
+ s->assign(c + start, i - start);
+ return c[i] == 0;
+}
+
+} // namespace
+
+
+Track::Track() {
+ num_frames_ = 0;
+ num_channels_ = 0;
+ shift_ = 0.0F;
+ voicing_enabled_ = false;
+}
+
+void Track::FillFrom(const Track &t) {
+ num_frames_ = t.num_frames_;
+ num_channels_ = t.num_channels_;
+ shift_ = t.shift_;
+ data_ = t.data_;
+ val_ = t.val_;
+ voicing_enabled_ = t.voicing_enabled_;
+}
+
+
+Track::~Track() {
+ Clear();
+}
+
+bool Track::Save(FileResource *fr) const {
+ fprintf(fr->fp(), "EST_File Track\n");
+ fprintf(fr->fp(), "DataType binary2\n");
+ fprintf(fr->fp(), "NumFrames %d\n", num_frames());
+ fprintf(fr->fp(), "NumChannels %d\n", num_channels());
+ fprintf(fr->fp(), "FrameShift %f\n", shift());
+ if (voicing_enabled_) {
+ fprintf(fr->fp(), "VoicingEnabled true\n");
+ } else {
+ fprintf(fr->fp(), "VoicingEnabled false\n");
+ }
+ fprintf(fr->fp(), "EST_Header_End\n");
+
+ // write time information
+ for (int i = 0; i < num_frames(); ++i) {
+ float f = t(i);
+ if (fwrite(&f, sizeof(f), 1, fr->fp()) != 1) {
+ fprintf(stderr, "Failed to write to track file");
+ return false;
+ }
+ }
+
+ // write voicing information
+ if (voicing_enabled_) {
+ for (int i = 0; i < num_frames(); ++i) {
+ char vu = v(i) ? 1 : 0;
+ if (fwrite(&vu, sizeof(vu), 1, fr->fp()) != 1) {
+ fprintf(stderr, "Failed to write to track file");
+ return false;
+ }
+ }
+ }
+
+ // write coefficient information
+ for (int i = 0; i < num_frames(); ++i) {
+ for (int j = 0; j < num_channels(); ++j) {
+ float f = a(i, j);
+ if (fwrite(&f, sizeof(f), 1, fr->fp()) != 1) {
+ fprintf(stderr, "Failed to write to track file");
+ return false;
+ }
+ }
+ }
+ return true;
+}
+
+int Track::Index(float x) const {
+ if (num_frames() > 1) { // if single frame, return that index (0)
+ int bst, bmid, bend;
+ bst = 1;
+ bend = num_frames();
+ if (x < t(bst)) {
+ bmid = bst;
+ }
+ if (x >= t(bend - 1)) {
+ bmid = bend - 1;
+ } else {
+ while (1) {
+ bmid = bst + (bend - bst) / 2;
+ if (bst == bmid) {
+ break;
+ } else if (x < t(bmid)) {
+ if (x >= t(bmid - 1)) {
+ break;
+ }
+ bend = bmid;
+ } else {
+ bst = bmid;
+ }
+ }
+ }
+ if (fabs(x - t(bmid)) < fabs(x - t(bmid - 1))) {
+ return bmid;
+ } else {
+ return bmid - 1;
+ }
+ }
+ return num_frames() - 1;
+}
+
+int Track::IndexBelow(float x) const {
+ for (int i = 1; i < num_frames(); ++i) {
+ if (x <= t(i)) {
+ return i - 1;
+ }
+ }
+ return num_frames() - 1;
+}
+
+int Track::IndexAbove(float x) const {
+ for (int i = 0; i < num_frames(); ++i) {
+ if (x <= t(i)) {
+ return i;
+ }
+ }
+ return num_frames() - 1;
+}
+
+std::string Track::HeaderToString() const {
+ std::string ret;
+ ret = "EST_File Track\n";
+ ret += "DataType ascii\n";
+ ret += "NumFrames " + ::ToString(num_frames()) + "\n";
+ ret += "NumChannels " + ::ToString(num_channels()) + "\n";
+ ret += "FrameShift " + ::ToString(shift(), 5) + "\n";
+ ret += "VoicingEnabled ";
+ if (voicing_enabled_) {
+ ret += "true\n";
+ } else {
+ ret += "false\n";
+ }
+ ret += "EST_Header_End\n";
+ return ret;
+}
+
+std::string Track::ToString(uint32_t precision) const {
+ std::string ret;
+ ret = HeaderToString();
+ char buf[1024];
+ for (int i = 0; i < num_frames(); ++i) {
+ snprintf(buf, 1024, "%f %d", t(i), v(i) ? 1 : 0);
+ ret += buf;
+ for (int j = 0; j < num_channels(); ++j) {
+ ret += " ";
+ ret += ::ToString(a(i, j), precision);
+ }
+ ret += std::string("\n");
+ }
+ return ret;
+}
+
+std::string Track::ToString() const {
+ const uint32_t kPrintOutPrecision = 6;
+ return ToString(kPrintOutPrecision);
+}
+
+float Track::shift() const {
+ return shift_;
+}
+
+void Track::FillTime(float frame_shift, int start) {
+ shift_ = frame_shift;
+ for (int i = 0; i < num_frames_; ++i) {
+ data_.Set(0, i, frame_shift * (i + start));
+ }
+}
+
+void Track::FillTime(const Track &t) {
+ for (int i = 0; i < num_frames_; ++i) {
+ data_.Set(0, i, t.t(i));
+ }
+}
+
+void Track::SetTimes(float *times, int length) {
+ if (length != num_frames_) {
+ fprintf(stderr, "Track::SetTimes: input `times` has different number "
+ "of frames (%d != %d)", length, num_frames_);
+ }
+ for (int i = 0; i < num_frames_; ++i) {
+ data_.Set(0, i, times[i]);
+ }
+}
+
+bool Track::SetVoicing(const std::vector &vuv) {
+ if (vuv.size() != num_frames_) {
+ fprintf(stderr, "Track::SetVoicing: input has different number "
+ "of frames (%zu != %d)", vuv.size(), num_frames_);
+ return false;
+ }
+ val_ = vuv;
+ return true;
+}
+
+void Track::FrameOut(std::vector *fv, int n) const {
+ fv->resize(num_channels_);
+ for (int i = 0; i < num_channels_; i++) {
+ (*fv)[i] = a(n, i);
+ }
+}
+
+void Track::FrameOut(std::vector *fv, int n) const {
+ fv->resize(num_channels_);
+ for (int i = 0; i < num_channels_; i++) {
+ (*fv)[i] = a(n, i);
+ }
+}
+
+void Track::FrameIn(const float &f, int n) {
+ a(n) = f;
+}
+
+void Track::FrameIn(const std::vector &fv, int n) {
+ for (int i = 0; i < num_channels_; i++) {
+ a(n, i) = fv[i];
+ }
+}
+
+void Track::FrameIn(const std::vector &fv, int n) {
+ for (int i = 0; i < num_channels_; i++) {
+ a(n, i) = fv[i];
+ }
+}
+
+Track *Track::GetSubTrack(float start,
+ float end,
+ int ch_offset,
+ int ch_size) const {
+ int start_frame = -1;
+ int end_frame = -1;
+ int n_sub_frames;
+ int i, j;
+
+ for (i = 0; i < this->num_frames(); ++i) {
+ if ((start_frame == -1) && (this->t(i) > start)) {
+ start_frame = i - 1;
+ }
+ if ((end_frame == -1) && (this->t(i) > end)) {
+ end_frame = i;
+ }
+ }
+ if (start_frame == -1) {
+ start_frame = this->num_frames() - 1;
+ }
+ if (end_frame == -1) {
+ end_frame = this->num_frames() - 1;
+ }
+ n_sub_frames = end_frame - start_frame;
+ if (n_sub_frames < 1) {
+ // make sure we have at least one frame
+ n_sub_frames = 1;
+ }
+ if (ch_size == -1 && ch_offset == -1) {
+ ch_offset = 0;
+ ch_size = this->num_channels();
+ } else {
+ if (ch_size > this->num_channels()) {
+ fprintf(stderr, "Incorrect number of channels for sub track");
+ return NULL;
+ }
+ }
+ Track *sub_track = new Track;
+ sub_track->resize(n_sub_frames, ch_size);
+ for (i = 0; i < n_sub_frames; ++i) {
+ sub_track->t(i) = this->t(i + start_frame);
+ for (j = ch_offset; j < ch_size; ++j) {
+ sub_track->a(i, j) = this->a(i + start_frame, j);
+ }
+ }
+ return sub_track;
+}
+
+
+Track *Track::GetSubTrack(int start_frame_index,
+ int end_frame_index,
+ int start_channel_index,
+ int end_channel_index) const {
+ if (start_frame_index > end_frame_index ||
+ start_frame_index < 0 || start_frame_index >= this->num_frames() ||
+ end_frame_index < 0 || end_frame_index >= this->num_frames()) {
+ fprintf(stderr, "Incorrect frame indices for sub-track 0<%d<=%d<%d\n",
+ start_frame_index,
+ end_frame_index,
+ this->num_frames());
+ return NULL;
+ }
+
+ if (start_channel_index > end_channel_index ||
+ start_channel_index < 0 || start_channel_index >= this->num_channels() ||
+ end_channel_index < 0 || end_channel_index >= this->num_channels()) {
+ fprintf(stderr, "Incorrect channel indices for sub-track 0<%d<=%d<%d\n",
+ start_channel_index,
+ end_channel_index,
+ this->num_channels());
+ return NULL;
+ }
+
+ Track *sub_track = new Track;
+
+ int number_frames = end_frame_index - start_frame_index + 1;
+ int number_channels = end_channel_index - start_channel_index + 1;
+ sub_track->resize(number_frames, number_channels);
+
+ for (int f = 0; f < number_frames; f++) {
+ for (int p = 0; p < number_channels; p++) {
+ sub_track->a(f, p) = this->a(start_frame_index + f,
+ start_channel_index + p);
+ }
+ sub_track->t(f) = this->t(start_frame_index + f);
+ sub_track->set_v(f, this->v(start_frame_index + f));
+ }
+
+ sub_track->set_shift(this->shift());
+ return sub_track;
+}
+
+void Track::resize(int n, int c) {
+ if (n != num_frames_) {
+ val_.resize(n, 1);
+ }
+
+ data_.resize(c + 1, n);
+ num_frames_ = n;
+ num_channels_ = c;
+}
+
+void Track::Clear() {
+ num_frames_ = 0;
+ num_channels_ = 0;
+ shift_ = 0.0F;
+ data_.clear();
+ val_.clear();
+}
+
+void Track::CopyFrom(const char *v, int32_t num_frames, int32_t num_channels) {
+ resize(num_frames, num_channels);
+ const float* source = reinterpret_cast(v);
+ for (int32_t i = 0; i < num_frames; ++i) {
+ for (int32_t j = 0; j < num_channels; ++j) {
+ a(i, j) = *source++;
+ }
+ }
+}
+
+// Sets current track to be combination of two tracks
+bool Track::SetCombinedTrack(const Track &track_a, const Track &track_b) {
+ if (track_a.num_frames() != track_b.num_frames()) {
+ fprintf(stderr, "Mismatching number of frames: %d vs. %d",
+ track_a.num_frames(),
+ track_b.num_frames());
+ return false;
+ }
+
+ const int n_frames = track_a.num_frames();
+ const int n_channels_a = track_a.num_channels();
+ const int n_channels_b = track_b.num_channels();
+ resize(n_frames, n_channels_a + n_channels_b);
+ for (int i = 0; i < n_frames; i++) {
+ for (int j = 0; j < n_channels_a; j++) {
+ a(i, j) = track_a.a(i, j);
+ }
+ for (int j = 0; j < n_channels_b; j++) {
+ a(i, n_channels_a + j) = track_b.a(i, j);
+ }
+ set_v(i, track_a.v(i) && track_b.v(i));
+ }
+ return true;
+}
+
+bool Track::SetCombinedTrack(const Track &track_a,
+ const Track &track_b,
+ const Track &track_c) {
+ Track track_ab;
+ if (!track_ab.SetCombinedTrack(track_a, track_b)) {
+ return false;
+ }
+ return SetCombinedTrack(track_ab, track_c);
+}
+
+// Pads a track with frames:
+bool Track::Pad(int num_pads) {
+ if (num_pads <= 0) {
+ return false;
+ }
+ const int num_original_frames = num_frames();
+ const int num_original_channels = num_channels();
+
+ Track new_track;
+ new_track.resize(num_original_frames + num_pads, num_original_channels);
+ for (int i = 0; i < num_original_frames; ++i) {
+ for (int j = 0; j < num_original_channels; ++j) {
+ new_track.a(i, j) = a(i, j);
+ }
+ new_track.set_v(i, v(i));
+ }
+ for (int i = 0; i < num_pads; ++i) {
+ for (int j = 0; j < num_original_channels; ++j) {
+ new_track.a(num_original_frames + i, j) = a(num_original_frames - 1, j);
+ }
+ new_track.set_v(i, v(num_original_frames - 1));
+ }
+
+ const int num_new_frames = new_track.num_frames();
+ Clear();
+ resize(num_new_frames, num_original_channels);
+ for (int i = 0; i < num_new_frames; ++i) {
+ for (int j = 0; j < num_original_channels; ++j) {
+ a(i, j) = new_track.a(i, j);
+ }
+ set_v(i, new_track.v(i));
+ }
+ return true;
+}
+
+// Forces the two tracks to have the same size, padding if necessary.
+void Track::MakeSameSize(Track *track) {
+ int max_frames = num_frames();
+ if (track->num_frames() > max_frames) {
+ max_frames = track->num_frames();
+ }
+ Pad(max_frames - num_frames());
+ track->Pad(max_frames - track->num_frames());
+}
+
+// Forces the three tracks to have same size, padding if necessary.
+void Track::MakeSameSize(Track *track_a, Track *track_b) {
+ int max_frames = num_frames();
+ if (track_a->num_frames() > max_frames) {
+ max_frames = track_a->num_frames();
+ }
+ if (track_b->num_frames() > max_frames) {
+ max_frames = track_b->num_frames();
+ }
+ Pad(max_frames - num_frames());
+ track_a->Pad(max_frames - track_a->num_frames());
+ track_b->Pad(max_frames - track_b->num_frames());
+}
+
+//------------------------------------------------------------------------------
+// Utils.
+//------------------------------------------------------------------------------
+
+void ConvertToLogarithmic(Track *t) {
+ for (int32_t i = 0; i < t->num_frames(); ++i) {
+ for (int32_t j = 0; j < t->num_channels(); ++j) {
+ if (t->a(i, j) <= 0.0F) {
+ t->a(i, j) = INVALID_LOG;
+ } else {
+ t->a(i, j) = log(t->a(i, j));
+ }
+ }
+ }
+}
+
+float *TrackToFloatPointer(const Track &track, int *num_samples) {
+ *num_samples = track.num_channels() * track.num_frames();
+ float *array = new float[*num_samples];
+ uint32_t k = 0;
+ for (int i = 0; i < track.num_frames(); ++i) {
+ for (int j = 0; j < track.num_channels(); ++j) {
+ array[k++] = track.a(i, j);
+ }
+ }
+ return array;
+}
diff --git a/REAPER/core/track.h b/REAPER/core/track.h
new file mode 100644
index 0000000000000000000000000000000000000000..c66dfdac257a4ffbd883aa0cc7a8b4764dfcae8c
--- /dev/null
+++ b/REAPER/core/track.h
@@ -0,0 +1,320 @@
+/*
+Copyright 2015 Google Inc. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+#ifndef _TRACK_H_
+#define _TRACK_H_
+
+#include
+#include
+#include
+
+#include "core/file_resource.h"
+#include "core/float_matrix.h"
+
+class Track {
+ public:
+ Track();
+ ~Track();
+
+ void FillFrom(const Track &track);
+
+ // Returns the number of frames contained within this track instance.
+ int num_frames() const;
+
+ // Returns the number of channels contained within this track instance.
+ int num_channels() const;
+
+ // Returns whether the voicing is enabled on this track instance.
+ bool voicing_enabled() const;
+
+ // Sets the voicing enable flag on this track instance.
+ void set_voicing_enabled(bool b);
+
+ // Gets values for frame "f" and channel "c".
+ float &a(int f, int c = 0);
+
+ // Gets values for frame "f" and channel "c".
+ float a(int f, int c = 0) const;
+
+ // Gets voiced flags for frame "f".
+ void set_v(int f, bool value);
+
+ // Gets voiced flags for frame "f".
+ bool v(int f) const;
+
+ // Gets time instant for frame "f".
+ float &t(int f);
+
+ // Gets time instant for frame "f".
+ float t(int f) const;
+
+ // Sets the interval between frames in seconds.
+ void set_shift(float shift);
+
+ // Returns the interval between frames in seconds.
+ float shift() const;
+
+ // Modifies this track instances frame times with that given, from the
+ // given frame index.
+ void FillTime(float frame_shift, int start = 1);
+
+ // Modifies this track instances frame times with the value corresponding
+ // to its frame index.
+ void FillTime(const Track &t);
+
+ // Modifies the times of this track instance with the given values.
+ // NOTE: the length must be equal to the number of frames in the track.
+ void SetTimes(float *times, int length);
+
+ // Modifies the voicing flag of this track instance with the given values.
+bool SetVoicing(const std::vector &vuv);
+
+ // Sets the track from the given time and value vectors.
+ // All frames are set to voiced.
+ template
+ void Set(const std::vector ×, const std::vector &values);
+
+ // Sets the track from the given time and value vectors.
+ // All frames are set to voiced.
+ template
+ void Set(float time_shift, const std::vector &values);
+
+ // Populates the given vector with the values for all channels for
+ // the given frame index.
+ void FrameOut(std::vector *fv, int n) const;
+
+ // Populates the given vector with the values for all channels for
+ // the given frame index.
+ void FrameOut(std::vector *fv, int n) const;
+
+ // Updates the values for all channels for the given frame index with
+ // the values given.
+ void FrameIn(const float &f, int n);
+
+ // Updates the values for all channels for the given frame index with
+ // the values given.
+ void FrameIn(const std::vector &fv, int n);
+
+ // Updates the values for all channels for the given frame index with
+ // the values given.
+ void FrameIn(const std::vector &fv, int n);
+
+ // Returns the index of the frame at the given time index.
+ int Index(float x) const;
+
+ // Returns the index of the first frame below that at the given time index, x.
+ int IndexBelow(float x) const;
+
+ // Returns the index of the first frame above that at the given time index, x.
+ int IndexAbove(float x) const;
+
+ // Resizes the data and voicing flags to the given value, n, and the
+ // number of channels to that given, c.
+ void resize(int n, int c = 1);
+
+ // Resets all the data associated with this track instance.
+ void Clear();
+
+ // Returns a portion of this track instance as defined by the input
+ // start and end times along with the channels required.
+ // Note: Ownership of the returned track is required to prevent
+ // memory leaks downstream.
+ Track *GetSubTrack(float start,
+ float end,
+ int ch_offset = -1,
+ int ch_size = -1) const;
+
+ // Returns a portion of this track instance as defined by the input
+ // start and end frame indices along with the channels required.
+ // Note: Ownership of the returned track is required to prevent
+ // memory leaks downstream.
+ Track *GetSubTrack(int start_frame_index,
+ int end_frame_index,
+ int start_channel_index,
+ int end_channel_index) const;
+
+ // Returns a std::string representation of the header of this track:
+ // The number of frames in this track
+ // The number of channels in this track
+ // The interval between frames
+ // Whether voicing is enabled or not
+ std::string HeaderToString() const;
+
+ // Returns a std::string representation of this track instance containing:
+ // The number of frames in this track
+ // The number of channels in this track
+ // The interval between frames
+ // Whether voicing is enabled or not
+ // values
+ // If precision is specified, float numbers are printed out up to
+ // the specified number of decimal places.
+ std::string ToString(uint32_t precision) const;
+ std::string ToString() const;
+
+ // Saves this track instance to the given FileResource.
+ bool Save(FileResource *fr) const;
+
+ // Saves this track instance to the given FileResource.
+ bool Save(const std::string &filename, bool ascii) const;
+
+ const FloatMatrix &data() const;
+
+ // Resizes the track to the number of frames and channels given,
+ // copying the given data into the track.
+ void CopyFrom(const char *v, int32_t num_frames, int32_t num_channels);
+
+ // Sets this track to be a combination of two input tracks
+ bool SetCombinedTrack(const Track &track_a,
+ const Track &track_b);
+
+ // Sets this track to be combination of three input tracks
+ bool SetCombinedTrack(const Track &track_a,
+ const Track &track_b,
+ const Track &track_c);
+
+ // Pads a track by repeating the last frame num_pads times.
+ bool Pad(int num_pads);
+
+ // Makes the current track and ref track equal lengths, use the longest length
+ // and zero pad the shorter track if the are different lengths.
+ void MakeSameSize(Track *track);
+
+ // Makes the current track and ref track equal lengths, use the longest length
+ // and zero pad the shorter tracks if any are shorter than the longest.
+ void MakeSameSize(Track *track_a,
+ Track *track_b);
+
+ private:
+ // Holds the number of frames of this track instance.
+ int num_frames_;
+
+ // Holds the number of channels of this track instance.
+ int num_channels_;
+
+ // Holds the frames values and times of this track instance.
+ FloatMatrix data_;
+
+ // Holds the voicing flags of this track instance.
+ std::vector val_;
+
+ // Holds whether this track instance has voicing enabled.
+ bool voicing_enabled_;
+
+ // The frame interval in seconds.
+ float shift_;
+};
+
+// Applies logarithm to all data values. Invalid values are set to INVALID_LOG.
+void ConvertToLogarithmic(Track *t);
+
+// Returns a new vector with the track data as a single sequence of
+// values. The caller takes ownership fo the pointer.
+float *TrackToFloatPointer(const Track &track, int *num_samples);
+
+inline int Track::num_frames() const {
+ return num_frames_;
+}
+
+inline int Track::num_channels() const {
+ return num_channels_;
+}
+
+inline float &Track::a(int f, int c) {
+ return data_.Get(c + 1, f);
+}
+
+inline float Track::a(int f, int c) const {
+ return data_.Get(c + 1, f);
+}
+
+inline void Track::set_v(int f, bool value) {
+ // If a writable reference is used, force the track into
+ // voicing enabled mode.
+ voicing_enabled_ = true;
+ val_[f] = value;
+}
+
+inline bool Track::v(int f) const {
+ return val_[f];
+}
+
+inline float &Track::t(int f) {
+ return data_.Get(0, f);
+}
+
+inline float Track::t(int f) const {
+ return data_.Get(0, f);
+}
+
+inline void Track::set_shift(float shift) {
+ shift_ = shift;
+}
+
+inline const FloatMatrix &Track::data() const {
+ return data_;
+}
+
+inline bool Track::voicing_enabled() const {
+ return voicing_enabled_;
+}
+
+inline void Track::set_voicing_enabled(bool b) {
+ voicing_enabled_ = b;
+}
+
+inline bool Track::Save(const std::string &filename, bool ascii) const {
+ FileResource fr(filename, "wb");
+ if (!fr.Get()) {
+ fprintf(stderr, "Failed to write '%s'", filename.c_str());
+ return false;
+ }
+ if (!ascii) {
+ return Save(&fr);
+ }
+ const std::string data = ToString();
+ if (fprintf(fr.fp(), "%s", data.c_str()) != data.size()) {
+ return false;
+ }
+ return true;
+}
+
+template
+void Track::Set(const std::vector ×,
+ const std::vector &values) {
+ if (times.size() != values.size()) {
+ fprintf(stderr, "Length of time and value vectors should equal (%d != %d)",
+ times.size(), values.size());
+ return;
+ }
+ resize(times.size());
+ for (int n = 0; n < times.size(); ++n) {
+ t(n) = times[n];
+ a(n) = values[n];
+ set_v(n, true);
+ }
+}
+
+template
+void Track::Set(float time_shift, const std::vector &values) {
+ resize(values.size());
+ FillTime(time_shift, 0);
+ for (int n = 0; n < values.size(); ++n) {
+ a(n) = values[n];
+ set_v(n, true);
+ }
+}
+
+#endif // _TRACK_H_
diff --git a/REAPER/epoch_tracker/epoch_tracker.cc b/REAPER/epoch_tracker/epoch_tracker.cc
new file mode 100644
index 0000000000000000000000000000000000000000..0b640f536adbbe2ab8abce7133632617290e5fc1
--- /dev/null
+++ b/REAPER/epoch_tracker/epoch_tracker.cc
@@ -0,0 +1,1255 @@
+/*
+Copyright 2015 Google Inc. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+// Author: dtalkin@google.com (David Talkin)
+
+// Implementation of the EpochTracker class. This does all of the
+// processing necessary to estimate the F0, voicing state and epochs
+// (glottal-closure instants) in human speech signals. See
+// epoch_tracker.h for details.
+
+#include "epoch_tracker/epoch_tracker.h"
+
+#include
+#include
+
+#include "epoch_tracker/fd_filter.h"
+#include "epoch_tracker/lpc_analyzer.h"
+#include "epoch_tracker/fft.h"
+
+const int kMinSampleRate = 6000;
+
+EpochTracker::EpochTracker(void) : sample_rate_(-1.0) {
+ SetParameters();
+}
+
+EpochTracker::~EpochTracker(void) {
+ CleanUp();
+}
+
+static inline int32_t RoundUp(float val) {
+ return static_cast(val + 0.5);
+}
+
+void EpochTracker::CleanUp(void) {
+ for (size_t i = 0; i < resid_peaks_.size(); ++i) {
+ for (size_t j = 0; j < resid_peaks_[i].future.size(); ++j) {
+ delete resid_peaks_[i].future[j];
+ }
+ }
+ resid_peaks_.clear();
+ output_.clear();
+ best_corr_.clear();
+}
+
+void EpochTracker::SetParameters(void) {
+ // Externally-settable control parameters:
+ // Period for the returned F0 signal.
+ external_frame_interval_ = kExternalFrameInterval;
+ do_highpass_ = kDoHighpass; // Enables highpassing of input signal.
+ // Enables Hilbert transformation of the input data.
+ do_hilbert_transform_ = kDoHilbertTransform;
+ max_f0_search_ = kMaxF0Search; // Maximum F0 to search for.
+ min_f0_search_ = kMinF0Search; // Minimum F0 to search for.
+ // Pulse spacing to use in unvoiced regions of the returned epoch signal.
+ unvoiced_pulse_interval_ = kUnvoicedPulseInterval;
+ debug_name_ = kDebugName; // base path for all debugging signals.
+
+ // Internal feature-computation parameters:
+ // For internal feature computations
+ internal_frame_interval_ = kInternalFrameInterval;
+ // for the high-pass filter
+ corner_frequency_ = 80.0;
+ filter_duration_ = 0.05;
+ // for the LPC inverse filter.
+ frame_duration_ = 0.02; // window size (sec)
+ lpc_frame_interval_ = 0.01; // (sec)
+ preemphasis_ = 0.98; // preemphasis for LPC analysis
+ noise_floor_ = 70.0; // SNR in dB simulated during LPC analysis.
+ // for computing LPC residual peak quality.
+ peak_delay_ = 0.0004; // for measuring prominence
+ skew_delay_ = 0.00015; // for measuring shape
+ peak_val_wt_ = 0.1;
+ peak_prominence_wt_ = 0.3;
+ peak_skew_wt_ = 0.1;
+ peak_quality_floor_ = 0.01;
+ // for computing voice-transition pseudo-probabilities
+ time_span_ = 0.020; // the interval (sec) centered on the
+ // measurement point, used to compute parameter
+ // deltas.
+ level_change_den_ = 30.0; // max. dB level change expected over
+ // time_span_ for bandpassed RMS for
+ // computing pseudo-probability of
+ // voicing.
+ min_rms_db_ = 20.0; // level floor in dB
+ // window size for computing amplitude-normalizing RMS
+ ref_dur_ = 0.02;
+ // low and high frequency limits for bandpassed RMS used in voicing indicator
+ min_freq_for_rms_ = 100.0;
+ max_freq_for_rms_ = 1000.0;
+ // duration of integrator for bandpassed RMS
+ rms_window_dur_ = 0.025;
+ // window duration, in seconds, for NCCF computations
+ correlation_dur_ = 0.0075;
+ // ignore any NCCF peaks less than this
+ correlation_thresh_ = 0.2;
+
+ // Parametrs used by the dynamic-programming tracker:
+ // reward for inserting another period
+ reward_ = -1.5;
+ // weight given to deviation of inter-pulse interval from the
+ // closest NCCF peak lag
+ period_deviation_wt_ = 1.0;
+ // weight given to the quality of the residual peak
+ peak_quality_wt_ = 1.3;
+ // cost of the unvoiced hypothesis
+ unvoiced_cost_ = kUnvoicedCost;
+ // cost of high NCCF values in hypothetical unvoiced regions
+ nccf_uv_peak_wt_ = 0.9;
+ // weight given to period length
+ period_wt_ = 0.0002;
+ // weight given to the pseudo-probability of voicing feature
+ level_wt_ = 0.8;
+ // weight given to period-length differences between adjacent periods.
+ freq_trans_wt_ = 1.8;
+ // cost of switching between voicing states; modulated by voicing
+ // onset/offset probs.
+ voice_transition_factor_ = 1.4;
+
+ // Parameters used to generate final outputs:
+ // pad time in seconds to add to the last measured period during
+ // output of periodically-resampled data
+ endpoint_padding_ = 0.01;
+}
+
+bool EpochTracker::Init(const int16_t* input, int32_t n_input, float sample_rate,
+ float min_f0_search, float max_f0_search,
+ bool do_highpass, bool do_hilbert_transform) {
+ if (input && (sample_rate > 6000.0) && (n_input > (sample_rate * 0.05)) &&
+ (min_f0_search < max_f0_search) && (min_f0_search > 0.0)) {
+ CleanUp();
+ min_f0_search_ = min_f0_search;
+ max_f0_search_ = max_f0_search;
+ sample_rate_ = sample_rate;
+ int16_t* input_p = const_cast(input);
+ if (do_highpass) {
+ input_p = HighpassFilter(input_p, n_input, sample_rate,
+ corner_frequency_, filter_duration_);
+ }
+ signal_.resize(n_input);
+ if (do_hilbert_transform) {
+ HilbertTransform(input_p, n_input, &(signal_.front()));
+ } else {
+ for (int32_t i = 0; i < n_input; ++i) {
+ signal_[i] = input_p[i];
+ }
+ }
+ if (input_p != input) {
+ delete [] input_p;
+ }
+ return true;
+ }
+ return false;
+}
+
+void EpochTracker::HilbertTransform(int16_t* input, int32_t n_input,
+ float* output) {
+ FFT ft = FFT(FFT::fft_pow2_from_window_size(n_input));
+ int32_t n_fft = ft.get_fftSize();
+ float* re = new float[n_fft];
+ float* im = new float[n_fft];
+ for (int i = 0; i < n_input; ++i) {
+ re[i] = input[i];
+ im[i] = 0.0;
+ }
+ for (int i = n_input; i < n_fft; ++i) {
+ re[i] = 0.0;
+ im[i] = 0.0;
+ }
+ ft.fft(re, im);
+ for (int i = 1; i < n_fft/2; ++i) {
+ float tmp = im[i];
+ im[i] = -re[i];
+ re[i] = tmp;
+ }
+ re[0] = im[0] = 0.0;
+ for (int i = n_fft/2 + 1; i < n_fft; ++i) {
+ float tmp = im[i];
+ im[i] = re[i];
+ re[i] = -tmp;
+ }
+ ft.ifft(re, im);
+ for (int i = 0; i < n_input; ++i) {
+ output[i] = re[i] / n_fft;
+ }
+ delete [] re;
+ delete [] im;
+}
+
+
+int16_t* EpochTracker::HighpassFilter(int16_t* input, int32_t n_input,
+ float sample_rate, float corner_freq,
+ float fir_duration) {
+ FdFilter filter(sample_rate, corner_freq, true, fir_duration, false);
+ int16_t* filtered_data = new int16_t[n_input];
+ int32_t max_buffer_size = filter.GetMaxInputSize();
+ int32_t to_process = n_input;
+ bool start = true;
+ bool end = false;
+ int32_t input_index = 0;
+ int32_t output_index = 0;
+ while (to_process > 0) {
+ int32_t to_send = to_process;
+ if (to_send > max_buffer_size) {
+ to_send = max_buffer_size;
+ } else {
+ end = true;
+ }
+ int32_t samples_returned = filter.FilterArray(input + input_index, to_send,
+ start, end,
+ filtered_data + output_index,
+ n_input - output_index);
+ input_index += to_send;
+ to_process -= to_send;
+ output_index += samples_returned;
+ start = false;
+ }
+ return filtered_data;
+}
+
+
+static float LpcDcGain(float* lpc, int32_t order) {
+ float sum = 0.0;
+ for (int32_t i = 0; i <= order; ++i) {
+ sum += lpc[i];
+ }
+ if (sum > 0.0) {
+ return sum;
+ } else {
+ return 1.0;
+ }
+}
+
+
+static void MakeDeltas(float* now, float* next, int32_t size, int32_t n_steps,
+ float* deltas) {
+ for (int32_t i = 0; i < size; ++i) {
+ deltas[i] = (next[i] - now[i]) / n_steps;
+ }
+}
+
+
+bool EpochTracker::GetLpcResidual(const std::vector& input, float sample_rate,
+ std::vector* output) {
+ int32_t n_input = input.size();
+ if (!((n_input > 0) && (sample_rate > 0.0) && output)) {
+ return false;
+ }
+ output->resize(n_input);
+ int32_t frame_step = RoundUp(sample_rate * lpc_frame_interval_);
+ int32_t frame_size = RoundUp(sample_rate * frame_duration_);
+ int32_t n_frames = 1 + ((n_input - frame_size) / frame_step);
+ int32_t n_analyzed = ((n_frames - 1) * frame_step) + frame_size;
+ // Must have one more than frame size to do a complete frame.
+ if (n_analyzed <= n_input) {
+ n_frames--;
+ if (n_frames <= 0) {
+ return false;
+ }
+ }
+ LpcAnalyzer lp;
+ int32_t order = lp.GetLpcOrder(sample_rate);
+ float* lpc = new float[order + 1];
+ float* old_lpc = new float[order + 1];
+ float* delta_lpc = new float[order + 1];
+ float norm_error = 0.0;
+ float preemp_rms = 0.0;
+
+#define RELEASE_MEMORY() { \
+ delete [] lpc; \
+ delete [] old_lpc; \
+ delete [] delta_lpc; \
+ }
+
+ if (!lp.ComputeLpc(order, noise_floor_, frame_size, &(input.front()),
+ old_lpc, NULL, NULL, &norm_error, &preemp_rms,
+ preemphasis_)) {
+ RELEASE_MEMORY();
+ return false;
+ }
+ for (int32_t i = 0; i <= order; ++i) {
+ delta_lpc[i] = 0.0;
+ (*output)[i] = 0.0;
+ }
+ float old_gain = LpcDcGain(old_lpc, order);
+ float new_gain = 1.0;
+ int32_t n_to_filter = (frame_size / 2) - order; // How many samples
+ // to process before
+ // computing the next
+ // LPC frame.
+ int32_t input_p = 0; // Where to get the next frame for LPC analysis
+ int32_t output_p = order; // where to store output samples.
+ int32_t proc_p = 0; // Where to pick up samples for input to the filter
+
+ // Main processing loop:
+ // Compute a new frame of LPC
+ // Compute the DC gain for the new LPC
+ // Compute delta DC gain.
+ // Compute the LPC deltas.
+ // For each point in the frame:
+ // Use old_lpc to produce an output point.
+ // Update the old LPCs and the DC gain
+ // As soon as the center of the current frame is reached, compute
+ // the LPC for the next frame.
+ for ( ; n_frames > 0; --n_frames, input_p += frame_step,
+ n_to_filter = frame_step) {
+ if (!lp.ComputeLpc(order, noise_floor_, frame_size,
+ (&(input.front())) + input_p, lpc, NULL, NULL,
+ &norm_error, &preemp_rms, preemphasis_)) {
+ RELEASE_MEMORY();
+ return false;
+ }
+ new_gain = LpcDcGain(lpc, order);
+ float delta_gain = (new_gain - old_gain) / n_to_filter;
+ MakeDeltas(old_lpc, lpc, order+1, n_to_filter, delta_lpc);
+ for (int32_t sample = 0; sample < n_to_filter; ++sample, ++proc_p,
+ ++output_p) {
+ float sum = 0.0;
+ int32_t mem = proc_p;
+ for (int32_t k = order; k > 0; --k, ++mem) {
+ sum += (old_lpc[k] * input[mem]);
+ old_lpc[k] += delta_lpc[k];
+ }
+ sum += input[mem]; // lpc[0] is always 1.0
+ (*output)[output_p] = sum / old_gain;
+ old_gain += delta_gain;
+ }
+ }
+ RELEASE_MEMORY();
+ return true;
+}
+
+// Note that GetResidualPulses assumes the LPC residual is in the
+// "correct" polarity, with the GCI pulses of interest being negative
+// pulses with a gradual fall and an abrupt rise.
+void EpochTracker::GetResidualPulses(void) {
+ int32_t peak_ind = RoundUp(peak_delay_ * sample_rate_);
+ int32_t skew_ind = RoundUp(skew_delay_ * sample_rate_);
+ float min_peak = -1.0; // minimum value that will be considered as a peak
+ int32_t limit = norm_residual_.size() - peak_ind;
+ resid_peaks_.resize(0);
+ peaks_debug_.resize(residual_.size());
+ for (size_t i = 0; i < peaks_debug_.size(); ++i) {
+ peaks_debug_[i] = 0.0;
+ }
+ for (int32_t i = peak_ind; i < limit; ++i) {
+ float val = norm_residual_[i];
+ if (val > min_peak) {
+ continue;
+ }
+ if ((norm_residual_[i-1] > val) && (val <= norm_residual_[i+1])) {
+ float vm_peak = norm_residual_[i - peak_ind];
+ float vp_peak = norm_residual_[i + peak_ind];
+ if ((vm_peak < val) || (vp_peak < val)) {
+ continue;
+ }
+ float vm_skew = norm_residual_[i - skew_ind];
+ float vp_skew = norm_residual_[i + skew_ind];
+ float sharp = (0.5 * (vp_peak + vm_peak)) - val;
+ float skew = -(vm_skew - vp_skew);
+ ResidPeak p;
+ p.resid_index = i;
+ float time = static_cast(i) / sample_rate_;
+ p.frame_index = RoundUp(time / internal_frame_interval_);
+ if (p.frame_index >= n_feature_frames_) {
+ p.frame_index = n_feature_frames_ - 1;
+ }
+ p.peak_quality = (-val * peak_val_wt_) + (skew * peak_skew_wt_) +
+ (sharp * peak_prominence_wt_);
+ if (p.peak_quality < peak_quality_floor_) {
+ p.peak_quality = peak_quality_floor_;
+ }
+ resid_peaks_.push_back(p);
+ peaks_debug_[i] = p.peak_quality;
+ }
+ }
+}
+
+
+void EpochTracker::GetVoiceTransitionFeatures(void) {
+ int32_t frame_offset = RoundUp(0.5 * time_span_ / internal_frame_interval_);
+ if (frame_offset <= 0) {
+ frame_offset = 1;
+ }
+ voice_onset_prob_.resize(n_feature_frames_);
+ voice_offset_prob_.resize(n_feature_frames_);
+ int32_t limit = n_feature_frames_ - frame_offset;
+ for (int32_t frame = frame_offset; frame < limit; ++frame) {
+ float delta_rms = (bandpassed_rms_[frame + frame_offset] -
+ bandpassed_rms_[frame - frame_offset]) / level_change_den_;
+ if (delta_rms > 1.0) {
+ delta_rms = 1.0;
+ } else {
+ if (delta_rms < -1.0) {
+ delta_rms = -1.0;
+ }
+ }
+ float prob_onset = delta_rms;
+ float prob_offset = -prob_onset;
+ if (prob_onset > 1.0) {
+ prob_onset = 1.0;
+ } else {
+ if (prob_onset < 0.0) {
+ prob_onset = 0.0;
+ }
+ }
+ if (prob_offset > 1.0) {
+ prob_offset = 1.0;
+ } else {
+ if (prob_offset < 0.0) {
+ prob_offset = 0.0;
+ }
+ }
+ voice_onset_prob_[frame] = prob_onset;
+ voice_offset_prob_[frame] = prob_offset;
+ }
+ // Just set the onset and offset probs to zero in the end zones.
+ for (int32_t frame = 0; frame < frame_offset; ++frame) {
+ int32_t bframe = n_feature_frames_ - 1 - frame;
+ voice_onset_prob_[frame] = voice_offset_prob_[frame] = 0.0;
+ voice_onset_prob_[bframe] = voice_offset_prob_[bframe] = 0.0;
+ }
+}
+
+
+void EpochTracker::GetRmsVoicingModulator(void) {
+ float min_val = bandpassed_rms_[0];
+ float max_val = min_val;
+
+ prob_voiced_.resize(bandpassed_rms_.size());
+ // Find the max and min over the whole RMS array. Scale and offset
+ // the RMS values to all fall in th range of 0.0 to 1.0.
+ for (size_t i = 1; i < bandpassed_rms_.size(); ++i) {
+ float val = bandpassed_rms_[i];
+ if (val < min_val) {
+ min_val = val;
+ } else {
+ if (val > max_val) {
+ max_val = val;
+ }
+ }
+ }
+ if (min_val < min_rms_db_) {
+ min_val = min_rms_db_;
+ }
+ float range = max_val - min_val;
+ if (range < 1.0) {
+ range = 1.0;
+ }
+ for (size_t i = 0; i < bandpassed_rms_.size(); ++i) {
+ prob_voiced_[i] = (bandpassed_rms_[i] - min_val) / range;
+ if (prob_voiced_[i] < 0.0) {
+ prob_voiced_[i] = 0.0;
+ }
+ }
+}
+
+
+int32_t EpochTracker::FindNccfPeaks(const std::vector& input, float thresh,
+ std::vector* output) {
+ int32_t limit = input.size() - 1;
+ uint32_t n_peaks = 0;
+ float max_val = 0.0;
+ int16_t max_index = 1;
+ int16_t max_out_index = 0;
+ output->resize(0);
+ for (int16_t i = 1; i < limit; ++i) {
+ float val = input[i];
+ if ((val > thresh) && (val > input[i-1]) && (val >= input[i+1])) {
+ if (val > max_val) {
+ max_val = val;
+ max_out_index = n_peaks;
+ max_index = i;
+ }
+ n_peaks++;
+ output->push_back(i);
+ }
+ }
+ // Be sure the highest peak is the first one in the array.
+ if ((n_peaks > 1) && (max_out_index > 0)) {
+ int16_t hold = (*output)[0];
+ (*output)[0] = (*output)[max_out_index];
+ (*output)[max_out_index] = hold;
+ } else {
+ if (n_peaks <= 0) {
+ n_peaks = 1;
+ output->push_back(max_index);
+ }
+ }
+ return n_peaks;
+}
+
+
+void EpochTracker::CrossCorrelation(const std::vector& data, int32_t start,
+ int32_t first_lag, int32_t n_lags,
+ int32_t size, std::vector* corr) {
+ const float* input = (&(data.front())) + start;
+ corr->resize(n_lags);
+ float energy = 0.0; // Zero-lag energy part of the normalizer.
+ for (int32_t i = 0; i < size; ++i) {
+ energy += input[i] * input[i];
+ }
+ if (energy == 0.0) { // Bail out if no energy is found.
+ for (int32_t i = 0; i < n_lags; ++i) {
+ (*corr)[i] = 0.0;
+ }
+ return;
+ }
+ int32_t limit = first_lag + size;
+ double lag_energy = 0.0; // Energy at the period hypothesis lag.
+ for (int32_t i = first_lag; i < limit; ++i) {
+ lag_energy += input[i] * input[i];
+ }
+ int32_t last_lag = first_lag + n_lags;
+ int32_t oind = 0; // Index for storing output values.
+ for (int32_t lag = first_lag; lag < last_lag; ++lag, ++oind) {
+ float sum = 0.0;
+ int32_t lag_ind = lag;
+ for (int32_t i = 0; i < size; ++i, ++lag_ind) {
+ sum += input[i] * input[lag_ind];
+ }
+ if (lag_energy <= 0.0)
+ lag_energy = 1.0;
+ (*corr)[oind] = sum / sqrt(energy * lag_energy);
+ lag_energy -= input[lag] * input[lag]; // Discard old sample.
+ lag_energy += input[lag_ind] * input[lag_ind]; // Pick up the new sample.
+ }
+ return;
+}
+
+
+void EpochTracker::GetPulseCorrelations(float window_dur, float peak_thresh) {
+ first_nccf_lag_ = RoundUp(sample_rate_ / max_f0_search_);
+ int32_t max_lag = RoundUp(sample_rate_ / min_f0_search_);
+ n_nccf_lags_ = max_lag - first_nccf_lag_;
+ int32_t window_size = RoundUp(window_dur * sample_rate_);
+ int32_t half_wind = window_size / 2;
+ int32_t frame_size = window_size + max_lag;
+
+ std::vector mixture;
+ mixture.resize(residual_.size());
+ const float kMinCorrelationStep = 0.001; // Pulse separation
+ // before computing new
+ // correlation values.
+ const float kResidFract = 0.7; // Fraction of the residual to use.
+ const float kPcmFract = 1.0 - kResidFract; // Fraction of the input to use.
+ for (size_t i = 0; i < residual_.size(); ++i) {
+ mixture[i] = (kResidFract * residual_[i]) + (kPcmFract * signal_[i]);
+ }
+
+ int32_t min_step = RoundUp(sample_rate_ * kMinCorrelationStep);
+ int32_t old_start = - (2.0 * min_step);
+ for (size_t peak = 0; peak < resid_peaks_.size(); ++peak) {
+ int32_t start = resid_peaks_[peak].resid_index - half_wind;
+ if (start < 0) {
+ start = 0;
+ }
+ size_t end = start + frame_size;
+ if ((end >= mixture.size()) || ((start - old_start) < min_step)) {
+ resid_peaks_[peak].nccf = resid_peaks_[peak - 1].nccf;
+ resid_peaks_[peak].nccf_periods = resid_peaks_[peak - 1].nccf_periods;
+ } else {
+ CrossCorrelation(mixture, start, first_nccf_lag_, n_nccf_lags_,
+ window_size, &(resid_peaks_[peak].nccf));
+ FindNccfPeaks(resid_peaks_[peak].nccf, peak_thresh,
+ &(resid_peaks_[peak].nccf_periods));
+ // Turn the peak indices from FindNccfPeaks into NCCF period hyps.
+ for (size_t i = 0; i < resid_peaks_[peak].nccf_periods.size(); ++i) {
+ resid_peaks_[peak].nccf_periods[i] += first_nccf_lag_;
+ }
+ old_start = start;
+ }
+ }
+}
+
+
+void EpochTracker::Window(const std::vector& input, int32_t offset, size_t size,
+ float* output) {
+ if (size != window_.size()) {
+ window_.resize(size);
+ float arg = 2.0 * M_PI / size;
+ for (size_t i = 0; i < size; ++i) {
+ window_[i] = 0.5 - (0.5 * cos((i + 0.5) * arg));
+ }
+ }
+ const float* data = (&(input.front())) + offset;
+ for (size_t i = 0; i < size; ++i) {
+ output[i] = data[i] * window_[i];
+ }
+}
+
+
+bool EpochTracker::GetBandpassedRmsSignal(const std::vector& input,
+ float sample_rate,
+ float low_limit, float high_limit,
+ float frame_interval,
+ float frame_dur,
+ std::vector* output_rms) {
+ size_t frame_step = RoundUp(sample_rate * frame_interval);
+ size_t frame_size = RoundUp(sample_rate * frame_dur);
+ size_t n_frames = 1 + ((input.size() - frame_size) / frame_step);
+ if (n_frames < 2) {
+ fprintf(stderr, "input too small (%d) in GetBandpassedRmsSignal\n",
+ static_cast(input.size()));
+ output_rms->resize(0);
+ return false;
+ }
+ output_rms->resize(n_frames);
+ FFT ft(FFT::fft_pow2_from_window_size(frame_size));
+ int32_t fft_size = ft.get_fftSize();
+ int32_t first_bin = RoundUp(fft_size * low_limit / sample_rate);
+ int32_t last_bin = RoundUp(fft_size * high_limit / sample_rate);
+ float* re = new float[fft_size];
+ float* im = new float[fft_size];
+ size_t first_frame = frame_size / (2 * frame_step);
+ if ((first_frame * 2 * frame_step) < frame_size) {
+ first_frame++;
+ }
+ for (size_t frame = first_frame; frame < n_frames; ++frame) {
+ Window(input, (frame - first_frame) * frame_step, frame_size, re);
+ for (size_t i = 0; i < frame_size; ++i) {
+ im[i] = 0.0;
+ }
+ for (int32_t i = frame_size; i < fft_size; ++i) {
+ re[i] = im[i] = 0.0;
+ }
+ ft.fft(re, im);
+ float rms = 20.0 *
+ log10(1.0 + ft.get_band_rms(re, im, first_bin, last_bin));
+ (*output_rms)[frame] = rms;
+ if (frame == first_frame) {
+ for (size_t bframe = 0; bframe < first_frame; ++bframe) {
+ (*output_rms)[bframe] = rms;
+ }
+ }
+ }
+ delete [] re;
+ delete [] im;
+ return true;
+}
+
+
+void EpochTracker::GetSymmetryStats(const std::vector& data, float* pos_rms,
+ float* neg_rms, float* mean) {
+ int32_t n_input = data.size();
+ double p_sum = 0.0;
+ double n_sum = 0.0;
+ double sum = 0.0;
+ int32_t n_p = 0;
+ int32_t n_n = 0;
+ for (int32_t i = 0; i < n_input; ++i) {
+ sum += data[i];
+ }
+ *mean = sum / n_input;
+ for (int32_t i = 0; i < n_input; ++i) {
+ double val = data[i] - *mean;
+ if (val > 0.0) {
+ p_sum += (val * val);
+ n_p++;
+ } else {
+ if (val < 0.0) {
+ n_sum += (val * val);
+ n_n++;
+ }
+ }
+ }
+ *pos_rms = sqrt(p_sum / n_p);
+ *neg_rms = sqrt(n_sum / n_n);
+}
+
+
+void EpochTracker::NormalizeAmplitude(const std::vector& input,
+ float sample_rate,
+ std::vector* output) {
+ int32_t n_input = input.size();
+ int32_t ref_size = RoundUp(sample_rate * ref_dur_);
+ std::vector wind;
+
+ output->resize(n_input);
+ // Just calling Window here to create a Hann window in window_.
+ Window(input, 0, ref_size, &(output->front()));
+ int32_t ref_by_2 = ref_size / 2;
+ int32_t frame_step = RoundUp(sample_rate * internal_frame_interval_);
+ int32_t limit = n_input - ref_size;
+ int32_t frame_limit = ref_by_2;
+ int32_t data_p = 0;
+ int32_t frame_p = 0;
+ double old_inv_rms = 0.0;
+ while (frame_p < limit) {
+ double ref_energy = 1.0; // to prevent divz
+ for (int32_t i = 0; i < ref_size; ++i) {
+ double val = window_[i] * input[i + frame_p];
+ ref_energy += (val * val);
+ }
+ double inv_rms = sqrt(static_cast(ref_size) / ref_energy);
+ double delta_inv_rms = 0.0;
+ if (frame_p > 0) {
+ delta_inv_rms = (inv_rms - old_inv_rms) / frame_step;
+ } else {
+ old_inv_rms = inv_rms;
+ }
+ for (int i = 0; i < frame_limit; ++i, ++data_p) {
+ (*output)[data_p] = input[data_p] * old_inv_rms;
+ old_inv_rms += delta_inv_rms;
+ }
+ frame_limit = frame_step;
+ frame_p += frame_step;
+ }
+ for ( ; data_p < n_input; ++data_p) {
+ (*output)[data_p] = input[data_p] * old_inv_rms;
+ }
+}
+
+bool EpochTracker::ComputePolarity(int *polarity) {
+ if (sample_rate_ <= 0.0) {
+ fprintf(stderr, "EpochTracker not initialized in ComputeFeatures\n");
+ return false;
+ }
+ if (!GetBandpassedRmsSignal(signal_, sample_rate_, min_freq_for_rms_,
+ max_freq_for_rms_, internal_frame_interval_,
+ rms_window_dur_, &bandpassed_rms_)) {
+ fprintf(stderr, "Failure in GetBandpassedRmsSignal\n");
+ return false;
+ }
+ if (!GetLpcResidual(signal_, sample_rate_, &residual_)) {
+ fprintf(stderr, "Failure in GetLpcResidual\n");
+ return false;
+ }
+ float mean = 0.0;
+ GetSymmetryStats(residual_, &positive_rms_, &negative_rms_, &mean);
+ *polarity = -1;
+ if (positive_rms_ > negative_rms_) {
+ *polarity = 1;
+ }
+ return true;
+}
+
+bool EpochTracker::ComputeFeatures(void) {
+ if (sample_rate_ <= 0.0) {
+ fprintf(stderr, "EpochTracker not initialized in ComputeFeatures\n");
+ return false;
+ }
+ if (!GetBandpassedRmsSignal(signal_, sample_rate_, min_freq_for_rms_,
+ max_freq_for_rms_, internal_frame_interval_,
+ rms_window_dur_, &bandpassed_rms_)) {
+ fprintf(stderr, "Failure in GetBandpassedRmsSignal\n");
+ return false;
+ }
+ if (!GetLpcResidual(signal_, sample_rate_, &residual_)) {
+ fprintf(stderr, "Failure in GetLpcResidual\n");
+ return false;
+ }
+ n_feature_frames_ = bandpassed_rms_.size();
+ float mean = 0.0;
+ GetSymmetryStats(residual_, &positive_rms_, &negative_rms_, &mean);
+ fprintf(stdout, "Residual symmetry: P:%f N:%f MEAN:%f\n",
+ positive_rms_, negative_rms_, mean);
+ if (positive_rms_ > negative_rms_) {
+ fprintf(stdout, "Inverting signal\n");
+ for (size_t i = 0; i < residual_.size(); ++i) {
+ residual_[i] = -residual_[i];
+ signal_[i] = -signal_[i];
+ }
+ }
+ NormalizeAmplitude(residual_, sample_rate_, &norm_residual_);
+ GetResidualPulses();
+ GetPulseCorrelations(correlation_dur_, correlation_thresh_);
+ GetVoiceTransitionFeatures();
+ GetRmsVoicingModulator();
+ return true;
+}
+
+
+bool EpochTracker::TrackEpochs(void) {
+ CreatePeriodLattice();
+ DoDynamicProgramming();
+ return BacktrackAndSaveOutput();
+}
+
+
+void EpochTracker::CreatePeriodLattice(void) {
+ int32_t low_period = RoundUp(sample_rate_ / max_f0_search_);
+ int32_t high_period = RoundUp(sample_rate_ / min_f0_search_);
+ int32_t total_cands = 0;
+
+ // For each pulse in the normalized residual...
+ for (size_t peak = 0; peak < resid_peaks_.size(); ++peak) {
+ size_t frame_index = resid_peaks_[peak].frame_index;
+ size_t resid_index = resid_peaks_[peak].resid_index;
+ int32_t min_period = resid_index + low_period;
+ int32_t max_period = resid_index + high_period;
+ float lowest_cost = 1.0e30;
+ float time = resid_index / sample_rate_;
+ int32_t best_nccf_period = resid_peaks_[peak].nccf_periods[0];
+ float best_cc_val =
+ resid_peaks_[peak].nccf[best_nccf_period - first_nccf_lag_];
+ best_corr_.push_back(time);
+ best_corr_.push_back(best_cc_val);
+ EpochCand* uv_cand = new EpochCand; // pre-allocate an unvoiced candidate.
+ uv_cand->voiced = false;
+ uv_cand->start_peak = peak;
+ uv_cand->cost_sum = 0.0;
+ uv_cand->local_cost = 0.0;
+ uv_cand->best_prev_cand = -1;
+ int32_t next_cands_created = 0;
+ // For each of the next residual pulses in the search range...
+ for (size_t npeak = peak + 1; npeak < resid_peaks_.size(); ++npeak) {
+ int32_t iperiod = resid_peaks_[npeak].resid_index - resid_index;
+ if (resid_peaks_[npeak].resid_index >= min_period) {
+ float fperiod = iperiod;
+ // Find the NCCF period that most closely matches.
+ int32_t cc_peak = 0;
+ float min_period_diff = fabs(log(fperiod / best_nccf_period));
+ for (size_t cc_peak_ind = 1;
+ cc_peak_ind < resid_peaks_[peak].nccf_periods.size();
+ ++cc_peak_ind) {
+ int32_t nccf_period = resid_peaks_[peak].nccf_periods[cc_peak_ind];
+ float test_diff = fabs(log(fperiod / nccf_period));
+ if (test_diff < min_period_diff) {
+ min_period_diff = test_diff;
+ cc_peak = cc_peak_ind;
+ }
+ }
+ // Generate a forward-period candidate. Grade the candidate
+ // on closeness to a NCCF period hyp, value of the NCCF,
+ // values of the candidate endpoint peaks.
+ EpochCand* v_cand = new EpochCand;
+ v_cand->voiced = true;
+ v_cand->period = iperiod;
+ int32_t cc_index = iperiod - first_nccf_lag_;
+ float cc_value = 0.0;
+ // If this period is in the normal search range, retrieve the
+ // actual NCCF value for that lag.
+ if ((cc_index >= 0) && (cc_index < n_nccf_lags_)) {
+ cc_value = resid_peaks_[peak].nccf[cc_index];
+ } else { // punt and use the "closest" nccf peak
+ int32_t peak_cc_index = resid_peaks_[peak].nccf_periods[cc_peak] -
+ first_nccf_lag_;
+ cc_value = resid_peaks_[peak].nccf[peak_cc_index];
+ }
+ float per_dev_cost = period_deviation_wt_ * min_period_diff;
+ float level_cost = level_wt_ * (1.0 - prob_voiced_[frame_index]);
+ float period_cost = fperiod * period_wt_;
+ float peak_qual_cost = peak_quality_wt_ /
+ (resid_peaks_[npeak].peak_quality + resid_peaks_[peak].peak_quality);
+ float local_cost = (1.0 - cc_value) + per_dev_cost + peak_qual_cost +
+ level_cost + period_cost + reward_;
+ v_cand->local_cost = local_cost;
+ if (local_cost < lowest_cost) {
+ lowest_cost = local_cost;
+ // Evaluate this best voiced period as an unvoiced
+ // hypothesis. (There are always plenty of poor
+ // voiced candidates!)
+ uv_cand->period = iperiod;
+ level_cost = level_wt_ * prob_voiced_[frame_index];
+ uv_cand->local_cost = (nccf_uv_peak_wt_ * cc_value) +
+ level_cost + unvoiced_cost_ + reward_;
+ uv_cand->end_peak = npeak;
+ uv_cand->closest_nccf_period =
+ resid_peaks_[peak].nccf_periods[cc_peak];
+ }
+ v_cand->start_peak = peak;
+ v_cand->end_peak = npeak;
+ v_cand->closest_nccf_period = resid_peaks_[peak].nccf_periods[cc_peak];
+ v_cand->cost_sum = 0.0;
+ v_cand->best_prev_cand = -1;
+ resid_peaks_[peak].future.push_back(v_cand);
+ resid_peaks_[npeak].past.push_back(v_cand);
+ total_cands++;
+ next_cands_created++;
+ if (resid_peaks_[npeak].resid_index >= max_period) {
+ break; // Exit the search only after at least one peak has
+ // been found, even if it is necessary to go beyond
+ // the nominal maximum period.
+ }
+ } // end if this period is >= minimum search period.
+ } // end for each next pulse in the global period-search range.
+ // Install the unvoiced candidate for this pulse.
+ if (next_cands_created) { // Register the unvoiced hyp iff there
+ // was at least one voiced hyp.
+ resid_peaks_[peak].future.push_back(uv_cand);
+ resid_peaks_[uv_cand->end_peak].past.push_back(uv_cand);
+ total_cands++;
+ } else {
+ delete uv_cand;
+ }
+ // Now all residual-pulse period hyps that start at the current
+ // pulse have been generated.
+
+ // If this pulse is one of the first few in the residual that had
+ // no possible preceeding periods, mark it as an origin.
+ if (resid_peaks_[peak].past.size() == 0) { // Is this pulse an origin?
+ for (size_t pp = 0; pp < resid_peaks_[peak].future.size(); ++pp) {
+ resid_peaks_[peak].future[pp]->cost_sum =
+ resid_peaks_[peak].future[pp]->local_cost;
+ resid_peaks_[peak].future[pp]->best_prev_cand = -1;
+ }
+ } else { // There are previous period hyps to consider...
+ // Check if at least one UV hyp is included in the period hyps
+ // that end on this peak. If there are none, generate one by
+ // cloning the best voiced hyp in the collection, but score it
+ // as unvoiced.
+ int32_t uv_hyps_found = 0;
+ float lowest_cost = resid_peaks_[peak].past[0]->local_cost;
+ size_t lowest_index = 0;
+ for (size_t pcand = 0; pcand < resid_peaks_[peak].past.size(); ++pcand) {
+ if (!resid_peaks_[peak].past[pcand]->voiced) {
+ uv_hyps_found++;
+ } else {
+ if (resid_peaks_[peak].past[pcand]->local_cost < lowest_cost) {
+ lowest_index = pcand;
+ lowest_cost = resid_peaks_[peak].past[pcand]->local_cost;
+ }
+ }
+ }
+ if (!uv_hyps_found) { // clone an UV hyp from the best V hyp found.
+ size_t start_peak = resid_peaks_[peak].past[lowest_index]->start_peak;
+ EpochCand* uv_cand = new EpochCand;
+ uv_cand->voiced = false;
+ uv_cand->start_peak = start_peak;
+ uv_cand->end_peak = peak;
+ uv_cand->period = resid_peaks_[peak].past[lowest_index]->period;
+ uv_cand->closest_nccf_period =
+ resid_peaks_[peak].past[lowest_index]->closest_nccf_period;
+ uv_cand->cost_sum = 0.0;
+ uv_cand->local_cost = 0.0;
+ uv_cand->best_prev_cand = -1;
+ float llevel_cost = level_wt_ *
+ prob_voiced_[resid_peaks_[start_peak].frame_index];
+ int32_t lcc_index = uv_cand->period - first_nccf_lag_;
+ float lcc_value = 0.0;
+ // If this period is in the normal search range, retrieve the
+ // actual NCCF value for that lag.
+ if ((lcc_index >= 0) && (lcc_index < n_nccf_lags_)) {
+ lcc_value = resid_peaks_[start_peak].nccf[lcc_index];
+ } else {
+ int32_t peak_cc_index = uv_cand->closest_nccf_period - first_nccf_lag_;
+ lcc_value = resid_peaks_[start_peak].nccf[peak_cc_index];
+ }
+ uv_cand->local_cost = (nccf_uv_peak_wt_ * lcc_value) + llevel_cost +
+ unvoiced_cost_ + reward_;
+ resid_peaks_[start_peak].future.push_back(uv_cand);
+ resid_peaks_[peak].past.push_back(uv_cand);
+ total_cands++;
+ }
+ }
+ } // end of the first pass at all pulses in the residual.
+ // All forward period hypotheses that start on all residual pulses
+ // in the signal have now been generated, and both voiced and
+ // unvoiced continuity throughout the lattice of hyps have been
+ // assured.
+}
+
+
+void EpochTracker::DoDynamicProgramming(void) {
+ // Perform the dynamic programming iterations over all pulses in
+ // the residual.
+ // For each pulse in the residual....
+ for (size_t peak = 0; peak < resid_peaks_.size(); ++peak) {
+ if (resid_peaks_[peak].past.size() == 0) { // Is this peak an origin?
+ continue;
+ }
+ // For each forward period hypothesis starting at this pulse...
+ for (size_t fhyp = 0; fhyp < resid_peaks_[peak].future.size(); ++fhyp) {
+ float min_cost = 1.0e30; // huge
+ size_t min_index = 0;
+ float forward_period = resid_peaks_[peak].future[fhyp]->period;
+ // For each of the previous period hyps ending on this pulse...
+ for (size_t phyp = 0; phyp < resid_peaks_[peak].past.size(); ++phyp) {
+ float sum_cost = 0.0;
+ // There are 4 voicing hyps to consider: V->V V->UV UV->V UV->UV
+ if (resid_peaks_[peak].future[fhyp]->voiced &&
+ resid_peaks_[peak].past[phyp]->voiced) { // v->v
+ float f_trans_cost = freq_trans_wt_ *
+ fabs(log(forward_period / resid_peaks_[peak].past[phyp]->period));
+ sum_cost = f_trans_cost + resid_peaks_[peak].past[phyp]->cost_sum;
+ } else {
+ if (resid_peaks_[peak].future[fhyp]->voiced &&
+ !resid_peaks_[peak].past[phyp]->voiced) { // uv->v
+ float v_transition_cost = voice_transition_factor_ *
+ (1.0 - voice_onset_prob_[resid_peaks_[peak].frame_index]);
+ sum_cost = resid_peaks_[peak].past[phyp]->cost_sum +
+ v_transition_cost;
+ } else {
+ if ((!resid_peaks_[peak].future[fhyp]->voiced) &&
+ resid_peaks_[peak].past[phyp]->voiced) { // v->uv
+ float v_transition_cost = voice_transition_factor_ *
+ (1.0 - voice_offset_prob_[resid_peaks_[peak].frame_index]);
+ sum_cost = resid_peaks_[peak].past[phyp]->cost_sum +
+ v_transition_cost;
+ } else { // UV->UV
+ sum_cost = resid_peaks_[peak].past[phyp]->cost_sum;
+ }
+ }
+ }
+ if (sum_cost < min_cost) {
+ min_cost = sum_cost;
+ min_index = phyp;
+ }
+ } // end for each previous period hyp
+ resid_peaks_[peak].future[fhyp]->cost_sum =
+ resid_peaks_[peak].future[fhyp]->local_cost + min_cost;
+ resid_peaks_[peak].future[fhyp]->best_prev_cand = min_index;
+ } // end for each foreward period hyp
+ } // end for each pulse in the residual signal.
+ // Here ends the dynamic programming.
+}
+
+
+bool EpochTracker::BacktrackAndSaveOutput(void) {
+ if (resid_peaks_.size() == 0) {
+ fprintf(stderr, "Can't backtrack with no residual peaks\n");
+ return false;
+ }
+ // Now find the best period hypothesis at the end of the signal,
+ // and backtrack from there.
+ float min_cost = 1.0e30;
+ int32_t min_index = 0;
+ // First, find a terminal peak which is the end of more than one
+ // period candidate.
+ size_t end = 0;
+ for (size_t peak = resid_peaks_.size() - 1; peak > 0; --peak) {
+ if ((resid_peaks_[peak].past.size() > 1)) {
+ for (size_t ind = 0; ind < resid_peaks_[peak].past.size(); ++ind) {
+ if (resid_peaks_[peak].past[ind]->cost_sum < min_cost) {
+ min_cost = resid_peaks_[peak].past[ind]->cost_sum;
+ min_index = ind;
+ }
+ }
+ end = peak;
+ break;
+ }
+ }
+ if (end == 0) {
+ fprintf(stderr, "No terminal peak found in DynamicProgramming\n");
+ return false;
+ }
+ output_.clear();
+ // Backtrack through the best pointers to retrieve the optimum
+ // period and voicing candidates. Save the GCI and voicing
+ // estimates.
+ while (1) {
+ int32_t start_peak = resid_peaks_[end].past[min_index]->start_peak;
+ TrackerResults tr;
+ tr.resid_index = resid_peaks_[start_peak].resid_index;
+ if (resid_peaks_[end].past[min_index]->voiced) {
+ float nccf_period =
+ resid_peaks_[end].past[min_index]->closest_nccf_period;
+ // TODO(dtalkin) If the closest NCCF period is more than epsilon
+ // different from the inter-pulse interval, use the inter-pulse
+ // interval instead.
+ tr.f0 = sample_rate_ / nccf_period;
+ tr.voiced = true;
+ } else {
+ tr.f0 = 0.0;
+ tr.voiced = false;
+ }
+ int32_t cc_index = resid_peaks_[end].past[min_index]->period -
+ first_nccf_lag_;
+ // If this period is in the normal search range, retrieve the
+ // actual NCCF value for that lag.
+ if ((cc_index >= 0) && (cc_index < n_nccf_lags_)) {
+ tr.nccf_value = resid_peaks_[start_peak].nccf[cc_index];
+ } else {
+ int32_t peak_cc_index =
+ resid_peaks_[end].past[min_index]->closest_nccf_period -
+ first_nccf_lag_;
+ tr.nccf_value = resid_peaks_[start_peak].nccf[peak_cc_index];
+ }
+ output_.push_back(tr);
+ size_t new_end = resid_peaks_[end].past[min_index]->start_peak;
+ min_index = resid_peaks_[end].past[min_index]->best_prev_cand;
+ if (min_index < 0) { // Has an origin pulse been reached?
+ break;
+ }
+ end = new_end;
+ }
+ // NOTE: The output_ array is in reverse time order!
+ return true;
+}
+
+
+void EpochTracker::GetFilledEpochs(float unvoiced_pm_interval,
+ std::vector* times,
+ std::vector* voicing) {
+ times->clear();
+ voicing->clear();
+ float final_time = norm_residual_.size() / sample_rate_;
+ int32_t limit = output_.size() - 1;
+ int32_t i = limit;
+ // Produce the output in normal time order.
+ while (i >= 0) {
+ int32_t i_old = i;
+ float time = output_[i].resid_index / sample_rate_;
+ // Note that the pulse locations of both the beginning and end
+ // of any voiced period are of interest.
+ if (output_[i].voiced || ((i < limit) && (output_[i+1].voiced))) {
+ times->push_back(time);
+ voicing->push_back(1);
+ i--;
+ }
+ if (i == limit) {
+ time = 0.0;
+ }
+ if ((i > 0) && (!output_[i].voiced) && (time < final_time)) {
+ for ( ; i > 0; --i) {
+ if (output_[i].voiced) {
+ break;
+ }
+ }
+ float next_time = final_time;
+ int32_t fill_ind = 1;
+ if (i > 0) {
+ next_time = (output_[i].resid_index / sample_rate_) -
+ (1.0 / max_f0_search_);
+ }
+ float now = time + (fill_ind * unvoiced_pm_interval);
+ while (now < next_time) {
+ times->push_back(now);
+ voicing->push_back(0);
+ fill_ind++;
+ now = time + (fill_ind * unvoiced_pm_interval);
+ }
+ }
+ if (i == i_old) {
+ i--;
+ }
+ }
+}
+
+
+bool EpochTracker::ResampleAndReturnResults(float resample_interval,
+ std::vector* f0,
+ std::vector* correlations) {
+ if ((sample_rate_ <= 0.0) || (output_.size() == 0)) {
+ fprintf(stderr,
+ "Un-initialized EpochTracker or no output_ in ResampleAndReturnF0\n");
+ return false;
+ }
+ if (resample_interval <= 0.0) {
+ fprintf(stderr, "resample_interval <= 0.0 in ResampleAndReturnF0\n");
+ return false;
+ }
+ float last_time = (output_[0].resid_index / sample_rate_) + endpoint_padding_;
+ int32_t n_frames = RoundUp(last_time / resample_interval);
+ f0->resize(0);
+ correlations->resize(0);
+ f0->insert(f0->begin(), n_frames, 0.0);
+ correlations->insert(correlations->begin(), n_frames, 0.0);
+ int32_t limit = output_.size() - 1;
+ int32_t prev_frame = 0;
+ float prev_f0 = output_[limit].f0;
+ float prev_corr = output_[limit].nccf_value;
+ for (int32_t i = limit; i >= 0; --i) {
+ int32_t frame = RoundUp(output_[i].resid_index /
+ (sample_rate_ * resample_interval));
+ (*f0)[frame] = output_[i].f0;
+ (*correlations)[frame] = output_[i].nccf_value;
+ if ((frame - prev_frame) > 1) {
+ for (int32_t fr = prev_frame + 1; fr < frame; ++fr) {
+ (*f0)[fr] = prev_f0;
+ (*correlations)[fr] = prev_corr;
+ }
+ }
+ prev_frame = frame;
+ prev_corr = output_[i].nccf_value;
+ prev_f0 = output_[i].f0;
+ }
+ for (int32_t frame = prev_frame; frame < n_frames; ++frame) {
+ (*f0)[frame] = prev_f0;
+ (*correlations)[frame] = prev_corr;
+ }
+ return true;
+}
+
+
+bool EpochTracker::WriteDebugData(const std::vector& data,
+ const std::string& extension) {
+ if (debug_name_.empty()) {
+ return true;
+ }
+ std::string filename = debug_name_ + "." + extension;
+ if (data.size() == 0) {
+ fprintf(stdout, "Data size==0 for %s in WriteDebugData\n",
+ filename.c_str());
+ return false;
+ }
+ FILE* out = fopen(filename.c_str(), "w");
+ if (!out) {
+ fprintf(stderr, "Can't open %s for debug output\n", filename.c_str());
+ return false;
+ }
+ size_t written = fwrite(&(data.front()), sizeof(data.front()),
+ data.size(), out);
+ fclose(out);
+ if (written != data.size()) {
+ fprintf(stderr, "Problems writing debug data (%d %d)\n",
+ static_cast(written), static_cast(data.size()));
+ return false;
+ }
+ return true;
+}
+
+bool EpochTracker::WriteDiagnostics(const std::string& file_base) {
+ if (!file_base.empty()) {
+ set_debug_name(file_base);
+ }
+ WriteDebugData(signal_, "pcm");
+ WriteDebugData(residual_, "resid");
+ WriteDebugData(norm_residual_, "nresid");
+ WriteDebugData(bandpassed_rms_, "bprms");
+ WriteDebugData(voice_onset_prob_, "onsetp");
+ WriteDebugData(voice_offset_prob_, "offsetp");
+ WriteDebugData(peaks_debug_, "pvals");
+ WriteDebugData(prob_voiced_, "pvoiced");
+ // best_corr_ is only available after CreatePeriodLattice.
+ WriteDebugData(best_corr_, "bestcorr");
+ // NOTE: if WriteDiagnostics is called before the
+ // DynamicProgramming, there will be nothing in output_.
+ if ((!debug_name_.empty()) && (output_.size() > 2)) {
+ std::string pm_name = debug_name_ + ".pmlab";
+ FILE* pmfile = fopen(pm_name.c_str(), "w");
+ fprintf(pmfile, "#\n");
+ std::vector f0;
+ int32_t limit = output_.size() - 1;
+ // Produce debug output in normal time order.
+ for (int32_t i = limit; i >= 0; --i) {
+ float time = output_[i].resid_index / sample_rate_;
+ // Note that the pulse locations of both the beginning and end
+ // of any voiced period are of interest.
+ if (output_[i].voiced || ((i < limit) && (output_[i+1].voiced))) {
+ fprintf(pmfile, "%f blue \n", time);
+ } else {
+ fprintf(pmfile, "%f red \n", time);
+ }
+ f0.push_back(time);
+ f0.push_back(output_[i].f0);
+ f0.push_back(output_[i].nccf_value);
+ }
+ fclose(pmfile);
+ WriteDebugData(f0, "f0ap");
+ }
+ return true;
+}
diff --git a/REAPER/epoch_tracker/epoch_tracker.h b/REAPER/epoch_tracker/epoch_tracker.h
new file mode 100644
index 0000000000000000000000000000000000000000..22d7a20111f1339ac94e20402676e2f13e77856c
--- /dev/null
+++ b/REAPER/epoch_tracker/epoch_tracker.h
@@ -0,0 +1,478 @@
+/*
+Copyright 2015 Google Inc. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+// Author: dtalkin@google.com (David Talkin)
+
+// EpochTracker estimates the location of glottal closure instants
+// (GCI), also known as "epochs" from digitized acoustic speech
+// signals. It simultaneously estimates the local fundamental
+// frequency (F0) and voicing state of the speech on a per-epoch
+// basis. Various output methods are available for retrieving the
+// results.
+//
+// The processing stages are:
+// * Optionally highpass the signal at 80 Hz to remove rumble, etc.
+// * Compute the LPC residual, obtaining an approximation of the
+// differentiated glottal flow.
+// * Normalize the amplitude of the residual by a local RMS measure.
+// * Pick the prominent peaks in the glottal flow, and grade them by
+// peakiness, skew and relative amplitude.
+// * Compute correlates of voicing to serve as pseudo-probabilities
+// of voicing, voicing onset and voicing offset.
+// * For every peak selected from the residual, compute a normalized
+// cross-correlation function (NCCF) of the LPC residual with a
+// relatively short reference window centered on the peak.
+// * For each peak in the residual, hypothesize all following peaks
+// within a specified F0 seaqrch range, that might be the end of a
+// period starting on that peak.
+// * Grade each of these hypothesized periods on local measures of
+// "voicedness" using the NCCF and the pseudo-probability of voicing
+// feature.
+// * Generate an unvoiced hypothesis for each period and grade it
+// for "voicelessness".
+// * Do a dynamic programming iteration to grade the goodness of
+// continuity between all hypotheses that start on a peak and
+// those that end on the same peak. For voiced-voiced
+// connections add a cost for F0 transitions. For
+// unvoiced-voiced and voiced-unvoiced transitions add a cost
+// that is modulated by the voicing onset or offset inverse
+// pseudo-probability. Unvoiced-unvoiced transitions incur no cost.
+// * Backtrack through the lowest-cost path developed during the
+// dynamic-programming stage to determine the best peak collection
+// in the residual. At each voiced peak, find the peak in the NCCF
+// (computed above) that corresponds to the duration closest to the
+// inter-peak interval, and use that as the inverse F0 for the
+// peak.
+//
+// A typical calling sequence might look like:
+/* ==============================================================
+ EpochTracker et;
+ et.Init(); // Prepare the instance for, possibly, multiple calls.
+ Track* f0; // for returning the F0 track
+ Track* pm; // for returning the epoch track
+ if (!et.ComputeEpochs(my_input_waveform, &pm, &f0)) {
+ exit(-2); // problems in the epoch computations
+ }
+ DoSomethingWithTracks(f0, pm);
+ delete f0;
+ delete pm;
+ ============================================================== */
+//
+// NOTE: Any client of this code inherits the Google command-line flags
+// defined in epoch_tracker.cc. These flags are processed in the Init()
+// method, and override both default and params-sourced settings.
+//
+// As currently written, this is a batch process. Very little has
+// been done to conserve either memory or CPU. The aim was simply to
+// make the best possible tracker. As will be seen in the
+// implementation, there are many parameters that can be adjusted to
+// influence the processing. It is very unlikely that the best
+// parameter setting is currently expressed in the code! However, the
+// performance, as written, appears to be quite good on a variety of voices.
+
+#ifndef _EPOCH_TRACKER_H_
+#define _EPOCH_TRACKER_H_
+
+#include
+#include
+#include
+#include
+
+static const float kExternalFrameInterval = 0.005;
+static const float kInternalFrameInterval = 0.002;
+static const float kMinF0Search = 40.0;
+static const float kMaxF0Search = 500.0;
+static const float kUnvoicedPulseInterval = 0.01;
+static const float kUnvoicedCost = 0.9;
+static const bool kDoHighpass = true;
+static const bool kDoHilbertTransform = false;
+static const char kDebugName[] = "";
+
+
+class EpochTracker {
+ public:
+ EpochTracker(void);
+
+ virtual ~EpochTracker(void);
+
+ // Set the default operating parameters of the tracker.
+ void SetParameters(void);
+
+ // NOTE: The following methods are exposed primarily for algorithm
+ // development purposes, where EpochTracker is used in a developer's test
+ // harness. These need not/should not be called directly in normal use.
+
+ // Prepare the instance for use. Some sanity check is made on the
+ // parameters, and the instance is reset so it can be reused
+ // multiple times by simply calling Init() for each new input
+ // signal. frame_interval determines the framing for some of the
+ // internal feature computations, and for the periodic resampling of
+ // F0 that will occur during final tracking result output. min_
+ // and max_f0_search are the bounding values, in Hz, for the F0
+ // search.
+ // NOTE: This Init method is DEPRECATED, and is only retained to
+ // support legacy code. IT MAY GO AWAY SOON. This is NOT to be
+ // used with ComputeEpochs().
+ bool Init(const int16_t* input, int32_t n_input, float sample_rate,
+ float min_f0_search, float max_f0_search,
+ bool do_highpass, bool do_hilbert_transform);
+
+ // Set the name for various intermediate features and other signals
+ // that may be written to files used during debug and development of
+ // the algorithm. If this is set to the empty std::string, no debug
+ // signals will be output.
+ void set_debug_name(const std::string& debug_name) {
+ debug_name_ = debug_name;
+ }
+
+ std::string debug_name(void) { return debug_name_; }
+
+ // Compute the Hilbert transform of the signal in input, and place
+ // the floating-point results in output. output must be at least
+ // n_input samples long. TODO(dtalkin): Make these vector inputs
+ // and outputs.
+ void HilbertTransform(int16_t* input, int32_t n_input, float* output);
+
+ // Apply a highpass filter to the signal in input. The filter
+ // corner frequency is corner_freq, and the duration, in seconds, of
+ // the Hann-truncated symmetric FIR is in fir_duration. The
+ // transition bandwidth is the inverse of fir_duration. The return
+ // value is a pointer to the filtered result, which is the same
+ // length as the input (n_input). It is up to the caller to free
+ // this returned memory. TODO(dtalkin): Make this vector I/O and
+ // supply the output as floats.
+ int16_t* HighpassFilter(int16_t* input, int32_t n_input,
+ float sample_rate, float corner_freq,
+ float fir_duration);
+
+ // Compute the LPC residual of the speech signal in input.
+ // sample_rate is the rate of both the input and the residual to be
+ // placed in output. The order of the LPC analysis is automatically
+ // set to be appropriate for the sample rate, and the output is
+ // integrated so it approximates the derivative of the glottal flow.
+ bool GetLpcResidual(const std::vector& input, float sample_rate,
+ std::vector* output);
+
+ // Compute the normalized cross-correlation function (NCCF) of the
+ // signal in data, starting at sample start. size is the number of
+ // samples to include in the inner product. Compute n_lags
+ // contiguous correlations starting at a delay of first_lag samples.
+ // Return the resulting n_lags correlation values in corr. Note
+ // that the NCCF is bounded by +-1.0.
+ void CrossCorrelation(const std::vector& data, int32_t start,
+ int32_t first_lag, int32_t n_lags,
+ int32_t size, std::vector* corr);
+
+ // Compute the band-limited RMS of the signal in input, which is
+ // sampled at sample_rate. low_limit and high_limit are the
+ // frequency bounds, in Hz, within which th RMS is measured.
+ // frame_interval is the period of the RMS signal returned in
+ // output_rms. frame_dur is the duration, in seconds, of the
+ // Hanning window used for each measurement.
+ bool GetBandpassedRmsSignal(const std::vector& input, float sample_rate,
+ float low_limit, float high_limit, float frame_interval,
+ float frame_dur, std::vector* output_rms);
+
+ // Compute the RMS of positive and negative signal values separately.
+ // The signal is made to be zero mean before this computation. Any
+ // imbalance in these measures is an indication of asymmetrical peak
+ // distribution, which is charactristic of the LPC residual of voiced speech.
+ void GetSymmetryStats(const std::vector& data, float* pos_rms,
+ float* neg_rms, float* mean);
+
+ // Normalize the input signal based on a local measure of its RMS.
+ void NormalizeAmplitude(const std::vector& input, float sample_rate,
+ std::vector* output);
+
+ // Apply a Hann weighting to the signal in input starting at
+ // sample index offset. The window will contain size samples, and
+ // the windowed signal is placed in output.
+ void Window(const std::vector& input, int32_t offset, size_t size,
+ float* output);
+
+ // Computes signal polarity (-1 for negative, +1 for
+ // positive). Requires data to be initialized via Init(...). Returns
+ // false if there's an error.
+ bool ComputePolarity(int *polarity);
+
+ // Compute NCCF, NCCF peak locations and values, bandpass RMS,
+ // residual, symmetry statistics (and invert residual, if necessary),
+ // normalized residual, residual peaks and values. Finally, generate
+ // the pulse working array in preparation for dynamic programming.
+ bool ComputeFeatures(void);
+
+ // Write all of data to a file, wht name of which is
+ // debug_name_ _ "." + extension. If debug_name_ is empty, do nothing.
+ bool WriteDebugData(const std::vector& data,
+ const std::string& extension);
+
+ // Write a collection of debugging signals to separate files with
+ // various, internally-defined name extensions. If file_base is not
+ // empty, use this as the base path for all of the files. If file
+ // base is empty, use debug_name_ as the base path. If both are
+ // empty, do nothing.
+ bool WriteDiagnostics(const std::string& file_base);
+
+ // After Init, ComputeFeatures and CreatePeriodLattice have been
+ // successfully called, TrackEpochs should be called to do the
+ // actual tracking of epochs (GCI) and to estimate the corresponding
+ // F0. This method integrates the information from all of the
+ // features, including the LPC residual peaks and the NCCF values,
+ // to find the optimum period assignments and voicing state
+ // assignments over the entire signal. The results are left in
+ // internal storage, pending retrieval by other methods.
+ bool TrackEpochs(void);
+
+ // Create a lattice of glottal period hypotheses in preparation for
+ // dynamic programming. This fills out most of the data fields in
+ // resid_peaks_. This must be called after ComputeFeatures.
+ void CreatePeriodLattice(void);
+
+ // Apply the Viterbi dynamic programming algorithm to find the best
+ // path through the period hypothesis lattice created by
+ // CreatePeriodLattice. The backpointers and cumulative scores are
+ // left in the relevant fields in resid_peaks_.
+ void DoDynamicProgramming(void);
+
+ // Backtrack through the best pointers in the period hypothesis
+ // lattice created by CreatePeriodLattice and processed by
+ // DoDynamicProgramming. The estimated GCI locations
+ // (epochs) and the corresponding F0 and voicing-states are placed
+ // in the output_ array pending retrieval using other methods.
+ bool BacktrackAndSaveOutput(void);
+
+ // Resample the per-period F0 and correlation data that results from
+ // the tracker to a periodic signal at an interval of
+ // resample_interval seconds. Samples returned are those nearest in
+ // time to an epoch. Thus, if the resample_interval is greater than
+ // the local epoch interval, some epochs, and their period
+ // information, will be skipped. Conversely, if the
+ // resample_interval is less than the local epoch interval,
+ // measurements will be replicated as required.
+ bool ResampleAndReturnResults(float resample_interval,
+ std::vector* f0,
+ std::vector* correlations);
+
+ // Convert the raw backtracking results in output_ into
+ // normal-time-order epoch markers. In unvoiced regions, fill with
+ // regularly-spaced pulses separated by unvoiced_pm_interval
+ // seconds. The epoch/pulse times are returned in times re the
+ // utterance beginning, and the corresponding voicing states in
+ // voicing (0=unvoiced; 1=voiced). This can only be called after
+ // TrackEpochs.
+ void GetFilledEpochs(float unvoiced_pm_interval, std::vector* times,
+ std::vector* voicing);
+
+ // Setters.
+ void set_do_hilbert_transform(bool v) { do_hilbert_transform_ = v; }
+ void set_do_highpass(bool v) { do_highpass_ = v; }
+ void set_external_frame_interval(float v) { external_frame_interval_ = v; }
+ void set_unvoiced_pulse_interval(float v) { unvoiced_pulse_interval_ = v; }
+ void set_min_f0_search(float v) { min_f0_search_ = v; }
+ void set_max_f0_search(float v) { max_f0_search_ = v; }
+ void set_unvoiced_cost(float v) { unvoiced_cost_ = v; }
+
+ private:
+ // Search the signal in norm_residual_ for prominent negative peaks.
+ // Grade the peaks on a combination of amplitude, "peakiness" and
+ // skew. (It is expected that the glottal pulses will
+ // have a relatively slow fall, and a rapid rise.) Place the
+ // selected and graded pulses in resid_peaks_.
+ void GetResidualPulses(void);
+
+ // Create pseudo-probability functions in voice_onset_prob_ and
+ // voice_offset_prob_ that attempt to indicate the time-varying
+ // probability that a voice onset or offset is occurring.
+ // Presently, this is based solely on the derivative of the
+ // bandpassed RMS signal, bandpassed_rms_.
+ void GetVoiceTransitionFeatures(void);
+
+ // Generate a pseudo-probability function that attempts to corespond
+ // to the probability that voicing is occurring. This is presently
+ // based solely on the bandpassed RMS signal, bandpassed_rms_.
+ void GetRmsVoicingModulator(void);
+
+ // Free memory, and prepare the instance for a new signal.
+ void CleanUp(void);
+
+ // Scan the signal in input searching for all local maxima that
+ // exceed thresh. The indices corresponding to the location of the
+ // peaks are placed in output. The first entry in output is always
+ // the location of the largest maximum found.
+ int32_t FindNccfPeaks(const std::vector& input, float thresh,
+ std::vector* output);
+
+ // Compute the NCCF with the reference window centered on each of
+ // the residual pulses identified in GetResidualPulses. window_dur
+ // is the duration in seconds of the correlation inner product.
+ // After the NCCF for each residual pulse is computed, it is
+ // searched for local maxima that exceed peak_thresh. These peak
+ // locations and the full NCCF are saved in the corresponding
+ // elements of the resid_peaks_ array of structures.
+ void GetPulseCorrelations(float window_dur, float peak_thresh);
+
+
+ private:
+ // EpochCand stores all of the period hypotheses that can be
+ // generated from the peaks found in the LPC residual. It also
+ // maintains the cumulative path costs and backpointers generated
+ // during dynamic programming.
+ struct EpochCand {
+ int32_t period; // # of samples in this period candidate
+ float local_cost; // cost of calling this a period (or unvoiced)
+ float cost_sum; // cumulative cost from DP
+ int32_t start_peak; // index in resid_peaks_ where this period hyp starts
+ int32_t end_peak; // where this period ends
+ int32_t best_prev_cand; // backpointer used after DP
+ int32_t closest_nccf_period; // per. implied by the closest correlation peak
+ bool voiced; // hypothesized voicing state for this cand.
+ };
+
+ typedef std::vector CandList;
+
+ // The ResidPeak stores data for each residual impulse. The array
+ // of these in resid_peaks_ serves as input to the dynamic
+ // programming search for GCI, voicing state and F0.
+ struct ResidPeak {
+ int32_t resid_index; // index into the resid_ array of this peak
+ int32_t frame_index; // index into the feature arrays for this peak
+ float peak_quality; // "goodness" measure for this peak
+ std::vector nccf; // the NCCF computed centered on this peak
+ std::vector nccf_periods; // periods implied by major peaks in nccf
+ CandList future; // period candidates that start on this peak
+ CandList past; // period candidates that end on this peak
+ };
+
+ struct TrackerResults {
+ bool voiced;
+ float f0;
+ int32_t resid_index;
+ float nccf_value;
+ };
+ typedef std::vector TrackerOutput;
+
+ protected:
+ std::vector resid_peaks_; // array of structures used to
+ // store the peak search lattice
+ TrackerOutput output_; // Array of time stamped results of the tracker.
+ // signal_, residual_, norm_residual and peaks_debug_ are all
+ // sampled at the original signal input sample_rate_.
+ std::vector signal_; // floating version of input speech signal
+ std::vector residual_; // LPC residual normalized for constant DC.
+ std::vector norm_residual_; // LPC residual normalized by its local RMS.
+ std::vector peaks_debug_; // for debug output of residual peak candidates
+ // bandpassed_rms_, voice_onset_prob_, voice_offset_prob_ and
+ // prob_voiced_ are all sampled with a period of internal_frame_interval_.
+ std::vector bandpassed_rms_; // RMS sampled at internal_frame_interval_
+ std::vector voice_onset_prob_; // prob that a voice onset is occurring
+ std::vector voice_offset_prob_; // prob that a voice offset is occurring
+ std::vector prob_voiced_; // prob that voicing is occurring
+ std::vector best_corr_; // An array of best NCCF vals for all resid peaks.
+ std::vector window_; // Hann weighting array for Window()
+ float sample_rate_; // original input signal sample rate in Hz
+
+ float positive_rms_; // RMS of all positive, non-zero samples in residual_
+ float negative_rms_; // RMS of all negative, non-zero samples in residual_
+ int32_t n_feature_frames_; // The number of feature frames available
+ // for all features computed at
+ // internal_frame_interval_.
+ int32_t first_nccf_lag_; // The index of the first correlation of the
+ // NCCF. This is determined by
+ // max_f0_search_.
+ int32_t n_nccf_lags_; // The number of correlations computed at each
+ // residual peak candidate. This is determined
+ // by max_f0_search_ and min_f0_search_.
+ std::string debug_name_; // The base path name for all debug output files.
+
+ // Below are all of the parameters that control the functioning of
+ // the tracker. These are all set to default known-to-work values in
+ // SetParameters().
+
+ // Control parameters available to clients of EpochTracker.
+ float external_frame_interval_; // Frame interval for final output of F0.
+ float unvoiced_pulse_interval_; // Pulse interval in unvoiced regions
+ float min_f0_search_; // minimum F0 to search for (Hz)
+ float max_f0_search_; // maximum F0 to search for (Hz)
+ bool do_highpass_; // Highpass input sighal iff true.
+ bool do_hilbert_transform_; // Hilbert trans. input data iff true.
+
+ // Internal feature-computation Parameters:
+ float internal_frame_interval_; // interval, in seconds, between frame onsets
+ // for the high-pass filter
+ float corner_frequency_;
+ float filter_duration_;
+ // for the LPC inverse filter.
+ float frame_duration_; // window size (sec)
+ float lpc_frame_interval_; // (sec)
+ float preemphasis_; // preemphasis for LPC analysis
+ float noise_floor_; // SNR in dB simulated during LPC analysis.
+ // for computing LPC residual peak quality.
+ float peak_delay_; // for measuring prominence
+ float skew_delay_; // for measuring shape
+ float peak_val_wt_;
+ float peak_prominence_wt_;
+ float peak_skew_wt_;
+ float peak_quality_floor_;
+ // for computing voice-transition pseudo-probabilities
+ float time_span_; // the interval (sec) centered on the
+ // measurement point, used to
+ // compute parameter deltas
+ float level_change_den_; // max. dB level change
+ // expected over time_span_ for
+ // bandpassed RMS
+ // for computing pseudo-probability of voicing
+ float min_rms_db_; // level floor in dB
+ // window size for computing amplitude-normalizing RMS
+ float ref_dur_;
+ // low and high frequency limits for bandpassed RMS used in voicing indicator
+ float min_freq_for_rms_;
+ float max_freq_for_rms_;
+ // duration of integrator for bandpassed RMS
+ float rms_window_dur_;
+ // window duration, in seconds, for NCCF computations
+ float correlation_dur_;
+ // ignore any NCCF peaks less than this
+ float correlation_thresh_;
+
+ // Parametrs used by the dynamic-programming tracker:
+ // reward for inserting another period
+ float reward_;
+ // weight given to deviation of inter-pulse interval from the
+ // closest NCCF peak lag
+ float period_deviation_wt_;
+ // weight given to the quality of the residual peak
+ float peak_quality_wt_;
+ // cost of the unvoiced hypothesis
+ float unvoiced_cost_;
+ // cost of high NCCF values in hypothetical unvoiced regions
+ float nccf_uv_peak_wt_;
+ // weight given to period length
+ float period_wt_;
+ // weight given to the pseudo-probability of voicing feature
+ float level_wt_;
+ // weight given to period-length differences between adjacent periods.
+ float freq_trans_wt_;
+ // cost of switching between voicing states; modulated by voicing
+ // onset/offset probs.
+ float voice_transition_factor_;
+
+ // Parameters used to generate final outputs:
+ // pad time in seconds to add to the last measured period during
+ // output of periodically-resampled data
+ float endpoint_padding_;
+};
+
+
+#endif // _EPOCH_TRACKER_H_
diff --git a/REAPER/epoch_tracker/fd_filter.cc b/REAPER/epoch_tracker/fd_filter.cc
new file mode 100644
index 0000000000000000000000000000000000000000..f37787aeb7dde82f067d30430fceda8e70305e5e
--- /dev/null
+++ b/REAPER/epoch_tracker/fd_filter.cc
@@ -0,0 +1,767 @@
+/*
+Copyright 2015 Google Inc. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+/* FdFilter: In-Line Filter class */
+/*
+Author: David Talkin (dtalkin@google.com)
+*/
+
+/*
+This class implements a general-purpose streaming FIR filter that is
+applied in the frequency domain for speed/efficiency. Using
+FFT-multiply-IFFT rather than a simple time-domain convolution greatly
+speeds up the computations. The longer the impulse response of the
+filter, the greater the advantage of this FFT approach over
+time-domain convolution.
+
+This class also supports sample-rate conversion. For simple
+input/output rate ratios, it is also quite efficient, but becomes
+rather inefficient for ratios with denominator terms greater than 5.
+It therefore limits the maximum denominator value to kMaxDecimation,
+and thus can only approximate rate conversions that require larger
+denominator terms. For large denominator ratios, or extreme
+decimation, indexed time-domain implementations can be much faster.
+
+All filters implemented with FdFilter are symmetric FIR, and thus have
+linear phase response. The filter is implemented non-causally, so
+that there is no signal delay introduced by filtering or downsampling
+operations.
+
+See the individual methods for details of use. See fd_filter_msin.cc
+for a test harness and use examples.
+*/
+
+#include "epoch_tracker/fd_filter.h"
+
+#include
+#include
+
+#include "epoch_tracker/fft.h"
+
+// kIoBufferSize can be any reasonable size.
+static const int kIoBufferSize = 10000;
+
+// kMaxDecimation sets the limit on the maximum value of the denominator in the
+// ratio that approximates the sample rate ratios when rate conversion
+// is done. FdFilter is really not appropriate if the ratio needs to be
+// greater than about 7, because time-domain approaches are then likely to be
+// faster. However, perverse or adventuresome souls might want to try
+// increasing this if they have extra computer cycles to waste.
+static const int kMaxDecimation = 12;
+
+// Constructor when FdFilter is to be used as a high- or low-pass
+// filter or as a sample-rate converter. 'input_freq' is the sample
+// rate of the input signal in Hz. If input_freq != corner_freq and
+// do_rate_conversion is true, FdFilter is confgured to convert the
+// sample rate to corner_freq using a filter of length specified by
+// filter_dur.
+//
+// If do_rate_conversion is false, FdFilter is configured to be a
+// high- or low-pass filter. In this case, corner_freq is interpreted
+// as the corner frequency of the filter, and must be in the range 0 <
+// corner_freq < (input_freq/2). If do_highpass is true, the filter
+// will be high-pass, else, low-pass. Again, filter_dur determines
+// the filter length. in all cases, the filter length is specified in
+// seconds, and determines the transition band width. The band width
+// is approximately 1.0/filter_dur Hz wide.
+/* ******************************************************************** */
+FdFilter::FdFilter(float input_freq, float corner_freq, bool do_highpass,
+ float filter_dur, bool do_rate_conversion) {
+ FdFilterInitialize(input_freq, corner_freq, do_highpass, filter_dur,
+ do_rate_conversion, NULL, NULL, 0);
+}
+
+// Constructor when FdFilter will be used to implement a filter whose
+// spectral magnitude values are listed in the plain text file with
+// the name specified by 'spectrum_shape'. input_freq is the sample
+// rate in Hz of the input signal. The file must have the following
+// format:
+//
+// Line 1: pow2 nMags
+// Lines 2 through (nMags+1): ind val
+//
+// nMags must equal ((1 << pow2)/2)+1,
+// pow2 is typically in the range 3 < pow2 < 15.
+
+// The lines in the file containing (ind, val) pairs specify the
+// magnitude response of the filter uniformly sampling the spectrum
+// from 0 Hz to (input_freq/2) Hz. the 'ind' column is just a line index
+// to make the file easily human readable, the 'val' column contains
+// (positive) magnitude scaling values. Note that values > 1.0 cause
+// an increase in output signal amplitude re the input signal at the
+// corresponding frequency, and have the potential to cause clipping,
+// if the input signal is too energetic at those frequencies.
+/* ******************************************************************** */
+FdFilter::FdFilter(float input_freq, char *spectrum_shape) {
+ FdFilterInitialize(input_freq, input_freq, 0, 0.01, 0, spectrum_shape,
+ NULL, 0);
+}
+
+// Constructor when FdFilter will be used to implement a filter whose
+// 'n_magnitudes' spectral magnitude values are in the array 'spectrum_array'.
+// n_magnitudes must equal ((1 << pow2)+1) for some pow2 in the
+// range 2 < pow2 < 16. The values in spectrum_array are interpreted as
+// above for the 'val' column in the 'spectrum_shape' file.
+/* ******************************************************************** */
+FdFilter::FdFilter(float input_freq, float *spectrum_array, int n_magnitudes) {
+ FdFilterInitialize(input_freq, input_freq, 0, 0.01, 0, NULL,
+ spectrum_array, n_magnitudes);
+}
+
+// This is the private method that configures FdFilter to satisfy the
+// requirements of the constructor.
+/* ----------------------------------------------------------------------- */
+void FdFilter::FdFilterInitialize(float input_freq, float corner_freq,
+ bool do_highpass, float filter_dur,
+ bool do_rate_conversion,
+ char *spectrum_shape, float *spectrum_array,
+ int n_magnitudes) {
+ float beta = 0.0, *b = NULL;
+ float ratio_t, ratio, freq1 = input_freq;
+ int pow2, i;
+ bool do_eq_filtering = false;
+ bool b_allocated = true;
+
+ insert_ = 1;
+ decimate_ = 1;
+ filter_state_ = 1;
+ array_leftover_ = 0;
+ array_index_ = 0;
+ array_samples_used_ = 0;
+ true_output_rate_ = input_freq;
+
+ output_buffer_ = new int16_t[kIoBufferSize * 2];
+ input_buffer_ = new int16_t[kIoBufferSize];
+
+ if (spectrum_shape || (spectrum_array && (n_magnitudes > 1))) {
+ do_eq_filtering = true;
+ } else {
+ if (do_rate_conversion) {
+ freq1 = input_freq;
+ } else { /* it is just a symmetric FIR */
+ if (corner_freq >= (freq1 = input_freq) / 2.0) {
+ fprintf(stderr,
+ "Unreasonable corner frequency specified to filter() (%f)\n",
+ corner_freq);
+ }
+ }
+ }
+
+ if (spectrum_shape) {
+ FILE *spec_stream = fopen(spectrum_shape, "r");
+ if (spec_stream) {
+ int n_spect, ind;
+ char line[500];
+ float fs;
+ if (fgets(line, 500, spec_stream)) {
+ int nItems = sscanf(line, "%d %d %f", &pow2, &n_spect, &fs);
+ if ((nItems == 3) && (fs != input_freq)) { // This should be a
+ // fatal error!
+ fprintf(stderr,
+ "Filter spec (%f) does not match input frequency (%f)\n",
+ fs, input_freq);
+ fprintf(stderr,
+ "The filtering results will probably not be what you want!\n");
+ }
+ b = new float[n_spect];
+ n_filter_coeffs_ = n_spect - 1; // n_filter_coeffs_ represents actual
+ // filter-kernel length,
+ // instead of half filter
+ // length when using external
+ // filter.
+ for (i = 0; i < n_spect; i++) {
+ if ((!fgets(line, 500, spec_stream)) ||
+ (sscanf(line, "%d %f", &ind, &(b[i])) != 2)) {
+ fprintf(stderr, "Parsing error in spect ratio file %s\n",
+ spectrum_shape);
+ }
+ }
+ } else {
+ fprintf(stderr, "Bad format in spectrum file %s\n",
+ spectrum_shape);
+ }
+ fclose(spec_stream);
+ } else {
+ fprintf(stderr, "Can't open %s as a spectrum file\n",
+ spectrum_shape);
+ }
+ } else {
+ // Note: n_magnitudes MUST be ((2^k)+1) for k > 1.
+ if (spectrum_array && (n_magnitudes > 1)) {
+ n_filter_coeffs_ = n_magnitudes - 1;
+ int nft = n_filter_coeffs_ * 2;
+ pow2 = 1;
+ while ((1 << pow2) < nft) {
+ pow2++;
+ }
+ b = spectrum_array; // Note: b must not be deleted in this case!
+ b_allocated = false;
+ } else { /* it is not an eq filter */
+ if (do_rate_conversion) {
+ /* get a ratio of integers close to desired freq. ratio. */
+ ratio = corner_freq/freq1;
+ RationalApproximation(ratio, &insert_, &decimate_, kMaxDecimation);
+ ratio_t = static_cast(insert_) / decimate_;
+
+ if (fabs(1.0 - ratio_t) < .01) {
+ fprintf(stderr,
+ "Input and output frequencies are essentially equal!\n");
+ }
+ true_output_rate_ = ratio_t * freq1;
+ // if (corner_freq != true_output_rate_) {
+ // fprintf(stderr,
+ // "Warning: Output frequency obtained(%f) is not as requested(%f)\n",
+ // true_output_rate_, corner_freq);
+ // }
+ corner_freq = true_output_rate_;
+ n_filter_coeffs_ = static_cast(freq1 * insert_ * filter_dur) | 1;
+ if (corner_freq < freq1)
+ beta = (.5 * corner_freq)/(insert_ * freq1);
+ else
+ beta = .5/insert_;
+ } else {
+ beta = corner_freq/freq1;
+ n_filter_coeffs_ = static_cast(freq1 * filter_dur) | 1;
+ }
+
+ /* Generate the symmetric FIR filter coefficients. */
+ b = new float[1 + (n_filter_coeffs_ / 2)];
+ MakeLinearFir(beta, &n_filter_coeffs_, b);
+
+ if (insert_ > 1) { // Scale up filter coeffs. to maintain
+ // precision in output.
+ float fact = insert_;
+ for (i = n_filter_coeffs_ / 2; i >= 0; i--) b[i] *= fact;
+ }
+ } // end else it is not an eq filter.
+ } // end else (a spectrum shape was not specified).
+
+ n_filter_coeffs_by2_ = n_filter_coeffs_ / 2;
+
+ if (!do_eq_filtering) { /* Is it a simple high- or low-pass filter? */
+ MirrorFilter(b, do_highpass);
+ int nf2 = n_filter_coeffs_ << 1;
+ fft_size_ = 128;
+ pow2 = 7;
+ while (nf2 > fft_size_) {
+ fft_size_ *= 2;
+ pow2++;
+ }
+ } else { // It is a filter with the magnitude response specified in b.
+ fft_size_ = n_filter_coeffs_ * 2;
+ pow2 = 2;
+ while ((1 << pow2) < fft_size_)
+ pow2++;
+ }
+
+ fft_size_by2_ = fft_size_ / 2;
+
+ x_ = new float[fft_size_];
+ y_ = new float[fft_size_];
+ xf_ = new float[fft_size_];
+ yf_ = new float[fft_size_];
+
+ leftovers_ = new int16_t[fft_size_];
+ max_input_ = kIoBufferSize / insert_;
+ output_delayed_ = new float[(2 * kIoBufferSize)+n_filter_coeffs_+fft_size_];
+
+ float ftscale = 1.0 / fft_size_;
+ fft_ = new FFT(pow2);
+ if (!do_eq_filtering) {
+ // position the filter kernel to be symmetric about time=0
+ // Note that this assumes an odd number of symmetric filter coefficients.
+ for (i = 0; i <= n_filter_coeffs_by2_; i++) {
+ xf_[i] = ftscale * filter_coeffs_[i+n_filter_coeffs_by2_];
+ yf_[i] = 0.0;
+ }
+ for (; i < n_filter_coeffs_; i++) {
+ xf_[fft_size_ - n_filter_coeffs_ + i] = ftscale *
+ filter_coeffs_[i - n_filter_coeffs_by2_ - 1];
+ yf_[fft_size_ - n_filter_coeffs_ + i] = 0.0;
+ }
+ for (i = n_filter_coeffs_by2_; i < (fft_size_-n_filter_coeffs_by2_); i++)
+ xf_[i] = yf_[i] = 0.0;
+ fft_->fft(xf_, yf_);
+ } else { /* Install the magnitude response symmetrically. */
+ for (i = 0; i <= n_filter_coeffs_; i++) {
+ xf_[i] = ftscale * b[i];
+ yf_[i] = 0.0;
+ }
+ for (; i < fft_size_; i++) {
+ xf_[i] = xf_[fft_size_ - i];
+ yf_[i] = 0.0;
+ }
+ }
+ /* The filter, regardless of its origin, is now in the frequency domain. */
+
+ if (b_allocated) {
+ delete [] b;
+ }
+}
+
+// Destructor
+/* ******************************************************************** */
+FdFilter::~FdFilter() {
+ delete [] input_buffer_;
+ delete [] output_buffer_;
+ delete [] x_;
+ delete [] y_;
+ delete [] xf_;
+ delete [] yf_;
+ delete [] filter_coeffs_;
+ delete [] leftovers_;
+ delete [] output_delayed_;
+ delete fft_;
+}
+
+
+// Given the half filter in fc, store the full symmetric kernel in
+// filter_coeffs_.
+/* ******************************************************************** */
+void FdFilter::MirrorFilter(float *fc, bool invert) {
+ float *dp1, *dp2, *dp3, sum, integral;
+ int i, ncoefb2;
+
+ filter_coeffs_ = new float[n_filter_coeffs_];
+ ncoefb2 = 1 + n_filter_coeffs_ / 2;
+ // Copy the half-filter and its mirror image into the coefficient array.
+ for (i = ncoefb2 - 1, dp3 = fc+ncoefb2 - 1, dp2 = filter_coeffs_,
+ dp1 = filter_coeffs_ + n_filter_coeffs_ - 1, integral = 0.0; i-- > 0;) {
+ if (!invert) {
+ *dp1-- = *dp2++ = *dp3--;
+ } else {
+ integral += (sum = *dp3--);
+ *dp1-- = *dp2++ = -sum;
+ }
+ }
+ if (!invert) {
+ *dp1 = *dp3; /* point of symmetry */
+ } else {
+ integral *= 2;
+ integral += *dp3;
+ *dp1 = integral - *dp3;
+ }
+}
+
+// This is a complex vector multiply. If the second vector (r2, i2) is
+// known to be real, set 'i2' to NULL for faster computation. The
+// result is returned in (r3, i3).
+/* ******************************************************************** */
+void FdFilter::ComplexDotProduct(int n, float *r1, float *i1, float *r2,
+ float *i2, float *r3, float *i3) {
+ float tr1, ti1;
+
+ /* This full complex multiply is only necessary for non-symmetric kernels */
+ if (i2) { // Only supply the i2 vector if you need to do a full
+ // complex multiply.
+ while (n--) {
+ tr1 = (*r1 * *r2) - (*i1 * *i2);
+ ti1 = (*r1++ * *i2++) + (*r2++ * *i1++);
+ *i3++ = ti1;
+ *r3++ = tr1;
+ }
+ } else {
+ /* Can do this iff the filter is symmetric, zero phase. */
+ while (n--) {
+ tr1 = (*r1++ * *r2);
+ ti1 = (*r2++ * *i1++);
+ *i3++ = ti1;
+ *r3++ = tr1;
+ }
+ }
+}
+
+/* ******************************************************************** */
+// Process samples from 'input' array to 'output' array. 'nIn'
+// contains the number of samples available in 'input'. 'maxOut' is
+// the maximum number of samples that the caller allows to be
+// transferred to 'output' (usually the size of 'output'). Set
+// 'first' TRUE if the first sample of a new signal is in 'input'.
+// Set 'last' TRUE of the last sample of the signal is in 'input' (to
+// cause flushing of processing pipeline). The simplest setup for use
+// of this method requires that the caller use an input buffer no
+// larger than the size returned by getMaxInputSize(), and an output
+// array twice the size returned by getMaxInputSize(). Then, each
+// subsequent call to filterArray will use all 'input' samples, and
+// will transfer all available samples to 'output'. Examples of this
+// and the other case, of arbitrarily small caller buffers can be seen
+// in the test harness at the end of this file.
+// This method returns the number of output samples transferred to 'output'.
+int FdFilter::FilterArray(int16_t *input, int nIn, bool first, bool last,
+ int16_t *output, int max_to_output) {
+ int i, j, nLeft = nIn, nOut = 0, nToGo = max_to_output;
+ int toRead, toWrite, available;
+ int16_t *p = input, *q, *r = output;
+
+ if (first) {
+ filter_state_ = 1; // indicate start of new signal
+ array_leftover_ = 0;
+ array_index_ = 0;
+ }
+ if (array_leftover_) { // First, move any output remaining from the
+ // previous call.
+ int toCopy = array_leftover_;
+ if (toCopy > nToGo)
+ toCopy = nToGo;
+ for (i = array_index_, j = 0; j < toCopy; i++, j++)
+ *r++ = output_buffer_[i];
+ nToGo -= toCopy;
+ nOut += toCopy;
+ array_leftover_ -= toCopy;
+ array_index_ = i;
+ }
+
+ if (nToGo <= 0) {
+ array_samples_used_ = 0; // Can't process any input this time; no
+ // room in output array.
+ return max_to_output;
+ }
+
+ /* Process data from array to array. */
+ while (nLeft > 0) {
+ toRead = nLeft;
+ if (toRead > max_input_)
+ toRead = max_input_;
+ if (insert_ > 1) {
+ for (q = input_buffer_, i = 0; i < toRead; i++) {
+ *q++ = *p++;
+ for (j = 1; j < insert_; j++)
+ *q++ = 0;
+ }
+ } else {
+ for (q = input_buffer_, i = 0; i < toRead; i++)
+ *q++ = *p++;
+ }
+ nLeft -= toRead;
+ if ((nLeft <= 0) && last)
+ filter_state_ |= 2; // Indicate that end of signal is (also) in
+ // this bufferful.
+ FilterBuffer(toRead * insert_, &available);
+ filter_state_ = 0; // Clear the initialization bit, if any for the
+ // next iteration.
+
+ toWrite = available;
+ if (toWrite > nToGo)
+ toWrite = nToGo;
+
+ for (i = 0; i < toWrite; i++)
+ *r++ = output_buffer_[i];
+ nOut += toWrite;
+ available -= toWrite;
+ if (available > 0) { // Ran out of output space; suspend processing
+ array_leftover_ = available; // Save the remaining output
+ // samples for the next call.
+ array_index_ = i;
+ array_samples_used_ = nIn - nLeft; // Record the number of input
+ // samples actually used.
+ return(nOut);
+ }
+ }
+ array_samples_used_ = nIn;
+ return(nOut);
+}
+
+// Use after a call to filterArray() to determine the number of input
+// samples actually processed.
+int FdFilter::GetArraySamplesUsed() {
+ return(array_samples_used_);
+}
+
+// Use after a call to filterArray() to determine how many output
+// samples were NOT transferred to caller's output array due to lack
+// of space in caller's array.
+int FdFilter::GetArrayOutputLeftover() {
+ return(array_leftover_);
+}
+
+// Given the input stream 'input_stream' and the output stream 'output_stream'
+// process all samples until EOF is reached on 'input_stream'. Returns 1
+// on success, 0 on failure. All processing is done in a single call
+// to this method.
+/* ******************************************************************** */
+int FdFilter::FilterStream(FILE *input_stream, FILE *output_stream) {
+ int i, j;
+ int toread, towrite, nread, rVal = 1, testc;
+
+ toread = max_input_;
+ filter_state_ = 1; // indicate start of new signal
+ /* process data from a stream */
+ while ((nread = fread(input_buffer_, sizeof(*input_buffer_), toread,
+ input_stream))) {
+ testc = getc(input_stream);
+ if (feof(input_stream))
+ filter_state_ |= 2;
+ else
+ ungetc(testc, input_stream);
+ if (insert_ > 1) {
+ int16_t *p, *q;
+ for (p = input_buffer_ + nread - 1,
+ q = input_buffer_ + (nread * insert_) - 1, i = nread; i--;) {
+ for (j = insert_ - 1; j--;) *q-- = 0;
+ *q-- = *p--;
+ }
+ }
+ FilterBuffer(nread*insert_, &towrite);
+ if ((i = fwrite(output_buffer_, sizeof(*output_buffer_), towrite,
+ output_stream)) < towrite) {
+ fprintf(stderr, "Problems writing output in FilterStream\n");
+ rVal = 0;
+ }
+ filter_state_ = 0;
+ }
+ return(rVal);
+}
+
+// This is a private method that supports FilterStream() and
+// FilterArray(). It assumes that the input samples have been
+// transferred to this->input_buffer_. It places the filtered results in
+// this->output_buffer_, and returns the number of output samples in
+// *n_output.
+/* ******************************************************************** */
+void FdFilter::FilterBuffer(int n_input, int *n_output) {
+ int16_t *p, *r, *p2;
+ float *dp1, *dp2, *q, half = 0.5;
+ int i, j, k, npass;
+ int totaln;
+
+ if (filter_state_ & 1) { /* first call with this signal and filter? */
+ first_out_ = 0;
+ to_skip_ = 0;
+ left_over_ = 0;
+ for (i = max_input_+n_filter_coeffs_, q = output_delayed_; i--;)
+ *q++ = 0.0;
+ } /* end of once-per-filter-invocation initialization */
+
+ npass = (n_input + left_over_) / fft_size_;
+ if (!npass && (filter_state_ & 2)) { // if it's the end...
+ // Append the input to the leftovers, then pad with zeros.
+ p = input_buffer_;
+ for (p = input_buffer_, r = leftovers_ + left_over_, i = n_input; i--;) {
+ *r++ = *p++; /* append to leftovers_ from prev. call */
+ }
+ int to_pad = fft_size_ - (left_over_ + n_input);
+ for (int i = 0; i < to_pad; ++i) {
+ *r++ = 0;
+ }
+ npass = 1;
+ } else {
+ /* This is the normal non-boundary course of action. */
+ for (p = input_buffer_, r = leftovers_ + left_over_,
+ i = fft_size_ - left_over_; i--;)
+ *r++ = *p++; /* append to leftovers_ from prev. call */
+ }
+ if (!npass && !(filter_state_ & 2)) { // it's not the end, but don't
+ // have enough data for a loop.
+ left_over_ += n_input;
+ *n_output = 0;
+ first_out_ |= filter_state_ & 1; // flag that start of sig is still here.
+ return;
+ }
+ filter_state_ |= first_out_;
+ first_out_ = 0;
+
+ /* >>>>>>>>>>>>>> Here's the main processing loop. <<<<<<<<<<<<< */
+ for (/* p set up above */ q = output_delayed_, i = 0; i < npass;
+ i++, q += fft_size_) {
+ if (i) {
+ for (r = p + fft_size_by2_, j = fft_size_by2_, dp1 = x_, dp2 = y_; j--;) {
+ *dp1++ = *p++;
+ *dp2++ = *r++;
+ }
+ p += fft_size_by2_;
+ } else {
+ for (p2 = leftovers_, r = p2 + fft_size_by2_, j = fft_size_by2_,
+ dp1 = x_, dp2 = y_; j--;) {
+ *dp1++ = *p2++;
+ *dp2++ = *r++;
+ }
+ }
+ for (j = fft_size_by2_; j--;)
+ *dp1++ = *dp2++ = 0.0;
+
+ /* Filtering is done in the frequency domain; transform two real arrays. */
+ fft_->fft(x_, y_);
+ ComplexDotProduct(fft_size_, x_, y_, xf_, NULL, x_, y_);
+ fft_->ifft(x_, y_);
+
+ /* Overlap and add. */
+ for (dp2 = q, j = fft_size_ - n_filter_coeffs_by2_; j < fft_size_; j++)
+ *dp2++ += x_[j];
+ for (j = 0, k = n_filter_coeffs_by2_; j < k; j++)
+ *dp2++ += x_[j];
+ for (j = n_filter_coeffs_by2_, k = fft_size_ - n_filter_coeffs_by2_;
+ j < k; j++)
+ *dp2++ = x_[j];
+
+ for (dp2 = q+fft_size_by2_, j = fft_size_ - n_filter_coeffs_by2_;
+ j < fft_size_; j++)
+ *dp2++ += y_[j];
+ for (j = 0, k = n_filter_coeffs_by2_; j < k; j++)
+ *dp2++ += y_[j];
+ for (j = n_filter_coeffs_by2_, k = fft_size_ - n_filter_coeffs_by2_;
+ j < k; j++)
+ *dp2++ = y_[j];
+ } /* end of main processing loop */
+
+ left_over_ = n_input - (p-input_buffer_);
+ for (i = left_over_, r = leftovers_; i--;) // Save unused input
+ // samples for next call.
+ *r++ = *p++;
+ /* If signal end is here, must process any unused input. */
+ if (left_over_ && (filter_state_ & 2)) { // Must do one more zero-pad pass.
+ for (p2 = leftovers_ + left_over_, i = fft_size_ - left_over_; i--;)
+ *p2++ = 0;
+ for (p2 = leftovers_, r = p2 + fft_size_by2_, j = fft_size_by2_,
+ dp1 = x_, dp2 = y_; j--;) {
+ *dp1++ = *p2++;
+ *dp2++ = *r++;
+ }
+ for (j = fft_size_by2_; j--;)
+ *dp1++ = *dp2++ = 0.0;
+ /* Filtering is done in the frequency domain; transform two real arrays. */
+ fft_->fft(x_, y_);
+ ComplexDotProduct(fft_size_, x_, y_, xf_, NULL, x_, y_);
+ fft_->ifft(x_, y_);
+
+ /* Overlap and add. */
+ for (dp2 = q, j = fft_size_ - n_filter_coeffs_by2_; j < fft_size_; j++)
+ *dp2++ += x_[j];
+ for (j = 0, k = n_filter_coeffs_by2_; j < k; j++)
+ *dp2++ += x_[j];
+ for (j = n_filter_coeffs_by2_, k = fft_size_ - n_filter_coeffs_by2_;
+ j < k; j++)
+ *dp2++ = x_[j];
+
+ for (dp2 = q+fft_size_by2_, j = fft_size_ - n_filter_coeffs_by2_;
+ j < fft_size_; j++)
+ *dp2++ += y_[j];
+ for (j = 0, k = n_filter_coeffs_by2_; j < k; j++)
+ *dp2++ += y_[j];
+ for (j = n_filter_coeffs_by2_, k = fft_size_ - n_filter_coeffs_by2_;
+ j < k; j++)
+ *dp2++ = y_[j];
+ }
+ /* total good output samples in ob: */
+ totaln = (((npass * fft_size_) - to_skip_ -
+ ((1 & filter_state_)? n_filter_coeffs_by2_ : 0)) +
+ ((filter_state_ & 2)? left_over_ + n_filter_coeffs_by2_ : 0));
+ /* number returned to caller: */
+ *n_output = 1 + (totaln - 1) / decimate_; // possible decimation for
+ // downsampling
+ /* Round, decimate and output the samples. */
+ float f_temp;
+ q = (filter_state_ & 1)? output_delayed_ + (n_filter_coeffs_by2_) :
+ output_delayed_ + to_skip_;
+ for (j = decimate_, i = *n_output, p = output_buffer_; i-- ; q += j) {
+ if ((f_temp = *q) > 32767.0)
+ f_temp = 32767.0;
+ if (f_temp < -32768.0)
+ f_temp = -32768.0;
+ *p++ = static_cast((f_temp > 0.0) ? half + f_temp : f_temp - half);
+ }
+
+ for (dp1 = output_delayed_ + npass*fft_size_, j = n_filter_coeffs_,
+ dp2 = output_delayed_; j--;) /*save mem for next call */
+ *dp2++ = *dp1++;
+ /* If decimating, number to skip on next call. */
+ to_skip_ = (*n_output * decimate_) - totaln;
+}
+
+// Return the largest number of samples that can be processed in a
+// single call to FdFilter::filterArray(). This can be used to configure
+// the caller's buffer sizes to simplify subsequent processing. The
+// simplest use of filterArray() is when the caller sends chunks of
+// size getMaxInputSize() (or less) as input, and has an output buffer
+// of size >= (2 * getMaxInputSize()). In this case, no checking is
+// required to synchronize input and output buffering. This, and the
+// less ideal case of arbitrary caller buffer sizes are illustrated in
+// the test harness at the end of this file.
+/* ******************************************************************** */
+int FdFilter::GetMaxInputSize() {
+ return(max_input_);
+}
+
+// When sample-rate conversion is attempted, it is possible that the
+// output frequency realizable with the FdFilter configuration does not
+// exactly match the requested rate. getActualOutputFreq() retrieves
+// the rate achieved, and allows the caller to decide whether to
+// proceed with the filtering or not, and to correctly set the rate og
+// the output stream for processes later in the chain. This method
+// may be called immediately after instantiation of the FdFilter, or at any
+// later time.
+float FdFilter::GetActualOutputFreq() {
+ return(true_output_rate_);
+}
+
+// A private method that finds the closest ratio to the fraction in
+// 'a' (0.0 < a < 1.0). The numerator is returned in 'k', the
+// denominator in 'l'. The largest allowed denominator is specified
+// by 'qlim'.
+/* ---------------------------------------------------------- */
+void FdFilter::RationalApproximation(float a, int *k, int *l, int qlim) {
+ float aa, af, q, em, qq = 1.0, pp = 1.0, ps, e;
+ int ai, ip, i;
+
+ aa = fabs(a);
+ ai = static_cast(aa);
+ i = ai;
+ af = aa - i;
+ q = 0;
+ em = 1.0;
+ while (++q <= qlim) {
+ ps = q * af;
+ ip = static_cast(ps + 0.5);
+ e = fabs((ps - static_cast(ip)) / q);
+ if (e < em) {
+ em = e;
+ pp = ip;
+ qq = q;
+ }
+ }
+ *k = static_cast((ai * qq) + pp);
+ *k = (a > 0)? *k : -(*k);
+ *l = static_cast(qq);
+}
+
+// A private method to create the coefficients for a symmetric FIR
+// lowpass filter using the window technique with a Hanning window.
+// Half of the symmetric kernel is returned in ''coef'. The desired
+// number of filter coefficients is in 'nf', but is forced to be odd
+// by adding one, if the requesred number is even. 'fc' is the
+// normalized corner frequency (0 < fc < 1).
+/* ---------------------------------------------------------- */
+void FdFilter::MakeLinearFir(float fc, int *nf, float *coef) {
+ int i, n;
+ double twopi, fn, c;
+
+ if (((*nf % 2) != 1))
+ *nf = *nf + 1;
+ n = (*nf + 1) / 2;
+
+ /* Compute part of the ideal impulse response (the sin(x)/x kernel). */
+ twopi = M_PI * 2.0;
+ coef[0] = 2.0 * fc;
+ c = M_PI;
+ fn = twopi * fc;
+ for (i = 1; i < n; i++)
+ coef[i] = sin(i * fn) / (c * i);
+
+ /* Now apply a Hanning window to the (infinite) impulse response. */
+ /* (Could use other windows, like Kaiser, Gaussian...) */
+ fn = twopi / *nf;
+ for (i = 0; i < n; i++)
+ coef[n - i - 1] *= (.5 - (.5 * cos(fn * (i + 0.5))));
+}
diff --git a/REAPER/epoch_tracker/fd_filter.h b/REAPER/epoch_tracker/fd_filter.h
new file mode 100644
index 0000000000000000000000000000000000000000..6b73411a7244383ef694e8bc0278e7c634befe48
--- /dev/null
+++ b/REAPER/epoch_tracker/fd_filter.h
@@ -0,0 +1,131 @@
+/*
+Copyright 2015 Google Inc. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+/* In-Line FIR filter class */
+/*
+Author: David Talkin (dtalkin@google.com)
+*/
+
+#ifndef _FD_FILTER_H_
+#define _FD_FILTER_H_
+
+#include
+#include
+
+class FFT;
+
+class FdFilter {
+ public:
+ // Constructor when doing arbitrary FIR filtering using the response
+ // in file 'spectrum_shape'
+ FdFilter(float input_freq, char* spectrum_shape);
+ // Constructor when doing arbitrary FIR filtering using the response
+ // in array 'spectrum_array'
+ FdFilter(float input_freq, float* spectrum_rray, int n_magnitudes);
+ // Constructor when doing highpass or lowpass filtering or when
+ // doing rate conversion
+ FdFilter(float input_freq, float corner_freq, bool do_highpass,
+ float filter_dur, bool do_rate_conversion);
+
+ ~FdFilter();
+
+ // Read and filter/convert all input from inStream and write to
+ // outStream until inStream is exhausted. Return 1 for success 0
+ // for failure.
+ int FilterStream(FILE* fIn, FILE* fOut);
+
+ // Process nIn samples from 'input' array into 'output' array. Set
+ // 'first' true if this is the first call for a new signal. Set
+ // 'last' true if the end of the signal is in 'input'. The
+ // number of samples transferred to 'output' is the return value.
+ // 'maximum_to_output' is the size of caller's output array.
+ int FilterArray(int16_t* input, int n_input, bool first, bool last,
+ int16_t* output, int maximum_to_output);
+
+ // Return number of samples left after a call to filterArray() in the
+ // case where 'maximum_to_output' is smaller than the number of output samples
+ // produced.
+ int GetArrayOutputLeftover();
+
+ // Use after a call to filterArray() to get number of 'input'
+ // samples actually used (in cases where the caller's output array
+ // size has limited the number used, or when the caller's input size
+ // is larger than getMaxInputSize()).
+ int GetArraySamplesUsed();
+
+ // Return the largest batch of input samples that can be processed
+ // with a single call to filterBuffer()
+ int GetMaxInputSize();
+
+ // When sample-rate conversion is being done, return the actual
+ // output frequency, which may differ from that requested.
+ float GetActualOutputFreq();
+
+ private:
+ // The main initialization function. Called by all constructors.
+ void FdFilterInitialize(float input_freq, float corner_freq, bool do_highpass,
+ float filter_dur, bool do_rate_conversion,
+ char* spectrum_shape, float* spectrum_array,
+ int n_magnitudes);
+
+ // Use the half filter in fc to create the full filter in filter_coeff_
+ void MirrorFilter(float* fc, bool invert);
+
+ // Window approach to creating a high- or low-pass FIR kernel
+ void MakeLinearFir(float fc, int* nf, float* coef);
+
+ // Find the closest integer ratio to the float 'a'
+ void RationalApproximation(float a, int* k, int* l, int qlim);
+
+ // Complex inner product of length 'n'; result goes to (r3,i3)
+ void ComplexDotProduct(int n, float* r1, float* i1, float* r2, float* i2,
+ float* r3, float* i3);
+
+ // Assuming n_input samples are in in_buffer_, process the signal
+ // into out_buffer_. Returns number transferred to out_buffer_ in
+ // 'n_output'.
+ void FilterBuffer(int n_input, int* n_output);
+
+
+ int16_t* output_buffer_; // Processing I/O buffers
+ int16_t* input_buffer_;
+ float* filter_coeffs_; // becomes the filter coefficient array
+ int n_filter_coeffs_; // The number of filter coefficients
+ int n_filter_coeffs_by2_; // Precompute for convenience/speed
+ int left_over_; // bookkeeping for the OLA filtering operations
+ int first_out_; // non-zero indicates the first call to the filter kernel
+ int to_skip_; // saves state for the decimator when downsampling
+ int array_leftover_; // Bookkeeping for buffered processing.
+ int array_index_; // internal book keeping
+ int array_samples_used_; // internal book keeping
+ int filter_state_; // State of processing WRT input and completion
+ float true_output_rate_; // For sample rate conversion, this can
+ // differ from requested freq.
+ int16_t* leftovers_; // saves residual input samples that are mod fft_size
+ float* output_delayed_; // saves samples that exceed the caller's output capacity.
+ float* x_; // FFT processing arrays
+ float* y_;
+ float* xf_;
+ float* yf_;
+ int fft_size_; // Number of points in the FFTs
+ int fft_size_by2_; // Precompute for convenience/speed
+ int insert_; // for sample rate conversion, these are the
+ // interpolation/decimations
+ int decimate_;
+ int max_input_; // maximum allowed input with each call to filterBuffer
+ FFT* fft_; // The FFT instance used by the filter.
+};
+
+#endif // _FD_FILTER_H_
diff --git a/REAPER/epoch_tracker/fft.cc b/REAPER/epoch_tracker/fft.cc
new file mode 100644
index 0000000000000000000000000000000000000000..3a4b0bd4477571bcdb3ff1409c3f3d4dc92968fd
--- /dev/null
+++ b/REAPER/epoch_tracker/fft.cc
@@ -0,0 +1,181 @@
+/*
+Copyright 2015 Google Inc. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+// Author: David Talkin (dtalkin@google.com)
+
+#include "epoch_tracker/fft.h"
+
+/* Construct a FFT to perform a DFT of size 2^power. */
+FFT::FFT(int power) {
+ makefttable(power);
+}
+
+FFT::~FFT() {
+ delete [] fsine;
+ delete [] fcosine;
+}
+
+/*-----------------------------------------------------------------------*/
+/* z <- (10 * log10(x^2 + y^2)) for n elements */
+bool FFT::flog_mag(float *x, float *y, float *z, int n) {
+ float *xp, *yp, *zp, t1, t2, ssq;
+
+ if (x && y && z && n) {
+ for (xp = x + n, yp = y + n, zp = z + n; zp > z;) {
+ t1 = *--xp;
+ t2 = *--yp;
+ ssq = (t1 * t1) + (t2 * t2);
+ *--zp = (ssq > 0.0)? 10.0 * log10(ssq) : -200.0;
+ }
+ return true;
+ } else {
+ return false;
+ }
+}
+
+/*-----------------------------------------------------------------------*/
+float FFT::get_band_rms(float *x, float*y, int first_bin, int last_bin) {
+ double sum = 0.0;
+ for (int i = first_bin; i <= last_bin; ++i) {
+ sum += (x[i] * x[i]) + (y[i] * y[i]);
+ }
+ return sqrt(sum / (last_bin - first_bin + 1));
+}
+
+/*-----------------------------------------------------------------------*/
+int FFT::makefttable(int pow2) {
+ int lmx, lm;
+ float *c, *s;
+ double scl, arg;
+
+ fftSize = 1 << pow2;
+ fft_ftablesize = lmx = fftSize/2;
+ fsine = new float[lmx];
+ fcosine = new float[lmx];
+ scl = (M_PI * 2.0) / fftSize;
+ for (s = fsine, c = fcosine, lm = 0; lm < lmx; ++lm) {
+ arg = scl * lm;
+ *s++ = sin(arg);
+ *c++ = cos(arg);
+ }
+ kbase = (fft_ftablesize * 2) / fftSize;
+ power2 = pow2;
+ return(fft_ftablesize);
+}
+
+/*-----------------------------------------------------------------------*/
+/* Compute the discrete Fourier transform of the 2**l complex sequence
+ * in x (real) and y (imaginary). The DFT is computed in place and the
+ * Fourier coefficients are returned in x and y.
+ */
+void FFT::fft(float *x, float *y) {
+ float c, s, t1, t2;
+ int j1, j2, li, lix, i;
+ int lmx, lo, lixnp, lm, j, nv2, k = kbase, im, jm, l = power2;
+
+ for (lmx = fftSize, lo = 0; lo < l; lo++, k *= 2) {
+ lix = lmx;
+ lmx /= 2;
+ lixnp = fftSize - lix;
+ for (i = 0, lm = 0; lm < lmx; lm++, i += k) {
+ c = fcosine[i];
+ s = fsine[i];
+ for (li = lixnp + lm, j1 = lm, j2 = lm + lmx; j1 <= li;
+ j1 += lix, j2 += lix) {
+ t1 = x[j1] - x[j2];
+ t2 = y[j1] - y[j2];
+ x[j1] += x[j2];
+ y[j1] += y[j2];
+ x[j2] = (c * t1) + (s * t2);
+ y[j2] = (c * t2) - (s * t1);
+ }
+ }
+ }
+
+ /* Now perform the bit reversal. */
+ j = 1;
+ nv2 = fftSize / 2;
+ for (i = 1; i < fftSize; i++) {
+ if (j < i) {
+ jm = j - 1;
+ im = i - 1;
+ t1 = x[jm];
+ t2 = y[jm];
+ x[jm] = x[im];
+ y[jm] = y[im];
+ x[im] = t1;
+ y[im] = t2;
+ }
+ k = nv2;
+ while (j > k) {
+ j -= k;
+ k /= 2;
+ }
+ j += k;
+ }
+}
+
+/*-----------------------------------------------------------------------*/
+/* Compute the discrete inverse Fourier transform of the 2**l complex
+ * sequence in x (real) and y (imaginary). The DFT is computed in
+ * place and the Fourier coefficients are returned in x and y. Note
+ * that this DOES NOT scale the result by the inverse FFT size.
+ */
+void FFT::ifft(float *x, float *y) {
+ float c, s, t1, t2;
+ int j1, j2, li, lix, i;
+ int lmx, lo, lixnp, lm, j, nv2, k = kbase, im, jm, l = power2;
+
+ for (lmx = fftSize, lo = 0; lo < l; lo++, k *= 2) {
+ lix = lmx;
+ lmx /= 2;
+ lixnp = fftSize - lix;
+ for (i = 0, lm = 0; lm < lmx; lm++, i += k) {
+ c = fcosine[i];
+ s = -fsine[i];
+ for (li = lixnp + lm, j1 = lm, j2 = lm + lmx; j1 <= li;
+ j1 += lix, j2 += lix) {
+ t1 = x[j1] - x[j2];
+ t2 = y[j1] - y[j2];
+ x[j1] += x[j2];
+ y[j1] += y[j2];
+ x[j2] = (c * t1) + (s * t2);
+ y[j2] = (c * t2) - (s * t1);
+ }
+ }
+ }
+
+ /* Now perform the bit reversal. */
+ j = 1;
+ nv2 = fftSize / 2;
+ for (i = 1; i < fftSize; i++) {
+ if (j < i) {
+ jm = j-1;
+ im = i-1;
+ t1 = x[jm];
+ t2 = y[jm];
+ x[jm] = x[im];
+ y[jm] = y[im];
+ x[im] = t1;
+ y[im] = t2;
+ }
+ k = nv2;
+ while (j > k) {
+ j -= k;
+ k /= 2;
+ }
+ j += k;
+ }
+}
diff --git a/REAPER/epoch_tracker/fft.h b/REAPER/epoch_tracker/fft.h
new file mode 100644
index 0000000000000000000000000000000000000000..58ce89a44194dca180796ce83d8dc2f6b70383ef
--- /dev/null
+++ b/REAPER/epoch_tracker/fft.h
@@ -0,0 +1,73 @@
+/*
+Copyright 2015 Google Inc. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+// Author: David Talkin (dtalkin@google.com)
+
+#ifndef _FFT_H_
+#define _FFT_H_
+
+#include
+#include
+#include
+
+#ifndef M_PI
+#define M_PI 3.1415927
+#endif
+
+#define TRUE 1
+#define FALSE 0
+
+class FFT {
+ public:
+ // Constructor: Prepare for radix-2 FFT's of size (1<
+#include
+
+#ifndef M_PI
+#define M_PI (3.14159265359)
+#endif
+
+/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+/* Generate a Hanning window, if one does not already exist. */
+void LpcAnalyzer::HannWindow(const float* din, float* dout, int n,
+ float preemp) {
+ int i;
+ const float *p;
+
+ // Need to create a new Hanning window? */
+ if (window_.size() != static_cast(n)) {
+ double arg, half = 0.5;
+ window_.resize(n);
+ for (i = 0, arg = M_PI * 2.0 / n; i < n; ++i)
+ window_[i] = (half - half * cos((half + i) * arg));
+ }
+ /* If preemphasis is to be performed, this assumes that there are n+1 valid
+ samples in the input buffer (din). */
+ if (preemp != 0.0) {
+ for (i = 0, p = din + 1; i < n; ++i)
+ *dout++ = window_[i] * (*p++ - (preemp * *din++));
+ } else {
+ for (i = 0; i < n; ++i)
+ *dout++ = window_[i] * *din++;
+ }
+}
+
+/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+/* Place a time-weighting window of length n in energywind_.
+*/
+void LpcAnalyzer::GetWindow(int n) {
+ // Need to create a new Hanning window?
+ if (energywind_.size() != static_cast(n)) {
+ double arg = M_PI * 2.0 / n, half = 0.5;
+ energywind_.resize(n);
+ for (int i = 0; i < n; ++i)
+ energywind_[i] = (half - half * cos((half + i) * arg));
+ }
+}
+
+/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+/* Compute the pp+1 autocorrelation lags of the windowsize samples in s.
+* Return the normalized autocorrelation coefficients in r.
+* The rms is returned in e.
+*/
+void LpcAnalyzer::Autoc(int windowsize, float* s, int p, float* r, float* e) {
+ int i, j;
+ float *q, *t, sum, sum0;
+
+ for (i = windowsize, q = s, sum0 = 0.0; i--;) {
+ sum = *q++;
+ sum0 += sum*sum;
+ }
+ *r = 1.; /* r[0] will always = 1.0 */
+ if (sum0 == 0.0) { /* No energy: fake low-energy white noise. */
+ *e = 1.; /* Arbitrarily assign 1 to rms. */
+ /* Now fake autocorrelation of white noise. */
+ for (i = 1; i <= p; i++) {
+ r[i] = 0.;
+ }
+ return;
+ }
+ *e = sqrt(sum0 / windowsize);
+ sum0 = 1.0 / sum0;
+ for (i = 1; i <= p; i++) {
+ for (sum = 0.0, j = windowsize - i, q = s, t = s + i; j--;)
+ sum += (*q++) * (*t++);
+ *(++r) = sum * sum0; // normalizing by the inverse energy
+ }
+}
+
+/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+/* Using Durbin's recursion, convert the autocorrelation sequence in r
+* to reflection coefficients in k and predictor coefficients in a.
+* The prediction error energy (gain) is left in *ex.
+* Note: Durbin returns the coefficients in normal sign format.
+* (i.e. a[0] is assumed to be = +1.)
+*/
+void LpcAnalyzer::Durbin(float* r, float* k, float* a, int p, float* ex) {
+ float bb[BIGSORD];
+ int i, j;
+ float e, s, *b = bb;
+
+ e = *r;
+ *k = -r[1] / e;
+ *a = *k;
+ e *= (1.0 - (*k) * (*k));
+ for (i = 1; i < p; i++) {
+ s = 0;
+ for (j = 0; j < i; j++) {
+ s -= a[j] * r[i - j];
+ }
+ k[i] = (s - r[i + 1]) / e;
+ a[i] = k[i];
+ for (j = 0; j <= i; j++) {
+ b[j] = a[j];
+ }
+ for (j = 0; j < i; j++) {
+ a[j] += k[i] * b[i - j - 1];
+ }
+ e *= (1.0 - (k[i] * k[i]));
+ }
+ *ex = e;
+}
+
+/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+/* Compute the autocorrelations of the p LP coefficients in a.
+* (a[0] is assumed to be = 1 and not explicitely accessed.)
+* The magnitude of a is returned in c.
+* 2* the other autocorrelation coefficients are returned in b.
+*/
+void LpcAnalyzer::PcToAutocorPc(float* a, float* b, float* c, int p) {
+ float s, *ap, *a0;
+ int i, j;
+
+ for (s = 1., ap = a, i = p; i--; ap++)
+ s += *ap * *ap;
+
+ *c = s;
+ for (i = 1; i <= p; i++) {
+ s = a[i - 1];
+ for (a0 = a, ap = a + i, j = p - i; j--;)
+ s += (*a0++ * *ap++);
+ *b++ = 2.0 * s;
+ }
+}
+
+/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+/* Compute the Itakura LPC distance between the model represented
+* by the signal autocorrelation (r) and its residual (gain) and
+* the model represented by an LPC autocorrelation (c, b).
+* Both models are of order p.
+* r is assumed normalized and r[0]=1 is not explicitely accessed.
+* Values returned by the function are >= 1.
+*/
+float LpcAnalyzer::ItakuraDistance(int p, float* b, float* c, float* r,
+ float gain) {
+ float s;
+
+ for (s = *c; p--;)
+ s += *r++ * *b++;
+
+ return s / gain;
+}
+
+/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+/* Compute the time-weighted RMS of a size segment of data. The data
+* is weighted by a Hanning window before RMS computation.
+*/
+float LpcAnalyzer::WindowedRms(float* data, int size) {
+ float sum, f;
+ int i;
+
+ GetWindow(size);
+ for (i = 0, sum = 0.0; i < size; i++) {
+ f = energywind_[i] * (*data++);
+ sum += f * f;
+ }
+ return sqrt(sum / size);
+}
+
+/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+// Generic autocorrelation LPC analysis of the floating-point
+// sequence in data.
+//
+// int lpc_ord, /* Analysis order */
+// wsize, /* window size in points */
+// type; /* window type (decoded in window() above) */
+// float noise_floor, /* Simulated white noise floor in dB (SNR). */
+// *lpca, /* if non-NULL, return vector for predictors */
+// *ar, /* if non-NULL, return vector for normalized autoc. */
+// *lpck, /* if non-NULL, return vector for PARCOR's */
+// *normerr, /* return scalar for normalized error */
+// *rms, /* return scalar for energy in preemphasized window */
+// preemp;
+// float *data; /* input data sequence; assumed to be wsize+1 long */
+int LpcAnalyzer::ComputeLpc(int lpc_ord, float noise_floor, int wsize,
+ const float* data, float* lpca, float* ar,
+ float* lpck, float* normerr, float* rms,
+ float preemp) {
+ float rho[BIGSORD+1], k[BIGSORD], a[BIGSORD+1], *r, *kp, *ap, en, er;
+
+ if ((wsize <= 0) || (!data) || (lpc_ord > BIGSORD))
+ return false;
+
+ float *dwind = new float[wsize];
+
+ HannWindow(data, dwind, wsize, preemp);
+ if (!(r = ar)) r = rho; /* Permit optional return of the various */
+ if (!(kp = lpck)) kp = k; /* coefficients and intermediate results. */
+ if (!(ap = lpca)) ap = a;
+ Autoc(wsize, dwind, lpc_ord, r, &en);
+ if (noise_floor > 1.0) { // Add some to the diagonal to simulate white noise.
+ int i;
+ float ffact;
+ ffact = 1.0 / (1.0 + exp((-noise_floor / 20.0) * log(10.0)));
+ for (i = 1; i <= lpc_ord; i++)
+ rho[i] = ffact * r[i];
+ *rho = *r;
+ r = rho;
+ if (ar) {
+ for (i = 0; i <= lpc_ord; i++)
+ ar[i] = r[i];
+ }
+ }
+ Durbin(r, kp, ap + 1, lpc_ord, &er);
+ float wfact = .612372; // ratio of Hanning RMS to rectangular RMS
+ ap[0] = 1.0;
+ if (rms)
+ *rms = en / wfact;
+ if (normerr)
+ *normerr = er;
+ delete [] dwind;
+ return true;
+}
diff --git a/REAPER/epoch_tracker/lpc_analyzer.h b/REAPER/epoch_tracker/lpc_analyzer.h
new file mode 100644
index 0000000000000000000000000000000000000000..56378c6435e819b4d5f8cbcfb36ed9f9e55cdd31
--- /dev/null
+++ b/REAPER/epoch_tracker/lpc_analyzer.h
@@ -0,0 +1,113 @@
+/*
+Copyright 2015 Google Inc. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// LpcAnalyzer
+// A collection of methods commonly used in linear-prediction analysis.
+
+#ifndef _LPC_ANALYZER_H_
+#define _LPC_ANALYZER_H_
+
+#include
+
+// Largest order allowed for any linear predictor analysis
+#define BIGSORD 100
+
+class LpcAnalyzer {
+ public:
+ LpcAnalyzer(void) { }
+
+ ~LpcAnalyzer(void) { }
+
+
+ // Apply Hanning weighting to the input data sequence in data_in,
+ // put the results in data_out. Array lengths are assumed as
+ // data_in has windowsize+1 points; data_out has windowsize
+ // elements.
+ void HannWindow(const float* data_in, float* data_out, int windowsize,
+ float preemp);
+
+
+ // Compute the order+1 autocorrelation lags of the windowsize
+ // samples in data_in. Return the normalized autocorrelation
+ // coefficients in autoc. The rms is returned in rms.
+ void Autoc(int windowsize, float* data_in, int order, float* autoc,
+ float* rms);
+
+
+ // Using Durbin's recursion, convert the autocorrelation sequence in autocor
+ // to reflection coefficients in refcof and predictor coefficients in lpc.
+ // The prediction error energy (gain) is left in *gain.
+ // Note: Durbin returns the coefficients in normal sign format.
+ // (i.e. lpca[0] is assumed to be = +1.)
+ void Durbin(float* autocor, float* refcof, float* lpc, int order,
+ float* gain);
+
+
+ // Compute the autocorrelations of the order LP coefficients in lpc.
+ // (lpc[0] is assumed to be = 1 and not explicitely accessed.)
+ // The magnitude of lpc is returned in mag.
+ // 2* the other autocorrelation coefficients are returned in lpc_auto.
+ void PcToAutocorPc(float* lpc, float* lpc_auto, float* mag, int order);
+
+
+ // Compute the Itakura LPC distance between the model represented
+ // by the signal autocorrelation (autoc) and its residual (gain) and
+ // the model represented by an LPC autocorrelation (mag, lpc_auto).
+ // Both models are of order.
+ // r is assumed normalized and r[0]=1 is not explicitely accessed.
+ // Values returned by the function are >= 1.
+ float ItakuraDistance(int order, float* lpc_auto, float* mag, float* autoc,
+ float gain);
+
+
+ // Compute the time-weighted RMS of a size segment of data. The data
+ // is weighted by a window of type w_type before RMS computation. w_type
+ // is decoded above in window().
+ float WindowedRms(float* data, int size);
+
+
+ // Generic autocorrelation LPC analysis of the floating-point
+ // sequence in data.
+ //
+ // int lpc_ord, /* Analysis order
+ // wsize; /* window size in points
+ // float noise_floor, /* To simulate a white noise floor (dB SNR).
+ // *lpca, /* if non-NULL, return vector for predictors
+ // *ar, /* if non-NULL, return vector for normalized autoc.
+ // *lpck, /* if non-NULL, return vector for PARCOR's
+ // *normerr, /* return scalar for normalized error
+ // *rms, /* return scalar for energy in preemphasized window
+ // preemp;
+ // float *data; /* input data sequence; assumed to be wsize+1 long
+ int ComputeLpc(int lpc_ord, float noise_floor, int wsize, const float* data,
+ float* lpca, float* ar, float* lpck, float* normerr, float* rms,
+ float preemp);
+
+ // Use the standard speech analysis formula to determine the
+ // appropriate LPC order, given a sample rate.
+ static int GetLpcOrder(float sample_rate) {
+ return static_cast(2.5 + (sample_rate / 1000.0));
+ }
+
+ private:
+ // Puts a time-weighting window of length n in energywind.
+ void GetWindow(int n);
+
+ std::vector energywind_;
+ std::vector window_;
+};
+
+#endif // _LPC_ANALYZER_H_
diff --git a/REAPER/epoch_tracker_main.cc b/REAPER/epoch_tracker_main.cc
new file mode 100644
index 0000000000000000000000000000000000000000..56fcd35932fcf6505942028eb832fa72c3c6157c
--- /dev/null
+++ b/REAPER/epoch_tracker_main.cc
@@ -0,0 +1,260 @@
+/*
+Copyright 2015 Google Inc. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+#include
+#include
+#include
+#include
+#include
+
+#include "core/file_resource.h"
+#include "core/track.h"
+#include "epoch_tracker/epoch_tracker.h"
+#include "wave/wave.h"
+
+
+const char* kHelp = "Usage: -i "
+ "[-f -p \\\n"
+ "-c "
+ "-t "
+ "-s "
+ "-e "
+ "-x "
+ "-m \\\n"
+ "-u "
+ "-w "
+ "-a "
+ "-d ] "
+ "\n\n Help:\n"
+ "-t enables a Hilbert transform that may reduce phase distortion\n"
+ "-s suppress applying high pass filter at 80Hz "
+ "(rumble-removal highpass filter)\n"
+ "-e specifies the output frame interval for F0\n"
+ "-x maximum f0 to look for\n"
+ "-m minimum f0 to look for\n"
+ "-u regular inter-mark interval to use in UV pitchmark regions\n"
+ "-w set the cost for unvoiced segments\n"
+ " (def. 0.9, the higher the value the more f0 estimates in noise)\n"
+ "-a saves F0 and PM output in ascii mode\n"
+ "-d write diagnostic output to this file pattern\n"
+"\nOutputs:\n"\
+"The output files specified with -f and -p are Edinburgh Speech Tool\n"
+"(EST) style files. These are output as binary by default, ASCII with\n"
+"the -a option. The F0 values in the f0_output file are resampled with\n"
+"the frame interval specified by option -e (default .005 s).\n"
+"The unvoiced regions of the pitchmark file are filled with marks spaced\n"
+"by the interval specified with -u (default .01 s).\n"
+"\nIt is strongly recommended that the default high-pass filter be\n"
+"applied to all input signals to remove DC and low-frequency\n"
+"components. For signals that have been recorded using close-talking\n"
+"microphones, or those that have been subjected to various other\n"
+"non-linear phase distortions in the studio, or in post-production, it\n"
+"is often helpful to apply a Hilbert transform (-t option). The .resid\n"
+"file output when -d is specified can be examined to determine if the\n"
+"voice pulses look anything like the classical glottal-flow derivative,\n"
+"and the Hilbert transform enabled, or not.\n"
+"\n"
+"In the discussion below, the following notation is used:\n"
+"Fs: sample rate\n"
+"Fs0: sample rate of input file\n"
+"nd: n-dimensional vector signal\n"
+"ts: time-stamped vector signal; 1st ele. is the time of the sample in sec.\n"
+"float, int16, etc.: atomic type of the data in the file\n"
+"\nIf -d is specified, the following raw binary output files are produced,\n"
+"with the base path as specified in , and the indicated extensions:\n"
+".bestcorr 2d float ts the highest NCC value found at each residual peak\n"
+".bprms 1d float Fs=500 RMS of 100-1000 Hz bandpassed input signal\n"
+".f0ap 3d float ts F0 and NCC value found for each period\n"
+".resid 1d float Fs=Fs0 LPC residual of conditioned input signal\n"
+".nresid 1d float Fs=Fs0 LPC residual with local gain normalization\n"
+".offsetp 1d float Fs=500 pseudo-probability that voicing is terminating\n"
+".onsetp 1d float Fs=500 pseudo-probability that voicing is starting\n"
+".pvoiced 1d float Fs=500 pseudo-probability that voicing is occurring\n"
+".pcm 1d float Fs=Fs0 conditioned input signal\n"
+".pmlab ASCII 'xlabel' format file of epoch marks\n"
+".pvals 1d float Fs=Fs0 graded residual peak candidates\n";
+
+Track* MakeEpochOutput(EpochTracker &et, float unvoiced_pm_interval) {
+ std::vector times;
+ std::vector voicing;
+ et.GetFilledEpochs(unvoiced_pm_interval, ×, &voicing);
+ Track* pm_track = new Track;
+ pm_track->resize(times.size());
+ for (int32_t i = 0; i < times.size(); ++i) {
+ pm_track->t(i) = times[i];
+ pm_track->set_v(i, voicing[i]);
+ }
+ return pm_track;
+}
+
+Track* MakeF0Output(EpochTracker &et, float resample_interval, Track** cor) {
+ std::vector f0;
+ std::vector corr;
+ if (!et.ResampleAndReturnResults(resample_interval, &f0, &corr)) {
+ return NULL;
+ }
+
+ Track* f0_track = new Track;
+ Track* cor_track = new Track;
+ f0_track->resize(f0.size());
+ cor_track->resize(corr.size());
+ for (int32_t i = 0; i < f0.size(); ++i) {
+ float t = resample_interval * i;
+ f0_track->t(i) = t;
+ cor_track->t(i) = t;
+ f0_track->set_v(i, (f0[i] > 0.0) ? true : false);
+ cor_track->set_v(i, (f0[i] > 0.0) ? true : false);
+ f0_track->a(i) = (f0[i] > 0.0) ? f0[i] : -1.0;
+ cor_track->a(i) = corr[i];
+ }
+ *cor = cor_track;
+ return f0_track;
+}
+
+bool ComputeEpochsAndF0(EpochTracker &et, float unvoiced_pulse_interval,
+ float external_frame_interval,
+ Track** pm, Track** f0, Track** corr) {
+ if (!et.ComputeFeatures()) {
+ return false;
+ }
+ bool tr_result = et.TrackEpochs();
+ et.WriteDiagnostics(""); // Try to save them here, even after tracking failure.
+ if (!tr_result) {
+ fprintf(stderr, "Problems in TrackEpochs");
+ return false;
+ }
+
+ // create pm and f0 objects, these need to be freed in calling client.
+ *pm = MakeEpochOutput(et, unvoiced_pulse_interval);
+ *f0 = MakeF0Output(et, external_frame_interval, corr);
+ return true;
+}
+
+int main(int argc, char* argv[]) {
+ int opt = 0;
+ std::string filename;
+ std::string f0_output;
+ std::string pm_output;
+ std::string corr_output;
+ bool do_hilbert_transform = kDoHilbertTransform;
+ bool do_high_pass = kDoHighpass;
+ float external_frame_interval = kExternalFrameInterval;
+ float max_f0 = kMaxF0Search;
+ float min_f0 = kMinF0Search;
+ float inter_pulse = kUnvoicedPulseInterval;
+ float unvoiced_cost = kUnvoicedCost;
+ bool ascii = false;
+ std::string debug_output;
+ if (argc < 3) {
+ fprintf(stdout, "\n%s\n", kHelp);
+ return 1;
+ }
+ while ((opt = getopt(argc, argv, "i:f:p:c:htse:x:m:u:w:ad:")) != -1) {
+ switch(opt) {
+ case 'i':
+ filename = optarg;
+ break;
+ case 'f':
+ f0_output = optarg;
+ break;
+ case 'p':
+ pm_output = optarg;
+ break;
+ case 'c':
+ corr_output = optarg;
+ break;
+ case 't':
+ do_hilbert_transform = true;
+ break;
+ case 's':
+ do_high_pass = false;
+ break;
+ case 'e':
+ external_frame_interval = atof(optarg);
+ break;
+ case 'x':
+ max_f0 = atof(optarg);
+ break;
+ case 'm':
+ min_f0 = atof(optarg);
+ break;
+ case 'u':
+ inter_pulse = atof(optarg);
+ break;
+ case 'w':
+ unvoiced_cost = atof(optarg);
+ break;
+ case 'a':
+ ascii = true;
+ break;
+ case 'd':
+ debug_output = optarg;
+ break;
+ case 'h':
+ fprintf(stdout, "\n%s\n", kHelp);
+ return 0;
+ }
+ }
+
+ // Load input.
+ Wave wav;
+ if (!wav.Load(filename)) {
+ fprintf(stderr, "Failed to load waveform '%s'\n", filename.c_str());
+ return 1;
+ }
+
+ EpochTracker et;
+ et.set_unvoiced_cost(unvoiced_cost);
+ int16_t* wave_datap = const_cast(wav.data()->data());
+ int32_t n_samples = wav.num_samples();
+ float sample_rate = wav.sample_rate();
+ if (!et.Init(wave_datap, n_samples, sample_rate,
+ min_f0, max_f0, do_high_pass, do_hilbert_transform)) {
+ return 1;
+ }
+ if (!debug_output.empty()) {
+ et.set_debug_name(debug_output);
+ }
+ // Compute f0 and pitchmarks.
+ Track *f0 = NULL;
+ Track *pm = NULL;
+ Track *corr = NULL;
+ if (!ComputeEpochsAndF0(et, inter_pulse, external_frame_interval, &pm, &f0, &corr)) {
+ fprintf(stderr, "Failed to compute epochs\n");
+ return 1;
+ }
+
+ // Save outputs.
+ if (!f0_output.empty() && !f0->Save(f0_output, ascii)) {
+ delete f0;
+ fprintf(stderr, "Failed to save f0 to '%s'\n", f0_output.c_str());
+ return 1;
+ }
+ if (!pm_output.empty() && !pm->Save(pm_output, ascii)) {
+ delete pm;
+ fprintf(stderr, "Failed to save pitchmarks to '%s'\n", pm_output.c_str());
+ return 1;
+ }
+ if (!corr_output.empty() && !corr->Save(corr_output, ascii)) {
+ delete corr;
+ fprintf(stderr, "Failed to save correlations to '%s'\n", corr_output.c_str());
+ return 1;
+ }
+ delete f0;
+ delete pm;
+ delete corr;
+ return 0;
+}
diff --git a/REAPER/wave/codec_api-inl.h b/REAPER/wave/codec_api-inl.h
new file mode 100644
index 0000000000000000000000000000000000000000..dc2dd4f626204e9d96e9c1a3f2e09acf3c035efc
--- /dev/null
+++ b/REAPER/wave/codec_api-inl.h
@@ -0,0 +1,135 @@
+/*
+Copyright 2015 Google Inc. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+#ifndef _CODEC_API_INL_H_
+#define _CODEC_API_INL_H_
+
+#include "core/file_resource.h"
+
+
+template
+inline bool CodecApi::SetHeaderInfo(
+ int sampling_rate, int num_samples_per_channel) {
+ bool status = set_sampling_rate(sampling_rate);
+ status &= set_num_samples_per_channel(num_samples_per_channel);
+ return status;
+}
+
+template
+inline bool CodecApi::GetHeaderInfo(
+ int *sampling_rate, int *num_samples_per_channel) {
+ *sampling_rate = sampling_rate_;
+ *num_samples_per_channel = num_samples_per_channel_;
+ return true;
+}
+
+template
+inline bool CodecApi::ReadHeader(FileResource *fr) {
+ return codec_.ReadHeader(fr, &num_samples_per_channel_, &sampling_rate_);
+}
+
+template
+bool CodecApi::ReadAudioData(
+ int wave_start, int num_samples,
+ std::vector *samples, FileResource *fr) {
+ if (samples == NULL) {
+ fprintf(stderr, "CodecApi::ReadAudioData: empty pointer was given");
+ return true;
+ }
+ int64_t offset_audio_container = ftell(fr->fp());
+ bool status = codec_.ReadAudioData(wave_start, num_samples, samples, fr);
+ // Reset the file resource pointer back to the beginning of the
+ // audio container.
+ if (fseek(fr->fp(), offset_audio_container, SEEK_SET) != 0) {
+ fprintf(stderr, "CodecApi::ReadAudioData: error seeking the beginning of the "
+ "audio container");
+ return false;
+ }
+ return status;
+}
+
+template
+bool CodecApi::ReadAudioContainer(
+ int container_size_in_bytes,
+ std::vector *samples,
+ FileResource *fr) {
+ int64_t offset_audio_container = ftell(fr->fp());
+ bool status = codec_.ReadAudioContainer(container_size_in_bytes, samples, fr);
+ // Reset the FileResource pointer back to the beginning of the audio container
+ if (fseek(fr->fp(), offset_audio_container, SEEK_SET) != 0) {
+ fprintf(stderr, "CodecApi::ReadAudioData: error seeking the beginning of the "
+ "audio container");
+ return false;
+ }
+ return status;
+}
+
+template
+inline int CodecApi::get_num_samples_per_channel() const {
+ return num_samples_per_channel_;
+}
+
+template
+inline int CodecApi::get_sampling_rate() const {
+ return sampling_rate_;
+}
+
+template
+inline
+bool CodecApi::set_num_samples_per_channel(int value) {
+ num_samples_per_channel_ = value;
+ return true;
+}
+
+template
+inline
+bool CodecApi::set_sampling_rate(int value) {
+ sampling_rate_ = value;
+ return true;
+}
+
+template
+bool CodecApi::Load(
+ FileResource *fr, std::vector *samples) {
+ if (!codec_.ReadHeader(fr, &num_samples_per_channel_, &sampling_rate_)) {
+ return false;
+ }
+ samples->resize(num_samples_per_channel_);
+ return codec_.ReadAudioData(
+ 0, num_samples_per_channel_, PCM16, samples, fr);
+}
+
+template
+template
+bool CodecApi::Load(
+ const std::string &filename, std::vector *samples) {
+ FileResource *fr = FileResourceType::Open(filename);
+ if (fr != NULL) {
+ return Load(fr, samples);
+ } else {
+ fprintf(stderr, "CodecApi::Load: Failed to open \"%s\"", filename.c_str());
+ return false;
+ }
+}
+
+template
+bool CodecApi::Initialize(
+ WaveCodingType coding_type) {
+ return codec_.Initialize(coding_type);
+}
+
+
+#endif // SPEECH_PATTS_LIBS_IO_CODEC_API_INL_H_
diff --git a/REAPER/wave/codec_api.h b/REAPER/wave/codec_api.h
new file mode 100644
index 0000000000000000000000000000000000000000..09e496c3575201ac7b23eefb60eadbbf61ca5145
--- /dev/null
+++ b/REAPER/wave/codec_api.h
@@ -0,0 +1,98 @@
+/*
+Copyright 2015 Google Inc. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+#ifndef _CODEC_API_H_
+#define _CODEC_API_H_
+
+#include
+#include
+#include
+
+#include "wave/codec_riff.h"
+
+
+
+class FileResource;
+
+template
+class CodecApi {
+ public:
+ CodecApi() { }
+ ~CodecApi() { }
+
+ // Loads audio samples from a file-resource. It sets the internal header
+ // parameters.
+ bool Load(FileResource *fr, std::vector *samples);
+
+ // Loads audio samples from a file. It sets the internal header parameters.
+ template
+ bool Load(const std::string &filename, std::vector *samples);
+
+ // Saves audio samples to a file-resource using the internal header
+ // parameters.
+ bool Save(const std::vector &samples, FileResource *fr) const;
+
+ // Saves audio samples to a file, using the internal header parameters.
+ template
+ bool Save(const std::vector &samples, const std::string &filename) const;
+
+ // Sets generic header information.
+ bool SetHeaderInfo(int sampling_rate, int num_samples_per_channel);
+
+ // Gets generic header information.
+ bool GetHeaderInfo(int *sampling_rate, int *num_samples_per_channel);
+
+ // Reads wave header from file-resource.
+ bool ReadHeader(FileResource *fr);
+
+ // Reads the audio data from the FileResource, under the condition that the
+ // current position of the FileResource always points to the beginning of the
+ // audio-container. The latter condition is preserved by this function. When
+ // a codec with internal-state is used (i.e. iSAC), the internal state is kept
+ // between sequential reads. The codec is reset prior non-sequential reads.
+ // By definition, the codecs DO NOT check whether you are trying to read
+ // beyond the boundaries of the audio-data container, so, be careful.
+ bool ReadAudioData(int wave_start, int num_samples,
+ std::vector *samples, FileResource *fr);
+
+ // Reads all audio data contained in the audio container held at the current
+ // position of the FileResource. The functions assumes and preserves the
+ // condition that the current position of the FileResource always points to
+ // the beginning of the audio container.
+ bool ReadAudioContainer(int container_size_in_bytes,
+ std::vector *samples,
+ FileResource *fr);
+
+ int get_num_samples_per_channel() const;
+ int get_sampling_rate() const;
+
+ bool set_num_samples_per_channel(int value);
+ bool set_sampling_rate(int value);
+
+ // Initializes the codec for the particular coding type
+ bool Initialize(WaveCodingType coding_type);
+
+ private:
+ int num_samples_per_channel_;
+ int sampling_rate_;
+ CodecImplementation codec_;
+
+};
+
+
+#include "codec_api-inl.h"
+
+#endif // _CODEC_API_H_
diff --git a/REAPER/wave/codec_riff.cc b/REAPER/wave/codec_riff.cc
new file mode 100644
index 0000000000000000000000000000000000000000..91213fc814c1dad1d43361ca132f057fe9928b68
--- /dev/null
+++ b/REAPER/wave/codec_riff.cc
@@ -0,0 +1,270 @@
+/*
+Copyright 2015 Google Inc. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+#include "wave/codec_riff.h"
+
+#include
+
+#include "core/file_resource.h"
+
+uint8_t UlawCodec::Int16ToUlaw(int16_t pcm_val) const {
+ int16_t mask;
+ int16_t seg;
+ uint8_t uval;
+ // u-law inverts all bits
+ // Get the sign and the magnitude of the value.
+ if (pcm_val < 0) {
+ pcm_val = -pcm_val;
+ mask = 0x7f;
+ } else {
+ mask = 0xff;
+ }
+ if (pcm_val > kClip) {
+ pcm_val = kClip; // clip the magnitude
+ }
+ pcm_val += (kBias >> 2);
+ // Convert the scaled magnitude to segment number.
+ seg = SegmentSearch(pcm_val, seg_uend, 8);
+ // Combine the sign, segment, quantization bits,
+ // and complement the code word.
+ if (seg >= 8) { // out of range, return maximum value.
+ return (uint8_t)(0x7f ^ mask);
+ } else {
+ uval = (uint8_t) (seg << 4) | ((pcm_val >> (seg + 1)) & 0xF);
+ return uval ^ mask;
+ }
+}
+
+int16_t UlawCodec::SegmentSearch(int16_t val, const int16_t *table,
+ int size) const {
+ for (int i = 0; i < size; ++i) {
+ if (val <= *table++) {
+ return i;
+ }
+ }
+ return size;
+}
+
+int16_t UlawCodec::UlawToInt16(uint8_t ulaw) const {
+ // Complement to obtain normal u-law value.
+ ulaw = ~ulaw;
+ // Extract and bias the quantization bits. Then
+ // shift up by the segment number and subtract out the bias.
+ int16_t t = ((ulaw & kQuantMask) << 3) + kBias;
+ t <<= ((unsigned)ulaw & kSegMask) >> kSegShift;
+ return ((ulaw & kSignBit) ? (kBias - t) : (t - kBias)) >> 2;
+}
+
+//
+// Table and constants for mu-law coding and decoding:
+//
+const int16_t UlawCodec::seg_uend[8] = { 0x3f, 0x7f, 0xff, 0x1ff, 0x3ff, 0x7ff,
+ 0xfff, 0x1fff};
+const int16_t UlawCodec::kBias = 0x84; // Bias for linear code.
+const int16_t UlawCodec::kClip = 8159; // max. linear value
+const int16_t UlawCodec::kSignBit = 0x80; // Sign bit for a A-law byte.
+const int16_t UlawCodec::kQuantMask = 0xf; // Quantization field mask.
+const int16_t UlawCodec::kSegShift = 4; // Left shift for segment number.
+const int16_t UlawCodec::kSegMask = 0x70; // Segment field mask.
+
+bool WavRiffCodec::ReadChunk(FileResource *fr, std::string *chunk) const {
+ if (chunk == NULL) {
+ return false;
+ }
+ char ch[5];
+ if (fread(static_cast(&ch), 1, 4, fr->fp()) != 4) {
+ return false;
+ }
+ ch[4] = '\0';
+ (*chunk) = ch;
+ return true;
+}
+
+bool WavRiffCodec::CheckChunk(FileResource *fr, const char *data) const {
+ std::string chunk;
+ if (ReadChunk(fr, &chunk)) {
+ return chunk == data;
+ }
+ return false;
+}
+
+bool WavRiffCodec::ReadHeader(FileResource *fr,
+ int32_t *num_samples_per_channel,
+ int32_t *sampling_rate) {
+ if (!CheckChunk(fr, "RIFF")) {
+ fprintf(stderr, "Invalid file: Expected \"RIFF\" in header");
+ return false;
+ }
+ // File length minus first 8 bytes of RIFF description, we don't use it
+ int32_t len = 0;
+ if (fread(static_cast(&len), 4, 1, fr->fp()) != 1) {
+ fprintf(stderr, "Failed to read file length");
+ return false;
+ }
+
+ if (!CheckChunk(fr, "WAVE")) {
+ fprintf(stderr, "Invalid file: Expected \"WAVE\" in header");
+ return false;
+ }
+
+ std::string riff_type;
+ if (!ReadChunk(fr, &riff_type)) {
+ fprintf(stderr, "Invalid file: Missing RIFF type header");
+ return false;
+ }
+
+ if (riff_type != "fmt " && riff_type != "bext") {
+ fprintf(stderr,
+ "Invalid file: RIFF type must be fmt or bext");
+ return false;
+ }
+
+ // If there is a broadcast format extension, skip it.
+ if (riff_type == "bext") {
+ int32_t bext_length;
+ fread(static_cast(&bext_length), sizeof(bext_length), 1, fr->fp());
+ fseek(fr->fp(), bext_length, SEEK_CUR);
+ std::string sub_type;
+ if (!CheckChunk(fr, "fmt ")) {
+ fprintf(stderr, "Invalid file: fmt subtype not found in bext header");
+ return false;
+ }
+ }
+
+ // Now skip wave format header only reading the number of channels and sample
+ // rate:
+ if (fread(static_cast(&len), sizeof(len), 1, fr->fp()) != 1) {
+ fprintf(stderr, "failed to skip file length");
+ return false;
+ }
+ if (len < 16) { // bad format chunk length
+ fprintf(stderr, "Invalid of the wave format buffer");
+ return false;
+ }
+
+ int16_t n_channels = 0;
+ fseek(fr->fp(), sizeof(n_channels), SEEK_CUR);
+ if (fread(static_cast(&n_channels), sizeof(n_channels), 1, fr->fp()) != 1) {
+ fprintf(stderr, "Failed to read number of channels");
+ return false;
+ }
+ if (n_channels != 1) {
+ fprintf(stderr, "Attempt to load multi channel audio");
+ return false;
+ }
+ int32_t sample_rate;
+ if (fread(&sample_rate, sizeof(sample_rate), 1, fr->fp()) != 1) {
+ fprintf(stderr, "Failed to read sample rate");
+ return false;
+ }
+ fseek(fr->fp(), 8, SEEK_CUR);
+
+ // advance in the stream to skip the wave format block
+ fseek(fr->fp(), len - 16, SEEK_CUR);
+
+ // now go to the end of "data" section, if found
+ while (!fr->eof()) {
+ if (fgetc(fr->fp()) == 'd' &&
+ fgetc(fr->fp()) == 'a' &&
+ fgetc(fr->fp()) == 't' &&
+ fgetc(fr->fp()) == 'a') {
+ break;
+ }
+ }
+ if (fr->eof()) {
+ fprintf(stderr, "Unexpected end of file: no data");
+ return false;
+ }
+
+ int32_t num_bytes = 0;
+ if (fread(&num_bytes, sizeof(num_bytes), 1, fr->fp()) != 1) {
+ fprintf(stderr, "Failed to read number of bytes");
+ return false;
+ }
+
+ *sampling_rate = sample_rate;
+ *num_samples_per_channel = num_bytes / 2;
+ return true;
+}
+
+bool WavRiffCodec::ReadAudioData(int32_t wave_start,
+ int32_t num_samples,
+ std::vector *samples,
+ FileResource *fr) {
+ samples->resize(num_samples);
+ bool status = true;
+ switch (coding_type_) {
+ case PCM16: {
+ status &= (fseek(fr->fp(),
+ wave_start * sizeof((*samples)[0]), SEEK_CUR) == 0);
+ uint32_t read = fread(&(*samples)[0], sizeof(int16_t), num_samples, fr->fp());
+ if (read != num_samples) {
+ fprintf(stderr, "WaveIO::ReadSamples: only %d out of %d values read",
+ read, num_samples);
+ status = false;
+ }
+ }
+ break;
+ case ULAW8: {
+ UlawCodec sample_codec;
+ uint8_t *buffer = new uint8_t[num_samples];
+ status &= (fseek(fr->fp(), wave_start * sizeof(*buffer), SEEK_CUR) == 0);
+ uint32_t read = fread(buffer, sizeof(uint8_t), num_samples, fr->fp());
+ if (read != num_samples) {
+ fprintf(stderr, "WaveIO::ReadSamples: only %d out of %d values read",
+ read, num_samples);
+ status = false;
+ }
+ for (int i = 0 ; i < num_samples; ++i) {
+ (*samples)[i] = sample_codec.UlawToInt16(buffer[i]);
+ }
+ delete [] buffer;
+ }
+ break;
+ default:
+ fprintf(stderr, "WaveIO::ReadSamples: Unsupported coding type (%d)",
+ coding_type_);
+ status = false;
+ }
+ return status;
+}
+
+bool WavRiffCodec::ReadAudioContainer(int container_size_in_bytes,
+ std::vector *samples,
+ FileResource *fr) {
+ int number_samples;
+ switch (coding_type_) {
+ case PCM16:
+ number_samples = container_size_in_bytes / 2;
+ break;
+ case PCM8:
+ case ULAW8:
+ number_samples = container_size_in_bytes;
+ break;
+ default:
+ return false;
+ }
+ return ReadAudioData(0, number_samples, samples, fr);
+}
+
+bool WavRiffCodec::Initialize(WaveCodingType coding_type) {
+ if ((coding_type != PCM16) && (coding_type != PCM8) &&
+ (coding_type != ULAW8)) {
+ return false;
+ }
+ coding_type_ = coding_type;
+ return true;
+}
diff --git a/REAPER/wave/codec_riff.h b/REAPER/wave/codec_riff.h
new file mode 100644
index 0000000000000000000000000000000000000000..78e3cc1058f8e2c6765cd43d2e408170412dea16
--- /dev/null
+++ b/REAPER/wave/codec_riff.h
@@ -0,0 +1,91 @@
+/*
+Copyright 2015 Google Inc. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.*/
+
+#ifndef _CODEC_RIFF_H_
+#define _CODEC_RIFF_H_
+
+#include
+#include
+#include
+
+class FileResource;
+
+enum WaveCodingType {
+ PCM16 = 0,
+ PCM8,
+ ULAW8,
+ ISAC_18kbps,
+ ISAC_20kbps,
+ ISAC_22kbps,
+ ISAC_24kbps,
+ ISAC_26kbps,
+ ISAC_30kbps
+};
+
+class WavRiffCodec {
+ public:
+ WavRiffCodec() { }
+ ~WavRiffCodec() { }
+
+ // The header is expected to be in the format:
+ //
+ // offset size description value
+ // 0x00 4 Chunk ID "RIFF"
+ // 0x04 4 Chunk data size file size - 8
+ // 0x08 4 RIFF Type "WAVE"
+ // 0x10 Wave chunks
+ //
+ // A boolean success indicator can be used to check that the header was read.
+ bool ReadHeader(FileResource *fr,
+ int32_t *num_samples_per_channel,
+ int32_t *sample_rate);
+
+ bool ReadAudioData(int32_t wave_start,
+ int32_t num_samples,
+ std::vector *samples,
+ FileResource *fr);
+
+ bool ReadAudioContainer(int container_size_in_bytes,
+ std::vector *samples,
+ FileResource *fr);
+
+ bool Initialize(WaveCodingType coding_type);
+
+ private:
+ bool ReadChunk(FileResource *fr, std::string *chunk) const;
+ bool CheckChunk(FileResource *fr, const char *data) const;
+
+ WaveCodingType coding_type_;
+};
+
+class UlawCodec {
+ public:
+ uint8_t Int16ToUlaw(int16_t pcm_val) const;
+ int16_t UlawToInt16(uint8_t ulaw) const;
+
+ private:
+ int16_t SegmentSearch(int16_t val, const int16_t *table, int size) const;
+
+ // Table and constants for mu-law coding and decoding
+ static const int16_t seg_uend[8];
+ static const int16_t kBias; // Bias for linear code.
+ static const int16_t kClip; // max. linear value
+ static const int16_t kSignBit; // Sign bit for a A-law byte.
+ static const int16_t kQuantMask; // Quantization field mask.
+ static const int16_t kSegShift; // Left shift for segment number.
+ static const int16_t kSegMask; // Segment field mask.
+};
+
+#endif // _CODEC_RIFF_H_
diff --git a/REAPER/wave/wave.cc b/REAPER/wave/wave.cc
new file mode 100644
index 0000000000000000000000000000000000000000..74bcb19ba1d5961a80d785da1bb9fc895ad22d5e
--- /dev/null
+++ b/REAPER/wave/wave.cc
@@ -0,0 +1,158 @@
+/*
+Copyright 2015 Google Inc. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+#include "wave/wave.h"
+
+#include
+#include
+#include
+
+#include "core/file_resource.h"
+#include "wave/wave_io.h"
+
+
+
+WaveData::WaveData() : sample_rate_(16000) {
+}
+WaveData::~WaveData() {
+}
+
+void WaveData::Set(int number_samples, int sampling_rate, const int16_t *data) {
+ set_sample_rate(sampling_rate);
+ resize(number_samples);
+ for (int n = 0; n < number_samples; ++n) {
+ (*this)[n] = data[n];
+ }
+}
+
+int WaveData::sample_rate(void) const {
+ return sample_rate_;
+}
+
+void WaveData::set_sample_rate(int sample_rate) {
+ sample_rate_ = sample_rate;
+}
+
+bool WaveData::Equals(const WaveData &wave_data, int threshold) const {
+ if (wave_data.size() != size()) {
+ fprintf(stderr, "Different number of samples");
+ return false;
+ }
+ if (wave_data.sample_rate() != sample_rate()) {
+ fprintf(stderr, "Different sample rate");
+ return false;
+ }
+ for (int i = 0; i < size(); ++i) {
+ if (abs(wave_data[i] - (*this)[i]) > threshold) {
+ fprintf(stderr, "Sample %d differs", i);
+ return false;
+ }
+ }
+ return true;
+}
+
+Wave::Wave() {
+ data_ = new WaveData;
+ owner_ = true;
+}
+
+Wave::Wave(const WaveData *data) {
+ // Shallow copy
+ data_ = const_cast(data);
+ owner_ = false;
+}
+
+Wave::~Wave() {
+ Clear();
+}
+
+void Wave::Clear() {
+ if (owner_) {
+ delete data_;
+ }
+ data_ = NULL;
+ owner_ = true;
+}
+
+void Wave::set_data(const WaveData *data) {
+ if (owner_) {
+ delete data_;
+ }
+ data_ = const_cast(data);
+ owner_ = false;
+}
+
+void Wave::copy_data(const WaveData &data) {
+ if (owner_) {
+ delete data_;
+ }
+ data_ = new WaveData(data);
+ owner_ = true;
+}
+
+void Wave::resize(int n, bool clear) {
+ if (!owner_) {
+ // copy the data to a local copy
+ WaveData *new_wave_data = new WaveData(*data_);
+ new_wave_data->set_sample_rate(data_->sample_rate());
+ data_ = new_wave_data;
+ }
+ data_->resize(n);
+ owner_ = true;
+}
+
+void Wave::ZeroFill() {
+ if (!owner_) {
+ // copy the data to a local copy
+ WaveData *new_wave_data = new WaveData(*data_);
+ new_wave_data->set_sample_rate(data_->sample_rate());
+ data_ = new_wave_data;
+ owner_ = true;
+ }
+ std::fill(data_->begin(), data_->end(), 0);
+}
+
+bool Wave::Load(FileResource *fr) {
+ WaveIO wave_io;
+ std::vector *samples = reinterpret_cast *>(data_);
+ int sampling_rate;
+ bool status = wave_io.Load(fr, samples, &sampling_rate);
+ set_sample_rate(sampling_rate);
+ return status;
+}
+
+const int16_t Wave::kMaxShort = std::numeric_limits::max() - 1;
+const int16_t Wave::kMinShort = std::numeric_limits::min() + 1;
+
+bool Wave::Amplify(float gain) {
+ return AmplifyBuffer(gain, &(*data_)[0], data_->size());
+}
+
+bool Wave::AmplifyBuffer(float gain, int16_t *buf, uint32_t size) {
+ bool clipped = false;
+ for (uint32_t i = 0; i < size; ++i) {
+ float sample = static_cast(buf[i]) * gain;
+ if (sample > kMaxShort) {
+ sample = kMaxShort;
+ clipped = true;
+ } else if (sample < kMinShort) {
+ sample = kMinShort;
+ clipped = true;
+ }
+ buf[i] = static_cast(sample);
+ }
+ return !clipped;
+}
diff --git a/REAPER/wave/wave.h b/REAPER/wave/wave.h
new file mode 100644
index 0000000000000000000000000000000000000000..6fc2c1199e97f713a2c68e9d62a9913254febbde
--- /dev/null
+++ b/REAPER/wave/wave.h
@@ -0,0 +1,142 @@
+/*
+Copyright 2015 Google Inc. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+#ifndef _WAVE_H_
+#define _WAVE_H_
+
+#include "core/file_resource.h"
+#include
+#include
+
+
+
+class WaveData : public std::vector {
+ public:
+ WaveData();
+ ~WaveData();
+
+ void Set(int number_samples, int sampling_rate, const int16_t *data);
+ int sample_rate(void) const;
+ void set_sample_rate(int sample_rate);
+ bool Equals(const WaveData &wave_data, int threshold = 0) const;
+
+ private:
+ int sample_rate_;
+};
+
+class Wave {
+ public:
+ Wave();
+ explicit Wave(const WaveData *data);
+ ~Wave();
+
+ // Sets internal WaveData to the new object. It loses ownership.
+ void set_data(const WaveData *data);
+
+ // Sets values of WaveData to the new data. It takes ownership.
+ void copy_data(const WaveData &data);
+
+ // Returns the number of samples contained in the wave.
+ int num_samples() const {
+ return data_->size();
+ }
+
+ // Returns the sample rate of the wave.
+ int sample_rate() const {
+ return data_->sample_rate();
+ }
+
+ // Sets the sample rate for the wave.
+ void set_sample_rate(int sample_rate) {
+ data_->set_sample_rate(sample_rate);
+ }
+
+ // Returns the value of the data at the given offset within the wave.
+ int16_t get(int f) const {
+ return (*data_)[f];
+ }
+
+ // Sets the wave data at the given position with the given value.
+ void set(int f, int16_t v) {
+ (*data_)[f] = v;
+ }
+
+ // Returns the wave data.
+ const WaveData *data() const {
+ return data_;
+ }
+
+ // Ensures that this wave 'parents' the wave data,
+ // so deleting it when this instance is deleted.
+ void adopt() {
+ owner_ = true;
+ }
+
+ const int16_t &operator [] (int f) const {
+ return (*data_)[f];
+ }
+
+ int16_t &operator [] (int f) {
+ return (*data_)[f];
+ }
+
+ // Resizes
+ void resize(int n, bool clear = false);
+
+ // Zero fills the wave data.
+ void ZeroFill();
+
+ // Applies the given gain to the wave data, limited to int16_t limits.
+ // Returns true if no clipping occurred.
+ // Returns false if the amplification resulted in clipping.
+ // The gain factor is a simple multiplicative factor, NOT a dB value.
+ bool Amplify(float gain_factor);
+
+ // Applies the given gain to the given buffer location and the given
+ // number of entries in that buffer.
+ // Returns true if no clipping occurred.
+ // Returns false if the amplification resulted in clipping.
+ // The gain factor is a simple multiplicative factor, NOT a dB value.
+ static bool AmplifyBuffer(float gain_factor,
+ int16_t *buffer, uint32_t num_entries);
+
+ bool Load(const std::string &filename);
+ bool Load(FileResource *fr);
+
+ protected:
+ // Clears the audio data down and sets the owner.
+ void Clear();
+
+ private:
+ static const int16_t kMaxShort;
+ static const int16_t kMinShort;
+ // The wave data.
+ WaveData *data_;
+ // Holds whether this instance is to sole owner of the wave data, allowing
+ // for correct object deletion.
+ bool owner_;
+};
+
+inline bool Wave::Load(const std::string &filename) {
+ FileResource fr(filename, "rb");
+ if (!fr.Get()) {
+ fprintf(stderr, "Failed to open \"%s\"", filename.c_str());
+ return false;
+ }
+ return Load(&fr);
+}
+
+#endif // SPEECH_PATTS_ENGINE_LING_ARCH_WAVE_H_
diff --git a/REAPER/wave/wave_io-inl.h b/REAPER/wave/wave_io-inl.h
new file mode 100644
index 0000000000000000000000000000000000000000..ddccb3fd4196055807f24739f5990a4b6e0f83c6
--- /dev/null
+++ b/REAPER/wave/wave_io-inl.h
@@ -0,0 +1,39 @@
+/*
+Copyright 2015 Google Inc. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+#ifndef _WAVE_IO_INL_H_
+#define _WAVE_IO_INL_H_
+
+#include
+#include
+
+inline WaveCodingType WaveIO::get_coding_type() const {
+ return coding_type_;
+}
+
+template
+bool WaveIO::Load(const std::string &filename,
+ std::vector *samples,
+ int32_t *sample_rate) {
+ FileResource fr(filename, "rb");
+ if (!fr.Get()) {
+ fprintf(stderr, "Failed to open \"%s\"", filename.c_str());
+ return false;
+ }
+ return Load(&fr, samples, sample_rate);
+}
+
+#endif // _WAVE_IO_INL_H_
diff --git a/REAPER/wave/wave_io.cc b/REAPER/wave/wave_io.cc
new file mode 100644
index 0000000000000000000000000000000000000000..d34f24a73bd7facbaa433da22e931634f08722e6
--- /dev/null
+++ b/REAPER/wave/wave_io.cc
@@ -0,0 +1,111 @@
+/*
+Copyright 2015 Google Inc. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+#include "wave/wave_io.h"
+
+#include
+
+#include "core/file_resource.h"
+
+
+
+WaveIO::WaveIO(void) {
+ Initialize(PCM16);
+}
+
+WaveIO::WaveIO(WaveCodingType coding_type) {
+ Initialize(coding_type);
+}
+
+bool WaveIO::ReadAudioData(int32_t wave_start,
+ int32_t num_samples,
+ std::vector *samples,
+ FileResource *fr) {
+ switch (coding_type_) {
+ case PCM16:
+ case PCM8:
+ case ULAW8:
+ return codec_riff_.ReadAudioData(wave_start, num_samples, samples, fr);
+ default:
+ fprintf(stderr, "WaveIO:ReadAudioData: unknown coding type %d",
+ coding_type_);
+ }
+ return false;
+}
+
+bool WaveIO::ReadAudioContainer(int container_size_in_bytes,
+ std::vector *samples,
+ FileResource *fr) {
+ switch (coding_type_) {
+ case PCM16:
+ case PCM8:
+ case ULAW8:
+ return codec_riff_.ReadAudioContainer(container_size_in_bytes,
+ samples, fr);
+ fprintf(stderr, "WaveIO:ReadAudioData: unknown coding type %d",
+ coding_type_);
+ default:
+ fprintf(stderr, "WaveIO: coding type not supported %d", coding_type_);
+ return false;
+ }
+ return false;
+}
+
+bool WaveIO::ReadHeader(FileResource *fr,
+ int32_t *num_samples_per_channel,
+ int32_t *sampling_rate) {
+ switch (coding_type_) {
+ case PCM16:
+ case PCM8:
+ case ULAW8: {
+ bool status = codec_riff_.ReadHeader(fr);
+ if (!status) {
+ return false;
+ }
+ *num_samples_per_channel = codec_riff_.get_num_samples_per_channel();
+ *sampling_rate = codec_riff_.get_sampling_rate();
+ return true;
+ }
+ default:
+ fprintf(stderr, "WaveIO:ReadHeader: unknown coding type %d",
+ coding_type_);
+ }
+ return false;
+}
+
+bool WaveIO::Load(FileResource *fr,
+ std::vector *samples,
+ int32_t *sample_rate) {
+ int32_t num_samples;
+ if (!ReadHeader(fr, &num_samples, sample_rate)) {
+ return false;
+ }
+ samples->resize(num_samples);
+ return ReadAudioData(0, num_samples, samples, fr);
+}
+
+bool WaveIO::Initialize(WaveCodingType coding_type) {
+ coding_type_ = coding_type;
+ switch (coding_type_) {
+ case PCM16:
+ case PCM8:
+ case ULAW8:
+ return codec_riff_.Initialize(coding_type);
+ default:
+ fprintf(stderr, "WaveIO:WaveIO: unknown coding type %d", coding_type_);
+ return false;
+ }
+}
diff --git a/REAPER/wave/wave_io.h b/REAPER/wave/wave_io.h
new file mode 100644
index 0000000000000000000000000000000000000000..04f80da0fb8289322de0f83e74187b8cd73adbe2
--- /dev/null
+++ b/REAPER/wave/wave_io.h
@@ -0,0 +1,79 @@
+/*
+Copyright 2015 Google Inc. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+#ifndef _WAVE_IO_H_
+#define _WAVE_IO_H_
+
+#include "wave/codec_api.h"
+#include "wave/codec_riff.h"
+
+class FileResource;
+
+// This class provides the main interface for waveform input/output. The class
+// abstracts the implementation of the codec from the rest of the system.
+class WaveIO {
+ public:
+ WaveIO();
+ explicit WaveIO(WaveCodingType coding_type);
+ ~WaveIO() { }
+
+ template
+ bool Load(const std::string &filename,
+ std::vector *samples,
+ int32_t *sample_rate);
+
+ // Loads the header-info and the audio data from a file, starting from the
+ // current position of the FileResource.
+ bool Load(FileResource *fr,
+ std::vector *samples,
+ int32_t *sample_rate);
+
+ // Reads the header-info from the FileResource, starting from the current
+ // position.
+ bool ReadHeader(FileResource *fr,
+ int32_t *num_samples_per_channel,
+ int32_t *sample_rate);
+
+ // Reads the audio data from the FileResource, under the condition that the
+ // current position of the FileResource always points to the beginning of the
+ // audio-container. The latter condition is preserved by this function. When
+ // a codec with internal-state is used (i.e. iSAC), the internal state is kept
+ // between sequential reads. The codec is reset prior non-sequential reads.
+ bool ReadAudioData(int32_t wave_start,
+ int32_t num_samples,
+ std::vector *samples,
+ FileResource *fr);
+
+ // Reads all audio data contained in the audio container held at the current
+ // position of the FileResource.
+ bool ReadAudioContainer(int container_size_in_bytes,
+ std::vector *samples,
+ FileResource *fr);
+
+ // Sets WaveIO to the corresponding codec, and also initializes the codec
+ // itself.
+ bool Initialize(WaveCodingType coding_type);
+
+ WaveCodingType get_coding_type() const;
+
+ private:
+ CodecApi codec_riff_;
+ WaveCodingType coding_type_;
+};
+
+#include "wave_io-inl.h"
+
+#endif // _WAVE_IO_H_
diff --git a/Untitled.ipynb b/Untitled.ipynb
new file mode 100644
index 0000000000000000000000000000000000000000..363fcab7ed6e9634e198cf5555ceb88932c9a245
--- /dev/null
+++ b/Untitled.ipynb
@@ -0,0 +1,6 @@
+{
+ "cells": [],
+ "metadata": {},
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/configs/config.json b/configs/config.json
new file mode 100644
index 0000000000000000000000000000000000000000..db537c4c96e45c2686bc34a16e1d3c4838824cd2
--- /dev/null
+++ b/configs/config.json
@@ -0,0 +1,75 @@
+{
+ "data_config": {
+ "n_samples": 48000,
+ "hop_size": 240,
+ "sampling_rate": 24000,
+ "batch_size": 4,
+ "num_workers": 8,
+ "pin_memory": false
+ },
+
+ "model_config": {
+ "factors": [2, 3, 4, 4, 5],
+ "upsampling_preconv_out_channels": 768,
+ "upsampling_out_channels": [384, 192, 96, 48, 24],
+ "upsampling_dilations": [
+ [1, 3, 9, 27],
+ [1, 3, 9, 27],
+ [1, 3, 9, 27],
+ [1, 3, 9, 27],
+ [1, 3, 9, 27]
+ ],
+ "downsampling_preconv_out_channels": 24,
+ "downsampling_out_channels": [48, 96, 192, 384],
+ "downsampling_dilations": [
+ [1, 2, 4], [1, 2, 4], [1, 2, 4], [1, 2, 4]
+ ],
+ "use_raw": true,
+ "num_harmonic": 2,
+ "harmonic_type": 2,
+ "nhv_inchannels": 1025,
+ "nhv_cat_type": "PLS",
+ "nhv_noise_std": 0.03
+ },
+
+ "optimizer_config": {
+ "lr": 5e-4,
+ "scheduler_step_size": 100000,
+ "scheduler_gamma": 0.5
+ },
+
+ "loss_config": {
+ "stft": {
+ "fft_sizes": [2048, 1024, 512, 256, 128, 64],
+ "hop_sizes": [512, 256, 128, 64, 32, 16],
+ "win_lengths": [2048, 1024, 512, 256, 128, 64]
+ },
+ "lambda_aux": 1.0,
+ "lambda_adv": 2.5,
+ "generator_adv_loss_params": {
+ "average_by_discriminators": true,
+ "loss_type": "mse"
+ },
+ "discriminator_adv_loss_params": {
+ "average_by_discriminators": true,
+ "loss_type": "mse"
+ }
+ },
+
+ "training_config": {
+ "train_max_steps": 3000000,
+ "discriminator_train_start_steps": 100000,
+ "generator_grad_norm": 1,
+ "discriminator_grad_norm": 1,
+ "distributed": true,
+ "rank": 0
+ },
+
+ "interval_config": {
+ "out_dir": "",
+ "num_save_intermediate_results": 5,
+ "save_interval_steps": 25000,
+ "eval_interval_steps": 25000,
+ "log_interval_steps": 1000
+ }
+}
diff --git a/dataset/dataset.py b/dataset/dataset.py
new file mode 100644
index 0000000000000000000000000000000000000000..ef2f036b469654e7d316ebbdca86d7a81b252a0f
--- /dev/null
+++ b/dataset/dataset.py
@@ -0,0 +1,88 @@
+import numpy as np
+import torch
+from torch.utils.data import Dataset
+import json
+import random
+from pathlib import Path
+import soundfile as sf
+
+class SVCDataset(Dataset):
+ def __init__(self, root, n_samples, sampling_rate, hop_size, mode):
+ self.root = Path(root)
+ self.n_samples = n_samples
+ self.sampling_rate = sampling_rate
+ self.hop_size = hop_size
+ self.n_frames = int(n_samples/hop_size)
+
+ with open(self.root / f"{mode}.json") as file:
+ metadata = json.load(file)
+
+ self.metadata = []
+ for audio_path, wavlm_path, pitch_path, ld_path in metadata:
+ self.metadata.append([audio_path, wavlm_path, pitch_path, ld_path])
+
+ print(mode, 'n_samples:', n_samples, 'metadata:', len(self.metadata))
+ random.shuffle(self.metadata)
+
+ def load_wav(self, audio_path):
+ wav, fs = sf.read(audio_path)
+ assert fs == self.sampling_rate, f'Audio {audio_path} sampling rate is not {self.sampling_rate} Hz.'
+ peak = np.abs(wav).max()
+ if peak > 1.0:
+ wav /= peak
+ return wav
+
+ def __len__(self):
+ return len(self.metadata)
+
+ def __getitem__(self, index):
+ audio_path, wavlm_path, pitch_path, ld_path = self.metadata[index]
+
+ audio = self.load_wav(audio_path)
+ wavlm = torch.load(wavlm_path)
+ if isinstance(wavlm, torch.Tensor):
+ wavlm = wavlm.numpy().T # (1024, T)
+ else:
+ wavlm = np.squeeze(wavlm)
+ pitch = np.load(pitch_path)
+ ld = np.load(ld_path)
+
+ wavlm_frames = int(self.n_frames/2)
+
+ assert pitch.shape[0] == ld.shape[0], f'{audio_path}: Length Mismatch: pitch length ({pitch.shape[0]}), ld length ({ld.shape[0]})'
+
+ # Align features, the hop size for wavlm is 20 ms, while the hop size for pitch/ld is 10 ms.
+ seq_len = wavlm.shape[-1] * 2
+ if seq_len > pitch.shape[0]:
+ p = seq_len - pitch.shape[0]
+ pitch = np.pad(pitch, (0, p), mode='edge')
+ ld = np.pad(ld, (0, p), mode='edge')
+ else:
+ pitch = pitch[:seq_len]
+ ld = ld[:seq_len]
+
+ # To ensure upsampling/downsampling will be processed in a right way for full signals
+ p = seq_len * self.hop_size - audio.shape[-1]
+ if p > 0:
+ audio = np.pad(audio, (0, p), mode='reflect')
+ else:
+ audio = audio[:seq_len * self.hop_size]
+
+ if audio.shape[0] >= self.n_samples:
+ pos = random.randint(0, wavlm.shape[-1] - wavlm_frames)
+ wavlm = wavlm[:, pos:pos+wavlm_frames]
+ pitch = pitch[pos*2:pos*2+self.n_frames]
+ ld = ld[pos*2:pos*2+self.n_frames]
+ audio = audio[pos*2*self.hop_size:(pos*2+self.n_frames)*self.hop_size]
+ else:
+ wavlm = np.pad(wavlm, ((0, 0), (0, wavlm_frames - wavlm.shape[-1])), mode='edge')
+ pitch = np.pad(pitch, (0, self.n_frames-pitch.shape[0]), mode='edge')
+ ld = np.pad(ld, (0, self.n_frames-ld.shape[0]), mode='edge')
+ audio = np.pad(audio, (0, self.n_samples-audio.shape[0]), mode='edge')
+
+ assert audio.shape[0] == self.n_samples, f'{audio_path}: audio length is not enough, {wavlm.shape}, {audio.shape}, {p}'
+ assert pitch.shape[0] == self.n_frames, f'{audio_path}: pitch length is not enough, {wavlm.shape}, {pitch.shape}, {self.n_frames}'
+ assert ld.shape[0] == self.n_frames, f'{audio_path}: ld length is not enough, {wavlm.shape}, {ld.shape}, {self.n_frames}'
+ assert wavlm.shape[-1] == wavlm_frames, f'{audio_path}: wavlm length is not enough, {wavlm.shape}, {self.n_frames}'
+
+ return (torch.from_numpy(wavlm).to(dtype=torch.float), torch.from_numpy(pitch).to(dtype=torch.float), torch.from_numpy(ld).to(dtype=torch.float)), torch.from_numpy(audio).to(dtype=torch.float)
\ No newline at end of file
diff --git a/dataset/metadata.py b/dataset/metadata.py
new file mode 100644
index 0000000000000000000000000000000000000000..f8fe604e22dd5f62f6c8841083c15f822c292a21
--- /dev/null
+++ b/dataset/metadata.py
@@ -0,0 +1,106 @@
+import os
+import json
+import random
+import argparse
+from joblib import Parallel, delayed
+from tqdm import tqdm
+from pathlib import Path
+
+
+def GetMetaInfo(wav_path):
+ relative_path = wav_path.relative_to(data_root)
+ wavlm_path = (wavlm_dir/relative_path).with_suffix('.pt')
+ pitch_path = (pitch_dir/relative_path).with_suffix('.npy')
+ ld_path = (ld_dir/relative_path).with_suffix('.npy')
+ assert os.path.isfile(wavlm_path), f'{wavlm_path} does not exist.'
+ assert os.path.isfile(pitch_path), f'{pitch_path} does not exist.'
+ assert os.path.isfile(ld_path), f'{ld_path} does not exist.'
+
+ return [str(wav_path), str(wavlm_path), str(pitch_path), str(ld_path)]
+
+
+def SplitDataset(wav_list:list[Path], train_valid_ratio=0.9, test_spk_list=['M26','M27','W46','W47']):
+ '''
+ Split the dataset into train set, valid set, and test set.
+ By default, it considers the OpenSinger dataset's 26th and 27th male singers (M26, M27) and
+ 46th and 47th female singers (W46, W47) as the test set.
+ The remaining singers' audio files are randomly divided into the train set and the valid set in a 9:1 ratio.
+
+ Args:
+ wav_list (list[Path]): List of Path objects representing the paths to the wav files.
+ train_valid_ratio (float, optional): Ratio of the dataset to be used for training and validation. Defaults to 0.9.
+ test_spk_list (list[str], optional): List of speaker IDs to be included in the test set. Defaults to ['M26', 'M27', 'W46', 'W47'].
+
+ Returns:
+ Tuple[list[Path], list[Path], list[Path]]: Tuple containing the train set, valid set, and test set as lists of Path objects.
+
+ '''
+ train_list = []
+ valid_list = []
+ test_list = []
+
+ for wav_file in wav_list:
+ singer = wav_file.parent.parent.name[0] + wav_file.stem.split('_')[0]
+ if singer not in test_spk_list:
+ train_list.append(wav_file)
+ else:
+ test_list.append(wav_file)
+
+ random.shuffle(train_list)
+
+ train_valid_split = int(len(train_list) * train_valid_ratio)
+
+ train_list, valid_list = train_list[:train_valid_split], train_list[train_valid_split:]
+
+ return train_list, valid_list, test_list
+
+
+def GenMetadata(data_root, wav_list, mode):
+ '''
+ generate the metadata file for the dataset
+ '''
+ results = Parallel(n_jobs=10)(delayed(GetMetaInfo)(wav_path) for wav_path in tqdm(wav_list))
+
+ with open(data_root/f'{mode}.json', 'w') as f:
+ json.dump(results, f)
+
+ return
+
+
+def main(args):
+ global data_root, wavlm_dir, pitch_dir, ld_dir
+ data_root = Path(args.data_root)
+ wavlm_dir = Path(args.wavlm_dir) if args.wavlm_dir is not None else data_root/'wavlm_features'
+ pitch_dir = Path(args.pitch_dir) if args.pitch_dir is not None else data_root/'pitch'
+ ld_dir = Path(args.ld_dir) if args.ld_dir is not None else data_root/'loudness'
+ wav_list = list(data_root.rglob('*.wav'))
+ train_list, valid_list, test_list = SplitDataset(wav_list)
+
+ GenMetadata(data_root, train_list, 'train')
+ GenMetadata(data_root, valid_list, 'valid')
+ GenMetadata(data_root, test_list, 'test')
+
+ return
+
+
+if __name__ == '__main__':
+ parser = argparse.ArgumentParser()
+ parser.add_argument(
+ '--data_root',
+ required=True, type=str, help='Directory of audios for the dataset.'
+ )
+ parser.add_argument(
+ '--wavlm_dir',
+ type=str, help='Directory of wavlm features for the dataset.'
+ )
+ parser.add_argument(
+ '--pitch_dir',
+ type=str, help='Directory of pitch for the dataset.'
+ )
+ parser.add_argument(
+ '--ld_dir',
+ type=str, help='Directory of loudness for the dataset.'
+ )
+
+ args = parser.parse_args()
+ main(args)
diff --git a/dataset/prematch_dataset.py b/dataset/prematch_dataset.py
new file mode 100644
index 0000000000000000000000000000000000000000..10e926acf88e06cedcbcde19114eb210975f680e
--- /dev/null
+++ b/dataset/prematch_dataset.py
@@ -0,0 +1,138 @@
+import argparse
+import os
+from pathlib import Path
+
+import numpy as np
+import pandas as pd
+import torch
+import torch.nn as nn
+import torch.nn.functional as F
+import torchaudio
+from torch import Tensor
+from tqdm import tqdm
+import resampy
+
+from modules.wavlm_encoder import WavLMEncoder
+from utils.tools import fast_cosine_dist
+
+DOWNSAMPLE_FACTOR = 320
+
+def make_opensinger_df(root_path: Path) -> pd.DataFrame:
+ all_files = []
+ folders = ['ManRaw', 'WomanRaw']
+ for f in folders:
+ all_files.extend(list((root_path/f).rglob('*.wav')))
+ # f.parts[-3][:-3]: Man/Woman
+ speakers = [f.parts[-3][:-3] + '-' + f.stem.split('_')[0] for f in all_files]
+ df = pd.DataFrame({'path': all_files, 'speaker': speakers})
+ return df
+
+
+def main(args):
+ data_root = Path(args.data_root)
+ out_dir = Path(args.out_dir) if args.out_dir is not None else data_root/'wavlm_features'
+ device = torch.device(args.device)
+ seed = args.seed
+ SYNTH_WEIGHTINGS = F.one_hot(torch.tensor(args.synthesis_layer), num_classes=25).float().to(device)[:, None]
+ MATCH_WEIGHTINGS = F.one_hot(torch.tensor(args.matching_layer), num_classes=25).float().mean(axis=0).to(device)[:, None]
+ print(f"Matching weight: {MATCH_WEIGHTINGS.squeeze()}\nSynthesis weight: {SYNTH_WEIGHTINGS.squeeze()}")
+
+ ls_df = make_opensinger_df(data_root)
+
+ print(f"Loading wavlm.")
+ wavlm = WavLMEncoder('pretrained/WavLM-Large.pt', device=device)
+
+ np.random.seed(seed)
+ torch.manual_seed(seed)
+
+ extract(ls_df, wavlm, device, data_root, out_dir, SYNTH_WEIGHTINGS, MATCH_WEIGHTINGS)
+ print("All done!", flush=True)
+
+
+@torch.inference_mode()
+def get_full_features(path, wavlm, device):
+ x, sr = torchaudio.load(path)
+ if sr != 16000:
+ x = resampy.resample(x.numpy(), sr, 16000, axis=1)
+ x = torch.from_numpy(x).to(dtype=torch.float)
+ n_pad = DOWNSAMPLE_FACTOR - (x.shape[-1] % DOWNSAMPLE_FACTOR)
+ x = F.pad(x, (0, n_pad), value=0)
+
+ # extract the representation of each layer
+ wav_input_16khz = x.to(device)
+ features = wavlm.get_features(wav_input_16khz)
+
+ return features
+
+
+@torch.inference_mode()
+def extract(df: pd.DataFrame, wavlm: nn.Module, device, data_root: Path, out_dir: Path, synth_weights: Tensor, match_weights: Tensor):
+
+ mb = tqdm(df.groupby('speaker'), desc=f'Total Progress')
+
+ for speaker, paths in mb:
+ if len(paths) == 1:
+ print(f"there is only one audio for speaker {speaker}, ignore him")
+ continue
+
+ targ_paths = {}
+ for i, row in paths.iterrows():
+ rel_path = row.path.relative_to(data_root)
+ targ_paths[row.path] = (out_dir/rel_path).with_suffix('.pt')
+
+ if all([p.exists() for p in targ_paths.values()]):
+ continue
+
+ feature_cache = {}
+ synthesis_cache = {}
+
+ # 1. extract the wavlm features of all the audio of the speaker
+ pb = tqdm(paths.iterrows(), total=len(paths), desc=f'extracting {speaker}')
+ for i, row in pb:
+ feats = get_full_features(row.path, wavlm, device)
+ matching_feats = (feats*match_weights[:, None] ).sum(dim=0) # (seq_len, dim)
+ synth_feats = (feats*synth_weights[:, None] ).sum(dim=0) # (seq_len, dim)
+ feature_cache[row.path] = matching_feats
+ synthesis_cache[row.path] = synth_feats
+
+ # 2. replace the wavlm features of each singing audio with the wavlm features of other songs by the same singer.
+ pb = tqdm(paths.iterrows(), total=len(paths), desc=f'prematching {speaker}')
+ for i, row in pb:
+ targ_path = targ_paths[row.path]
+ if targ_path.is_file(): continue
+ os.makedirs(targ_path.parent, exist_ok=True)
+
+ source_feats = feature_cache[row.path]
+ # the audios of the same song are removed since the same song contains repeated phrases.
+ song_name = row.path.stem.split('_')[1]
+ filtered_matching_feats = {key: value for key, value in feature_cache.items() if song_name not in key.stem}
+ matching_pool = list(filtered_matching_feats.values())
+ matching_pool = torch.concat(matching_pool, dim=0)
+ filtered_synth_feats = {key: value for key, value in synthesis_cache.items() if song_name not in key.stem}
+ synth_pool = list(filtered_synth_feats.values())
+ synth_pool = torch.concat(synth_pool, dim=0)
+ # calculate the distance and replace each feature with its K neighbors
+ matching_pool = matching_pool.to(device)
+ synth_pool = synth_pool.to(device)
+ dists = fast_cosine_dist(source_feats, matching_pool, device=device)
+ best = dists.topk(k=args.topk, dim=-1, largest=False) # (src_len, 4)
+ out_feats = synth_pool[best.indices].mean(dim=1) # (N, dim)
+
+ # 3. save pre-matched sequence
+ torch.save(out_feats.cpu(), str(targ_path))
+
+
+if __name__ == '__main__':
+ parser = argparse.ArgumentParser(description="Compute matched wavlm features for a OpenSinger dataset")
+
+ parser.add_argument('--data_root', required=True, type=str)
+ parser.add_argument('--seed', default=123, type=int)
+ parser.add_argument('--out_dir', type=str)
+ parser.add_argument('--device', default='cuda', type=str)
+ parser.add_argument('--topk', type=int, default=4)
+ parser.add_argument('--matching_layer', type=int, default=[20,21,22,23,24], nargs='+')
+ parser.add_argument('--synthesis_layer', type=int, default=6)
+
+ args = parser.parse_args()
+ main(args)
+
diff --git a/haha.wav b/haha.wav
new file mode 100644
index 0000000000000000000000000000000000000000..de317b38bdfad9bdfd8ce65db8b9f8583b07467f
Binary files /dev/null and b/haha.wav differ
diff --git a/img/Architecture.png b/img/Architecture.png
new file mode 100644
index 0000000000000000000000000000000000000000..aa54a00ccd8dd7d4fa4f288a877163b00a66ec20
Binary files /dev/null and b/img/Architecture.png differ
diff --git a/infer.py b/infer.py
new file mode 100644
index 0000000000000000000000000000000000000000..42e9698db61dba9170b77afaf149ad93a6fb68c1
--- /dev/null
+++ b/infer.py
@@ -0,0 +1,158 @@
+import os
+import json
+import time
+import argparse
+import numpy as np
+import soundfile as sf
+import torch
+import torch.nn.functional as F
+
+from modules.FastSVC import SVCNN
+from modules.wavlm_encoder import WavLMEncoder
+from utils.pitch_ld_extraction import extract_loudness, extract_pitch_ref as extract_pitch
+from utils.tools import ConfigWrapper, fast_cosine_dist
+
+# the 6th layer features of wavlm are used to audio synthesis
+SPEAKER_INFORMATION_LAYER = 6
+# the mean of last 5 layers features of wavlm are used for matching in kNN
+CONTENT_INFORMATION_LAYER = [20, 21, 22, 23, 24]
+
+
+def VoiceConverter(test_utt: str, ref_utt: str, out_path: str, svc_mdl: SVCNN, wavlm_encoder: WavLMEncoder, f0_factor: float, speech_enroll=False, device=torch.device('cpu')):
+ """
+ Perform singing voice conversion and save the resulting waveform to `out_path`.
+
+ Args:
+ test_utt (str): Path to the source singing waveform (24kHz, single-channel).
+ ref_utt (str): Path to the reference waveform from the target speaker (single-channel, not less than 16kHz).
+ out_path (str): Path to save the converted singing audio.
+ svc_mdl (SVCNN): Loaded FastSVC model with neural harmonic filters.
+ wavlm_encoder (WavLMEncoder): Loaded WavLM Encoder.
+ f0_factor (float): F0 shift factor.
+ speech_enroll (bool, optional): Whether the reference audio is a speech clip or a singing clip. Defaults to False.
+ device (torch.device, optional): Device to perform the conversion on. Defaults to cpu.
+
+ """
+ # Preprocess audio and extract features.
+ print('Processing feats.')
+ applied_weights = F.one_hot(torch.tensor(CONTENT_INFORMATION_LAYER), num_classes=25).float().mean(axis=0).to(device)[:, None]
+
+ ld = extract_loudness(test_utt)
+ pitch, f0_factor = extract_pitch(test_utt, ref_utt, predefined_factor=f0_factor, speech_enroll=speech_enroll)
+ assert pitch.shape[0] == ld.shape[0], f'{test_utt} Length Mismatch: pitch length ({pitch.shape[0]}), ld length ({ld.shape[0]}).'
+
+ query_feats = wavlm_encoder.get_features(test_utt, weights=applied_weights)
+ matching_set = wavlm_encoder.get_features(ref_utt, weights=applied_weights)
+ synth_set = wavlm_encoder.get_features(ref_utt, output_layer=SPEAKER_INFORMATION_LAYER)
+
+ # Calculate the distance between the query feats and the matching feats
+ dists = fast_cosine_dist(query_feats, matching_set, device=device)
+ best = dists.topk(k=4, largest=False, dim=-1)
+ # Replace query features with corresponding nearest synth feats
+ prematched_wavlm = synth_set[best.indices].mean(dim=1).transpose(0, 1) # (T, 1024)
+
+ # Align the features: the hop_size of the wavlm feature is twice that of pitch and loudness.
+ seq_len = prematched_wavlm.shape[1] * 2
+ if seq_len > pitch.shape[0]:
+ p = seq_len - pitch.shape[0]
+ pitch = np.pad(pitch, (0, p), mode='edge')
+ ld = np.pad(ld, (0, p), mode='edge')
+ else:
+ pitch = pitch[:seq_len]
+ ld = ld[:seq_len]
+
+ in_feats = [prematched_wavlm.unsqueeze(0), torch.from_numpy(pitch).to(dtype=torch.float).unsqueeze(0),
+ torch.from_numpy(ld).to(dtype=torch.float).unsqueeze(0)]
+ in_feats = tuple([x_.to(device) for x_ in in_feats])
+
+ # Inference
+ print('Inferencing.')
+ with torch.no_grad():
+ y_ = svc_mdl(*in_feats)
+
+ # Save converted audio.
+ print('Saving audio.')
+ os.makedirs(os.path.dirname(out_path), exist_ok=True)
+ y_ = y_.unsqueeze(0)
+ y_ = np.clip(y_.view(-1).cpu().numpy(), -1, 1)
+ sf.write(out_path, y_, 24000)
+
+
+if __name__ == '__main__':
+ parser = argparse.ArgumentParser()
+ parser.add_argument(
+ '--src_wav_path',
+ required=True, type=str, help='The audio path for the source singing utterance.'
+ )
+ parser.add_argument(
+ '--ref_wav_path',
+ required=True, type=str, help='The audio path for the reference utterance.'
+ )
+ parser.add_argument(
+ '--out_path',
+ required=True, type=str, help='The audio path for the reference utterance.'
+ )
+ parser.add_argument(
+ '-cfg', '--config_file',
+ type=str, default='configs/config.json',
+ help='The model configuration file.'
+ )
+ parser.add_argument(
+ '-ckpt', '--ckpt_path',
+ type=str,
+ default='pretrained/model.pkl',
+ help='The model checkpoint path for loading.'
+ )
+ parser.add_argument(
+ '-f0factor', '--f0_factor', type=float, default=0.0,
+ help='Adjust the pitch of the source singing to match the vocal range of the target singer. \
+ The default value is 0.0, which means no pitch adjustment is applied (equivalent to f0_factor = 1.0)'
+ )
+ parser.add_argument(
+ '--speech_enroll', action='store_true',
+ help='When using speech as the reference audio, the pitch of the reference audio will be increased by 1.2 times \
+ when performing pitch shift to cover the pitch gap between singing and speech. \
+ Note: This option is invalid when f0_factor is specified.'
+ )
+
+ args = parser.parse_args()
+
+ t0 = time.time()
+
+ f0factor = args.f0_factor
+ speech_enroll_flag = args.speech_enroll
+
+ if torch.cuda.is_available():
+ device = torch.device('cuda')
+ else:
+ device = torch.device('cpu')
+ print(f'using {device} for inference.')
+
+ # Loading model and parameters.
+ # load svc model
+ cfg = args.config_file
+ model_path = args.ckpt_path
+
+ print('Loading svc model configurations.')
+ with open(cfg) as f:
+ config = ConfigWrapper(**json.load(f))
+
+ svc_mdl = SVCNN(config)
+
+ state_dict = torch.load(model_path, map_location='cpu')
+ svc_mdl.load_state_dict(state_dict['model']['generator'], strict=False)
+ svc_mdl.to(device)
+ svc_mdl.eval()
+ # load wavlm model
+ wavlm_encoder = WavLMEncoder(ckpt_path='pretrained/WavLM-Large.pt', device=device)
+ print('wavlm loaded.')
+ # End loading model and parameters.
+ t1 = time.time()
+ print(f'loading models cost {t1-t0:.2f}s.')
+
+ VoiceConverter(test_utt=args.src_wav_path, ref_utt=args.ref_wav_path, out_path=args.out_path,
+ svc_mdl=svc_mdl, wavlm_encoder=wavlm_encoder,
+ f0_factor=f0factor, speech_enroll=speech_enroll_flag, device=device)
+
+ t2 = time.time()
+ print(f'converting costs {t2-t1:.2f}s.')
diff --git a/lala.wav b/lala.wav
new file mode 100644
index 0000000000000000000000000000000000000000..02f07311fc83a785669ba683a34ad2fe2a8084cd
Binary files /dev/null and b/lala.wav differ
diff --git a/loss/adversarial_loss.py b/loss/adversarial_loss.py
new file mode 100644
index 0000000000000000000000000000000000000000..c7624fa95e61261e9ded6ff3e6e39828fa878e0e
--- /dev/null
+++ b/loss/adversarial_loss.py
@@ -0,0 +1,123 @@
+# -*- coding: utf-8 -*-
+
+# Copyright 2021 Tomoki Hayashi
+# MIT License (https://opensource.org/licenses/MIT)
+
+"""Adversarial loss modules."""
+
+import torch
+import torch.nn.functional as F
+
+
+class GeneratorAdversarialLoss(torch.nn.Module):
+ """Generator adversarial loss module."""
+
+ def __init__(
+ self,
+ average_by_discriminators=True,
+ loss_type="mse",
+ ):
+ """Initialize GeneratorAversarialLoss module."""
+ super().__init__()
+ self.average_by_discriminators = average_by_discriminators
+ assert loss_type in ["mse", "hinge"], f"{loss_type} is not supported."
+ if loss_type == "mse":
+ self.criterion = self._mse_loss
+ else:
+ self.criterion = self._hinge_loss
+
+ def forward(self, outputs):
+ """Calcualate generator adversarial loss.
+
+ Args:
+ outputs (Tensor or list): Discriminator outputs or list of
+ discriminator outputs.
+
+ Returns:
+ Tensor: Generator adversarial loss value.
+
+ """
+ if isinstance(outputs, (tuple, list)):
+ adv_loss = 0.0
+ for i, outputs_ in enumerate(outputs):
+ if isinstance(outputs_, (tuple, list)):
+ # NOTE(kan-bayashi): case including feature maps
+ outputs_ = outputs_[-1]
+ adv_loss += self.criterion(outputs_)
+ if self.average_by_discriminators:
+ adv_loss /= i + 1
+ else:
+ adv_loss = self.criterion(outputs)
+
+ return adv_loss
+
+ def _mse_loss(self, x):
+ return F.mse_loss(x, x.new_ones(x.size()))
+
+ def _hinge_loss(self, x):
+ return -x.mean()
+
+
+class DiscriminatorAdversarialLoss(torch.nn.Module):
+ """Discriminator adversarial loss module."""
+
+ def __init__(
+ self,
+ average_by_discriminators=True,
+ loss_type="mse",
+ ):
+ """Initialize DiscriminatorAversarialLoss module."""
+ super().__init__()
+ self.average_by_discriminators = average_by_discriminators
+ assert loss_type in ["mse", "hinge"], f"{loss_type} is not supported."
+ if loss_type == "mse":
+ self.fake_criterion = self._mse_fake_loss
+ self.real_criterion = self._mse_real_loss
+ else:
+ self.fake_criterion = self._hinge_fake_loss
+ self.real_criterion = self._hinge_real_loss
+
+ def forward(self, outputs_hat, outputs):
+ """Calcualate discriminator adversarial loss.
+
+ Args:
+ outputs_hat (Tensor or list): Discriminator outputs or list of
+ discriminator outputs calculated from generator outputs.
+ outputs (Tensor or list): Discriminator outputs or list of
+ discriminator outputs calculated from groundtruth.
+
+ Returns:
+ Tensor: Discriminator real loss value.
+ Tensor: Discriminator fake loss value.
+
+ """
+ if isinstance(outputs, (tuple, list)):
+ real_loss = 0.0
+ fake_loss = 0.0
+ for i, (outputs_hat_, outputs_) in enumerate(zip(outputs_hat, outputs)):
+ if isinstance(outputs_hat_, (tuple, list)):
+ # NOTE(kan-bayashi): case including feature maps
+ outputs_hat_ = outputs_hat_[-1]
+ outputs_ = outputs_[-1]
+ real_loss += self.real_criterion(outputs_)
+ fake_loss += self.fake_criterion(outputs_hat_)
+ if self.average_by_discriminators:
+ fake_loss /= i + 1
+ real_loss /= i + 1
+ else:
+ real_loss = self.real_criterion(outputs)
+ fake_loss = self.fake_criterion(outputs_hat)
+
+ return real_loss, fake_loss
+
+ def _mse_real_loss(self, x):
+ return F.mse_loss(x, x.new_ones(x.size()))
+
+ def _mse_fake_loss(self, x):
+ return F.mse_loss(x, x.new_zeros(x.size()))
+
+ def _hinge_real_loss(self, x):
+ return -torch.mean(torch.min(x - 1, x.new_zeros(x.size())))
+
+ def _hinge_fake_loss(self, x):
+ return -torch.mean(torch.min(-x - 1, x.new_zeros(x.size())))
diff --git a/loss/stft_loss.py b/loss/stft_loss.py
new file mode 100644
index 0000000000000000000000000000000000000000..c2a18f3a50558f750ddb8eb8ea612440714e7b1e
--- /dev/null
+++ b/loss/stft_loss.py
@@ -0,0 +1,178 @@
+# -*- coding: utf-8 -*-
+
+# Copyright 2019 Tomoki Hayashi
+# MIT License (https://opensource.org/licenses/MIT)
+
+"""STFT-based Loss modules."""
+
+import torch
+import torch.nn.functional as F
+
+from distutils.version import LooseVersion
+
+is_pytorch_17plus = LooseVersion(torch.__version__) >= LooseVersion("1.7")
+
+
+def stft(x, fft_size, hop_size, win_length, window):
+ """Perform STFT and convert to magnitude spectrogram.
+
+ Args:
+ x (Tensor): Input signal tensor (B, T).
+ fft_size (int): FFT size.
+ hop_size (int): Hop size.
+ win_length (int): Window length.
+ window (str): Window function type.
+
+ Returns:
+ Tensor: Magnitude spectrogram (B, #frames, fft_size // 2 + 1).
+
+ """
+ if is_pytorch_17plus:
+ x_stft = torch.stft(
+ x, fft_size, hop_size, win_length, window, return_complex=True
+ )
+ x_stft = torch.view_as_real(x_stft)
+ else:
+ x_stft = torch.stft(x, fft_size, hop_size, win_length, window)
+ real = x_stft[..., 0]
+ imag = x_stft[..., 1]
+
+ # NOTE(kan-bayashi): clamp is needed to avoid nan or inf
+ return torch.sqrt(torch.clamp(real ** 2 + imag ** 2, min=1e-7)).transpose(2, 1)
+
+
+class SpectralConvergenceLoss(torch.nn.Module):
+ """Spectral convergence loss module."""
+
+ def __init__(self):
+ """Initilize spectral convergence loss module."""
+ super(SpectralConvergenceLoss, self).__init__()
+
+ def forward(self, x_mag, y_mag):
+ """Calculate forward propagation.
+
+ Args:
+ x_mag (Tensor): Magnitude spectrogram of predicted signal (B, #frames, #freq_bins).
+ y_mag (Tensor): Magnitude spectrogram of groundtruth signal (B, #frames, #freq_bins).
+
+ Returns:
+ Tensor: Spectral convergence loss value.
+
+ """
+ # rst = (torch.norm(y_mag - x_mag, p="fro")+1e-7) / (torch.norm(y_mag, p="fro")+1e-7)
+
+ # a = torch.norm(y_mag - x_mag, p="fro")+1e-7
+ # b = torch.norm(y_mag, p="fro")+1e-7
+ # c = torch.norm(x_mag, p="fro")+1e-7
+ # assert torch.isnan(rst).sum() == 0, f'a is {a}, b is {b}, c is {c}, rst is {rst}.'
+ # print('sc norm', torch.norm(y_mag - x_mag, p="fro"))
+ return (torch.norm(y_mag - x_mag, p="fro")+1e-7) / (torch.norm(y_mag, p="fro")+1e-7)
+
+
+class LogSTFTMagnitudeLoss(torch.nn.Module):
+ """Log STFT magnitude loss module."""
+
+ def __init__(self):
+ """Initilize los STFT magnitude loss module."""
+ super(LogSTFTMagnitudeLoss, self).__init__()
+
+ def forward(self, x_mag, y_mag):
+ """Calculate forward propagation.
+
+ Args:
+ x_mag (Tensor): Magnitude spectrogram of predicted signal (B, #frames, #freq_bins).
+ y_mag (Tensor): Magnitude spectrogram of groundtruth signal (B, #frames, #freq_bins).
+
+ Returns:
+ Tensor: Log STFT magnitude loss value.
+
+ """
+ return F.l1_loss(torch.log(y_mag), torch.log(x_mag))
+
+
+class STFTLoss(torch.nn.Module):
+ """STFT loss module."""
+
+ def __init__(
+ self, fft_size=1024, shift_size=120, win_length=600, window="hann_window"
+ ):
+ """Initialize STFT loss module."""
+ super(STFTLoss, self).__init__()
+ self.fft_size = fft_size
+ self.shift_size = shift_size
+ self.win_length = win_length
+ self.spectral_convergence_loss = SpectralConvergenceLoss()
+ self.log_stft_magnitude_loss = LogSTFTMagnitudeLoss()
+ # NOTE(kan-bayashi): Use register_buffer to fix #223
+ self.register_buffer("window", getattr(torch, window)(win_length))
+
+ def forward(self, x, y):
+ """Calculate forward propagation.
+
+ Args:
+ x (Tensor): Predicted signal (B, T).
+ y (Tensor): Groundtruth signal (B, T).
+
+ Returns:
+ Tensor: Spectral convergence loss value.
+ Tensor: Log STFT magnitude loss value.
+
+ """
+ x_mag = stft(x, self.fft_size, self.shift_size, self.win_length, self.window)
+ y_mag = stft(y, self.fft_size, self.shift_size, self.win_length, self.window)
+ sc_loss = self.spectral_convergence_loss(x_mag, y_mag)
+ mag_loss = self.log_stft_magnitude_loss(x_mag, y_mag)
+
+ return sc_loss, mag_loss
+
+
+class MultiResolutionSTFTLoss(torch.nn.Module):
+ """Multi resolution STFT loss module."""
+
+ def __init__(
+ self,
+ fft_sizes=[1024, 2048, 512],
+ hop_sizes=[120, 240, 50],
+ win_lengths=[600, 1200, 240],
+ window="hann_window",
+ ):
+ """Initialize Multi resolution STFT loss module.
+
+ Args:
+ fft_sizes (list): List of FFT sizes.
+ hop_sizes (list): List of hop sizes.
+ win_lengths (list): List of window lengths.
+ window (str): Window function type.
+
+ """
+ super(MultiResolutionSTFTLoss, self).__init__()
+ assert len(fft_sizes) == len(hop_sizes) == len(win_lengths)
+ self.stft_losses = torch.nn.ModuleList()
+ for fs, ss, wl in zip(fft_sizes, hop_sizes, win_lengths):
+ self.stft_losses += [STFTLoss(fs, ss, wl, window)]
+
+ def forward(self, x, y):
+ """Calculate forward propagation.
+
+ Args:
+ x (Tensor): Predicted signal (B, T) or (B, #subband, T).
+ y (Tensor): Groundtruth signal (B, T) or (B, #subband, T).
+
+ Returns:
+ Tensor: Multi resolution spectral convergence loss value.
+ Tensor: Multi resolution log STFT magnitude loss value.
+
+ """
+ if len(x.shape) == 3:
+ x = x.view(-1, x.size(2)) # (B, C, T) -> (B x C, T)
+ y = y.view(-1, y.size(2)) # (B, C, T) -> (B x C, T)
+ sc_loss = 0.0
+ mag_loss = 0.0
+ for f in self.stft_losses:
+ sc_l, mag_l = f(x, y)
+ sc_loss += sc_l
+ mag_loss += mag_l
+ sc_loss /= len(self.stft_losses)
+ mag_loss /= len(self.stft_losses)
+
+ return sc_loss, mag_loss
diff --git a/modules/.DS_Store b/modules/.DS_Store
new file mode 100644
index 0000000000000000000000000000000000000000..a73d64ec099e495876911dd11679202c48259d03
Binary files /dev/null and b/modules/.DS_Store differ
diff --git a/modules/FastSVC.py b/modules/FastSVC.py
new file mode 100644
index 0000000000000000000000000000000000000000..bd28d532df87ec3c25a18fe99df40000fdc7e05a
--- /dev/null
+++ b/modules/FastSVC.py
@@ -0,0 +1,208 @@
+import numpy as np
+import torch
+import torch.nn.functional as F
+
+from modules.base import BaseModule
+from modules.layers import Conv1dWithInitialization
+from modules.upsampling import UpsamplingBlock as UBlock
+from modules.downsampling import DownsamplingBlock as DBlock
+from modules.linear_modulation import FeatureWiseLinearModulation as FiLM
+
+from modules.nhv import NeuralHomomorphicVocoder
+
+device_str = 'cuda' if torch.cuda.is_available() else 'cpu'
+
+class SVCNN(BaseModule):
+ """
+ WaveGrad is a fully-convolutional mel-spectrogram conditional
+ vocoder model for waveform generation introduced in
+ "WaveGrad: Estimating Gradients for Waveform Generation" paper (link: https://arxiv.org/pdf/2009.00713.pdf).
+ The concept is built on the prior work on score matching and diffusion probabilistic models.
+ Current implementation follows described architecture in the paper.
+ """
+ def __init__(self, config):
+ super(SVCNN, self).__init__()
+
+ # Construct NHV module.
+ self.hop_size = config.data_config.hop_size
+ self.noise_std = config.model_config.nhv_noise_std
+ self.nhv_cat_type = config.model_config.nhv_cat_type
+ self.harmonic_type = config.model_config.harmonic_type
+
+ self.nhv = NeuralHomomorphicVocoder(fs=config.data_config.sampling_rate, hop_size=self.hop_size, in_channels=config.model_config.nhv_inchannels, fmin=80, fmax=7600)
+
+ # Building upsampling branch (mels -> signal)
+ self.ublock_preconv = Conv1dWithInitialization(
+ in_channels=config.model_config.nhv_inchannels-1,
+ out_channels=config.model_config.upsampling_preconv_out_channels,
+ kernel_size=3,
+ stride=1,
+ padding=1
+ )
+ upsampling_in_sizes = [config.model_config.upsampling_preconv_out_channels] \
+ + config.model_config.upsampling_out_channels[:-1]
+ self.ublocks = torch.nn.ModuleList([
+ UBlock(
+ in_channels=in_size,
+ out_channels=out_size,
+ factor=factor,
+ dilations=dilations
+ ) for in_size, out_size, factor, dilations in zip(
+ upsampling_in_sizes,
+ config.model_config.upsampling_out_channels,
+ config.model_config.factors,
+ config.model_config.upsampling_dilations
+ )
+ ])
+ self.ublock_postconv = Conv1dWithInitialization(
+ in_channels=config.model_config.upsampling_out_channels[-1],
+ out_channels=1,
+ kernel_size=3,
+ stride=1,
+ padding=1
+ )
+
+ # Building downsampling branch (starting from signal)
+ self.ld_dblock_preconv = Conv1dWithInitialization(
+ in_channels=1,
+ out_channels=config.model_config.downsampling_preconv_out_channels,
+ kernel_size=5,
+ stride=1,
+ padding=2
+ )
+ self.pitch_dblock_preconv = Conv1dWithInitialization(
+ in_channels=config.model_config.num_harmonic,
+ out_channels=config.model_config.downsampling_preconv_out_channels,
+ kernel_size=5,
+ stride=1,
+ padding=2
+ )
+
+ downsampling_in_sizes = [config.model_config.downsampling_preconv_out_channels] \
+ + config.model_config.downsampling_out_channels[:-1]
+ self.ld_dblocks = torch.nn.ModuleList([
+ DBlock(
+ in_channels=in_size,
+ out_channels=out_size,
+ factor=factor,
+ dilations=dilations
+ ) for in_size, out_size, factor, dilations in zip(
+ downsampling_in_sizes,
+ config.model_config.downsampling_out_channels,
+ config.model_config.factors[1:][::-1],
+ config.model_config.downsampling_dilations
+ )
+ ])
+ self.pitch_dblocks = torch.nn.ModuleList([
+ DBlock(
+ in_channels=in_size,
+ out_channels=out_size,
+ factor=factor,
+ dilations=dilations
+ ) for in_size, out_size, factor, dilations in zip(
+ downsampling_in_sizes,
+ config.model_config.downsampling_out_channels,
+ config.model_config.factors[1:][::-1],
+ config.model_config.downsampling_dilations
+ )
+ ])
+
+ # Building FiLM connections (in order of downscaling stream)
+ film_in_sizes = [24] + config.model_config.downsampling_out_channels
+ film_out_sizes = config.model_config.upsampling_out_channels[::-1]
+ film_factors = [1] + config.model_config.factors[1:][::-1]
+ self.ld_films = torch.nn.ModuleList([
+ FiLM(
+ in_channels=in_size,
+ out_channels=out_size,
+ input_dscaled_by=np.product(film_factors[:i+1]) # for proper positional encodings initialization
+ ) for i, (in_size, out_size) in enumerate(
+ zip(film_in_sizes, film_out_sizes)
+ )
+ ])
+ self.pitch_films = torch.nn.ModuleList([
+ FiLM(
+ in_channels=in_size,
+ out_channels=out_size,
+ input_dscaled_by=np.product(film_factors[:i+1]) # for proper positional encodings initialization
+ ) for i, (in_size, out_size) in enumerate(
+ zip(film_in_sizes, film_out_sizes)
+ )
+ ])
+
+ def forward(self, wavlm, pitch, ld):
+ """
+ Computes forward pass of neural network.
+ :param mels (torch.Tensor): mel-spectrogram acoustic features of shape [B, n_mels, T//hop_length]
+ :param yn (torch.Tensor): noised signal `y_n` of shape [B, T]
+ :return (torch.Tensor): epsilon noise
+ """
+ ## Prepare inputs
+ # wavlm: B, 1024, T
+ # pitch: B, T
+ # ld: B, T
+ assert len(wavlm.shape) == 3 # B, n_mels, T
+
+ pitch = pitch.unsqueeze(1)
+ ld = ld.unsqueeze(1)
+ assert len(pitch.shape) == 3 # B, 1, T
+ assert len(ld.shape) == 3 # B, 1, T
+
+ # Generate NHV conditions
+ if self.nhv_cat_type == 'PLS':
+ nhv_ld = ld
+ nhv_wavlm = F.interpolate(wavlm, size=nhv_ld.shape[2], mode='nearest')
+ nhv_conditions = torch.cat((nhv_ld, nhv_wavlm), dim=1) # B, (1+1024), T
+ else:
+ raise NameError('Unknown nhv cat type: {self.nhv_cat_type}')
+
+ nhv_conditions = nhv_conditions.transpose(1, 2) # B, T, n_emb
+
+ # Generate NHV harmonic signals
+ nhv_noise = torch.normal(0, self.noise_std, (nhv_conditions.size(0), 1, nhv_conditions.size(1)*self.hop_size)).to(nhv_conditions.device)
+ nhv_pitch = pitch.transpose(1, 2) # B, T, 1
+
+ raw_harmonic, filtered_harmonic = self.nhv(nhv_noise, nhv_conditions, nhv_pitch)
+
+ # Linear interpolate loudness to audio_rate
+ upsampled_ld = F.interpolate(ld, scale_factor=self.hop_size, mode='linear')
+ if self.harmonic_type == 0:
+ upsampled_pitch = raw_harmonic
+ elif self.harmonic_type == 1:
+ upsampled_pitch = filtered_harmonic
+ elif self.harmonic_type == 2:
+ upsampled_pitch = torch.cat((raw_harmonic, filtered_harmonic), dim=1)
+ else:
+ raise NameError(f'unknown harmonic type: {self.harmonic_type}')
+
+ # Downsampling stream + Linear Modulation statistics calculation
+ ld_statistics = []
+ dblock_outputs = self.ld_dblock_preconv(upsampled_ld)
+ scale, shift = self.ld_films[0](x=dblock_outputs)
+ ld_statistics.append([scale, shift])
+ for dblock, film in zip(self.ld_dblocks, self.ld_films[1:]):
+ dblock_outputs = dblock(dblock_outputs)
+ scale, shift = film(x=dblock_outputs)
+ ld_statistics.append([scale, shift])
+ ld_statistics = ld_statistics[::-1]
+
+ pitch_statistics = []
+ dblock_outputs = self.pitch_dblock_preconv(upsampled_pitch)
+ scale, shift = self.pitch_films[0](x=dblock_outputs)
+ pitch_statistics.append([scale, shift])
+ for dblock, film in zip(self.pitch_dblocks, self.pitch_films[1:]):
+ dblock_outputs = dblock(dblock_outputs)
+ scale, shift = film(x=dblock_outputs)
+ pitch_statistics.append([scale, shift])
+ pitch_statistics = pitch_statistics[::-1]
+
+ # Upsampling stream
+ condition = wavlm
+ ublock_outputs = self.ublock_preconv(condition)
+ for i, ublock in enumerate(self.ublocks):
+ ld_scale, ld_shift = ld_statistics[i]
+ pitch_scale, pitch_shift = pitch_statistics[i]
+ ublock_outputs = ublock(x=ublock_outputs, scale=ld_scale+pitch_scale, shift=ld_shift+pitch_shift)
+ outputs = self.ublock_postconv(ublock_outputs)
+ return outputs.squeeze(1)
+
diff --git a/modules/__init__.py b/modules/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/modules/base.py b/modules/base.py
new file mode 100644
index 0000000000000000000000000000000000000000..6dd7c951d984b8658b3d25a3e36282b544e16b84
--- /dev/null
+++ b/modules/base.py
@@ -0,0 +1,10 @@
+import torch
+
+
+class BaseModule(torch.nn.Module):
+ def __init__(self):
+ super(BaseModule, self).__init__()
+
+ @property
+ def nparams(self):
+ return sum(p.numel() for p in self.parameters() if p.requires_grad)
diff --git a/modules/discriminator.py b/modules/discriminator.py
new file mode 100644
index 0000000000000000000000000000000000000000..f3297f0cedc8f5901f28775e1b054779c9a3b572
--- /dev/null
+++ b/modules/discriminator.py
@@ -0,0 +1,269 @@
+# -*- coding: utf-8 -*-
+
+# Copyright 2020 Tomoki Hayashi
+# MIT License (https://opensource.org/licenses/MIT)
+
+"""MelGAN Modules."""
+
+import logging
+
+import numpy as np
+import torch
+
+from modules.base import BaseModule
+
+class MelGANDiscriminator(BaseModule):
+ """MelGAN discriminator module."""
+
+ def __init__(
+ self,
+ in_channels=1,
+ out_channels=1,
+ kernel_sizes=[5, 3],
+ channels=16,
+ max_downsample_channels=1024,
+ bias=True,
+ downsample_scales=[4, 4, 4, 4],
+ nonlinear_activation="LeakyReLU",
+ nonlinear_activation_params={"negative_slope": 0.2},
+ pad="ReflectionPad1d",
+ pad_params={},
+ ):
+ """Initilize MelGAN discriminator module.
+
+ Args:
+ in_channels (int): Number of input channels.
+ out_channels (int): Number of output channels.
+ kernel_sizes (list): List of two kernel sizes. The prod will be used for the first conv layer,
+ and the first and the second kernel sizes will be used for the last two layers.
+ For example if kernel_sizes = [5, 3], the first layer kernel size will be 5 * 3 = 15,
+ the last two layers' kernel size will be 5 and 3, respectively.
+ channels (int): Initial number of channels for conv layer.
+ max_downsample_channels (int): Maximum number of channels for downsampling layers.
+ bias (bool): Whether to add bias parameter in convolution layers.
+ downsample_scales (list): List of downsampling scales.
+ nonlinear_activation (str): Activation function module name.
+ nonlinear_activation_params (dict): Hyperparameters for activation function.
+ pad (str): Padding function module name before dilated convolution layer.
+ pad_params (dict): Hyperparameters for padding function.
+
+ """
+ super(MelGANDiscriminator, self).__init__()
+ self.layers = torch.nn.ModuleList()
+
+ # check kernel size is valid
+ assert len(kernel_sizes) == 2
+ assert kernel_sizes[0] % 2 == 1
+ assert kernel_sizes[1] % 2 == 1
+
+ # add first layer
+ self.layers += [
+ torch.nn.Sequential(
+ getattr(torch.nn, pad)((np.prod(kernel_sizes) - 1) // 2, **pad_params),
+ torch.nn.Conv1d(
+ in_channels, channels, np.prod(kernel_sizes), bias=bias
+ ),
+ getattr(torch.nn, nonlinear_activation)(**nonlinear_activation_params),
+ )
+ ]
+
+ # add downsample layers
+ in_chs = channels
+ for downsample_scale in downsample_scales:
+ out_chs = min(in_chs * downsample_scale, max_downsample_channels)
+ self.layers += [
+ torch.nn.Sequential(
+ torch.nn.Conv1d(
+ in_chs,
+ out_chs,
+ kernel_size=downsample_scale * 10 + 1,
+ stride=downsample_scale,
+ padding=downsample_scale * 5,
+ groups=in_chs // 4,
+ bias=bias,
+ ),
+ getattr(torch.nn, nonlinear_activation)(
+ **nonlinear_activation_params
+ ),
+ )
+ ]
+ in_chs = out_chs
+
+ # add final layers
+ out_chs = min(in_chs * 2, max_downsample_channels)
+ self.layers += [
+ torch.nn.Sequential(
+ torch.nn.Conv1d(
+ in_chs,
+ out_chs,
+ kernel_sizes[0],
+ padding=(kernel_sizes[0] - 1) // 2,
+ bias=bias,
+ ),
+ getattr(torch.nn, nonlinear_activation)(**nonlinear_activation_params),
+ )
+ ]
+ self.layers += [
+ torch.nn.Conv1d(
+ out_chs,
+ out_channels,
+ kernel_sizes[1],
+ padding=(kernel_sizes[1] - 1) // 2,
+ bias=bias,
+ ),
+ ]
+
+ def forward(self, x):
+ """Calculate forward propagation.
+
+ Args:
+ x (Tensor): Input noise signal (B, 1, T).
+
+ Returns:
+ List: List of output tensors of each layer.
+
+ """
+ outs = []
+ for f in self.layers:
+ x = f(x)
+ outs += [x]
+
+ return outs
+
+
+class MelGANMultiScaleDiscriminator(BaseModule):
+ """MelGAN multi-scale discriminator module."""
+
+ def __init__(
+ self,
+ in_channels=1,
+ out_channels=1,
+ scales=3,
+ downsample_pooling="AvgPool1d",
+ # follow the official implementation setting
+ downsample_pooling_params={
+ "kernel_size": 4,
+ "stride": 2,
+ "padding": 1,
+ "count_include_pad": False,
+ },
+ kernel_sizes=[5, 3],
+ channels=16,
+ max_downsample_channels=1024,
+ bias=True,
+ downsample_scales=[4, 4, 4, 4],
+ nonlinear_activation="LeakyReLU",
+ nonlinear_activation_params={"negative_slope": 0.2},
+ pad="ReflectionPad1d",
+ pad_params={},
+ use_weight_norm=True,
+ ):
+ """Initilize MelGAN multi-scale discriminator module.
+
+ Args:
+ in_channels (int): Number of input channels.
+ out_channels (int): Number of output channels.
+ scales (int): Number of multi-scales.
+ downsample_pooling (str): Pooling module name for downsampling of the inputs.
+ downsample_pooling_params (dict): Parameters for the above pooling module.
+ kernel_sizes (list): List of two kernel sizes. The sum will be used for the first conv layer,
+ and the first and the second kernel sizes will be used for the last two layers.
+ channels (int): Initial number of channels for conv layer.
+ max_downsample_channels (int): Maximum number of channels for downsampling layers.
+ bias (bool): Whether to add bias parameter in convolution layers.
+ downsample_scales (list): List of downsampling scales.
+ nonlinear_activation (str): Activation function module name.
+ nonlinear_activation_params (dict): Hyperparameters for activation function.
+ pad (str): Padding function module name before dilated convolution layer.
+ pad_params (dict): Hyperparameters for padding function.
+ use_causal_conv (bool): Whether to use causal convolution.
+
+ """
+ super(MelGANMultiScaleDiscriminator, self).__init__()
+ self.discriminators = torch.nn.ModuleList()
+
+ # add discriminators
+ for _ in range(scales):
+ self.discriminators += [
+ MelGANDiscriminator(
+ in_channels=in_channels,
+ out_channels=out_channels,
+ kernel_sizes=kernel_sizes,
+ channels=channels,
+ max_downsample_channels=max_downsample_channels,
+ bias=bias,
+ downsample_scales=downsample_scales,
+ nonlinear_activation=nonlinear_activation,
+ nonlinear_activation_params=nonlinear_activation_params,
+ pad=pad,
+ pad_params=pad_params,
+ )
+ ]
+ self.pooling = getattr(torch.nn, downsample_pooling)(
+ **downsample_pooling_params
+ )
+
+ # apply weight norm
+ if use_weight_norm:
+ self.apply_weight_norm()
+
+ # reset parameters
+ self.reset_parameters()
+
+ def forward(self, x):
+ """Calculate forward propagation.
+
+ Args:
+ x (Tensor): Input noise signal (B, 1, T).
+
+ Returns:
+ List: List of list of each discriminator outputs, which consists of each layer output tensors.
+
+ """
+ outs = []
+ for f in self.discriminators:
+ outs += [f(x)]
+ x = self.pooling(x)
+
+ return outs
+
+ def remove_weight_norm(self):
+ """Remove weight normalization module from all of the layers."""
+
+ def _remove_weight_norm(m):
+ try:
+ logging.debug(f"Weight norm is removed from {m}.")
+ torch.nn.utils.remove_weight_norm(m)
+ except ValueError: # this module didn't have weight norm
+ return
+
+ self.apply(_remove_weight_norm)
+
+ def apply_weight_norm(self):
+ """Apply weight normalization module from all of the layers."""
+
+ def _apply_weight_norm(m):
+ if isinstance(m, torch.nn.Conv1d) or isinstance(
+ m, torch.nn.ConvTranspose1d
+ ):
+ torch.nn.utils.weight_norm(m)
+ logging.debug(f"Weight norm is applied to {m}.")
+
+ self.apply(_apply_weight_norm)
+
+ def reset_parameters(self):
+ """Reset parameters.
+
+ This initialization follows official implementation manner.
+ https://github.com/descriptinc/melgan-neurips/blob/master/mel2wav/modules.py
+
+ """
+
+ def _reset_parameters(m):
+ if isinstance(m, torch.nn.Conv1d) or isinstance(
+ m, torch.nn.ConvTranspose1d
+ ):
+ m.weight.data.normal_(0.0, 0.02)
+ logging.debug(f"Reset parameters in {m}.")
+
+ self.apply(_reset_parameters)
diff --git a/modules/downsampling.py b/modules/downsampling.py
new file mode 100644
index 0000000000000000000000000000000000000000..ef8ecd0b715b3fb18506ea679d1392958e8857e2
--- /dev/null
+++ b/modules/downsampling.py
@@ -0,0 +1,61 @@
+import torch
+
+from modules.base import BaseModule
+from modules.interpolation import InterpolationBlock
+from modules.layers import Conv1dWithInitialization
+
+
+class ConvolutionBlock(BaseModule):
+ def __init__(self, in_channels, out_channels, dilation):
+ super(ConvolutionBlock, self).__init__()
+ self.leaky_relu = torch.nn.LeakyReLU(0.2)
+ self.convolution = Conv1dWithInitialization(
+ in_channels=in_channels,
+ out_channels=out_channels,
+ kernel_size=3,
+ stride=1,
+ padding=dilation,
+ dilation=dilation
+ )
+
+ def forward(self, x):
+ outputs = self.leaky_relu(x)
+ outputs = self.convolution(outputs)
+ return outputs
+
+
+class DownsamplingBlock(BaseModule):
+ def __init__(self, in_channels, out_channels, factor, dilations):
+ super(DownsamplingBlock, self).__init__()
+ in_sizes = [in_channels] + [out_channels for _ in range(len(dilations) - 1)]
+ out_sizes = [out_channels for _ in range(len(in_sizes))]
+ self.main_branch = torch.nn.Sequential(*([
+ InterpolationBlock(
+ scale_factor=factor,
+ mode='linear',
+ align_corners=False,
+ downsample=True
+ )
+ ] + [
+ ConvolutionBlock(in_size, out_size, dilation)
+ for in_size, out_size, dilation in zip(in_sizes, out_sizes, dilations)
+ ]))
+ self.residual_branch = torch.nn.Sequential(*[
+ Conv1dWithInitialization(
+ in_channels=in_channels,
+ out_channels=out_channels,
+ kernel_size=1,
+ stride=1
+ ),
+ InterpolationBlock(
+ scale_factor=factor,
+ mode='linear',
+ align_corners=False,
+ downsample=True
+ )
+ ])
+
+ def forward(self, x):
+ outputs = self.main_branch(x)
+ outputs = outputs + self.residual_branch(x)
+ return outputs
diff --git a/modules/interpolation.py b/modules/interpolation.py
new file mode 100644
index 0000000000000000000000000000000000000000..70188af32b91a39183becd1a45c863f422857873
--- /dev/null
+++ b/modules/interpolation.py
@@ -0,0 +1,23 @@
+import torch
+
+from modules.base import BaseModule
+
+
+class InterpolationBlock(BaseModule):
+ def __init__(self, scale_factor, mode='linear', align_corners=False, downsample=False):
+ super(InterpolationBlock, self).__init__()
+ self.downsample = downsample
+ self.scale_factor = scale_factor
+ self.mode = mode
+ self.align_corners = align_corners
+
+ def forward(self, x):
+ outputs = torch.nn.functional.interpolate(
+ x,
+ size=x.shape[-1] * self.scale_factor \
+ if not self.downsample else x.shape[-1] // self.scale_factor,
+ mode=self.mode,
+ align_corners=self.align_corners,
+ recompute_scale_factor=False
+ )
+ return outputs
diff --git a/modules/layers.py b/modules/layers.py
new file mode 100644
index 0000000000000000000000000000000000000000..f20d5800f95cf102b4ac1e6c418616d4b02addaa
--- /dev/null
+++ b/modules/layers.py
@@ -0,0 +1,15 @@
+import torch
+
+from modules.base import BaseModule
+
+
+class Conv1dWithInitialization(BaseModule):
+ def __init__(self, **kwargs):
+ super(Conv1dWithInitialization, self).__init__()
+ self.conv1d = torch.nn.Conv1d(**kwargs)
+ torch.nn.init.orthogonal_(self.conv1d.weight.data, gain=1)
+
+ def forward(self, x):
+ return self.conv1d(x)
+
+
\ No newline at end of file
diff --git a/modules/linear_modulation.py b/modules/linear_modulation.py
new file mode 100644
index 0000000000000000000000000000000000000000..621717976401d8dda635d30472180fde0a69f7e2
--- /dev/null
+++ b/modules/linear_modulation.py
@@ -0,0 +1,52 @@
+import torch
+
+from modules.base import BaseModule
+from modules.layers import Conv1dWithInitialization
+
+
+LINEAR_SCALE=5000
+
+
+class FeatureWiseLinearModulation(BaseModule):
+ def __init__(self, in_channels, out_channels, input_dscaled_by):
+ super(FeatureWiseLinearModulation, self).__init__()
+ self.signal_conv = torch.nn.Sequential(*[
+ Conv1dWithInitialization(
+ in_channels=in_channels,
+ out_channels=in_channels,
+ kernel_size=3,
+ stride=1,
+ padding=1
+ ),
+ torch.nn.LeakyReLU(0.2)
+ ])
+ # self.positional_encoding = PositionalEncoding(in_channels)
+ self.scale_conv = Conv1dWithInitialization(
+ in_channels=in_channels,
+ out_channels=out_channels,
+ kernel_size=3,
+ stride=1,
+ padding=1
+ )
+ self.shift_conv = Conv1dWithInitialization(
+ in_channels=in_channels,
+ out_channels=out_channels,
+ kernel_size=3,
+ stride=1,
+ padding=1
+ )
+
+ def forward(self, x):
+ outputs = self.signal_conv(x)
+ # outputs = outputs + self.positional_encoding(noise_level).unsqueeze(-1)
+ scale, shift = self.scale_conv(outputs), self.shift_conv(outputs)
+ return scale, shift
+
+
+class FeatureWiseAffine(BaseModule):
+ def __init__(self):
+ super(FeatureWiseAffine, self).__init__()
+
+ def forward(self, x, scale, shift):
+ outputs = scale * x + shift
+ return outputs
diff --git a/modules/nhv/__init__.py b/modules/nhv/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..08dbcfed03ac34305f221d05f2131227f94a60dc
--- /dev/null
+++ b/modules/nhv/__init__.py
@@ -0,0 +1 @@
+from .layer import NeuralHomomorphicVocoder # noqa
diff --git a/modules/nhv/layer/__init__.py b/modules/nhv/layer/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..4b6988bea5d0e914837ee7ebcaa8d94cf9b24a8e
--- /dev/null
+++ b/modules/nhv/layer/__init__.py
@@ -0,0 +1,5 @@
+from .layer import * # noqa
+from .model import * # noqa
+from .module import * # noqa
+from .incremental import * # noqa
+from .preprocess import * # noqa
diff --git a/modules/nhv/layer/incremental.py b/modules/nhv/layer/incremental.py
new file mode 100644
index 0000000000000000000000000000000000000000..65dd53cc6273d5a30803eeac7485396bc804f06d
--- /dev/null
+++ b/modules/nhv/layer/incremental.py
@@ -0,0 +1,308 @@
+#! /usr/bin/env python
+# -*- coding: utf-8 -*-
+# vim:fenc=utf-8
+#
+# Copyright (c) 2021 Kazuhiro KOBAYASHI
+#
+# Distributed under terms of the MIT license.
+
+"""
+
+"""
+
+import math
+
+import torch
+import torch.nn as nn
+import torch.nn.functional as F
+
+from .layer import ConvLayers, DFTLayer
+from .model import NeuralHomomorphicVocoder
+from .module import CCepLTVFilter, SinusoidsGenerator
+
+
+class IncrementalCacheConvClass(nn.Module):
+ def __init__(self):
+ super().__init__()
+ # remain handles to remove old hooks
+ self.handles = []
+
+ def _forward_without_cache(self, x):
+ raise NotImplementedError("Please implement _forward_without_cache")
+
+ def forward(self, caches, *inputs):
+ self.caches = caches
+ self.new_caches = []
+ self.cache_num = 0
+ x = self._forward(*inputs)
+ return x, self.new_caches
+
+ def reset_caches(self, *args, hop_size=128, batch_size=1):
+ self.caches = []
+ self.receptive_sizes = []
+ self._initialize_caches(batch_size=batch_size, hop_size=hop_size)
+ # set ordering hook
+ self._set_pre_hooks(cache_ordering=True)
+ # caclulate order of inference
+ _ = self._forward_without_cache(*args)
+ # remove hook handles for ordering
+ [h.remove() for h in self.handles]
+ # set concatenate hook
+ self._set_pre_hooks(cache_ordering=False)
+ # make cache zeros
+ self.caches = [torch.zeros_like(c) for c in self.caches]
+ # remove conv padding
+ self._remove_padding()
+ return self.caches
+
+ def _initialize_caches(self, batch_size=1, hop_size=128):
+ self.caches_dict = {}
+ self.receptive_sizes_dict = {}
+ for k, m in self.named_modules():
+ if isinstance(m, nn.Conv1d):
+ if m.kernel_size[0] > 1:
+ receptive_size = self._get_receptive_size_1d(m)
+ # NOTE(k2kobayashi): postfilter_fn requires to accept
+ # hop_size length input
+ if "postfilter_fn" in k:
+ receptive_size += hop_size - 1
+ self.caches_dict[id(m)] = torch.randn(
+ (batch_size, m.in_channels, receptive_size)
+ )
+ self.receptive_sizes_dict[id(m)] = receptive_size
+
+ def _set_pre_hooks(self, cache_ordering=True):
+ if cache_ordering:
+ func = self._cache_ordering
+ else:
+ func = self._concat_cache
+ for k, m in self.named_modules():
+ if isinstance(m, nn.Conv1d):
+ if m.kernel_size[0] > 1:
+ self.handles.append(m.register_forward_pre_hook(func))
+
+ def _concat_cache(self, module, inputs):
+ def __concat_cache(inputs, cache, receptive_size):
+ inputs = torch.cat([cache, inputs[0]], axis=-1)
+ inputs = inputs[..., -receptive_size:]
+ return inputs
+
+ cache = self.caches[self.cache_num]
+ receptive_size = self.receptive_sizes[self.cache_num]
+ inputs = __concat_cache(inputs, cache, receptive_size)
+ self.new_caches += [inputs]
+ self.cache_num += 1
+ return inputs
+
+ def _cache_ordering(self, module, inputs):
+ self.caches.append(self.caches_dict[id(module)])
+ self.receptive_sizes.append(self.receptive_sizes_dict[id(module)])
+
+ def _remove_padding(self):
+ def __remove_padding(m):
+ if isinstance(m, torch.nn.Conv1d):
+ m.padding = (0,)
+ if isinstance(m, torch.nn.Conv2d):
+ m.padding = (0, 0)
+
+ self.apply(__remove_padding)
+
+ @staticmethod
+ def _get_receptive_size_1d(m):
+ return (m.kernel_size[0] - 1) * m.dilation[0] + 1
+
+
+class IncrementalNeuralHomomorphicVocoder(
+ NeuralHomomorphicVocoder, IncrementalCacheConvClass
+):
+ fs = 24000
+ fft_size = 1024
+ hop_size = 256
+ in_channels = 80
+ conv_channels = 256
+ ccep_size = 222
+ out_channels = 1
+ kernel_size = 3
+ dilation_size = 1
+ group_size = 8
+ fmin = 80
+ fmax = 7600
+ roll_size = 24
+ n_ltv_layers = 3
+ n_postfilter_layers = 4
+ n_ltv_postfilter_layers = 1
+ use_causal = False
+ use_reference_mag = False
+ use_tanh = False
+ use_uvmask = False
+ use_weight_norm = True
+ conv_type = "original"
+ postfilter_type = "ddsconv"
+ ltv_postfilter_type = "conv"
+ ltv_postfilter_kernel_size = 128
+ scaler_file = None
+
+ def __init__(self, **kwargs):
+ super().__init__(**kwargs)
+ assert kwargs["use_causal"], "Require use_causal"
+ self.impulse_generator = IncrementalSinusoidsGenerator(
+ hop_size=self.hop_size, fs=self.fs, use_uvmask=self.use_uvmask
+ )
+ self.ltv_harmonic = IncrementalCCepLTVFilter(
+ **self.ltv_params, feat2linear_fn=self.feat2linear_fn
+ )
+ self.ltv_noise = IncrementalCCepLTVFilter(**self.ltv_params)
+ self.window_size = self.ltv_harmonic.window_size
+
+ def _forward_without_cache(self, *inputs):
+ super()._forward(*inputs)
+
+ def forward(self, z, x, f0, uv, ltv_caches, conv_caches):
+ self.caches = conv_caches
+ self.new_caches = []
+ self.cache_num = 0
+ y, new_ltv_caches = self._incremental_forward(z, x, f0, uv, ltv_caches)
+ return y, new_ltv_caches, self.new_caches
+
+ def _incremental_forward(self, z, x, cf0, uv, ltv_caches):
+ if self.feat_scaler_fn is not None:
+ x = self.feat_scaler_fn(x)
+
+ # impulse
+ impulse, impulse_cache = self.impulse_generator.incremental_forward(
+ cf0, uv, ltv_caches[0]
+ )
+
+ # ltv for harmonic
+ harmonic = self._concat_ltv_input_cache(ltv_caches[1], impulse)
+ ltv_harm = self.ltv_harmonic.incremental_forward(x, harmonic)
+ sig_harm = ltv_caches[2][..., -self.hop_size :] + ltv_harm[..., : self.hop_size]
+ if self.ltv_harmonic.ltv_postfilter_fn is not None:
+ sig_harm = self.ltv_harmonic.ltv_postfilter_fn(
+ sig_harm.transpose(1, 2)
+ ).transpose(1, 2)
+
+ # ltv for noise
+ noise = self._concat_ltv_input_cache(ltv_caches[3], z)
+ ltv_noise = self.ltv_noise.incremental_forward(x, noise)
+ sig_noise = (
+ ltv_caches[4][..., -self.hop_size :] + ltv_noise[..., : self.hop_size]
+ )
+ if self.ltv_noise.ltv_postfilter_fn is not None:
+ sig_noise = self.ltv_noise.ltv_postfilter_fn(
+ sig_noise.transpose(1, 2)
+ ).transpose(1, 2)
+
+ # superimpose
+ y = sig_harm + sig_noise
+
+ if self.postfilter_fn is not None:
+ y = self.postfilter_fn(y.transpose(1, 2)).transpose(1, 2)
+
+ y = torch.tanh(y) if self.use_tanh else torch.clamp(y, -1, 1)
+
+ new_ltv_caches = [impulse_cache, harmonic, ltv_harm, noise, ltv_noise]
+ return y.reshape(1, self.out_channels, -1), new_ltv_caches
+
+ def reset_ltv_caches(self):
+ ltv_caches = []
+ # impulse generator
+ ltv_caches += [torch.zeros(1, 1, 1)]
+ # ltv harm
+ ltv_caches += [torch.zeros(1, 1, self.window_size)]
+ ltv_caches += [torch.zeros(1, 1, self.window_size)]
+ # ltv noise
+ ltv_caches += [torch.zeros(1, 1, self.window_size)]
+ ltv_caches += [torch.zeros(1, 1, self.window_size)]
+ return ltv_caches
+
+ def _concat_ltv_input_cache(self, cache, z):
+ z = torch.cat([cache, z], axis=-1)
+ z = z[..., self.hop_size :]
+ return z
+
+
+class IncrementalSinusoidsGenerator(SinusoidsGenerator):
+ def __init__(self, **kwargs):
+ super().__init__(**kwargs)
+
+ def incremental_forward(self, cf0, uv, cache):
+ f0, uv = self.upsample(cf0.transpose(1, 2)), self.upsample(uv.transpose(1, 2))
+ harmonic, new_cache = self.incremental_generate_sinusoids(f0, uv, cache)
+ harmonic = self.harmonic_amp * harmonic.reshape(cf0.size(0), 1, -1)
+ return harmonic, new_cache
+
+ def incremental_generate_sinusoids(self, f0, uv, cache):
+ mask = self.anti_aliacing_mask(f0 * self.harmonics)
+ # f0[..., 0] = f0[..., 0] + cache
+ f0 = torch.cat([cache, f0], axis=-1)
+ cumsum = torch.cumsum(f0, dim=-1)[..., 1:]
+ rads = cumsum * 2.0 * math.pi / self.fs * self.harmonics
+ harmonic = torch.sum(torch.cos(rads) * mask, dim=1, keepdim=True)
+ if self.use_uvmask:
+ harmonic = uv * harmonic
+ new_cache = cumsum[..., -1:] % self.fs
+ return harmonic, new_cache
+
+
+class IncrementalConvLayers(ConvLayers, IncrementalCacheConvClass):
+ in_channels = 80
+ conv_channels = 256
+ out_channels = 222
+ kernel_size = 3
+ dilation_size = 1
+ group_size = 8
+ n_conv_layers = 3
+ use_causal = False
+ conv_type = "original"
+
+ def __init__(self, **kwargs):
+ for k, v in kwargs.items():
+ if k not in self.__class__.__dict__.keys():
+ raise ValueError(f"{k} not in arguments {self.__class__}.")
+ setattr(self, k, v)
+ assert kwargs["use_causal"], "Require use_causal"
+ super().__init__(**kwargs)
+
+ def _forward_without_cache(self, *inputs):
+ super().forward(*inputs)
+
+ def forward(self, x, conv_caches):
+ self.caches = conv_caches
+ self.new_caches = []
+ self.cache_num = 0
+ x = self.conv_layers(x)
+ return x, self.new_caches
+
+
+class IncrementalCCepLTVFilter(CCepLTVFilter):
+ def __init__(self, **kwargs):
+ super().__init__(**kwargs)
+ self.conv_dft = DFTLayer(n_fft=self.fft_size)
+ self.conv_idft = DFTLayer(n_fft=self.fft_size + 1)
+ self.padding = (self.fft_size - self.ccep_size) // 2
+
+ def incremental_forward(self, x, z):
+ """Input tensor size
+ x: (1, 1, input_size)
+ z: (1, 1, fft_size + hop_size)
+ """
+ # inference complex cepstrum
+ ccep = self.conv(x) / self.quef_norm
+ log_mag = None if self.feat2linear_fn is None else self.feat2linear_fn(x)
+ y = self._dft_ccep2impulse(ccep, ref=log_mag)
+
+ # convolve to a frame
+ z = F.pad(z, (self.fft_size // 2, self.fft_size // 2))
+ z = F.conv1d(z, y)
+ return z * self.win
+
+ def _dft_ccep2impulse(self, ccep, ref=None):
+ ccep = F.pad(ccep, (self.padding, self.padding))
+ real, imag = self.conv_dft(ccep)
+ if ref is not None:
+ real = self._apply_ref_mag(real, ref)
+ mag, phase = torch.pow(10, real / 10), imag
+ real, imag = mag * torch.cos(phase), mag * torch.sin(phase)
+ real, _ = self.conv_idft(F.pad(real, (0, 1)), F.pad(imag, (0, 1)), inverse=True)
+ return real
diff --git a/modules/nhv/layer/layer.py b/modules/nhv/layer/layer.py
new file mode 100644
index 0000000000000000000000000000000000000000..8ef6dd5db306caab1a69c3f0a6fc47b61ad10b45
--- /dev/null
+++ b/modules/nhv/layer/layer.py
@@ -0,0 +1,253 @@
+#! /usr/bin/env python
+# -*- coding: utf-8 -*-
+# vim:fenc=utf-8
+#
+# Copyright (c) 2021 Kazuhiro KOBAYASHI
+#
+# Distributed under terms of the MIT license.
+
+"""
+
+"""
+
+import numpy as np
+import torch
+import torch.nn as nn
+import torch.nn.functional as F
+
+
+class ConvLayers(nn.Module):
+ in_channels = 80
+ conv_channels = 256
+ out_channels = 222
+ kernel_size = 3
+ dilation_size = 1
+ group_size = 8
+ n_conv_layers = 3
+ use_causal = False
+ conv_type = "original"
+
+ def __init__(self, **kwargs):
+ super().__init__()
+ for k, v in kwargs.items():
+ if k not in self.__class__.__dict__.keys():
+ raise ValueError(f"{k} not in arguments {self.__class__}.")
+ setattr(self, k, v)
+ if self.conv_type == "ddsconv":
+ self.conv_layers = self.ddsconv()
+ elif self.conv_type == "original":
+ self.conv_layers = self.original_conv()
+ else:
+ raise ValueError(f"Unsupported conv_type: {self.conv_type}")
+
+ def forward(self, x):
+ """
+ x: (B, T, in_channels)
+ y: (B, T, out_channels)
+ """
+ return self.conv_layers(x)
+
+ def original_conv(self):
+ modules = []
+ modules += [
+ Conv1d(
+ self.in_channels,
+ self.conv_channels,
+ self.kernel_size,
+ self.dilation_size,
+ 1,
+ self.use_causal,
+ ),
+ nn.ReLU(),
+ ]
+ for i in range(self.n_conv_layers):
+ modules += [
+ Conv1d(
+ self.conv_channels,
+ self.conv_channels,
+ self.kernel_size,
+ self.dilation_size,
+ self.group_size,
+ self.use_causal,
+ ),
+ nn.ReLU(),
+ ]
+ modules += [
+ Conv1d(
+ self.conv_channels,
+ self.out_channels,
+ self.kernel_size,
+ self.dilation_size,
+ 1,
+ self.use_causal,
+ ),
+ ]
+ return nn.Sequential(*modules)
+
+ def ddsconv(self):
+ modules = []
+ modules += [
+ Conv1d(
+ in_channels=self.in_channels,
+ out_channels=self.conv_channels,
+ kernel_size=1,
+ dilation_size=1,
+ group_size=1,
+ use_causal=self.use_causal,
+ )
+ ]
+ for i in range(self.n_conv_layers):
+ if self.dilation_size == 1:
+ dilation_size = self.kernel_size ** i
+ else:
+ dilation_size = self.dilation_size ** i
+ modules += [
+ DepthSeparableConv1d(
+ channels=self.conv_channels,
+ kernel_size=self.kernel_size,
+ dilation_size=dilation_size,
+ use_causal=self.use_causal,
+ )
+ ]
+ modules += [
+ Conv1d(
+ in_channels=self.conv_channels,
+ out_channels=self.out_channels,
+ kernel_size=1,
+ dilation_size=1,
+ group_size=1,
+ use_causal=self.use_causal,
+ )
+ ]
+ return nn.Sequential(*modules)
+
+ def remove_weight_norm(self):
+ def _remove_weight_norm(m):
+ try:
+ torch.nn.utils.remove_weight_norm(m)
+ except ValueError:
+ return
+
+ self.apply(_remove_weight_norm)
+
+
+class Conv1d(nn.Module):
+ def __init__(
+ self,
+ in_channels,
+ out_channels,
+ kernel_size=3,
+ dilation_size=1,
+ group_size=1,
+ use_causal=False,
+ ):
+ super().__init__()
+ self.use_causal = use_causal
+ self.kernel_size = kernel_size
+ self.padding = (kernel_size - 1) * dilation_size
+
+ self.conv1d = nn.Conv1d(
+ in_channels,
+ out_channels,
+ kernel_size,
+ padding=self.padding,
+ dilation=dilation_size,
+ groups=group_size,
+ )
+ nn.init.kaiming_normal_(self.conv1d.weight)
+
+ def forward(self, x):
+ """
+ x: (B, T, D)
+ y: (B, T, D)
+ """
+ x = x.transpose(1, 2)
+ y = self.conv1d(x)
+ # NOTE(k2kobayashi): kernel_size=1 does not discard padding
+ if self.kernel_size > 1 and self.conv1d.padding != (0,):
+ if self.use_causal:
+ y = y[..., : -self.padding]
+ else:
+ y = y[..., self.padding // 2 : -self.padding // 2]
+ return y.transpose(1, 2)
+
+
+class DepthSeparableConv1d(nn.Module):
+ def __init__(self, channels, kernel_size, dilation_size, use_causal=False):
+ super().__init__()
+ sep_conv = Conv1d(
+ channels,
+ channels,
+ kernel_size,
+ dilation_size,
+ group_size=channels,
+ use_causal=use_causal,
+ )
+ conv1d = Conv1d(
+ channels,
+ channels,
+ kernel_size=1,
+ dilation_size=1,
+ group_size=1,
+ use_causal=use_causal,
+ )
+ ln1 = nn.LayerNorm(channels)
+ ln2 = nn.LayerNorm(channels)
+ gelu1 = nn.GELU()
+ gelu2 = nn.GELU()
+ modules = [sep_conv, ln1, gelu1, conv1d, ln2, gelu2]
+ self.layers = nn.Sequential(*modules)
+
+ def forward(self, x):
+ y = self.layers(x)
+ return x + y
+
+
+class DFTLayer(nn.Module):
+ def __init__(self, n_fft=1024):
+ super().__init__()
+ self.n_fft = n_fft
+ wsin, wcos = self._generate_fourier_kernels(n_fft=n_fft)
+ self.register_buffer(
+ "wsin", torch.tensor(wsin, dtype=torch.float), persistent=False
+ )
+ self.register_buffer(
+ "wcos", torch.tensor(wcos, dtype=torch.float), persistent=False
+ )
+
+ @staticmethod
+ def _generate_fourier_kernels(n_fft, window="hann"):
+ freq_bins = n_fft
+ s = np.arange(0, n_fft, 1.0)
+ wsin = np.empty((freq_bins, 1, n_fft))
+ wcos = np.empty((freq_bins, 1, n_fft))
+ for k in range(freq_bins):
+ wsin[k, 0, :] = np.sin(2 * np.pi * k * s / n_fft)
+ wcos[k, 0, :] = np.cos(2 * np.pi * k * s / n_fft)
+ return wsin.astype(np.float32), wcos.astype(np.float32)
+
+ def forward(self, x, imag=None, inverse=False):
+ if not inverse:
+ return self.dft(x)
+ else:
+ return self.idft(x, imag)
+
+ def dft(self, real):
+ real = real.transpose(0, 1)
+ imag = F.conv1d(real, self.wsin, stride=self.n_fft + 1).permute(2, 0, 1)
+ real = F.conv1d(real, self.wcos, stride=self.n_fft + 1).permute(2, 0, 1)
+ return real, -imag
+
+ def idft(self, real, imag):
+ real = real.transpose(0, 1)
+ imag = imag.transpose(0, 1)
+ a1 = F.conv1d(real, self.wcos, stride=self.n_fft + 1)
+ a2 = F.conv1d(real, self.wsin, stride=self.n_fft + 1)
+ b1 = F.conv1d(imag, self.wcos, stride=self.n_fft + 1)
+ b2 = F.conv1d(imag, self.wsin, stride=self.n_fft + 1)
+ imag = a2 + b1
+ real = a1 - b2
+ return (
+ (real / self.n_fft).permute(2, 0, 1),
+ (imag / self.n_fft).permute(2, 0, 1),
+ )
diff --git a/modules/nhv/layer/model.py b/modules/nhv/layer/model.py
new file mode 100644
index 0000000000000000000000000000000000000000..1b735607cf16fb559a26fae49e53c94e49d3ef0c
--- /dev/null
+++ b/modules/nhv/layer/model.py
@@ -0,0 +1,208 @@
+#! /usr/bin/env python
+# -*- coding: utf-8 -*-
+# vim:fenc=utf-8
+#
+# Copyright (c) 2021 Kazuhiro KOBAYASHI
+#
+# Distributed under terms of the MIT license.
+
+"""
+
+"""
+
+import joblib
+import torch
+import torch.nn as nn
+
+from .layer import Conv1d, ConvLayers
+from .module import CCepLTVFilter, SinusoidsGenerator
+from .preprocess import LogMelSpectrogram2LogMagnitude, LogMelSpectrogramScaler
+
+
+class NeuralHomomorphicVocoder(nn.Module):
+ fs = 24000
+ fft_size = 1024
+ hop_size = 256
+ in_channels = 80
+ conv_channels = 256
+ ccep_size = 222
+ out_channels = 1
+ kernel_size = 3
+ dilation_size = 1
+ group_size = 8
+ fmin = 80
+ fmax = 7600
+ roll_size = 24
+ n_ltv_layers = 3
+ n_postfilter_layers = 4
+ n_ltv_postfilter_layers = 1
+ harmonic_amp = 0.1
+ noise_std = 0.03
+ use_causal = False
+ use_reference_mag = False
+ use_tanh = False
+ use_uvmask = True
+ use_weight_norm = True
+ conv_type = "original"
+ postfilter_type = None
+ ltv_postfilter_type = None
+ ltv_postfilter_kernel_size = 128
+ scaler_file = None
+
+ def __init__(self, **kwargs):
+ super().__init__()
+ for k, v in kwargs.items():
+ if k not in self.__class__.__dict__.keys():
+ raise ValueError(f"{k} not in arguments {self.__class__}.")
+ setattr(self, k, v)
+ # load scaler
+ self.feat_scaler_fn = self._load_feat_scaler(self.scaler_file, ext="mlfb")
+
+ # feat to linear spectrogram if use_reference_mag
+ self.feat2linear_fn = self._get_feat2linear_fn(ext="mlfb")
+
+ # impulse generator
+ self.impulse_generator = SinusoidsGenerator(
+ hop_size=self.hop_size,
+ fs=self.fs,
+ harmonic_amp=self.harmonic_amp,
+ use_uvmask=self.use_uvmask,
+ )
+
+ # LTV modules
+ self.ltv_params = self._get_ltv_params()
+ self.ltv_harmonic = CCepLTVFilter(
+ **self.ltv_params, feat2linear_fn=self.feat2linear_fn
+ )
+ self.ltv_noise = CCepLTVFilter(**self.ltv_params)
+
+ # post filter
+ self.postfilter_fn = self._get_postfilter_fn()
+
+ if self.use_weight_norm:
+ self._apply_weight_norm()
+
+ def forward(self, z, x, cf0):
+ """
+ z: (B, 1, T * hop_size)
+ x: (B, T, D) ## D is the total dimension, including loudness, PPGs and spk_embs.
+ cf0: (B, T, 1) ## frame-level pitch
+ ### uv: (B, T, 1) ## frame-level uv symbols, u is 0 and v is 1.
+ """
+ if self.feat_scaler_fn is not None:
+ x = self.feat_scaler_fn(x)
+
+ harmonic = self.impulse_generator(cf0)
+ sig_harm = self.ltv_harmonic(x, harmonic)
+ sig_noise = self.ltv_noise(x, z)
+ y = sig_harm + sig_noise
+
+ if self.postfilter_fn is not None:
+ y = self.postfilter_fn(y.transpose(1, 2)).transpose(1, 2)
+
+ y = torch.tanh(y) if self.use_tanh else torch.clamp(y, -1, 1)
+ y = y.reshape(x.size(0), self.out_channels, -1)
+
+ return harmonic, y
+
+
+ @torch.no_grad()
+ def inference(self, c):
+ """Interface for PWG decoder
+ c: (T, D)
+ """
+ c = c.unsqueeze(0)
+ z = torch.normal(0, self.noise_std, (1, c.size(1) * self.hop_size)).to(c.device)
+ x, cf0, uv = torch.split(c, [self.in_channels, 1, 1], dim=-1)
+ y = self._forward(z, x, cf0, uv)
+ return y.squeeze(0)
+
+ def remove_weight_norm(self):
+ def _remove_weight_norm(m):
+ try:
+ torch.nn.utils.remove_weight_norm(m)
+ except ValueError:
+ return
+
+ self.apply(_remove_weight_norm)
+
+ def _apply_weight_norm(self):
+ def _apply_weight_norm(m):
+ if isinstance(m, torch.nn.Conv1d):
+ torch.nn.utils.weight_norm(m)
+
+ self.apply(_apply_weight_norm)
+
+ def _get_ltv_params(self):
+ return {
+ "in_channels": self.in_channels,
+ "conv_channels": self.conv_channels,
+ "ccep_size": self.ccep_size,
+ "kernel_size": self.kernel_size,
+ "dilation_size": self.dilation_size,
+ "group_size": self.group_size,
+ "fft_size": self.fft_size,
+ "hop_size": self.hop_size,
+ "n_ltv_layers": self.n_ltv_layers,
+ "n_ltv_postfilter_layers": self.n_ltv_postfilter_layers,
+ "use_causal": self.use_causal,
+ "conv_type": self.conv_type,
+ "ltv_postfilter_type": self.ltv_postfilter_type,
+ "ltv_postfilter_kernel_size": self.ltv_postfilter_kernel_size,
+ }
+
+ @staticmethod
+ def _load_feat_scaler(scaler_file, ext="mlfb"):
+ if scaler_file is not None:
+ if ext == "mlfb":
+ fn = LogMelSpectrogramScaler(joblib.load(scaler_file)[ext])
+ elif ext == "lsp":
+ fn = None
+ raise NotImplementedError("lsp scaler is not implemented.")
+ else:
+ fn = None
+ return fn
+
+ def _get_feat2linear_fn(self, ext="mlfb"):
+ if self.use_reference_mag:
+ if ext == "mlfb":
+ fn = LogMelSpectrogram2LogMagnitude(
+ fs=self.fs,
+ fft_size=self.fft_size,
+ n_mels=self.in_channels,
+ fmin=self.fmin,
+ fmax=self.fmax,
+ roll_size=self.roll_size,
+ melspc_scaler_fn=self.feat_scaler_fn,
+ )
+ elif ext == "lsp":
+ fn = None
+ raise NotImplementedError("lsp to linear is not implemented.")
+ else:
+ fn = None
+ return fn
+
+ def _get_postfilter_fn(self):
+ if self.postfilter_type == "ddsconv":
+ fn = ConvLayers(
+ in_channels=1,
+ conv_channels=64,
+ out_channels=1,
+ kernel_size=5,
+ dilation_size=2,
+ n_conv_layers=self.n_postfilter_layers,
+ use_causal=self.use_causal,
+ conv_type="ddsconv",
+ )
+ elif self.postfilter_type == "conv":
+ fn = Conv1d(
+ in_channels=1,
+ out_channels=1,
+ kernel_size=self.fft_size,
+ use_causal=self.use_causal,
+ )
+ elif self.postfilter_type is None:
+ fn = None
+ else:
+ raise ValueError(f"Invalid postfilter_type: {self.postfilter_type}")
+ return fn
diff --git a/modules/nhv/layer/module.py b/modules/nhv/layer/module.py
new file mode 100644
index 0000000000000000000000000000000000000000..2ea6bfb1f4ea64f87277367b34767e3c22c32621
--- /dev/null
+++ b/modules/nhv/layer/module.py
@@ -0,0 +1,209 @@
+#! /usr/bin/env python
+# -*- coding: utf-8 -*-
+# vim:fenc=utf-8
+#
+# Copyright (c) 2021 Kazuhiro KOBAYASHI
+#
+# Distributed under terms of the MIT license.
+
+"""
+
+"""
+
+import math
+
+import torch
+import torch.nn as nn
+import torch.nn.functional as F
+import torch.fft
+
+from .layer import Conv1d, ConvLayers
+
+
+class CCepLTVFilter(nn.Module):
+ def __init__(
+ self,
+ in_channels,
+ conv_channels=256,
+ ccep_size=222,
+ kernel_size=3,
+ dilation_size=1,
+ group_size=8,
+ fft_size=1024,
+ hop_size=256,
+ n_ltv_layers=3,
+ n_ltv_postfilter_layers=1,
+ use_causal=False,
+ conv_type="original",
+ feat2linear_fn=None,
+ ltv_postfilter_type="conv",
+ ltv_postfilter_kernel_size=128,
+ ):
+ super().__init__()
+ self.fft_size = fft_size
+ self.hop_size = hop_size
+ self.window_size = hop_size * 2
+ self.ccep_size = ccep_size
+ self.use_causal = use_causal
+ self.feat2linear_fn = feat2linear_fn
+ self.ltv_postfilter_type = ltv_postfilter_type
+ self.ltv_postfilter_kernel_size = ltv_postfilter_kernel_size
+ self.n_ltv_postfilter_layers = n_ltv_postfilter_layers
+
+ win_norm = self.window_size // (hop_size * 2) # only for hanning window
+ # periodic must be True to become OLA 1
+ win = torch.hann_window(self.window_size, periodic=True) / win_norm
+ self.conv = ConvLayers(
+ in_channels=in_channels,
+ conv_channels=conv_channels,
+ out_channels=ccep_size,
+ kernel_size=kernel_size,
+ dilation_size=dilation_size,
+ group_size=group_size,
+ n_conv_layers=n_ltv_layers,
+ use_causal=use_causal,
+ conv_type=conv_type,
+ )
+ self.ltv_postfilter_fn = self._get_ltv_postfilter_fn()
+
+ idx = torch.arange(1, ccep_size // 2 + 1).float()
+ quef_norm = torch.cat([torch.flip(idx, dims=[-1]), idx], dim=-1)
+ self.padding = (self.fft_size - self.ccep_size) // 2
+ self.register_buffer("quef_norm", quef_norm)
+ self.register_buffer("win", win)
+
+ def forward(self, x, z):
+ """
+ x: B, T, D
+ z: B, 1, T * hop_size
+ """
+ # inference complex cepstrum
+ ccep = self.conv(x) / self.quef_norm
+
+ # apply LTV filter and overlap
+ log_mag = None if self.feat2linear_fn is None else self.feat2linear_fn(x)
+ y = self._ccep2impulse(ccep, ref=log_mag)
+ z = self._conv_impulse(z, y)
+ z = self._ola(z)
+ if self.ltv_postfilter_fn is not None:
+ z = self.ltv_postfilter_fn(z.transpose(1, 2)).transpose(1, 2)
+ return z
+
+ def _apply_ref_mag(self, real, ref):
+ # TODO(k2kobayashi): it requires to consider following line.
+ # this mask eliminates very small amplitude values (-100).
+ # ref = ref * (ref > -100)
+ real[..., : self.fft_size // 2 + 1] += ref
+ real[..., self.fft_size // 2 :] += torch.flip(ref[..., 1:], dims=[-1])
+ return real
+
+ def _ccep2impulse(self, ccep, ref=None):
+ ccep = F.pad(ccep, (self.padding, self.padding))
+ y = torch.fft.fft(ccep, n=self.fft_size, dim=-1)
+ # NOTE(k2kobayashi): we assume intermediate log amplitude as 10log10|mag|
+ if ref is not None:
+ y.real = self._apply_ref_mag(y.real, ref)
+ # logarithmic to linear
+ mag, phase = torch.pow(10, y.real / 10), y.imag
+ real, imag = mag * torch.cos(phase), mag * torch.sin(phase)
+ y = torch.fft.ifft(torch.complex(real, imag), n=self.fft_size + 1, dim=-1)
+ return y.real
+
+ def _conv_impulse(self, z, y):
+ # (B, T * hop_size + hop_size)
+ # z = F.pad(z, (self.hop_size // 2, self.hop_size // 2)).squeeze(1)
+ z = F.pad(z, (self.hop_size, 0)).squeeze(1)
+ z = z.unfold(-1, self.window_size, step=self.hop_size) # (B, T, window_size)
+ z = F.pad(z, (self.fft_size // 2, self.fft_size // 2))
+ z = z.unfold(-1, self.fft_size + 1, step=1) # (B, T, window_size, fft_size + 1)
+ # y: (B, T, fft_size + 1) -> (B, T, fft_size + 1, 1)
+ # z: (B, T, window_size, fft_size + 1)
+ # output: (B, T, window_size)
+ output = torch.matmul(z, y.unsqueeze(-1)).squeeze(-1)
+ return output
+
+ def _conv_impulse_old(self, z, y):
+ z = F.pad(z, (self.window_size // 2 - 1, self.window_size // 2)).squeeze(1)
+ z = z.unfold(-1, self.window_size, step=self.hop_size) # (B, 1, T, window_size)
+
+ z = F.pad(z, (self.fft_size // 2 - 1, self.fft_size // 2))
+ z = z.unfold(-1, self.fft_size, step=1) # (B, 1, T, window_size, fft_size)
+
+ # z = matmul(z, y) -> (B, 1, T, window_size) where
+ # z: (B, 1, T, window_size, fft_size)
+ # y: (B, T, fft_size) -> (B, 1, T, fft_size, 1)
+ z = torch.matmul(z, y.unsqueeze(-1)).squeeze(-1)
+ return z
+
+ def _ola(self, z):
+ z = z * self.win
+ l, r = torch.chunk(z, 2, dim=-1) # (B, 1, T, window_size // 2)
+ z = l + torch.roll(r, 1, dims=-2) # roll a frame of right side
+ z = z.reshape(z.size(0), 1, -1)
+ return z
+
+ def _get_ltv_postfilter_fn(self):
+ if self.ltv_postfilter_type == "ddsconv":
+ fn = ConvLayers(
+ in_channels=1,
+ conv_channels=64,
+ out_channels=1,
+ kernel_size=5,
+ dilation_size=2,
+ n_conv_layers=self.n_ltv_postfilter_layers,
+ use_causal=self.use_causal,
+ conv_type="ddsconv",
+ )
+ elif self.ltv_postfilter_type == "conv":
+ fn = Conv1d(
+ in_channels=1,
+ out_channels=1,
+ kernel_size=self.ltv_postfilter_kernel_size,
+ use_causal=self.use_causal,
+ )
+ elif self.ltv_postfilter_type is None:
+ fn = None
+ else:
+ raise ValueError(f"Invalid ltv_postfilter_type: {self.ltv_postfilter_type}")
+ return fn
+
+
+class SinusoidsGenerator(nn.Module):
+ def __init__(
+ self,
+ hop_size,
+ fs=24000,
+ harmonic_amp=0.1,
+ n_harmonics=200,
+ use_uvmask=False,
+ ):
+ super().__init__()
+ self.fs = fs
+ self.harmonic_amp = harmonic_amp
+ self.upsample = nn.Upsample(scale_factor=hop_size, mode="linear")
+ self.use_uvmask = use_uvmask
+ self.n_harmonics = n_harmonics
+ harmonics = torch.arange(1, self.n_harmonics + 1).unsqueeze(-1)
+ self.register_buffer("harmonics", harmonics)
+
+ def forward(self, cf0):
+ f0 = self.upsample(cf0.transpose(1, 2))
+ uv = torch.zeros(f0.size()).to(f0.device)
+ nonzero_indices = torch.nonzero(f0, as_tuple=True)
+ uv[nonzero_indices] = 1.0
+ harmonic = self.generate_sinusoids(f0, uv).reshape(cf0.size(0), 1, -1)
+ return self.harmonic_amp * harmonic
+
+ def generate_sinusoids(self, f0, uv):
+ mask = self.anti_aliacing_mask(f0 * self.harmonics)
+ rads = f0.cumsum(dim=-1) * 2.0 * math.pi / self.fs * self.harmonics
+ harmonic = torch.sum(torch.cos(rads) * mask, dim=1, keepdim=True)
+ if self.use_uvmask:
+ harmonic = uv * harmonic
+ return harmonic
+
+ def anti_aliacing_mask(self, f0_with_harmonics, use_soft_mask=False):
+ if use_soft_mask:
+ return torch.sigmoid(-(f0_with_harmonics - self.fs / 2.0))
+ else:
+ return (f0_with_harmonics < self.fs / 2.0).float()
diff --git a/modules/nhv/layer/preprocess.py b/modules/nhv/layer/preprocess.py
new file mode 100644
index 0000000000000000000000000000000000000000..d8625a9b3e9dbcb27f50a3ec15886f11f2553d9a
--- /dev/null
+++ b/modules/nhv/layer/preprocess.py
@@ -0,0 +1,183 @@
+#! /usr/bin/env python
+# -*- coding: utf-8 -*-
+# vim:fenc=utf-8
+#
+# Copyright (c) 2021 Kazuhiro KOBAYASHI
+#
+# Distributed under terms of the MIT license.
+
+"""
+
+"""
+
+import librosa
+import numpy as np
+import torch
+import torch.nn as nn
+import torch.nn.functional as F
+
+
+class LogMelSpectrogram(nn.Module):
+ def __init__(
+ self,
+ fs=24000,
+ hop_size=128,
+ fft_size=1024,
+ win_length=None,
+ window="hann",
+ center=True,
+ pad_mode="reflect",
+ n_mels=80,
+ fmin=None,
+ fmax=None,
+ scaler_file=None,
+ ):
+ super().__init__()
+ self.mag_layer = Magnitude(fs, hop_size, fft_size, win_length, window)
+ self.mel_layer = Magnitude2LogMelSpectrogram(fs, fft_size, n_mels, fmin, fmax)
+ if scaler_file is not None:
+ self.melspc_scaler = LogMelSpectrogramScaler(scaler_file)
+ else:
+ self.melspc_scaler = None
+
+ def forward(self, x):
+ mag = self.mag_layer(x)
+ log_melspc = self.mel_layer(mag)
+ if self.melspc_scaler is not None:
+ log_melspc = self.scaler_layer(log_melspc)
+ return log_melspc
+
+
+class Magnitude(torch.nn.Module):
+ def __init__(
+ self,
+ fs=24000,
+ hop_size=128,
+ fft_size=1024,
+ win_length=None,
+ window="hann",
+ center=True,
+ pad_mode="reflect",
+ return_complex=True,
+ ):
+ super().__init__()
+ self.hop_size = hop_size
+ self.fft_size = fft_size
+ self.win_length = fft_size if win_length is None else win_length
+ self.window = window
+ self.center = center
+ self.pad_mode = pad_mode
+ self.return_complex = return_complex
+
+ def forward(self, x):
+ """
+ x: (B, 1, T)
+ ret: (B, T, fft_size // 2 + 1)
+ """
+ f = getattr(torch, f"{self.window}_window")
+ window = f(self.win_length, dtype=x.dtype, device=x.device)
+ y = torch.stft(
+ x,
+ n_fft=self.fft_size,
+ win_length=self.win_length,
+ hop_length=self.hop_size,
+ window=window,
+ center=self.center,
+ pad_mode=self.pad_mode,
+ return_complex=self.return_complex,
+ )
+ return y.abs().transpose(1, 2)
+
+
+class Magnitude2LogMelSpectrogram(torch.nn.Module):
+ def __init__(
+ self, fs=24000, fft_size=1024, n_mels=80, fmin=None, fmax=None, eps=1.0e-10
+ ):
+ super().__init__()
+ self.eps = eps
+ fmin = 0 if fmin is None else fmin
+ fmax = fs / 2 if fmax is None else fmax
+ mel_basis = librosa.filters.mel(
+ fs, fft_size, n_mels=n_mels, fmin=fmin, fmax=fmax
+ )
+ self.register_buffer("mel_basis", torch.from_numpy(mel_basis.T).float())
+
+ def forward(self, x):
+ melspc = torch.matmul(x, self.mel_basis)
+ log_melspc = torch.clamp(melspc, min=self.eps).log10()
+ return log_melspc
+
+
+class LogMelSpectrogram2LogMagnitude(nn.Module):
+ def __init__(
+ self,
+ fs,
+ fft_size,
+ n_mels=80,
+ fmin=None,
+ fmax=None,
+ eps=1.0e-10,
+ roll_size=24,
+ melspc_scaler_fn=None,
+ ):
+ super().__init__()
+ self.eps = eps
+ self.roll_size = roll_size
+ self.melspc_scaler_fn = melspc_scaler_fn
+ fmin = 0 if fmin is None else fmin
+ fmax = fs / 2 if fmax is None else fmax
+
+ mel_basis = librosa.filters.mel(
+ fs, fft_size, n_mels=n_mels, fmin=fmin, fmax=fmax
+ )
+ inv_mel_basis = np.linalg.pinv(mel_basis)
+ self.register_buffer("inv_mel_basis", torch.from_numpy(inv_mel_basis.T).float())
+
+ def forward(self, x):
+ if self.melspc_scaler_fn is not None:
+ # denorm mlfb
+ x = self.melspc_scaler_fn.inverse_transform(x)
+
+ x = torch.pow(10.0, x)
+ spc = torch.matmul(x, self.inv_mel_basis)
+ log_spc = 10 * torch.clamp(spc, min=self.eps).log10()
+ z = F.pad(log_spc, (self.roll_size // 2 - 1, self.roll_size // 2))
+ z = z.unfold(-1, self.roll_size, step=1)
+ log_spc = torch.median(z, dim=-1)[0]
+ return log_spc
+
+
+class CepstrumLiftering(nn.Module):
+ def __init__(self, lifter_size=None):
+ super().__init__()
+ if lifter_size <= 0:
+ raise ValueError("lifter_size must be > 0.")
+ else:
+ self.lifter_size = lifter_size
+
+ def forward(self, x):
+ cep = torch.fft.ifft(x, dim=-1)
+ cep[..., self.lifter_size : -self.lifter_size] = 0
+ x = torch.fft.fft(cep, dim=-1)
+ return x
+
+
+class LogMelSpectrogramScaler(nn.Module):
+ def __init__(self, scaler):
+ super().__init__()
+ self.register_parameter(
+ "mean",
+ nn.Parameter(torch.from_numpy(scaler.mean_).float(), requires_grad=False),
+ )
+ self.register_parameter(
+ "scale",
+ nn.Parameter(
+ torch.from_numpy(scaler.var_).float().sqrt(), requires_grad=False
+ ),
+ )
+
+ def forward(self, x):
+ return (x - self.mean) / self.scale
+
+ def inverse_transform(self, x):
+ return x * self.scale + self.mean
diff --git a/modules/upsampling.py b/modules/upsampling.py
new file mode 100644
index 0000000000000000000000000000000000000000..e9716185ecd84a9fea7abd04b9abffedd4794b84
--- /dev/null
+++ b/modules/upsampling.py
@@ -0,0 +1,90 @@
+import torch
+
+from modules.base import BaseModule
+from modules.linear_modulation import FeatureWiseAffine
+from modules.interpolation import InterpolationBlock
+from modules.layers import Conv1dWithInitialization
+
+
+class BasicModulationBlock(BaseModule):
+ """
+ Linear modulation part of UBlock, represented by sequence of the following layers:
+ - Feature-wise Affine
+ - LReLU
+ - 3x1 Conv
+ """
+ def __init__(self, n_channels, dilation):
+ super(BasicModulationBlock, self).__init__()
+ self.featurewise_affine = FeatureWiseAffine()
+ self.leaky_relu = torch.nn.LeakyReLU(0.2)
+ self.convolution = Conv1dWithInitialization(
+ in_channels=n_channels,
+ out_channels=n_channels,
+ kernel_size=3,
+ stride=1,
+ padding=dilation,
+ dilation=dilation
+ )
+
+ def forward(self, x, scale, shift):
+ outputs = self.featurewise_affine(x, scale, shift)
+ outputs = self.leaky_relu(outputs)
+ outputs = self.convolution(outputs)
+ return outputs
+
+
+class UpsamplingBlock(BaseModule):
+ def __init__(self, in_channels, out_channels, factor, dilations):
+ super(UpsamplingBlock, self).__init__()
+
+ self.first_block_main_branch = torch.nn.ModuleDict({
+ 'upsampling': torch.nn.Sequential(*[
+ torch.nn.LeakyReLU(0.2),
+ InterpolationBlock(
+ scale_factor=factor,
+ mode='linear',
+ align_corners=False
+ ),
+ Conv1dWithInitialization(
+ in_channels=in_channels,
+ out_channels=out_channels,
+ kernel_size=3,
+ stride=1,
+ padding=dilations[0],
+ dilation=dilations[0]
+ ),
+ torch.nn.LeakyReLU(0.2)
+ ]),
+ 'modulation': BasicModulationBlock(
+ out_channels, dilation=dilations[1]
+ )
+ })
+ self.first_block_residual_branch = torch.nn.Sequential(*[
+ InterpolationBlock(
+ scale_factor=factor,
+ mode='linear',
+ align_corners=False
+ ),
+ Conv1dWithInitialization(
+ in_channels=in_channels,
+ out_channels=out_channels,
+ kernel_size=1,
+ stride=1
+ )
+ ])
+ self.second_block_main_branch = torch.nn.ModuleDict({
+ f'modulation_{idx}': BasicModulationBlock(
+ out_channels, dilation=dilations[2 + idx]
+ ) for idx in range(2)
+ })
+
+ def forward(self, x, scale, shift):
+ # First upsampling residual block
+ outputs = self.first_block_main_branch['upsampling'](x)
+ outputs = self.first_block_main_branch['modulation'](outputs, scale, shift)
+ outputs = outputs + self.first_block_residual_branch(x)
+
+ # Second residual block
+ residual = self.second_block_main_branch['modulation_0'](outputs, scale, shift)
+ outputs = outputs + self.second_block_main_branch['modulation_1'](residual, scale, shift)
+ return outputs
diff --git a/modules/wavlm/WavLM.py b/modules/wavlm/WavLM.py
new file mode 100644
index 0000000000000000000000000000000000000000..644ab89af21cd90348391d5b09cc7c94ac0d5f6a
--- /dev/null
+++ b/modules/wavlm/WavLM.py
@@ -0,0 +1,743 @@
+# --------------------------------------------------------
+# WavLM: Large-Scale Self-Supervised Pre-training for Full Stack Speech Processing (https://arxiv.org/abs/2110.13900.pdf)
+# Github source: https://github.com/microsoft/unilm/tree/master/wavlm
+# Copyright (c) 2021 Microsoft
+# Licensed under The MIT License [see LICENSE for details]
+# Based on fairseq code bases
+# https://github.com/pytorch/fairseq
+# --------------------------------------------------------
+
+import math
+import logging
+from typing import List, Optional, Tuple
+
+import numpy as np
+
+import torch
+import torch.nn as nn
+import torch.nn.functional as F
+from torch.nn import LayerNorm
+from .modules import (
+ Fp32GroupNorm,
+ Fp32LayerNorm,
+ GradMultiply,
+ MultiheadAttention,
+ SamePad,
+ init_bert_params,
+ get_activation_fn,
+ TransposeLast,
+ GLU_Linear,
+)
+
+logger = logging.getLogger(__name__)
+
+
+def compute_mask_indices(
+ shape: Tuple[int, int],
+ padding_mask: Optional[torch.Tensor],
+ mask_prob: float,
+ mask_length: int,
+ mask_type: str = "static",
+ mask_other: float = 0.0,
+ min_masks: int = 0,
+ no_overlap: bool = False,
+ min_space: int = 0,
+) -> np.ndarray:
+ """
+ Computes random mask spans for a given shape
+
+ Args:
+ shape: the the shape for which to compute masks.
+ should be of size 2 where first element is batch size and 2nd is timesteps
+ padding_mask: optional padding mask of the same size as shape, which will prevent masking padded elements
+ mask_prob: probability for each token to be chosen as start of the span to be masked. this will be multiplied by
+ number of timesteps divided by length of mask span to mask approximately this percentage of all elements.
+ however due to overlaps, the actual number will be smaller (unless no_overlap is True)
+ mask_type: how to compute mask lengths
+ static = fixed size
+ uniform = sample from uniform distribution [mask_other, mask_length*2]
+ normal = sample from normal distribution with mean mask_length and stdev mask_other. mask is min 1 element
+ poisson = sample from possion distribution with lambda = mask length
+ min_masks: minimum number of masked spans
+ no_overlap: if false, will switch to an alternative recursive algorithm that prevents spans from overlapping
+ min_space: only used if no_overlap is True, this is how many elements to keep unmasked between spans
+ """
+
+ bsz, all_sz = shape
+ mask = np.full((bsz, all_sz), False)
+
+ all_num_mask = int(
+ # add a random number for probabilistic rounding
+ mask_prob * all_sz / float(mask_length)
+ + np.random.rand()
+ )
+
+ all_num_mask = max(min_masks, all_num_mask)
+
+ mask_idcs = []
+ for i in range(bsz):
+ if padding_mask is not None:
+ sz = all_sz - padding_mask[i].long().sum().item()
+ num_mask = int(
+ # add a random number for probabilistic rounding
+ mask_prob * sz / float(mask_length)
+ + np.random.rand()
+ )
+ num_mask = max(min_masks, num_mask)
+ else:
+ sz = all_sz
+ num_mask = all_num_mask
+
+ if mask_type == "static":
+ lengths = np.full(num_mask, mask_length)
+ elif mask_type == "uniform":
+ lengths = np.random.randint(mask_other, mask_length * 2 + 1, size=num_mask)
+ elif mask_type == "normal":
+ lengths = np.random.normal(mask_length, mask_other, size=num_mask)
+ lengths = [max(1, int(round(x))) for x in lengths]
+ elif mask_type == "poisson":
+ lengths = np.random.poisson(mask_length, size=num_mask)
+ lengths = [int(round(x)) for x in lengths]
+ else:
+ raise Exception("unknown mask selection " + mask_type)
+
+ if sum(lengths) == 0:
+ lengths[0] = min(mask_length, sz - 1)
+
+ if no_overlap:
+ mask_idc = []
+
+ def arrange(s, e, length, keep_length):
+ span_start = np.random.randint(s, e - length)
+ mask_idc.extend(span_start + i for i in range(length))
+
+ new_parts = []
+ if span_start - s - min_space >= keep_length:
+ new_parts.append((s, span_start - min_space + 1))
+ if e - span_start - keep_length - min_space > keep_length:
+ new_parts.append((span_start + length + min_space, e))
+ return new_parts
+
+ parts = [(0, sz)]
+ min_length = min(lengths)
+ for length in sorted(lengths, reverse=True):
+ lens = np.fromiter(
+ (e - s if e - s >= length + min_space else 0 for s, e in parts),
+ np.int,
+ )
+ l_sum = np.sum(lens)
+ if l_sum == 0:
+ break
+ probs = lens / np.sum(lens)
+ c = np.random.choice(len(parts), p=probs)
+ s, e = parts.pop(c)
+ parts.extend(arrange(s, e, length, min_length))
+ mask_idc = np.asarray(mask_idc)
+ else:
+ min_len = min(lengths)
+ if sz - min_len <= num_mask:
+ min_len = sz - num_mask - 1
+
+ mask_idc = np.random.choice(sz - min_len, num_mask, replace=False)
+
+ mask_idc = np.asarray(
+ [
+ mask_idc[j] + offset
+ for j in range(len(mask_idc))
+ for offset in range(lengths[j])
+ ]
+ )
+
+ mask_idcs.append(np.unique(mask_idc[mask_idc < sz]))
+
+ min_len = min([len(m) for m in mask_idcs])
+ for i, mask_idc in enumerate(mask_idcs):
+ if len(mask_idc) > min_len:
+ mask_idc = np.random.choice(mask_idc, min_len, replace=False)
+ mask[i, mask_idc] = True
+
+ return mask
+
+
+class WavLMConfig:
+ def __init__(self, cfg=None):
+ self.extractor_mode: str = "default" # mode for feature extractor. default has a single group norm with d groups in the first conv block, whereas layer_norm has layer norms in every block (meant to use with normalize=True)
+ self.encoder_layers: int = 12 # num encoder layers in the transformer
+
+ self.encoder_embed_dim: int = 768 # encoder embedding dimension
+ self.encoder_ffn_embed_dim: int = 3072 # encoder embedding dimension for FFN
+ self.encoder_attention_heads: int = 12 # num encoder attention heads
+ self.activation_fn: str = "gelu" # activation function to use
+
+ self.layer_norm_first: bool = False # apply layernorm first in the transformer
+ self.conv_feature_layers: str = "[(512,10,5)] + [(512,3,2)] * 4 + [(512,2,2)] * 2" # string describing convolutional feature extraction layers in form of a python list that contains [(dim, kernel_size, stride), ...]
+ self.conv_bias: bool = False # include bias in conv encoder
+ self.feature_grad_mult: float = 1.0 # multiply feature extractor var grads by this
+
+ self.normalize: bool = False # normalize input to have 0 mean and unit variance during training
+
+ # dropouts
+ self.dropout: float = 0.1 # dropout probability for the transformer
+ self.attention_dropout: float = 0.1 # dropout probability for attention weights
+ self.activation_dropout: float = 0.0 # dropout probability after activation in FFN
+ self.encoder_layerdrop: float = 0.0 # probability of dropping a tarnsformer layer
+ self.dropout_input: float = 0.0 # dropout to apply to the input (after feat extr)
+ self.dropout_features: float = 0.0 # dropout to apply to the features (after feat extr)
+
+ # masking
+ self.mask_length: int = 10 # mask length
+ self.mask_prob: float = 0.65 # probability of replacing a token with mask
+ self.mask_selection: str = "static" # how to choose mask length
+ self.mask_other: float = 0 # secondary mask argument (used for more complex distributions), see help in compute_mask_indicesh
+ self.no_mask_overlap: bool = False # whether to allow masks to overlap
+ self.mask_min_space: int = 1 # min space between spans (if no overlap is enabled)
+
+ # channel masking
+ self.mask_channel_length: int = 10 # length of the mask for features (channels)
+ self.mask_channel_prob: float = 0.0 # probability of replacing a feature with 0
+ self.mask_channel_selection: str = "static" # how to choose mask length for channel masking
+ self.mask_channel_other: float = 0 # secondary mask argument (used for more complex distributions), see help in compute_mask_indices
+ self.no_mask_channel_overlap: bool = False # whether to allow channel masks to overlap
+ self.mask_channel_min_space: int = 1 # min space between spans (if no overlap is enabled)
+
+ # positional embeddings
+ self.conv_pos: int = 128 # number of filters for convolutional positional embeddings
+ self.conv_pos_groups: int = 16 # number of groups for convolutional positional embedding
+
+ # relative position embedding
+ self.relative_position_embedding: bool = False # apply relative position embedding
+ self.num_buckets: int = 320 # number of buckets for relative position embedding
+ self.max_distance: int = 1280 # maximum distance for relative position embedding
+ self.gru_rel_pos: bool = False # apply gated relative position embedding
+
+ if cfg is not None:
+ self.update(cfg)
+
+ def update(self, cfg: dict):
+ self.__dict__.update(cfg)
+
+
+class WavLM(nn.Module):
+ def __init__(
+ self,
+ cfg: WavLMConfig,
+ ) -> None:
+ super().__init__()
+ logger.info(f"WavLM Config: {cfg.__dict__}")
+
+ self.cfg = cfg
+ feature_enc_layers = eval(cfg.conv_feature_layers)
+ self.embed = feature_enc_layers[-1][0]
+
+ self.feature_extractor = ConvFeatureExtractionModel(
+ conv_layers=feature_enc_layers,
+ dropout=0.0,
+ mode=cfg.extractor_mode,
+ conv_bias=cfg.conv_bias,
+ )
+
+ self.post_extract_proj = (
+ nn.Linear(self.embed, cfg.encoder_embed_dim)
+ if self.embed != cfg.encoder_embed_dim
+ else None
+ )
+
+ self.mask_prob = cfg.mask_prob
+ self.mask_selection = cfg.mask_selection
+ self.mask_other = cfg.mask_other
+ self.mask_length = cfg.mask_length
+ self.no_mask_overlap = cfg.no_mask_overlap
+ self.mask_min_space = cfg.mask_min_space
+
+ self.mask_channel_prob = cfg.mask_channel_prob
+ self.mask_channel_selection = cfg.mask_channel_selection
+ self.mask_channel_other = cfg.mask_channel_other
+ self.mask_channel_length = cfg.mask_channel_length
+ self.no_mask_channel_overlap = cfg.no_mask_channel_overlap
+ self.mask_channel_min_space = cfg.mask_channel_min_space
+
+ self.dropout_input = nn.Dropout(cfg.dropout_input)
+ self.dropout_features = nn.Dropout(cfg.dropout_features)
+
+ self.feature_grad_mult = cfg.feature_grad_mult
+
+ self.mask_emb = nn.Parameter(
+ torch.FloatTensor(cfg.encoder_embed_dim).uniform_()
+ )
+
+ self.encoder = TransformerEncoder(cfg)
+ self.layer_norm = LayerNorm(self.embed)
+
+ def apply_mask(self, x, padding_mask):
+ B, T, C = x.shape
+ if self.mask_prob > 0:
+ mask_indices = compute_mask_indices(
+ (B, T),
+ padding_mask,
+ self.mask_prob,
+ self.mask_length,
+ self.mask_selection,
+ self.mask_other,
+ min_masks=2,
+ no_overlap=self.no_mask_overlap,
+ min_space=self.mask_min_space,
+ )
+ mask_indices = torch.from_numpy(mask_indices).to(x.device)
+ x[mask_indices] = self.mask_emb
+ else:
+ mask_indices = None
+
+ if self.mask_channel_prob > 0:
+ mask_channel_indices = compute_mask_indices(
+ (B, C),
+ None,
+ self.mask_channel_prob,
+ self.mask_channel_length,
+ self.mask_channel_selection,
+ self.mask_channel_other,
+ no_overlap=self.no_mask_channel_overlap,
+ min_space=self.mask_channel_min_space,
+ )
+ mask_channel_indices = (
+ torch.from_numpy(mask_channel_indices)
+ .to(x.device)
+ .unsqueeze(1)
+ .expand(-1, T, -1)
+ )
+ x[mask_channel_indices] = 0
+
+ return x, mask_indices
+
+ def forward_padding_mask(
+ self, features: torch.Tensor, padding_mask: torch.Tensor,
+ ) -> torch.Tensor:
+ extra = padding_mask.size(1) % features.size(1)
+ if extra > 0:
+ padding_mask = padding_mask[:, :-extra]
+ padding_mask = padding_mask.view(
+ padding_mask.size(0), features.size(1), -1
+ )
+ padding_mask = padding_mask.all(-1)
+ return padding_mask
+
+ def extract_features(
+ self,
+ source: torch.Tensor,
+ padding_mask: Optional[torch.Tensor] = None,
+ mask: bool = False,
+ ret_conv: bool = False,
+ output_layer: Optional[int] = None,
+ ret_layer_results: bool = False,
+ ):
+
+ if self.feature_grad_mult > 0:
+ features = self.feature_extractor(source)
+ if self.feature_grad_mult != 1.0:
+ features = GradMultiply.apply(features, self.feature_grad_mult)
+ else:
+ with torch.no_grad():
+ features = self.feature_extractor(source)
+
+ features = features.transpose(1, 2)
+ features = self.layer_norm(features)
+
+ if padding_mask is not None:
+ padding_mask = self.forward_padding_mask(features, padding_mask)
+
+ if self.post_extract_proj is not None:
+ features = self.post_extract_proj(features)
+
+ features = self.dropout_input(features)
+
+ if mask:
+ x, mask_indices = self.apply_mask(
+ features, padding_mask
+ )
+ else:
+ x = features
+
+ # feature: (B, T, D), float
+ # target: (B, T), long
+ # x: (B, T, D), float
+ # padding_mask: (B, T), bool
+ # mask_indices: (B, T), bool
+ x, layer_results = self.encoder(
+ x,
+ padding_mask=padding_mask,
+ layer=None if output_layer is None else output_layer - 1
+ )
+
+ res = {"x": x, "padding_mask": padding_mask, "features": features, "layer_results": layer_results}
+
+ feature = res["features"] if ret_conv else res["x"]
+ if ret_layer_results:
+ feature = (feature, res["layer_results"])
+ return feature, res["padding_mask"]
+
+
+class ConvFeatureExtractionModel(nn.Module):
+ def __init__(
+ self,
+ conv_layers: List[Tuple[int, int, int]],
+ dropout: float = 0.0,
+ mode: str = "default",
+ conv_bias: bool = False,
+ conv_type: str = "default"
+ ):
+ super().__init__()
+
+ assert mode in {"default", "layer_norm"}
+
+ def block(
+ n_in,
+ n_out,
+ k,
+ stride,
+ is_layer_norm=False,
+ is_group_norm=False,
+ conv_bias=False,
+ ):
+ def make_conv():
+ conv = nn.Conv1d(n_in, n_out, k, stride=stride, bias=conv_bias)
+ nn.init.kaiming_normal_(conv.weight)
+ return conv
+
+ assert (
+ is_layer_norm and is_group_norm
+ ) == False, "layer norm and group norm are exclusive"
+
+ if is_layer_norm:
+ return nn.Sequential(
+ make_conv(),
+ nn.Dropout(p=dropout),
+ nn.Sequential(
+ TransposeLast(),
+ Fp32LayerNorm(dim, elementwise_affine=True),
+ TransposeLast(),
+ ),
+ nn.GELU(),
+ )
+ elif is_group_norm:
+ return nn.Sequential(
+ make_conv(),
+ nn.Dropout(p=dropout),
+ Fp32GroupNorm(dim, dim, affine=True),
+ nn.GELU(),
+ )
+ else:
+ return nn.Sequential(make_conv(), nn.Dropout(p=dropout), nn.GELU())
+
+ self.conv_type = conv_type
+ if self.conv_type == "default":
+ in_d = 1
+ self.conv_layers = nn.ModuleList()
+ for i, cl in enumerate(conv_layers):
+ assert len(cl) == 3, "invalid conv definition: " + str(cl)
+ (dim, k, stride) = cl
+
+ self.conv_layers.append(
+ block(
+ in_d,
+ dim,
+ k,
+ stride,
+ is_layer_norm=mode == "layer_norm",
+ is_group_norm=mode == "default" and i == 0,
+ conv_bias=conv_bias,
+ )
+ )
+ in_d = dim
+ elif self.conv_type == "conv2d":
+ in_d = 1
+ self.conv_layers = nn.ModuleList()
+ for i, cl in enumerate(conv_layers):
+ assert len(cl) == 3
+ (dim, k, stride) = cl
+
+ self.conv_layers.append(
+ torch.nn.Conv2d(in_d, dim, k, stride)
+ )
+ self.conv_layers.append(torch.nn.ReLU())
+ in_d = dim
+ elif self.conv_type == "custom":
+ in_d = 1
+ idim = 80
+ self.conv_layers = nn.ModuleList()
+ for i, cl in enumerate(conv_layers):
+ assert len(cl) == 3
+ (dim, k, stride) = cl
+ self.conv_layers.append(
+ torch.nn.Conv2d(in_d, dim, k, stride, padding=1)
+ )
+ self.conv_layers.append(
+ torch.nn.LayerNorm([dim, idim])
+ )
+ self.conv_layers.append(torch.nn.ReLU())
+ in_d = dim
+ if (i + 1) % 2 == 0:
+ self.conv_layers.append(
+ torch.nn.MaxPool2d(2, stride=2, ceil_mode=True)
+ )
+ idim = int(math.ceil(idim / 2))
+ else:
+ pass
+
+ def forward(self, x, mask=None):
+
+ # BxT -> BxCxT
+ x = x.unsqueeze(1)
+ if self.conv_type == "custom":
+ for conv in self.conv_layers:
+ if isinstance(conv, nn.LayerNorm):
+ x = x.transpose(1, 2)
+ x = conv(x).transpose(1, 2)
+ else:
+ x = conv(x)
+ x = x.transpose(2, 3).contiguous()
+ x = x.view(x.size(0), -1, x.size(-1))
+ else:
+ for conv in self.conv_layers:
+ x = conv(x)
+ if self.conv_type == "conv2d":
+ b, c, t, f = x.size()
+ x = x.transpose(2, 3).contiguous().view(b, c * f, t)
+ return x
+
+
+class TransformerEncoder(nn.Module):
+ def __init__(self, args):
+ super().__init__()
+
+ self.dropout = args.dropout
+ self.embedding_dim = args.encoder_embed_dim
+
+ self.pos_conv = nn.Conv1d(
+ self.embedding_dim,
+ self.embedding_dim,
+ kernel_size=args.conv_pos,
+ padding=args.conv_pos // 2,
+ groups=args.conv_pos_groups,
+ )
+ dropout = 0
+ std = math.sqrt((4 * (1.0 - dropout)) / (args.conv_pos * self.embedding_dim))
+ nn.init.normal_(self.pos_conv.weight, mean=0, std=std)
+ nn.init.constant_(self.pos_conv.bias, 0)
+
+ self.pos_conv = nn.utils.weight_norm(self.pos_conv, name="weight", dim=2)
+ self.pos_conv = nn.Sequential(self.pos_conv, SamePad(args.conv_pos), nn.GELU())
+
+ if hasattr(args, "relative_position_embedding"):
+ self.relative_position_embedding = args.relative_position_embedding
+ self.num_buckets = args.num_buckets
+ self.max_distance = args.max_distance
+ else:
+ self.relative_position_embedding = False
+ self.num_buckets = 0
+ self.max_distance = 0
+
+ self.layers = nn.ModuleList(
+ [
+ TransformerSentenceEncoderLayer(
+ embedding_dim=self.embedding_dim,
+ ffn_embedding_dim=args.encoder_ffn_embed_dim,
+ num_attention_heads=args.encoder_attention_heads,
+ dropout=self.dropout,
+ attention_dropout=args.attention_dropout,
+ activation_dropout=args.activation_dropout,
+ activation_fn=args.activation_fn,
+ layer_norm_first=args.layer_norm_first,
+ has_relative_attention_bias=(self.relative_position_embedding and i == 0),
+ num_buckets=self.num_buckets,
+ max_distance=self.max_distance,
+ gru_rel_pos=args.gru_rel_pos,
+ )
+ for i in range(args.encoder_layers)
+ ]
+ )
+
+ self.layer_norm_first = args.layer_norm_first
+ self.layer_norm = LayerNorm(self.embedding_dim)
+ self.layerdrop = args.encoder_layerdrop
+
+ self.apply(init_bert_params)
+
+ def forward(self, x, padding_mask=None, streaming_mask=None, layer=None):
+ x, layer_results = self.extract_features(x, padding_mask, streaming_mask, layer)
+
+ if self.layer_norm_first and layer is None:
+ x = self.layer_norm(x)
+
+ return x, layer_results
+
+ def extract_features(self, x, padding_mask=None, streaming_mask=None, tgt_layer=None):
+
+ if padding_mask is not None:
+ x[padding_mask] = 0
+
+ x_conv = self.pos_conv(x.transpose(1, 2))
+ x_conv = x_conv.transpose(1, 2)
+ x += x_conv
+
+ if not self.layer_norm_first:
+ x = self.layer_norm(x)
+
+ x = F.dropout(x, p=self.dropout, training=self.training)
+
+ # B x T x C -> T x B x C
+ x = x.transpose(0, 1)
+
+ layer_results = []
+ z = None
+ if tgt_layer is not None:
+ layer_results.append((x, z))
+ r = None
+ pos_bias = None
+ for i, layer in enumerate(self.layers):
+ dropout_probability = np.random.random()
+ if not self.training or (dropout_probability > self.layerdrop):
+ x, z, pos_bias = layer(x, self_attn_padding_mask=padding_mask, need_weights=False,
+ self_attn_mask=streaming_mask, pos_bias=pos_bias)
+ if tgt_layer is not None:
+ layer_results.append((x, z))
+ if i == tgt_layer:
+ r = x
+ break
+
+ if r is not None:
+ x = r
+
+ # T x B x C -> B x T x C
+ x = x.transpose(0, 1)
+
+ return x, layer_results
+
+
+class TransformerSentenceEncoderLayer(nn.Module):
+ """
+ Implements a Transformer Encoder Layer used in BERT/XLM style pre-trained
+ models.
+ """
+
+ def __init__(
+ self,
+ embedding_dim: float = 768,
+ ffn_embedding_dim: float = 3072,
+ num_attention_heads: float = 8,
+ dropout: float = 0.1,
+ attention_dropout: float = 0.1,
+ activation_dropout: float = 0.1,
+ activation_fn: str = "relu",
+ layer_norm_first: bool = False,
+ has_relative_attention_bias: bool = False,
+ num_buckets: int = 0,
+ max_distance: int = 0,
+ rescale_init: bool = False,
+ gru_rel_pos: bool = False,
+ ) -> None:
+
+ super().__init__()
+ # Initialize parameters
+ self.embedding_dim = embedding_dim
+ self.dropout = dropout
+ self.activation_dropout = activation_dropout
+
+ # Initialize blocks
+ self.activation_name = activation_fn
+ self.activation_fn = get_activation_fn(activation_fn)
+ self.self_attn = MultiheadAttention(
+ self.embedding_dim,
+ num_attention_heads,
+ dropout=attention_dropout,
+ self_attention=True,
+ has_relative_attention_bias=has_relative_attention_bias,
+ num_buckets=num_buckets,
+ max_distance=max_distance,
+ rescale_init=rescale_init,
+ gru_rel_pos=gru_rel_pos,
+ )
+
+ self.dropout1 = nn.Dropout(dropout)
+ self.dropout2 = nn.Dropout(self.activation_dropout)
+ self.dropout3 = nn.Dropout(dropout)
+
+ self.layer_norm_first = layer_norm_first
+
+ # layer norm associated with the self attention layer
+ self.self_attn_layer_norm = LayerNorm(self.embedding_dim)
+
+ if self.activation_name == "glu":
+ self.fc1 = GLU_Linear(self.embedding_dim, ffn_embedding_dim, "swish")
+ else:
+ self.fc1 = nn.Linear(self.embedding_dim, ffn_embedding_dim)
+ self.fc2 = nn.Linear(ffn_embedding_dim, self.embedding_dim)
+
+ # layer norm associated with the position wise feed-forward NN
+ self.final_layer_norm = LayerNorm(self.embedding_dim)
+
+ def forward(
+ self,
+ x: torch.Tensor,
+ self_attn_mask: torch.Tensor = None,
+ self_attn_padding_mask: torch.Tensor = None,
+ need_weights: bool = False,
+ pos_bias=None
+ ):
+ """
+ LayerNorm is applied either before or after the self-attention/ffn
+ modules similar to the original Transformer imlementation.
+ """
+ residual = x
+
+ if self.layer_norm_first:
+ x = self.self_attn_layer_norm(x)
+ x, attn, pos_bias = self.self_attn(
+ query=x,
+ key=x,
+ value=x,
+ key_padding_mask=self_attn_padding_mask,
+ need_weights=False,
+ attn_mask=self_attn_mask,
+ position_bias=pos_bias
+ )
+ x = self.dropout1(x)
+ x = residual + x
+
+ residual = x
+ x = self.final_layer_norm(x)
+ if self.activation_name == "glu":
+ x = self.fc1(x)
+ else:
+ x = self.activation_fn(self.fc1(x))
+ x = self.dropout2(x)
+ x = self.fc2(x)
+ x = self.dropout3(x)
+ x = residual + x
+ else:
+ x, attn, pos_bias = self.self_attn(
+ query=x,
+ key=x,
+ value=x,
+ key_padding_mask=self_attn_padding_mask,
+ need_weights=need_weights,
+ attn_mask=self_attn_mask,
+ position_bias=pos_bias
+ )
+
+ x = self.dropout1(x)
+ x = residual + x
+
+ x = self.self_attn_layer_norm(x)
+
+ residual = x
+ if self.activation_name == "glu":
+ x = self.fc1(x)
+ else:
+ x = self.activation_fn(self.fc1(x))
+ x = self.dropout2(x)
+ x = self.fc2(x)
+ x = self.dropout3(x)
+ x = residual + x
+ x = self.final_layer_norm(x)
+
+ return x, attn, pos_bias
+
diff --git a/modules/wavlm/modules.py b/modules/wavlm/modules.py
new file mode 100644
index 0000000000000000000000000000000000000000..1dcfc6f061cc189ca51fc90107116f38e2e48daf
--- /dev/null
+++ b/modules/wavlm/modules.py
@@ -0,0 +1,827 @@
+# --------------------------------------------------------
+# WavLM: Large-Scale Self-Supervised Pre-training for Full Stack Speech Processing (https://arxiv.org/abs/2110.13900.pdf)
+# Github source: https://github.com/microsoft/unilm/tree/master/wavlm
+# Copyright (c) 2021 Microsoft
+# Licensed under The MIT License [see LICENSE for details]
+# Based on fairseq code bases
+# https://github.com/pytorch/fairseq
+# --------------------------------------------------------
+
+import math
+import warnings
+from typing import Dict, Optional, Tuple
+import torch
+from torch import Tensor, nn
+from torch.nn import Parameter
+import torch.nn.functional as F
+
+
+class TransposeLast(nn.Module):
+ def __init__(self, deconstruct_idx=None):
+ super().__init__()
+ self.deconstruct_idx = deconstruct_idx
+
+ def forward(self, x):
+ if self.deconstruct_idx is not None:
+ x = x[self.deconstruct_idx]
+ return x.transpose(-2, -1)
+
+
+class Fp32LayerNorm(nn.LayerNorm):
+ def __init__(self, *args, **kwargs):
+ super().__init__(*args, **kwargs)
+
+ def forward(self, input):
+ output = F.layer_norm(
+ input.float(),
+ self.normalized_shape,
+ self.weight.float() if self.weight is not None else None,
+ self.bias.float() if self.bias is not None else None,
+ self.eps,
+ )
+ return output.type_as(input)
+
+
+class Fp32GroupNorm(nn.GroupNorm):
+ def __init__(self, *args, **kwargs):
+ super().__init__(*args, **kwargs)
+
+ def forward(self, input):
+ output = F.group_norm(
+ input.float(),
+ self.num_groups,
+ self.weight.float() if self.weight is not None else None,
+ self.bias.float() if self.bias is not None else None,
+ self.eps,
+ )
+ return output.type_as(input)
+
+
+class GradMultiply(torch.autograd.Function):
+ @staticmethod
+ def forward(ctx, x, scale):
+ ctx.scale = scale
+ res = x.new(x)
+ return res
+
+ @staticmethod
+ def backward(ctx, grad):
+ return grad * ctx.scale, None
+
+
+class SamePad(nn.Module):
+ def __init__(self, kernel_size, causal=False):
+ super().__init__()
+ if causal:
+ self.remove = kernel_size - 1
+ else:
+ self.remove = 1 if kernel_size % 2 == 0 else 0
+
+ def forward(self, x):
+ if self.remove > 0:
+ x = x[:, :, : -self.remove]
+ return x
+
+
+class Swish(nn.Module):
+ """Swish function
+ """
+
+ def __init__(self):
+ """Construct an MultiHeadedAttention object."""
+ super(Swish, self).__init__()
+ self.act = torch.nn.Sigmoid()
+
+ def forward(self, x):
+ return x * self.act(x)
+
+
+class GLU_Linear(nn.Module):
+ def __init__(self, input_dim, output_dim, glu_type="sigmoid", bias_in_glu=True):
+ super(GLU_Linear, self).__init__()
+
+ self.glu_type = glu_type
+ self.output_dim = output_dim
+
+ if glu_type == "sigmoid":
+ self.glu_act = torch.nn.Sigmoid()
+ elif glu_type == "swish":
+ self.glu_act = Swish()
+ elif glu_type == "relu":
+ self.glu_act = torch.nn.ReLU()
+ elif glu_type == "gelu":
+ self.glu_act = torch.nn.GELU()
+
+ if bias_in_glu:
+ self.linear = nn.Linear(input_dim, output_dim * 2, True)
+ else:
+ self.linear = nn.Linear(input_dim, output_dim * 2, False)
+
+ def forward(self, x):
+ # to be consistent with GLU_Linear, we assume the input always has the #channel (#dim) in the last dimension of the tensor, so need to switch the dimension first for 1D-Conv case
+ x = self.linear(x)
+
+ if self.glu_type == "bilinear":
+ x = (x[:, :, 0:self.output_dim] * x[:, :, self.output_dim:self.output_dim * 2])
+ else:
+ x = (x[:, :, 0:self.output_dim] * self.glu_act(x[:, :, self.output_dim:self.output_dim * 2]))
+
+ return x
+
+
+def gelu_accurate(x):
+ if not hasattr(gelu_accurate, "_a"):
+ gelu_accurate._a = math.sqrt(2 / math.pi)
+ return (
+ 0.5 * x * (1 + torch.tanh(gelu_accurate._a * (x + 0.044715 * torch.pow(x, 3))))
+ )
+
+
+def gelu(x: torch.Tensor) -> torch.Tensor:
+ return torch.nn.functional.gelu(x.float()).type_as(x)
+
+
+def get_activation_fn(activation: str):
+ """Returns the activation function corresponding to `activation`"""
+
+ if activation == "relu":
+ return F.relu
+ elif activation == "gelu":
+ return gelu
+ elif activation == "gelu_fast":
+ warnings.warn(
+ "--activation-fn=gelu_fast has been renamed to gelu_accurate"
+ )
+ return gelu_accurate
+ elif activation == "gelu_accurate":
+ return gelu_accurate
+ elif activation == "tanh":
+ return torch.tanh
+ elif activation == "linear":
+ return lambda x: x
+ elif activation == "glu":
+ return lambda x: x
+ else:
+ raise RuntimeError("--activation-fn {} not supported".format(activation))
+
+
+def init_bert_params(module):
+ """
+ Initialize the weights specific to the BERT Model.
+ This overrides the default initializations depending on the specified arguments.
+ 1. If normal_init_linear_weights is set then weights of linear
+ layer will be initialized using the normal distribution and
+ bais will be set to the specified value.
+ 2. If normal_init_embed_weights is set then weights of embedding
+ layer will be initialized using the normal distribution.
+ 3. If normal_init_proj_weights is set then weights of
+ in_project_weight for MultiHeadAttention initialized using
+ the normal distribution (to be validated).
+ """
+
+ def normal_(data):
+ # with FSDP, module params will be on CUDA, so we cast them back to CPU
+ # so that the RNG is consistent with and without FSDP
+ data.copy_(
+ data.cpu().normal_(mean=0.0, std=0.02).to(data.device)
+ )
+
+ if isinstance(module, nn.Linear):
+ normal_(module.weight.data)
+ if module.bias is not None:
+ module.bias.data.zero_()
+ if isinstance(module, nn.Embedding):
+ normal_(module.weight.data)
+ if module.padding_idx is not None:
+ module.weight.data[module.padding_idx].zero_()
+ if isinstance(module, MultiheadAttention):
+ normal_(module.q_proj.weight.data)
+ normal_(module.k_proj.weight.data)
+ normal_(module.v_proj.weight.data)
+
+
+def quant_noise(module, p, block_size):
+ """
+ Wraps modules and applies quantization noise to the weights for
+ subsequent quantization with Iterative Product Quantization as
+ described in "Training with Quantization Noise for Extreme Model Compression"
+
+ Args:
+ - module: nn.Module
+ - p: amount of Quantization Noise
+ - block_size: size of the blocks for subsequent quantization with iPQ
+
+ Remarks:
+ - Module weights must have the right sizes wrt the block size
+ - Only Linear, Embedding and Conv2d modules are supported for the moment
+ - For more detail on how to quantize by blocks with convolutional weights,
+ see "And the Bit Goes Down: Revisiting the Quantization of Neural Networks"
+ - We implement the simplest form of noise here as stated in the paper
+ which consists in randomly dropping blocks
+ """
+
+ # if no quantization noise, don't register hook
+ if p <= 0:
+ return module
+
+ # supported modules
+ assert isinstance(module, (nn.Linear, nn.Embedding, nn.Conv2d))
+
+ # test whether module.weight has the right sizes wrt block_size
+ is_conv = module.weight.ndim == 4
+
+ # 2D matrix
+ if not is_conv:
+ assert (
+ module.weight.size(1) % block_size == 0
+ ), "Input features must be a multiple of block sizes"
+
+ # 4D matrix
+ else:
+ # 1x1 convolutions
+ if module.kernel_size == (1, 1):
+ assert (
+ module.in_channels % block_size == 0
+ ), "Input channels must be a multiple of block sizes"
+ # regular convolutions
+ else:
+ k = module.kernel_size[0] * module.kernel_size[1]
+ assert k % block_size == 0, "Kernel size must be a multiple of block size"
+
+ def _forward_pre_hook(mod, input):
+ # no noise for evaluation
+ if mod.training:
+ if not is_conv:
+ # gather weight and sizes
+ weight = mod.weight
+ in_features = weight.size(1)
+ out_features = weight.size(0)
+
+ # split weight matrix into blocks and randomly drop selected blocks
+ mask = torch.zeros(
+ in_features // block_size * out_features, device=weight.device
+ )
+ mask.bernoulli_(p)
+ mask = mask.repeat_interleave(block_size, -1).view(-1, in_features)
+
+ else:
+ # gather weight and sizes
+ weight = mod.weight
+ in_channels = mod.in_channels
+ out_channels = mod.out_channels
+
+ # split weight matrix into blocks and randomly drop selected blocks
+ if mod.kernel_size == (1, 1):
+ mask = torch.zeros(
+ int(in_channels // block_size * out_channels),
+ device=weight.device,
+ )
+ mask.bernoulli_(p)
+ mask = mask.repeat_interleave(block_size, -1).view(-1, in_channels)
+ else:
+ mask = torch.zeros(
+ weight.size(0), weight.size(1), device=weight.device
+ )
+ mask.bernoulli_(p)
+ mask = (
+ mask.unsqueeze(2)
+ .unsqueeze(3)
+ .repeat(1, 1, mod.kernel_size[0], mod.kernel_size[1])
+ )
+
+ # scale weights and apply mask
+ mask = mask.to(
+ torch.bool
+ ) # x.bool() is not currently supported in TorchScript
+ s = 1 / (1 - p)
+ mod.weight.data = s * weight.masked_fill(mask, 0)
+
+ module.register_forward_pre_hook(_forward_pre_hook)
+ return module
+
+
+class MultiheadAttention(nn.Module):
+ """Multi-headed attention.
+
+ See "Attention Is All You Need" for more details.
+ """
+
+ def __init__(
+ self,
+ embed_dim,
+ num_heads,
+ kdim=None,
+ vdim=None,
+ dropout=0.0,
+ bias=True,
+ add_bias_kv=False,
+ add_zero_attn=False,
+ self_attention=False,
+ encoder_decoder_attention=False,
+ q_noise=0.0,
+ qn_block_size=8,
+ has_relative_attention_bias=False,
+ num_buckets=32,
+ max_distance=128,
+ gru_rel_pos=False,
+ rescale_init=False,
+ ):
+ super().__init__()
+ self.embed_dim = embed_dim
+ self.kdim = kdim if kdim is not None else embed_dim
+ self.vdim = vdim if vdim is not None else embed_dim
+ self.qkv_same_dim = self.kdim == embed_dim and self.vdim == embed_dim
+
+ self.num_heads = num_heads
+ self.dropout_module = nn.Dropout(dropout)
+
+ self.has_relative_attention_bias = has_relative_attention_bias
+ self.num_buckets = num_buckets
+ self.max_distance = max_distance
+ if self.has_relative_attention_bias:
+ self.relative_attention_bias = nn.Embedding(num_buckets, num_heads)
+
+ self.head_dim = embed_dim // num_heads
+ self.q_head_dim = self.head_dim
+ self.k_head_dim = self.head_dim
+ assert (
+ self.head_dim * num_heads == self.embed_dim
+ ), "embed_dim must be divisible by num_heads"
+ self.scaling = self.head_dim ** -0.5
+
+ self.self_attention = self_attention
+ self.encoder_decoder_attention = encoder_decoder_attention
+
+ assert not self.self_attention or self.qkv_same_dim, (
+ "Self-attention requires query, key and " "value to be of the same size"
+ )
+
+ k_bias = True
+ if rescale_init:
+ k_bias = False
+
+ k_embed_dim = embed_dim
+ q_embed_dim = embed_dim
+
+ self.k_proj = quant_noise(
+ nn.Linear(self.kdim, k_embed_dim, bias=k_bias), q_noise, qn_block_size
+ )
+ self.v_proj = quant_noise(
+ nn.Linear(self.vdim, embed_dim, bias=bias), q_noise, qn_block_size
+ )
+ self.q_proj = quant_noise(
+ nn.Linear(embed_dim, q_embed_dim, bias=bias), q_noise, qn_block_size
+ )
+
+ self.out_proj = quant_noise(
+ nn.Linear(embed_dim, embed_dim, bias=bias), q_noise, qn_block_size
+ )
+
+ if add_bias_kv:
+ self.bias_k = Parameter(torch.Tensor(1, 1, embed_dim))
+ self.bias_v = Parameter(torch.Tensor(1, 1, embed_dim))
+ else:
+ self.bias_k = self.bias_v = None
+
+ self.add_zero_attn = add_zero_attn
+
+ self.gru_rel_pos = gru_rel_pos
+ if self.gru_rel_pos:
+ self.grep_linear = nn.Linear(self.q_head_dim, 8)
+ self.grep_a = nn.Parameter(torch.ones(1, num_heads, 1, 1))
+
+ self.reset_parameters()
+
+ def reset_parameters(self):
+ if self.qkv_same_dim:
+ # Empirically observed the convergence to be much better with
+ # the scaled initialization
+ nn.init.xavier_uniform_(self.k_proj.weight, gain=1 / math.sqrt(2))
+ nn.init.xavier_uniform_(self.v_proj.weight, gain=1 / math.sqrt(2))
+ nn.init.xavier_uniform_(self.q_proj.weight, gain=1 / math.sqrt(2))
+ else:
+ nn.init.xavier_uniform_(self.k_proj.weight)
+ nn.init.xavier_uniform_(self.v_proj.weight)
+ nn.init.xavier_uniform_(self.q_proj.weight)
+
+ nn.init.xavier_uniform_(self.out_proj.weight)
+ if self.out_proj.bias is not None:
+ nn.init.constant_(self.out_proj.bias, 0.0)
+ if self.bias_k is not None:
+ nn.init.xavier_normal_(self.bias_k)
+ if self.bias_v is not None:
+ nn.init.xavier_normal_(self.bias_v)
+ if self.has_relative_attention_bias:
+ nn.init.xavier_normal_(self.relative_attention_bias.weight)
+
+ def _relative_positions_bucket(self, relative_positions, bidirectional=True):
+ num_buckets = self.num_buckets
+ max_distance = self.max_distance
+ relative_buckets = 0
+
+ if bidirectional:
+ num_buckets = num_buckets // 2
+ relative_buckets += (relative_positions > 0).to(torch.long) * num_buckets
+ relative_positions = torch.abs(relative_positions)
+ else:
+ relative_positions = -torch.min(relative_positions, torch.zeros_like(relative_positions))
+
+ max_exact = num_buckets // 2
+ is_small = relative_positions < max_exact
+
+ relative_postion_if_large = max_exact + (
+ torch.log(relative_positions.float() / max_exact)
+ / math.log(max_distance / max_exact)
+ * (num_buckets - max_exact)
+ ).to(torch.long)
+ relative_postion_if_large = torch.min(
+ relative_postion_if_large, torch.full_like(relative_postion_if_large, num_buckets - 1)
+ )
+
+ relative_buckets += torch.where(is_small, relative_positions, relative_postion_if_large)
+ return relative_buckets
+
+ def compute_bias(self, query_length, key_length):
+ context_position = torch.arange(query_length, dtype=torch.long)[:, None]
+ memory_position = torch.arange(key_length, dtype=torch.long)[None, :]
+ relative_position = memory_position - context_position
+ relative_position_bucket = self._relative_positions_bucket(
+ relative_position,
+ bidirectional=True
+ )
+ relative_position_bucket = relative_position_bucket.to(self.relative_attention_bias.weight.device)
+ values = self.relative_attention_bias(relative_position_bucket)
+ values = values.permute([2, 0, 1])
+ return values
+
+ def forward(
+ self,
+ query,
+ key: Optional[Tensor],
+ value: Optional[Tensor],
+ key_padding_mask: Optional[Tensor] = None,
+ incremental_state: Optional[Dict[str, Dict[str, Optional[Tensor]]]] = None,
+ need_weights: bool = True,
+ static_kv: bool = False,
+ attn_mask: Optional[Tensor] = None,
+ before_softmax: bool = False,
+ need_head_weights: bool = False,
+ position_bias: Optional[Tensor] = None
+ ) -> Tuple[Tensor, Optional[Tensor], Optional[Tensor]]:
+ """Input shape: Time x Batch x Channel
+
+ Args:
+ key_padding_mask (ByteTensor, optional): mask to exclude
+ keys that are pads, of shape `(batch, src_len)`, where
+ padding elements are indicated by 1s.
+ need_weights (bool, optional): return the attention weights,
+ averaged over heads (default: False).
+ attn_mask (ByteTensor, optional): typically used to
+ implement causal attention, where the mask prevents the
+ attention from looking forward in time (default: None).
+ before_softmax (bool, optional): return the raw attention
+ weights and values before the attention softmax.
+ need_head_weights (bool, optional): return the attention
+ weights for each head. Implies *need_weights*. Default:
+ return the average attention weights over all heads.
+ """
+ if need_head_weights:
+ need_weights = True
+
+ is_tpu = query.device.type == "xla"
+
+ tgt_len, bsz, embed_dim = query.size()
+ src_len = tgt_len
+ assert embed_dim == self.embed_dim
+ assert list(query.size()) == [tgt_len, bsz, embed_dim]
+ if key is not None:
+ src_len, key_bsz, _ = key.size()
+ if not torch.jit.is_scripting():
+ assert key_bsz == bsz
+ assert value is not None
+ assert src_len, bsz == value.shape[:2]
+
+ if self.has_relative_attention_bias and position_bias is None:
+ position_bias = self.compute_bias(tgt_len, src_len)
+ position_bias = position_bias.unsqueeze(0).repeat(bsz, 1, 1, 1).view(bsz * self.num_heads, tgt_len, src_len)
+
+ if (
+ not is_tpu # don't use PyTorch version on TPUs
+ and incremental_state is None
+ and not static_kv
+ # A workaround for quantization to work. Otherwise JIT compilation
+ # treats bias in linear module as method.
+ and not torch.jit.is_scripting()
+ and self.q_head_dim == self.head_dim
+ ):
+ assert key is not None and value is not None
+ assert attn_mask is None
+
+ attn_mask_rel_pos = None
+ if position_bias is not None:
+ attn_mask_rel_pos = position_bias
+ if self.gru_rel_pos:
+ query_layer = query.transpose(0, 1)
+ new_x_shape = query_layer.size()[:-1] + (self.num_heads, -1)
+ query_layer = query_layer.view(*new_x_shape)
+ query_layer = query_layer.permute(0, 2, 1, 3)
+ _B, _H, _L, __ = query_layer.size()
+
+ gate_a, gate_b = torch.sigmoid(self.grep_linear(query_layer).view(
+ _B, _H, _L, 2, 4).sum(-1, keepdim=False)).chunk(2, dim=-1)
+ gate_a_1 = gate_a * (gate_b * self.grep_a - 1.0) + 2.0
+ attn_mask_rel_pos = gate_a_1.view(bsz * self.num_heads, -1, 1) * position_bias
+
+ attn_mask_rel_pos = attn_mask_rel_pos.view((-1, tgt_len, tgt_len))
+ k_proj_bias = self.k_proj.bias
+ if k_proj_bias is None:
+ k_proj_bias = torch.zeros_like(self.q_proj.bias)
+
+ x, attn = F.multi_head_attention_forward(
+ query,
+ key,
+ value,
+ self.embed_dim,
+ self.num_heads,
+ torch.empty([0]),
+ torch.cat((self.q_proj.bias, self.k_proj.bias, self.v_proj.bias)),
+ self.bias_k,
+ self.bias_v,
+ self.add_zero_attn,
+ self.dropout_module.p,
+ self.out_proj.weight,
+ self.out_proj.bias,
+ self.training,
+ # self.training or self.dropout_module.apply_during_inference,
+ key_padding_mask,
+ need_weights,
+ attn_mask_rel_pos,
+ use_separate_proj_weight=True,
+ q_proj_weight=self.q_proj.weight,
+ k_proj_weight=self.k_proj.weight,
+ v_proj_weight=self.v_proj.weight,
+ )
+ return x, attn, position_bias
+
+ if incremental_state is not None:
+ saved_state = self._get_input_buffer(incremental_state)
+ if saved_state is not None and "prev_key" in saved_state:
+ # previous time steps are cached - no need to recompute
+ # key and value if they are static
+ if static_kv:
+ assert self.encoder_decoder_attention and not self.self_attention
+ key = value = None
+ else:
+ saved_state = None
+
+ if self.self_attention:
+ q = self.q_proj(query)
+ k = self.k_proj(query)
+ v = self.v_proj(query)
+ elif self.encoder_decoder_attention:
+ # encoder-decoder attention
+ q = self.q_proj(query)
+ if key is None:
+ assert value is None
+ k = v = None
+ else:
+ k = self.k_proj(key)
+ v = self.v_proj(key)
+
+ else:
+ assert key is not None and value is not None
+ q = self.q_proj(query)
+ k = self.k_proj(key)
+ v = self.v_proj(value)
+ q *= self.scaling
+
+ if self.bias_k is not None:
+ assert self.bias_v is not None
+ k = torch.cat([k, self.bias_k.repeat(1, bsz, 1)])
+ v = torch.cat([v, self.bias_v.repeat(1, bsz, 1)])
+ if attn_mask is not None:
+ attn_mask = torch.cat(
+ [attn_mask, attn_mask.new_zeros(attn_mask.size(0), 1)], dim=1
+ )
+ if key_padding_mask is not None:
+ key_padding_mask = torch.cat(
+ [
+ key_padding_mask,
+ key_padding_mask.new_zeros(key_padding_mask.size(0), 1),
+ ],
+ dim=1,
+ )
+
+ q = (
+ q.contiguous()
+ .view(tgt_len, bsz * self.num_heads, self.q_head_dim)
+ .transpose(0, 1)
+ )
+ if k is not None:
+ k = (
+ k.contiguous()
+ .view(-1, bsz * self.num_heads, self.k_head_dim)
+ .transpose(0, 1)
+ )
+ if v is not None:
+ v = (
+ v.contiguous()
+ .view(-1, bsz * self.num_heads, self.head_dim)
+ .transpose(0, 1)
+ )
+
+ if saved_state is not None:
+ # saved states are stored with shape (bsz, num_heads, seq_len, head_dim)
+ if "prev_key" in saved_state:
+ _prev_key = saved_state["prev_key"]
+ assert _prev_key is not None
+ prev_key = _prev_key.view(bsz * self.num_heads, -1, self.head_dim)
+ if static_kv:
+ k = prev_key
+ else:
+ assert k is not None
+ k = torch.cat([prev_key, k], dim=1)
+ src_len = k.size(1)
+ if "prev_value" in saved_state:
+ _prev_value = saved_state["prev_value"]
+ assert _prev_value is not None
+ prev_value = _prev_value.view(bsz * self.num_heads, -1, self.head_dim)
+ if static_kv:
+ v = prev_value
+ else:
+ assert v is not None
+ v = torch.cat([prev_value, v], dim=1)
+ prev_key_padding_mask: Optional[Tensor] = None
+ if "prev_key_padding_mask" in saved_state:
+ prev_key_padding_mask = saved_state["prev_key_padding_mask"]
+ assert k is not None and v is not None
+ key_padding_mask = MultiheadAttention._append_prev_key_padding_mask(
+ key_padding_mask=key_padding_mask,
+ prev_key_padding_mask=prev_key_padding_mask,
+ batch_size=bsz,
+ src_len=k.size(1),
+ static_kv=static_kv,
+ )
+
+ saved_state["prev_key"] = k.view(bsz, self.num_heads, -1, self.head_dim)
+ saved_state["prev_value"] = v.view(bsz, self.num_heads, -1, self.head_dim)
+ saved_state["prev_key_padding_mask"] = key_padding_mask
+ # In this branch incremental_state is never None
+ assert incremental_state is not None
+ incremental_state = self._set_input_buffer(incremental_state, saved_state)
+ assert k is not None
+ assert k.size(1) == src_len
+
+ # This is part of a workaround to get around fork/join parallelism
+ # not supporting Optional types.
+ if key_padding_mask is not None and key_padding_mask.dim() == 0:
+ key_padding_mask = None
+
+ if key_padding_mask is not None:
+ assert key_padding_mask.size(0) == bsz
+ assert key_padding_mask.size(1) == src_len
+
+ if self.add_zero_attn:
+ assert v is not None
+ src_len += 1
+ k = torch.cat([k, k.new_zeros((k.size(0), 1) + k.size()[2:])], dim=1)
+ v = torch.cat([v, v.new_zeros((v.size(0), 1) + v.size()[2:])], dim=1)
+ if attn_mask is not None:
+ attn_mask = torch.cat(
+ [attn_mask, attn_mask.new_zeros(attn_mask.size(0), 1)], dim=1
+ )
+ if key_padding_mask is not None:
+ key_padding_mask = torch.cat(
+ [
+ key_padding_mask,
+ torch.zeros(key_padding_mask.size(0), 1).type_as(
+ key_padding_mask
+ ),
+ ],
+ dim=1,
+ )
+
+ attn_weights = torch.bmm(q, k.transpose(1, 2))
+ attn_weights = self.apply_sparse_mask(attn_weights, tgt_len, src_len, bsz)
+
+ assert list(attn_weights.size()) == [bsz * self.num_heads, tgt_len, src_len]
+
+ if attn_mask is not None:
+ attn_mask = attn_mask.unsqueeze(0)
+ attn_weights += attn_mask
+
+ if key_padding_mask is not None:
+ # don't attend to padding symbols
+ attn_weights = attn_weights.view(bsz, self.num_heads, tgt_len, src_len)
+ if not is_tpu:
+ attn_weights = attn_weights.masked_fill(
+ key_padding_mask.unsqueeze(1).unsqueeze(2).to(torch.bool),
+ float("-inf"),
+ )
+ else:
+ attn_weights = attn_weights.transpose(0, 2)
+ attn_weights = attn_weights.masked_fill(key_padding_mask, float("-inf"))
+ attn_weights = attn_weights.transpose(0, 2)
+ attn_weights = attn_weights.view(bsz * self.num_heads, tgt_len, src_len)
+
+ if before_softmax:
+ return attn_weights, v, position_bias
+
+ if position_bias is not None:
+ if self.gru_rel_pos == 1:
+ query_layer = q.view(bsz, self.num_heads, tgt_len, self.q_head_dim)
+ _B, _H, _L, __ = query_layer.size()
+ gate_a, gate_b = torch.sigmoid(self.grep_linear(query_layer).view(
+ _B, _H, _L, 2, 4).sum(-1, keepdim=False)).chunk(2, dim=-1)
+ gate_a_1 = gate_a * (gate_b * self.grep_a - 1.0) + 2.0
+ position_bias = gate_a_1.view(bsz * self.num_heads, -1, 1) * position_bias
+
+ position_bias = position_bias.view(attn_weights.size())
+
+ attn_weights = attn_weights + position_bias
+
+ attn_weights_float = F.softmax(
+ attn_weights, dim=-1
+ )
+ attn_weights = attn_weights_float.type_as(attn_weights)
+ attn_probs = self.dropout_module(attn_weights)
+
+ assert v is not None
+ attn = torch.bmm(attn_probs, v)
+ assert list(attn.size()) == [bsz * self.num_heads, tgt_len, self.head_dim]
+ attn = attn.transpose(0, 1).contiguous().view(tgt_len, bsz, embed_dim)
+ attn = self.out_proj(attn)
+ attn_weights: Optional[Tensor] = None
+ if need_weights:
+ attn_weights = attn_weights_float.view(
+ bsz, self.num_heads, tgt_len, src_len
+ ).transpose(1, 0)
+ if not need_head_weights:
+ # average attention weights over heads
+ attn_weights = attn_weights.mean(dim=0)
+
+ return attn, attn_weights, position_bias
+
+ @staticmethod
+ def _append_prev_key_padding_mask(
+ key_padding_mask: Optional[Tensor],
+ prev_key_padding_mask: Optional[Tensor],
+ batch_size: int,
+ src_len: int,
+ static_kv: bool,
+ ) -> Optional[Tensor]:
+ # saved key padding masks have shape (bsz, seq_len)
+ if prev_key_padding_mask is not None and static_kv:
+ new_key_padding_mask = prev_key_padding_mask
+ elif prev_key_padding_mask is not None and key_padding_mask is not None:
+ new_key_padding_mask = torch.cat(
+ [prev_key_padding_mask.float(), key_padding_mask.float()], dim=1
+ )
+ # During incremental decoding, as the padding token enters and
+ # leaves the frame, there will be a time when prev or current
+ # is None
+ elif prev_key_padding_mask is not None:
+ if src_len > prev_key_padding_mask.size(1):
+ filler = torch.zeros(
+ (batch_size, src_len - prev_key_padding_mask.size(1)),
+ device=prev_key_padding_mask.device,
+ )
+ new_key_padding_mask = torch.cat(
+ [prev_key_padding_mask.float(), filler.float()], dim=1
+ )
+ else:
+ new_key_padding_mask = prev_key_padding_mask.float()
+ elif key_padding_mask is not None:
+ if src_len > key_padding_mask.size(1):
+ filler = torch.zeros(
+ (batch_size, src_len - key_padding_mask.size(1)),
+ device=key_padding_mask.device,
+ )
+ new_key_padding_mask = torch.cat(
+ [filler.float(), key_padding_mask.float()], dim=1
+ )
+ else:
+ new_key_padding_mask = key_padding_mask.float()
+ else:
+ new_key_padding_mask = prev_key_padding_mask
+ return new_key_padding_mask
+
+ def _get_input_buffer(
+ self, incremental_state: Optional[Dict[str, Dict[str, Optional[Tensor]]]]
+ ) -> Dict[str, Optional[Tensor]]:
+ result = self.get_incremental_state(incremental_state, "attn_state")
+ if result is not None:
+ return result
+ else:
+ empty_result: Dict[str, Optional[Tensor]] = {}
+ return empty_result
+
+ def _set_input_buffer(
+ self,
+ incremental_state: Dict[str, Dict[str, Optional[Tensor]]],
+ buffer: Dict[str, Optional[Tensor]],
+ ):
+ return self.set_incremental_state(incremental_state, "attn_state", buffer)
+
+ def apply_sparse_mask(self, attn_weights, tgt_len: int, src_len: int, bsz: int):
+ return attn_weights
diff --git a/modules/wavlm_encoder.py b/modules/wavlm_encoder.py
new file mode 100644
index 0000000000000000000000000000000000000000..891244e39f1ca22ce058fe5496fe67ae66669781
--- /dev/null
+++ b/modules/wavlm_encoder.py
@@ -0,0 +1,99 @@
+import resampy
+from pathlib import Path
+
+import torch
+import torch.nn as nn
+import torchaudio
+import torchaudio.transforms as T
+from torch import Tensor
+from torchaudio.sox_effects import apply_effects_tensor
+
+from modules.wavlm.WavLM import WavLM, WavLMConfig
+
+
+class WavLMEncoder(nn.Module):
+
+ def __init__(self,
+ ckpt_path,
+ device='cpu'
+ ):
+ """
+ Load the WavLM large checkpoint from the original paper. See https://github.com/microsoft/unilm/tree/master/wavlm for details.
+
+ Args:
+ ckpt_path : checkpoint path of WavLM.
+
+ """
+ super().__init__()
+ wavlm_check_point = torch.load(ckpt_path)
+ cfg = WavLMConfig(wavlm_check_point['cfg'])
+ wavlm = WavLM(cfg)
+ wavlm.load_state_dict(wavlm_check_point['model'])
+ wavlm = wavlm.to(device)
+
+ # store wavlm
+ self.wavlm = wavlm.eval()
+ self.device = torch.device(device)
+ self.sr = 16000
+
+ @torch.inference_mode()
+ def get_features(self, path, output_layer=None, weights=None, vad_trigger_level=0):
+ """
+ Returns the features of the waveform at `path` as a tensor of shape (seq_len, dim).
+ Optionally, performs Voice Activity Detection (VAD) trimming on the start and end of the waveform
+ using the `vad_trigger_level`.
+
+ If the `output_layer` is specified, the result of the corresponding layer is returned.
+ If the `weights` are specified, the weighted result of the corresponding layers is returned.
+ If neither `output_layer` nor `weights` are specified, the result of all layers is returned.
+
+ Args:
+ path (str or torch.Tensor): Path to the audio waveform file or a tensor representing the waveform.
+ output_layer (int, optional): Index of the layer to extract the features from. Defaults to None.
+ weights (torch.Tensor, optional): Weights to apply to the features of each layer. Defaults to None.
+ vad_trigger_level (float, optional): VAD trigger level for trimming silence. Defaults to 0.
+
+ Returns:
+ torch.Tensor: Extracted WavLM features of the waveform.
+
+ """
+ # load audio
+ if type(path) in [str, Path]:
+ x, sr = torchaudio.load(path, normalize=True)
+ if sr != self.sr:
+ print(f'Original audio sr is {sr}, change it to {self.sr}.')
+ x = resampy.resample(x.numpy(), sr, self.sr, axis=1)
+ x = torch.from_numpy(x).to(dtype=torch.float)
+ sr = self.sr
+ else:
+ x: Tensor = path
+ sr = self.sr
+ if x.dim() == 1: x = x[None]
+ assert sr == self.sr, f"input audio sample rate must be 16kHz. Got {sr}"
+
+ # trim silence from front and back
+ if vad_trigger_level > 1e-3:
+ transform = T.Vad(sample_rate=sr, trigger_level=vad_trigger_level)
+ x_front_trim = transform(x)
+ waveform_reversed, sr = apply_effects_tensor(x_front_trim, sr, [["reverse"]])
+ waveform_reversed_front_trim = transform(waveform_reversed)
+ waveform_end_trim, sr = apply_effects_tensor(
+ waveform_reversed_front_trim, sr, [["reverse"]]
+ )
+ x = waveform_end_trim
+
+ # extract the representation of each layer
+ wav_input_16khz = x.to(self.device)
+ if output_layer is not None:
+ # use fastpath
+ features = self.wavlm.extract_features(wav_input_16khz, output_layer=output_layer, ret_layer_results=False)[0]
+ features = torch.squeeze(features)
+ else:
+ # use slower weighted
+ rep, layer_results = self.wavlm.extract_features(wav_input_16khz, output_layer=self.wavlm.cfg.encoder_layers, ret_layer_results=True)[0]
+ features = torch.cat([x.transpose(0, 1) for x, _ in layer_results], dim=0) # (n_layers, seq_len, dim)
+ # save full sequence
+ if weights is not None:
+ features = (features*weights[:, None] ).sum(dim=0) # (1, seq_len, dim)
+
+ return features
\ No newline at end of file
diff --git a/optimizers/scheduler.py b/optimizers/scheduler.py
new file mode 100644
index 0000000000000000000000000000000000000000..59e12050d4269feea4d560b8e0df482c05748908
--- /dev/null
+++ b/optimizers/scheduler.py
@@ -0,0 +1,22 @@
+import torch.optim as optim
+import warnings
+
+class StepLRScheduler(optim.lr_scheduler._LRScheduler):
+ def __init__(self, optimizer, step_size, gamma=0.1, last_epoch=-1, verbose=False):
+ self.step_size = step_size
+ self.gamma = gamma
+ super(StepLRScheduler, self).__init__(optimizer, last_epoch, verbose)
+
+ def get_lr(self):
+ if not self._get_lr_called_within_step:
+ warnings.warn("To get the last learning rate computed by the scheduler, "
+ "please use `get_last_lr()`.", UserWarning)
+
+ if (self.last_epoch == 0) or (self.last_epoch % self.step_size != 0):
+ return [group['lr'] for group in self.optimizer.param_groups]
+ return [group['lr'] * self.gamma
+ for group in self.optimizer.param_groups]
+
+ def _get_closed_form_lr(self):
+ return [base_lr * self.gamma ** (self.last_epoch // self.step_size)
+ for base_lr in self.base_lrs]
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000000000000000000000000000000000000..90df4b39ef2c2d28998813f9489191562d0895d3
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,11 @@
+librosa==0.9.1
+matplotlib==3.8.2
+numpy==1.23.5
+pandas==2.1.4
+praat-parselmouth==0.4.3
+resampy==0.4.2
+soundfile==0.12.1
+tensorboardX==2.6.2.2
+torch==2.0.1
+torchaudio==2.0.2
+tqdm==4.66.1
\ No newline at end of file
diff --git a/requirements_all.txt b/requirements_all.txt
new file mode 100644
index 0000000000000000000000000000000000000000..0cc36fbd69cdd366573c920aa66905d59e0ba1ea
--- /dev/null
+++ b/requirements_all.txt
@@ -0,0 +1,61 @@
+audioread==3.0.1
+certifi==2023.11.17
+cffi==1.16.0
+charset-normalizer==3.3.2
+cmake==3.28.1
+contourpy==1.2.0
+cycler==0.12.1
+decorator==5.1.1
+filelock==3.13.1
+fonttools==4.47.0
+idna==3.6
+Jinja2==3.1.2
+joblib==1.3.2
+kiwisolver==1.4.5
+librosa==0.9.1
+lit==17.0.6
+llvmlite==0.41.1
+MarkupSafe==2.1.3
+matplotlib==3.8.2
+mpmath==1.3.0
+networkx==3.2.1
+numba==0.58.1
+numpy==1.23.5
+nvidia-cublas-cu11==11.10.3.66
+nvidia-cuda-cupti-cu11==11.7.101
+nvidia-cuda-nvrtc-cu11==11.7.99
+nvidia-cuda-runtime-cu11==11.7.99
+nvidia-cudnn-cu11==8.5.0.96
+nvidia-cufft-cu11==10.9.0.58
+nvidia-curand-cu11==10.2.10.91
+nvidia-cusolver-cu11==11.4.0.1
+nvidia-cusparse-cu11==11.7.4.91
+nvidia-nccl-cu11==2.14.3
+nvidia-nvtx-cu11==11.7.91
+packaging==23.2
+pandas==2.1.4
+Pillow==10.1.0
+platformdirs==4.1.0
+pooch==1.8.0
+praat-parselmouth==0.4.3
+protobuf==4.25.1
+pycparser==2.21
+pyparsing==3.1.1
+python-dateutil==2.8.2
+pytz==2023.3.post1
+requests==2.31.0
+resampy==0.4.2
+scikit-learn==1.3.2
+scipy==1.11.4
+six==1.16.0
+soundfile==0.12.1
+sympy==1.12
+tensorboardX==2.6.2.2
+threadpoolctl==3.2.0
+torch==2.0.1
+torchaudio==2.0.2
+tqdm==4.66.1
+triton==2.0.0
+typing_extensions==4.9.0
+tzdata==2023.3
+urllib3==2.1.0
diff --git a/start.py b/start.py
new file mode 100644
index 0000000000000000000000000000000000000000..7b611049c452444022acbec2e4ebd02665384a9b
--- /dev/null
+++ b/start.py
@@ -0,0 +1,254 @@
+import argparse
+import logging
+import os
+import sys
+import json
+import random
+
+import numpy as np
+import torch
+from torch.utils.data import DataLoader
+
+from utils.tools import ConfigWrapper
+from dataset.dataset import SVCDataset
+
+from modules.FastSVC import SVCNN
+from modules.discriminator import MelGANMultiScaleDiscriminator
+
+from optimizers.scheduler import StepLRScheduler
+from loss.adversarial_loss import GeneratorAdversarialLoss
+from loss.adversarial_loss import DiscriminatorAdversarialLoss
+from loss.stft_loss import MultiResolutionSTFTLoss
+from trainer import Trainer
+
+def main():
+ """Run training process."""
+ parser = argparse.ArgumentParser(
+ description="Train the FastSVC model."
+ )
+ parser.add_argument(
+ "--data_root",
+ type=str,
+ required=True,
+ help="dataset root path.",
+ )
+ parser.add_argument(
+ "--config",
+ type=str,
+ required=True,
+ help="configuration file path.",
+ )
+ parser.add_argument(
+ "--cp_path",
+ required=True,
+ type=str,
+ nargs="?",
+ help='checkpoint file path.',
+ )
+ parser.add_argument(
+ "--pretrain",
+ default="",
+ type=str,
+ nargs="?",
+ help='checkpoint file path to load pretrained params. (default="")',
+ )
+ parser.add_argument(
+ "--resume",
+ default=False,
+ type=bool,
+ nargs="?",
+ help='whether to resume training from a certain checkpoint.',
+ )
+ parser.add_argument(
+ "--seed",
+ default=0,
+ type=int,
+ help="random seed.",
+ )
+ parser.add_argument(
+ "--verbose",
+ type=int,
+ default=1,
+ help="logging level. higher is more logging. (default=1)",
+ )
+ args = parser.parse_args()
+
+ local_rank = 0
+ args.distributed = False
+ if not torch.cuda.is_available():
+ device = torch.device("cpu")
+ else:
+ device = torch.device("cuda")
+ # effective when using fixed size inputs
+ # see https://discuss.pytorch.org/t/what-does-torch-backends-cudnn-benchmark-do/5936
+ torch.backends.cudnn.benchmark = True
+ # setup for distributed training
+ # see example: https://github.com/NVIDIA/apex/tree/master/examples/simple/distributed
+ args.world_size = torch.cuda.device_count()
+ args.distributed = args.world_size > 1
+ if args.distributed:
+ local_rank = int(os.environ["LOCAL_RANK"])
+ torch.cuda.set_device(local_rank)
+ print('Using multi-GPUs for training. n_GPU=%d.' %(args.world_size))
+ torch.distributed.init_process_group(backend="nccl")
+
+ # random seed
+ torch.manual_seed(args.seed)
+ if torch.cuda.is_available():
+ torch.cuda.manual_seed(args.seed)
+ np.random.seed(args.seed)
+ random.seed(args.seed)
+
+ # suppress logging for distributed training
+ if local_rank != 0:
+ sys.stdout = open(os.devnull, "w")
+
+ # set logger
+ if args.verbose > 1:
+ logging.basicConfig(
+ level=logging.DEBUG,
+ stream=sys.stdout,
+ format="%(asctime)s (%(module)s:%(lineno)d) %(levelname)s: %(message)s",
+ )
+ elif args.verbose > 0:
+ logging.basicConfig(
+ level=logging.INFO,
+ stream=sys.stdout,
+ format="%(asctime)s (%(module)s:%(lineno)d) %(levelname)s: %(message)s",
+ )
+ else:
+ logging.basicConfig(
+ level=logging.WARN,
+ stream=sys.stdout,
+ format="%(asctime)s (%(module)s:%(lineno)d) %(levelname)s: %(message)s",
+ )
+ logging.warning("Skip DEBUG/INFO messages")
+
+ # load and save config
+ with open(args.config) as f:
+ config = ConfigWrapper(**json.load(f))
+ config.training_config.rank = local_rank
+ config.training_config.distributed = args.distributed
+ config.interval_config.out_dir = args.cp_path
+
+ # get dataset
+ train_set = SVCDataset(args.data_root, config.data_config.n_samples, config.data_config.sampling_rate, config.data_config.hop_size, 'train')
+ valid_set = SVCDataset(args.data_root, config.data_config.n_samples, config.data_config.sampling_rate, config.data_config.hop_size, 'valid')
+ dataset = {
+ "train": train_set,
+ "dev": valid_set,
+ }
+
+ # get data loader
+ sampler = {"train": None, "dev": None}
+ if args.distributed:
+ # setup sampler for distributed training
+ from torch.utils.data.distributed import DistributedSampler
+
+ sampler["train"] = DistributedSampler(
+ dataset=dataset["train"],
+ num_replicas=args.world_size,
+ rank=local_rank,
+ shuffle=True,
+ )
+ data_loader = {
+ "train": DataLoader(
+ dataset=dataset["train"],
+ shuffle=False if args.distributed else True,
+ batch_size=config.data_config.batch_size,
+ num_workers=config.data_config.num_workers,
+ sampler=sampler["train"],
+ pin_memory=config.data_config.pin_memory,
+ drop_last=True,
+ ),
+ "dev": DataLoader(
+ dataset=dataset["dev"],
+ shuffle=False,
+ batch_size=config.data_config.batch_size,
+ num_workers=config.data_config.num_workers,
+ sampler=sampler["dev"],
+ pin_memory=config.data_config.pin_memory,
+ ),
+ }
+
+ # define models
+ svc_mdl = SVCNN(config).to(device)
+ discriminator = MelGANMultiScaleDiscriminator().to(device)
+ model = {
+ "generator": svc_mdl,
+ "discriminator": discriminator,
+ }
+
+ # define criterions
+ criterion = {
+ "gen_adv": GeneratorAdversarialLoss(
+ # keep compatibility
+ **config.loss_config.generator_adv_loss_params
+ ).to(device),
+ "dis_adv": DiscriminatorAdversarialLoss(
+ # keep compatibility
+ **config.loss_config.discriminator_adv_loss_params
+ ).to(device),
+ }
+ criterion["stft"] = MultiResolutionSTFTLoss(
+ **config.loss_config.stft,
+ ).to(device)
+
+ # define optimizers and schedulers
+ optimizer = {
+ "generator": torch.optim.Adam(model["generator"].parameters(), lr=config.optimizer_config.lr),
+ "discriminator": torch.optim.Adam(model["discriminator"].parameters(), lr=config.optimizer_config.lr),
+ }
+ scheduler = {
+ "generator": StepLRScheduler(optimizer["generator"], step_size=config.optimizer_config.scheduler_step_size, gamma=config.optimizer_config.scheduler_gamma),
+ "discriminator": StepLRScheduler(optimizer["discriminator"], step_size=config.optimizer_config.scheduler_step_size, gamma=config.optimizer_config.scheduler_gamma),
+ }
+ if args.distributed:
+ from torch.nn.parallel import DistributedDataParallel
+ model["generator"] = DistributedDataParallel(model["generator"])
+ model["discriminator"] = DistributedDataParallel(model["discriminator"])
+
+ # define trainer
+ trainer = Trainer(
+ steps=0,
+ epochs=0,
+ data_loader=data_loader,
+ sampler=sampler,
+ model=model,
+ criterion=criterion,
+ optimizer=optimizer,
+ scheduler=scheduler,
+ config=config,
+ device=device,
+ )
+
+ # load pretrained parameters from checkpoint
+ if args.resume:
+ if args.pretrain != "":
+ trainer.load_checkpoint(args.pretrain, load_only_params=False, dst_train=args.distributed)
+ logging.info(f"Successfully load parameters from {args.pretrain}.")
+ else:
+ if os.path.isdir(args.cp_path):
+ dir_files = os.listdir(args.cp_path)
+ cp_files = [fname for fname in dir_files if fname[:11] == 'checkpoint-']
+ if len(cp_files) == 0:
+ logging.info(f'No pretrained checkpoints. Training from scratch...')
+ else:
+ cp_files.sort(key=lambda fname: os.path.getmtime(f'{args.cp_path}/{fname}'))
+ latest_cp = f'{args.cp_path}/{cp_files[-1]}'
+ trainer.load_checkpoint(latest_cp, load_only_params=False, dst_train=args.distributed)
+ logging.info(f'No pretrain dir specified, use the latest one instead. Successfully load parameters from {latest_cp}.')
+ else:
+ logging.info(f'No pretrain dir specified. Training from scratch...')
+ # run training loop
+ try:
+ trainer.run()
+ finally:
+ trainer.save_checkpoint(
+ os.path.join(config.interval_config.out_dir, f"checkpoint-{trainer.steps}steps.pkl"), args.distributed
+ )
+ logging.info(f"Successfully saved checkpoint @ {trainer.steps}steps.")
+
+
+if __name__ == "__main__":
+ main()
diff --git a/trainer.py b/trainer.py
new file mode 100644
index 0000000000000000000000000000000000000000..2d54c850ebe4988d0a88dc8e9990cab96f4fe74a
--- /dev/null
+++ b/trainer.py
@@ -0,0 +1,372 @@
+import logging
+import os
+
+from collections import defaultdict
+
+import matplotlib
+import numpy as np
+import soundfile as sf
+import torch
+
+from tensorboardX import SummaryWriter
+from tqdm import tqdm
+
+from utils.tools import save_checkpoint, load_checkpoint
+
+# set to avoid matplotlib error in CLI environment
+matplotlib.use("Agg")
+
+
+class Trainer(object):
+ """Customized trainer module for FastSVC training."""
+
+ def __init__(
+ self,
+ steps,
+ epochs,
+ data_loader,
+ sampler,
+ model,
+ criterion,
+ optimizer,
+ scheduler,
+ config,
+ device=torch.device("cpu"),
+ ):
+ """Initialize trainer.
+
+ Args:
+ steps (int): Initial global steps.
+ epochs (int): Initial global epochs.
+ data_loader (dict): Dict of data loaders. It must contrain "train" and "dev" loaders.
+ model (dict): Dict of models. It must contrain "generator" and "discriminator" models.
+ criterion (dict): Dict of criterions. It must contrain "stft" and "mse" criterions.
+ optimizer (dict): Dict of optimizers. It must contrain "generator" and "discriminator" optimizers.
+ scheduler (dict): Dict of schedulers. It must contrain "generator" and "discriminator" schedulers.
+ config (dict): Config dict loaded from yaml format configuration file.
+ device (torch.deive): Pytorch device instance.
+
+ """
+ self.steps = steps
+ self.epochs = epochs
+ self.data_loader = data_loader
+ self.sampler = sampler
+ self.model = model
+ self.criterion = criterion
+ self.optimizer = optimizer
+ self.scheduler = scheduler
+ self.config = config
+ self.device = device
+ tensorboard_dir = os.path.join(config.interval_config.out_dir, 'logs')
+ os.makedirs(tensorboard_dir, exist_ok=True)
+ self.writer = SummaryWriter(tensorboard_dir)
+ self.finish_train = False
+ self.total_train_loss = defaultdict(float)
+ self.total_eval_loss = defaultdict(float)
+
+ def run(self):
+ """Run training."""
+ self.tqdm = tqdm(
+ initial=self.steps, total=self.config.training_config.train_max_steps, desc="[train]"
+ )
+ while True:
+ # train one epoch
+ self._train_epoch()
+
+ # check whether training is finished
+ if self.finish_train:
+ break
+
+ self.tqdm.close()
+ logging.info("Finished training.")
+
+ def _train_step(self, batch):
+ """Train model one step."""
+ # parse batch
+ x, y = batch # x: (mels, pitch, ld, spk_index), y: audio
+ x = tuple([x_.to(self.device) for x_ in x])
+ y = y.to(self.device)
+
+ #######################
+ # Generator #
+ #######################
+ if self.steps > 0:
+ y_ = self.model["generator"](*x)
+
+ # initialize
+ gen_loss = 0.0
+
+ # multi-resolution sfft loss
+ sc_loss, mag_loss = self.criterion["stft"](y_, y)
+ gen_loss += sc_loss + mag_loss
+ self.total_train_loss[
+ "train/spectral_convergence_loss"
+ ] += sc_loss.item()
+ self.total_train_loss[
+ "train/log_stft_magnitude_loss"
+ ] += mag_loss.item()
+
+ # weighting aux loss
+ gen_loss *= self.config.loss_config.lambda_aux
+
+ # adversarial loss
+ if self.steps > self.config.training_config.discriminator_train_start_steps:
+ p_ = self.model["discriminator"](y_.unsqueeze(1))
+ adv_loss = self.criterion["gen_adv"](p_)
+ self.total_train_loss["train/adversarial_loss"] += adv_loss.item()
+
+ # add adversarial loss to generator loss
+ gen_loss += self.config.loss_config.lambda_adv * adv_loss
+
+ self.total_train_loss["train/generator_loss"] += gen_loss.item()
+
+ # update generator
+ self.optimizer["generator"].zero_grad()
+ self.optimizer["discriminator"].zero_grad()
+ gen_loss.backward()
+ if self.config.training_config.generator_grad_norm > 0:
+ torch.nn.utils.clip_grad_norm_(
+ self.model["generator"].parameters(),
+ self.config.training_config.generator_grad_norm,
+ )
+ self.optimizer["generator"].step()
+ self.scheduler["generator"].step()
+
+ #######################
+ # Discriminator #
+ #######################
+ if self.steps > self.config.training_config.discriminator_train_start_steps:
+ # re-compute y_ which leads better quality
+ with torch.no_grad():
+ y_ = self.model["generator"](*x)
+
+ # discriminator loss
+ p = self.model["discriminator"](y.unsqueeze(1))
+ p_ = self.model["discriminator"](y_.unsqueeze(1).detach())
+ real_loss, fake_loss = self.criterion["dis_adv"](p_, p)
+ dis_loss = real_loss + fake_loss
+ self.total_train_loss["train/real_loss"] += real_loss.item()
+ self.total_train_loss["train/fake_loss"] += fake_loss.item()
+ self.total_train_loss["train/discriminator_loss"] += dis_loss.item()
+
+ # update discriminator
+ self.optimizer["discriminator"].zero_grad()
+ dis_loss.backward()
+ if self.config.training_config.discriminator_grad_norm > 0:
+ torch.nn.utils.clip_grad_norm_(
+ self.model["discriminator"].parameters(),
+ self.config.training_config.discriminator_grad_norm,
+ )
+
+ self.optimizer["discriminator"].step()
+ self.scheduler["discriminator"].step()
+
+ # update counts
+ self.steps += 1
+ self.tqdm.update(1)
+ self._check_train_finish()
+
+ def _train_epoch(self):
+ """Train model one epoch."""
+ for train_steps_per_epoch, batch in enumerate(self.data_loader["train"], 1):
+ # train one step
+ self._train_step(batch)
+
+ # check interval
+ if self.config.training_config.rank == 0:
+ self._check_log_interval()
+ self._check_eval_interval()
+ self._check_save_interval()
+
+ # check whether training is finished
+ if self.finish_train:
+ return
+
+ # update
+ self.epochs += 1
+ self.train_steps_per_epoch = train_steps_per_epoch
+ logging.info(
+ f"(Steps: {self.steps}) Finished {self.epochs} epoch training "
+ f"({self.train_steps_per_epoch} steps per epoch)."
+ )
+
+ # needed for shuffle in distributed training
+ if self.config.training_config.distributed:
+ self.sampler["train"].set_epoch(self.epochs)
+
+ @torch.no_grad()
+ def _eval_step(self, batch):
+ """Evaluate model one step."""
+ # parse batch
+ x, y = batch
+ x = tuple([x_.to(self.device) for x_ in x])
+ y = y.to(self.device)
+
+ #######################
+ # Generator #
+ #######################
+ y_ = self.model["generator"](*x)
+
+ # initialize
+ aux_loss = 0.0
+
+ # multi-resolution stft loss
+ sc_loss, mag_loss = self.criterion["stft"](y_, y)
+ aux_loss += sc_loss + mag_loss
+ self.total_eval_loss["eval/spectral_convergence_loss"] += sc_loss.item()
+ self.total_eval_loss["eval/log_stft_magnitude_loss"] += mag_loss.item()
+
+ # weighting stft loss
+ aux_loss *= self.config.loss_config.lambda_aux
+
+ # adversarial loss
+ p_ = self.model["discriminator"](y_.unsqueeze(1))
+ adv_loss = self.criterion["gen_adv"](p_)
+ gen_loss = aux_loss + self.config.loss_config.lambda_adv * adv_loss
+
+ #######################
+ # Discriminator #
+ #######################
+ p = self.model["discriminator"](y.unsqueeze(1))
+ p_ = self.model["discriminator"](y_.unsqueeze(1))
+
+ # discriminator loss
+ real_loss, fake_loss = self.criterion["dis_adv"](p_, p)
+ dis_loss = real_loss + fake_loss
+
+ # add to total eval loss
+ self.total_eval_loss["eval/adversarial_loss"] += adv_loss.item()
+ self.total_eval_loss["eval/generator_loss"] += gen_loss.item()
+ self.total_eval_loss["eval/real_loss"] += real_loss.item()
+ self.total_eval_loss["eval/fake_loss"] += fake_loss.item()
+ self.total_eval_loss["eval/discriminator_loss"] += dis_loss.item()
+
+ def _eval_epoch(self):
+ """Evaluate model one epoch."""
+ logging.info(f"(Steps: {self.steps}) Start evaluation.")
+ # change mode
+ for key in self.model.keys():
+ self.model[key].eval()
+
+ # calculate loss for each batch
+ for eval_steps_per_epoch, batch in enumerate(
+ tqdm(self.data_loader["dev"], desc="[eval]"), 1
+ ):
+ # eval one step
+ self._eval_step(batch)
+
+ # save intermediate result
+ if eval_steps_per_epoch == 1:
+ self._genearete_and_save_intermediate_result(batch)
+
+ logging.info(
+ f"(Steps: {self.steps}) Finished evaluation "
+ f"({eval_steps_per_epoch} steps per epoch)."
+ )
+
+ # average loss
+ for key in self.total_eval_loss.keys():
+ self.total_eval_loss[key] /= eval_steps_per_epoch
+ logging.info(
+ f"(Steps: {self.steps}) {key} = {self.total_eval_loss[key]:.4f}."
+ )
+
+ # record
+ self._write_to_tensorboard(self.total_eval_loss)
+
+ # reset
+ self.total_eval_loss = defaultdict(float)
+
+ # restore mode
+ for key in self.model.keys():
+ self.model[key].train()
+
+ @torch.no_grad()
+ def _genearete_and_save_intermediate_result(self, batch):
+ """Generate and save intermediate result."""
+ # delayed import to avoid error related backend error
+ import matplotlib.pyplot as plt
+
+ # generate
+ x_batch, y_batch = batch
+ x_batch = tuple([x.to(self.device) for x in x_batch])
+ y_batch = y_batch.to(self.device)
+ y_batch_ = self.model["generator"](*x_batch)
+
+ # check directory
+ dirname = os.path.join(self.config.interval_config.out_dir, f"predictions/{self.steps}steps")
+ if not os.path.exists(dirname):
+ os.makedirs(dirname)
+
+ for idx, (y, y_) in enumerate(zip(y_batch, y_batch_), 1):
+ # convert to ndarray
+ y, y_ = y.view(-1).cpu().numpy(), y_.view(-1).cpu().numpy()
+
+ # plot figure and save it
+ figname = os.path.join(dirname, f"{idx}.png")
+ plt.subplot(2, 1, 1)
+ plt.plot(y)
+ plt.title("groundtruth speech")
+ plt.subplot(2, 1, 2)
+ plt.plot(y_)
+ plt.title(f"generated speech @ {self.steps} steps")
+ plt.tight_layout()
+ plt.savefig(figname)
+ plt.close()
+
+ # save as wavfile
+ y = np.clip(y, -1, 1)
+ y_ = np.clip(y_, -1, 1)
+ sf.write(
+ figname.replace(".png", "_ref.wav"),
+ y,
+ self.config.data_config.sampling_rate,
+ "PCM_16",
+ )
+ sf.write(
+ figname.replace(".png", "_gen.wav"),
+ y_,
+ self.config.data_config.sampling_rate,
+ "PCM_16",
+ )
+
+ if idx >= self.config.interval_config.num_save_intermediate_results:
+ break
+
+ def _write_to_tensorboard(self, loss):
+ """Write to tensorboard."""
+ for key, value in loss.items():
+ self.writer.add_scalar(key, value, self.steps)
+
+ def _check_save_interval(self):
+ if self.steps % self.config.interval_config.save_interval_steps == 0:
+ self.save_checkpoint(
+ os.path.join(self.config.interval_config.out_dir, f"checkpoint-{self.steps}steps.pkl"), self.config.training_config.distributed
+ )
+ logging.info(f"Successfully saved checkpoint @ {self.steps} steps.")
+
+ def _check_eval_interval(self):
+ if self.steps % self.config.interval_config.eval_interval_steps == 0:
+ self._eval_epoch()
+
+ def _check_log_interval(self):
+ if self.steps % self.config.interval_config.log_interval_steps == 0:
+ for key in self.total_train_loss.keys():
+ self.total_train_loss[key] /= self.config.interval_config.log_interval_steps
+ logging.info(
+ f"(Steps: {self.steps}) {key} = {self.total_train_loss[key]:.4f}."
+ )
+ self._write_to_tensorboard(self.total_train_loss)
+
+ # reset
+ self.total_train_loss = defaultdict(float)
+
+ def _check_train_finish(self):
+ if self.steps >= self.config.training_config.train_max_steps:
+ self.finish_train = True
+
+ def load_checkpoint(self, cp_path, load_only_params, dst_train):
+ self.steps, self.epochs = load_checkpoint(model=self.model, optimizer=self.optimizer, scheduler=self.scheduler, checkpoint_path=cp_path, load_only_params=load_only_params, dst_train=dst_train)
+
+ def save_checkpoint(self, cp_path, dst_train):
+ save_checkpoint(steps=self.steps, epochs=self.epochs, model=self.model, optimizer=self.optimizer, scheduler=self.scheduler, checkpoint_path=cp_path, dst_train=dst_train)
diff --git a/utils/.ipynb_checkpoints/pitch_ld_extraction-checkpoint.py b/utils/.ipynb_checkpoints/pitch_ld_extraction-checkpoint.py
new file mode 100644
index 0000000000000000000000000000000000000000..fd581cebfee6496c799e1ea811b00b03c529fb1e
--- /dev/null
+++ b/utils/.ipynb_checkpoints/pitch_ld_extraction-checkpoint.py
@@ -0,0 +1,252 @@
+import numpy as np
+import os
+import random
+import librosa
+import parselmouth
+import argparse
+from pathlib import Path
+from multiprocessing import Process
+from tqdm import tqdm
+
+from utils.spectrogram import AWeightingLoudness
+from utils.tools import load_wav
+
+np.random.seed(0)
+random.seed(0)
+
+
+def extract_loudness(wav_path: str | Path, ld_path: str | Path=None, frame_period=0.01, factor=0):
+ """
+ Extracts loudness information from an audio waveform.
+
+ Args:
+ wav_path (str or Path): Path to the audio waveform file (must be 24kHz)
+ ld_path (str or Path, optional): Path to load or save the extracted loudness information as a numpy file.
+ If specified, the function will first attempt to load the loudness information from this path.
+ If the file does not exist, the loudness will be calculated and saved to this path.
+ Defaults to None.
+ frame_period (float, optional): Time duration in seconds for each frame. Defaults to 0.01.
+ factor (float, optional): Loudness adjustment factor to fit different persons. Defaults to 0.
+
+ Returns:
+ numpy.ndarray: Extracted loudness information.
+
+ """
+ if ld_path is not None and os.path.isfile(ld_path):
+ loudness = np.load(ld_path)
+ return loudness
+ else:
+ # extract loudness using 24kHz audio
+ wav, fs = load_wav(wav_path, 24000)
+ loudness = AWeightingLoudness(
+ x=wav,
+ sr=fs,
+ n_fft=2048,
+ n_shift=int(fs*frame_period),
+ win_length=2048,
+ window='hann',
+ )
+ loudness = loudness + factor
+
+ if ld_path is not None:
+ os.makedirs(ld_path.parent, exist_ok=True)
+ np.save(ld_path, loudness)
+
+ return loudness
+
+
+def REAPER_F0(wav_path, sr=24000, frame_period=0.01): # frame_period s
+ if not os.path.isfile(f'{wav_path}.f0'):
+ cmd = f'REAPER/build/reaper -i {wav_path} -f {wav_path}.f0 -e {frame_period} -x 1000 -m 65 -a'
+ os.system(cmd)
+ f0 = []
+ with open(f'{wav_path}.f0', 'r') as rf:
+ for line in rf.readlines()[7:]:
+ f0.append(float(line.split()[2]))
+
+ cmd = f'rm -f {wav_path}.f0'
+ os.system(cmd)
+
+ f0 = np.array(f0)
+ minus_one_indexes = (f0 == -1)
+ f0[minus_one_indexes] = 0
+
+ return f0
+
+
+def ParselMouth_F0(wav, sr=24000, frame_period=0.01):
+ wav = parselmouth.Sound(wav, sampling_frequency=sr)
+ pitch = wav.to_pitch(time_step=frame_period, pitch_floor=65, pitch_ceiling=1000)
+ f0 = pitch.selected_array['frequency']
+
+ return f0
+
+
+def PYIN_F0(wav, sr=24000, frame_period=10):
+ fmin = librosa.note_to_hz('C2') # ~65Hz
+ fmax = librosa.note_to_hz('C7') # ~2093Hz
+ # fmax = fs/2
+ f0, voiced_flag, voiced_prob = librosa.pyin(
+ wav, fmin=fmin, fmax=fmax, sr=sr, frame_length=int(sr*frame_period/1000*4))
+ f0 = np.where(np.isnan(f0), 0.0, f0)
+ return f0
+
+
+def pad_arrays(arrays: list[np.ndarray], std_len: int):
+ """
+ Pad arrays value to a specified standard length.
+
+ Args:
+ arrays (List[numpy.ndarray]): List of arrays to be padded.
+ std_len (int): Standard length to which the arrays will be padded.
+
+ Returns:
+ List[numpy.ndarray]: List of padded arrays.
+
+ Raises:
+ ValueError: If the length of any array in the input list is greater than the specified standard length.
+
+ """
+ padded_arrays = []
+ for arr in arrays:
+ cur_len = len(arr)
+ if cur_len <= std_len:
+ pad_width = std_len - cur_len
+ left_pad = pad_width // 2
+ right_pad = pad_width - left_pad
+ padded_arr = np.pad(arr, (left_pad, right_pad), 'edge')
+ padded_arrays.append(padded_arr)
+ else:
+ raise ValueError(f'cur_len: {cur_len}, std_len: {std_len}.')
+ return padded_arrays
+
+
+def compute_pitch(wav_path: str, pitch_path: str=None, frame_period=0.01):
+ """
+ Computes the pitch information from an audio waveform.
+
+ Args:
+ wav_path (str): Path to the audio waveform file (must be 24kHz).
+ pitch_path (str, optional): Path to save or load the computed pitch information as a numpy file.
+ If specified, the function will first attempt to load the pitch information from this path.
+ If the file does not exist, the pitch will be computed and saved to this path.
+ Defaults to None.
+ frame_period (float, optional): Time duration in seconds for each frame. Defaults to 0.01.
+
+ Returns:
+ numpy.ndarray: Computed pitch information.
+
+ Notes:
+ For precise pitch representation, the pitch values are extracted by the median of three methods:
+ the PYIN, the REAPER, and the Parselmouth.
+
+ """
+ if pitch_path is not None and os.path.isfile(pitch_path):
+ pitch = np.load(pitch_path)
+ return pitch
+ else:
+ # extract pitch using 24kHz audio
+ wav, fs = load_wav(wav_path, 24000)
+ f0_std_len = wav.shape[0] // int(frame_period*fs) + 1
+
+ compute_median = []
+
+ # Compute pitch using PYIN algorithm
+ f0 = PYIN_F0(wav, sr=fs, frame_period=frame_period*1000)
+ compute_median.append(f0)
+ # Compute pitch using ParselMouth algorithm
+ f0 = ParselMouth_F0(wav, sr=fs, frame_period=frame_period)
+ compute_median.append(f0)
+ # Compute pitch using REAPER algorithm
+ f0 = REAPER_F0(wav_path, sr=fs, frame_period=frame_period)
+ compute_median.append(f0)
+
+ # Compute median F0
+ compute_median = pad_arrays(compute_median, f0_std_len)
+ compute_median = np.array(compute_median)
+ median_f0 = np.median(compute_median, axis=0)
+ if pitch_path is not None:
+ os.makedirs(pitch_path.parent, exist_ok=True)
+ np.save(pitch_path, median_f0)
+ return median_f0
+
+
+def extract_pitch_ref(wav_path: str, ref_path: str, predefined_factor=0, speech_enroll=False):
+ """
+ Extracts pitch information from an audio waveform and adjusts it based on a reference audio.
+
+ Args:
+ wav_path (str): Path to the audio waveform file.
+ ref_path (str): Path to the reference audio waveform file.
+ predefined_factor (float, optional): Predefined factor to adjust the pitch.
+ If non-zero, this factor will be used instead of computing it from the reference audio. Defaults to 0.
+ speech_enroll (bool, optional): Flag indicating whether the pitch adjustment is for speech enrollment. Defaults to False.
+
+ Returns:
+ Tuple[numpy.ndarray, float]: Tuple containing the adjusted pitch information (source_f0) and the pitch shift factor (factor).
+
+ """
+ source_f0 = compute_pitch(wav_path)
+ nonzero_indices = np.nonzero(source_f0)
+ source_mean = np.mean(source_f0[nonzero_indices], axis=0)
+
+ if predefined_factor != 0.:
+ print(f'Using predefined factor {predefined_factor}.')
+ factor = predefined_factor
+ else:
+ # Compute mean and std for pitch with the reference audio
+ ref_wav, fs = load_wav(ref_path)
+ ref_f0 = ParselMouth_F0(ref_wav, fs)
+ nonzero_indices = np.nonzero(ref_f0)
+ ref_mean = np.mean(ref_f0[nonzero_indices], axis=0)
+ factor = ref_mean / source_mean
+ if speech_enroll:
+ factor = factor * 1.2
+ print(f'pitch shift factor: {factor:.2f}')
+
+ # Modify f0 to fit with different persons
+ source_f0 = source_f0 * factor
+
+ return source_f0, factor
+
+
+def go(files, audio_dir, pitch_dir, ld_dir, rank):
+ if rank == 0:
+ pb = tqdm(files)
+ else:
+ pb = files
+
+ for file in pb:
+ ld = extract_loudness(file, (ld_dir/file.relative_to(audio_dir)).with_suffix('.npy'))
+ f0 = compute_pitch(file, (pitch_dir/file.relative_to(audio_dir)).with_suffix('.npy'))
+
+
+def main(args):
+ data_root = Path(args.data_root)
+ pitch_dir = Path(args.pitch_dir) if args.pitch_dir is not None else data_root/'pitch'
+ ld_dir = Path(args.ld_dir) if args.ld_dir is not None else data_root/'loudness'
+ n_p = args.n_cpu
+ files = list(data_root.rglob('*.wav'))
+ print(f"{len(files)} files to extract")
+ ps = []
+ for i in range(n_p):
+ p = Process(
+ target=go,
+ args=(files[i::n_p], data_root, pitch_dir, ld_dir, i)
+ )
+ ps.append(p)
+ p.start()
+ for i in range(n_p):
+ ps[i].join()
+
+
+if __name__ == '__main__':
+ parser = argparse.ArgumentParser(description="Compute pitch and loudness")
+
+ parser.add_argument('--data_root', required=True, type=str)
+ parser.add_argument('--pitch_dir', type=str)
+ parser.add_argument('--ld_dir', type=str)
+ parser.add_argument('--n_cpu', type=int, default=1)
+
+ args = parser.parse_args()
+ main(args)
diff --git a/utils/pitch_ld_extraction.py b/utils/pitch_ld_extraction.py
new file mode 100644
index 0000000000000000000000000000000000000000..fd581cebfee6496c799e1ea811b00b03c529fb1e
--- /dev/null
+++ b/utils/pitch_ld_extraction.py
@@ -0,0 +1,252 @@
+import numpy as np
+import os
+import random
+import librosa
+import parselmouth
+import argparse
+from pathlib import Path
+from multiprocessing import Process
+from tqdm import tqdm
+
+from utils.spectrogram import AWeightingLoudness
+from utils.tools import load_wav
+
+np.random.seed(0)
+random.seed(0)
+
+
+def extract_loudness(wav_path: str | Path, ld_path: str | Path=None, frame_period=0.01, factor=0):
+ """
+ Extracts loudness information from an audio waveform.
+
+ Args:
+ wav_path (str or Path): Path to the audio waveform file (must be 24kHz)
+ ld_path (str or Path, optional): Path to load or save the extracted loudness information as a numpy file.
+ If specified, the function will first attempt to load the loudness information from this path.
+ If the file does not exist, the loudness will be calculated and saved to this path.
+ Defaults to None.
+ frame_period (float, optional): Time duration in seconds for each frame. Defaults to 0.01.
+ factor (float, optional): Loudness adjustment factor to fit different persons. Defaults to 0.
+
+ Returns:
+ numpy.ndarray: Extracted loudness information.
+
+ """
+ if ld_path is not None and os.path.isfile(ld_path):
+ loudness = np.load(ld_path)
+ return loudness
+ else:
+ # extract loudness using 24kHz audio
+ wav, fs = load_wav(wav_path, 24000)
+ loudness = AWeightingLoudness(
+ x=wav,
+ sr=fs,
+ n_fft=2048,
+ n_shift=int(fs*frame_period),
+ win_length=2048,
+ window='hann',
+ )
+ loudness = loudness + factor
+
+ if ld_path is not None:
+ os.makedirs(ld_path.parent, exist_ok=True)
+ np.save(ld_path, loudness)
+
+ return loudness
+
+
+def REAPER_F0(wav_path, sr=24000, frame_period=0.01): # frame_period s
+ if not os.path.isfile(f'{wav_path}.f0'):
+ cmd = f'REAPER/build/reaper -i {wav_path} -f {wav_path}.f0 -e {frame_period} -x 1000 -m 65 -a'
+ os.system(cmd)
+ f0 = []
+ with open(f'{wav_path}.f0', 'r') as rf:
+ for line in rf.readlines()[7:]:
+ f0.append(float(line.split()[2]))
+
+ cmd = f'rm -f {wav_path}.f0'
+ os.system(cmd)
+
+ f0 = np.array(f0)
+ minus_one_indexes = (f0 == -1)
+ f0[minus_one_indexes] = 0
+
+ return f0
+
+
+def ParselMouth_F0(wav, sr=24000, frame_period=0.01):
+ wav = parselmouth.Sound(wav, sampling_frequency=sr)
+ pitch = wav.to_pitch(time_step=frame_period, pitch_floor=65, pitch_ceiling=1000)
+ f0 = pitch.selected_array['frequency']
+
+ return f0
+
+
+def PYIN_F0(wav, sr=24000, frame_period=10):
+ fmin = librosa.note_to_hz('C2') # ~65Hz
+ fmax = librosa.note_to_hz('C7') # ~2093Hz
+ # fmax = fs/2
+ f0, voiced_flag, voiced_prob = librosa.pyin(
+ wav, fmin=fmin, fmax=fmax, sr=sr, frame_length=int(sr*frame_period/1000*4))
+ f0 = np.where(np.isnan(f0), 0.0, f0)
+ return f0
+
+
+def pad_arrays(arrays: list[np.ndarray], std_len: int):
+ """
+ Pad arrays value to a specified standard length.
+
+ Args:
+ arrays (List[numpy.ndarray]): List of arrays to be padded.
+ std_len (int): Standard length to which the arrays will be padded.
+
+ Returns:
+ List[numpy.ndarray]: List of padded arrays.
+
+ Raises:
+ ValueError: If the length of any array in the input list is greater than the specified standard length.
+
+ """
+ padded_arrays = []
+ for arr in arrays:
+ cur_len = len(arr)
+ if cur_len <= std_len:
+ pad_width = std_len - cur_len
+ left_pad = pad_width // 2
+ right_pad = pad_width - left_pad
+ padded_arr = np.pad(arr, (left_pad, right_pad), 'edge')
+ padded_arrays.append(padded_arr)
+ else:
+ raise ValueError(f'cur_len: {cur_len}, std_len: {std_len}.')
+ return padded_arrays
+
+
+def compute_pitch(wav_path: str, pitch_path: str=None, frame_period=0.01):
+ """
+ Computes the pitch information from an audio waveform.
+
+ Args:
+ wav_path (str): Path to the audio waveform file (must be 24kHz).
+ pitch_path (str, optional): Path to save or load the computed pitch information as a numpy file.
+ If specified, the function will first attempt to load the pitch information from this path.
+ If the file does not exist, the pitch will be computed and saved to this path.
+ Defaults to None.
+ frame_period (float, optional): Time duration in seconds for each frame. Defaults to 0.01.
+
+ Returns:
+ numpy.ndarray: Computed pitch information.
+
+ Notes:
+ For precise pitch representation, the pitch values are extracted by the median of three methods:
+ the PYIN, the REAPER, and the Parselmouth.
+
+ """
+ if pitch_path is not None and os.path.isfile(pitch_path):
+ pitch = np.load(pitch_path)
+ return pitch
+ else:
+ # extract pitch using 24kHz audio
+ wav, fs = load_wav(wav_path, 24000)
+ f0_std_len = wav.shape[0] // int(frame_period*fs) + 1
+
+ compute_median = []
+
+ # Compute pitch using PYIN algorithm
+ f0 = PYIN_F0(wav, sr=fs, frame_period=frame_period*1000)
+ compute_median.append(f0)
+ # Compute pitch using ParselMouth algorithm
+ f0 = ParselMouth_F0(wav, sr=fs, frame_period=frame_period)
+ compute_median.append(f0)
+ # Compute pitch using REAPER algorithm
+ f0 = REAPER_F0(wav_path, sr=fs, frame_period=frame_period)
+ compute_median.append(f0)
+
+ # Compute median F0
+ compute_median = pad_arrays(compute_median, f0_std_len)
+ compute_median = np.array(compute_median)
+ median_f0 = np.median(compute_median, axis=0)
+ if pitch_path is not None:
+ os.makedirs(pitch_path.parent, exist_ok=True)
+ np.save(pitch_path, median_f0)
+ return median_f0
+
+
+def extract_pitch_ref(wav_path: str, ref_path: str, predefined_factor=0, speech_enroll=False):
+ """
+ Extracts pitch information from an audio waveform and adjusts it based on a reference audio.
+
+ Args:
+ wav_path (str): Path to the audio waveform file.
+ ref_path (str): Path to the reference audio waveform file.
+ predefined_factor (float, optional): Predefined factor to adjust the pitch.
+ If non-zero, this factor will be used instead of computing it from the reference audio. Defaults to 0.
+ speech_enroll (bool, optional): Flag indicating whether the pitch adjustment is for speech enrollment. Defaults to False.
+
+ Returns:
+ Tuple[numpy.ndarray, float]: Tuple containing the adjusted pitch information (source_f0) and the pitch shift factor (factor).
+
+ """
+ source_f0 = compute_pitch(wav_path)
+ nonzero_indices = np.nonzero(source_f0)
+ source_mean = np.mean(source_f0[nonzero_indices], axis=0)
+
+ if predefined_factor != 0.:
+ print(f'Using predefined factor {predefined_factor}.')
+ factor = predefined_factor
+ else:
+ # Compute mean and std for pitch with the reference audio
+ ref_wav, fs = load_wav(ref_path)
+ ref_f0 = ParselMouth_F0(ref_wav, fs)
+ nonzero_indices = np.nonzero(ref_f0)
+ ref_mean = np.mean(ref_f0[nonzero_indices], axis=0)
+ factor = ref_mean / source_mean
+ if speech_enroll:
+ factor = factor * 1.2
+ print(f'pitch shift factor: {factor:.2f}')
+
+ # Modify f0 to fit with different persons
+ source_f0 = source_f0 * factor
+
+ return source_f0, factor
+
+
+def go(files, audio_dir, pitch_dir, ld_dir, rank):
+ if rank == 0:
+ pb = tqdm(files)
+ else:
+ pb = files
+
+ for file in pb:
+ ld = extract_loudness(file, (ld_dir/file.relative_to(audio_dir)).with_suffix('.npy'))
+ f0 = compute_pitch(file, (pitch_dir/file.relative_to(audio_dir)).with_suffix('.npy'))
+
+
+def main(args):
+ data_root = Path(args.data_root)
+ pitch_dir = Path(args.pitch_dir) if args.pitch_dir is not None else data_root/'pitch'
+ ld_dir = Path(args.ld_dir) if args.ld_dir is not None else data_root/'loudness'
+ n_p = args.n_cpu
+ files = list(data_root.rglob('*.wav'))
+ print(f"{len(files)} files to extract")
+ ps = []
+ for i in range(n_p):
+ p = Process(
+ target=go,
+ args=(files[i::n_p], data_root, pitch_dir, ld_dir, i)
+ )
+ ps.append(p)
+ p.start()
+ for i in range(n_p):
+ ps[i].join()
+
+
+if __name__ == '__main__':
+ parser = argparse.ArgumentParser(description="Compute pitch and loudness")
+
+ parser.add_argument('--data_root', required=True, type=str)
+ parser.add_argument('--pitch_dir', type=str)
+ parser.add_argument('--ld_dir', type=str)
+ parser.add_argument('--n_cpu', type=int, default=1)
+
+ args = parser.parse_args()
+ main(args)
diff --git a/utils/spectrogram.py b/utils/spectrogram.py
new file mode 100644
index 0000000000000000000000000000000000000000..267517bb37e41c03aa198d0b59693faa5b1bb9d8
--- /dev/null
+++ b/utils/spectrogram.py
@@ -0,0 +1,323 @@
+'''
+Copied from espnet: https://github.com/espnet/espnet/blob/master/espnet/transform/spectrogram.py
+'''
+import librosa
+import numpy as np
+
+
+# Extract Log-Scaled A-Weighting Loudness from Audio. Added by Xu Li.
+def AWeightingLoudness(x, sr, n_fft, n_shift, win_length=None, window='hann', center=True, pad_mode='reflect'):
+ assert x.ndim == 1, 'The audio has %d channels, but so far we only support single-channel audios.' %(x.ndim)
+ # [Freq, Time]
+ mag_stft = np.abs(stft(x, n_fft, n_shift, win_length, window, center, pad_mode).T)
+
+ freq_axis = librosa.fft_frequencies(sr=sr, n_fft=n_fft)
+ perceptual_stft = librosa.perceptual_weighting(mag_stft**2, freq_axis, ref=1)
+ perceptual_loudness = np.log10(np.mean(np.power(10, perceptual_stft/10), axis=0)+1e-5)
+
+ return perceptual_loudness
+
+
+def stft(
+ x, n_fft, n_shift, win_length=None, window="hann", center=True, pad_mode="reflect"
+):
+ # x: [Time, Channel]
+ if x.ndim == 1:
+ single_channel = True
+ # x: [Time] -> [Time, Channel]
+ x = x[:, None]
+ else:
+ single_channel = False
+ x = x.astype(np.float32)
+
+ # FIXME(kamo): librosa.stft can't use multi-channel?
+ # x: [Time, Channel, Freq]
+ x = np.stack(
+ [
+ librosa.stft(
+ x[:, ch],
+ n_fft=n_fft,
+ hop_length=n_shift,
+ win_length=win_length,
+ window=window,
+ center=center,
+ pad_mode=pad_mode,
+ ).T
+ for ch in range(x.shape[1])
+ ],
+ axis=1,
+ )
+
+ if single_channel:
+ # x: [Time, Channel, Freq] -> [Time, Freq]
+ x = x[:, 0]
+ return x
+
+
+def istft(x, n_shift, win_length=None, window="hann", center=True):
+ # x: [Time, Channel, Freq]
+ if x.ndim == 2:
+ single_channel = True
+ # x: [Time, Freq] -> [Time, Channel, Freq]
+ x = x[:, None, :]
+ else:
+ single_channel = False
+
+ # x: [Time, Channel]
+ x = np.stack(
+ [
+ librosa.istft(
+ x[:, ch].T, # [Time, Freq] -> [Freq, Time]
+ hop_length=n_shift,
+ win_length=win_length,
+ window=window,
+ center=center,
+ )
+ for ch in range(x.shape[1])
+ ],
+ axis=1,
+ )
+
+ if single_channel:
+ # x: [Time, Channel] -> [Time]
+ x = x[:, 0]
+ return x
+
+
+def stft2logmelspectrogram(x_stft, fs, n_mels, n_fft, fmin=None, fmax=None, eps=1e-10):
+ # x_stft: (Time, Channel, Freq) or (Time, Freq)
+ fmin = 0 if fmin is None else fmin
+ fmax = fs / 2 if fmax is None else fmax
+
+ # spc: (Time, Channel, Freq) or (Time, Freq)
+ spc = np.abs(x_stft)
+ # mel_basis: (Mel_freq, Freq)
+ mel_basis = librosa.filters.mel(fs, n_fft, n_mels, fmin, fmax)
+ # lmspc: (Time, Channel, Mel_freq) or (Time, Mel_freq)
+ lmspc = np.log10(np.maximum(eps, np.dot(spc, mel_basis.T)))
+
+ return lmspc
+
+
+def spectrogram(x, n_fft, n_shift, win_length=None, window="hann"):
+ # x: (Time, Channel) -> spc: (Time, Channel, Freq)
+ spc = np.abs(stft(x, n_fft, n_shift, win_length, window=window))
+ return spc
+
+
+def logmelspectrogram(
+ x,
+ fs,
+ n_mels,
+ n_fft,
+ n_shift,
+ win_length=None,
+ window="hann",
+ fmin=None,
+ fmax=None,
+ eps=1e-10,
+ pad_mode="reflect",
+):
+ # stft: (Time, Channel, Freq) or (Time, Freq)
+ x_stft = stft(
+ x,
+ n_fft=n_fft,
+ n_shift=n_shift,
+ win_length=win_length,
+ window=window,
+ pad_mode=pad_mode,
+ )
+
+ return stft2logmelspectrogram(
+ x_stft, fs=fs, n_mels=n_mels, n_fft=n_fft, fmin=fmin, fmax=fmax, eps=eps
+ )
+
+
+class Spectrogram(object):
+ def __init__(self, n_fft, n_shift, win_length=None, window="hann"):
+ self.n_fft = n_fft
+ self.n_shift = n_shift
+ self.win_length = win_length
+ self.window = window
+
+ def __repr__(self):
+ return (
+ "{name}(n_fft={n_fft}, n_shift={n_shift}, "
+ "win_length={win_length}, window={window})".format(
+ name=self.__class__.__name__,
+ n_fft=self.n_fft,
+ n_shift=self.n_shift,
+ win_length=self.win_length,
+ window=self.window,
+ )
+ )
+
+ def __call__(self, x):
+ return spectrogram(
+ x,
+ n_fft=self.n_fft,
+ n_shift=self.n_shift,
+ win_length=self.win_length,
+ window=self.window,
+ )
+
+
+class LogMelSpectrogram(object):
+ def __init__(
+ self,
+ fs,
+ n_mels,
+ n_fft,
+ n_shift,
+ win_length=None,
+ window="hann",
+ fmin=None,
+ fmax=None,
+ eps=1e-10,
+ ):
+ self.fs = fs
+ self.n_mels = n_mels
+ self.n_fft = n_fft
+ self.n_shift = n_shift
+ self.win_length = win_length
+ self.window = window
+ self.fmin = fmin
+ self.fmax = fmax
+ self.eps = eps
+
+ def __repr__(self):
+ return (
+ "{name}(fs={fs}, n_mels={n_mels}, n_fft={n_fft}, "
+ "n_shift={n_shift}, win_length={win_length}, window={window}, "
+ "fmin={fmin}, fmax={fmax}, eps={eps}))".format(
+ name=self.__class__.__name__,
+ fs=self.fs,
+ n_mels=self.n_mels,
+ n_fft=self.n_fft,
+ n_shift=self.n_shift,
+ win_length=self.win_length,
+ window=self.window,
+ fmin=self.fmin,
+ fmax=self.fmax,
+ eps=self.eps,
+ )
+ )
+
+ def __call__(self, x):
+ return logmelspectrogram(
+ x,
+ fs=self.fs,
+ n_mels=self.n_mels,
+ n_fft=self.n_fft,
+ n_shift=self.n_shift,
+ win_length=self.win_length,
+ window=self.window,
+ )
+
+
+class Stft2LogMelSpectrogram(object):
+ def __init__(self, fs, n_mels, n_fft, fmin=None, fmax=None, eps=1e-10):
+ self.fs = fs
+ self.n_mels = n_mels
+ self.n_fft = n_fft
+ self.fmin = fmin
+ self.fmax = fmax
+ self.eps = eps
+
+ def __repr__(self):
+ return (
+ "{name}(fs={fs}, n_mels={n_mels}, n_fft={n_fft}, "
+ "fmin={fmin}, fmax={fmax}, eps={eps}))".format(
+ name=self.__class__.__name__,
+ fs=self.fs,
+ n_mels=self.n_mels,
+ n_fft=self.n_fft,
+ fmin=self.fmin,
+ fmax=self.fmax,
+ eps=self.eps,
+ )
+ )
+
+ def __call__(self, x):
+ return stft2logmelspectrogram(
+ x,
+ fs=self.fs,
+ n_mels=self.n_mels,
+ n_fft=self.n_fft,
+ fmin=self.fmin,
+ fmax=self.fmax,
+ )
+
+
+class Stft(object):
+ def __init__(
+ self,
+ n_fft,
+ n_shift,
+ win_length=None,
+ window="hann",
+ center=True,
+ pad_mode="reflect",
+ ):
+ self.n_fft = n_fft
+ self.n_shift = n_shift
+ self.win_length = win_length
+ self.window = window
+ self.center = center
+ self.pad_mode = pad_mode
+
+ def __repr__(self):
+ return (
+ "{name}(n_fft={n_fft}, n_shift={n_shift}, "
+ "win_length={win_length}, window={window},"
+ "center={center}, pad_mode={pad_mode})".format(
+ name=self.__class__.__name__,
+ n_fft=self.n_fft,
+ n_shift=self.n_shift,
+ win_length=self.win_length,
+ window=self.window,
+ center=self.center,
+ pad_mode=self.pad_mode,
+ )
+ )
+
+ def __call__(self, x):
+ return stft(
+ x,
+ self.n_fft,
+ self.n_shift,
+ win_length=self.win_length,
+ window=self.window,
+ center=self.center,
+ pad_mode=self.pad_mode,
+ )
+
+
+class IStft(object):
+ def __init__(self, n_shift, win_length=None, window="hann", center=True):
+ self.n_shift = n_shift
+ self.win_length = win_length
+ self.window = window
+ self.center = center
+
+ def __repr__(self):
+ return (
+ "{name}(n_shift={n_shift}, "
+ "win_length={win_length}, window={window},"
+ "center={center})".format(
+ name=self.__class__.__name__,
+ n_shift=self.n_shift,
+ win_length=self.win_length,
+ window=self.window,
+ center=self.center,
+ )
+ )
+
+ def __call__(self, x):
+ return istft(
+ x,
+ self.n_shift,
+ win_length=self.win_length,
+ window=self.window,
+ center=self.center,
+ )
diff --git a/utils/tools.py b/utils/tools.py
new file mode 100644
index 0000000000000000000000000000000000000000..01f857e45dfd7cb03f04ac84dbe8751cd3a44c96
--- /dev/null
+++ b/utils/tools.py
@@ -0,0 +1,171 @@
+import os
+import torch
+import numpy as np
+import soundfile as sf
+
+
+def fast_cosine_dist(source_feats: torch.Tensor, matching_pool: torch.Tensor, device='cpu'):
+ """
+ Computes the cosine distance between source features and a matching pool of features.
+ Like torch.cdist, but fixed dim=-1 and for cosine distance.
+
+ Args:
+ source_feats (torch.Tensor): Tensor of source features with shape (n_source_feats, feat_dim).
+ matching_pool (torch.Tensor): Tensor of matching pool features with shape (n_matching_feats, feat_dim).
+ device (str, optional): Device to perform the computation on. Defaults to 'cpu'.
+
+ Returns:
+ torch.Tensor: Tensor of cosine distances between the source features and the matching pool features.
+
+ """
+ source_feats = source_feats.to(device)
+ matching_pool = matching_pool.to(device)
+ source_norms = torch.norm(source_feats, p=2, dim=-1)
+ matching_norms = torch.norm(matching_pool, p=2, dim=-1)
+ dotprod = -torch.cdist(source_feats[None].to(device), matching_pool[None], p=2)[0]**2 + source_norms[:, None]**2 + matching_norms[None]**2
+ dotprod /= 2
+
+ dists = 1 - ( dotprod / (source_norms[:, None] * matching_norms[None]) )
+ return dists
+
+
+def load_wav(wav_path, sr=None):
+ """
+ Loads a waveform from a wav file.
+
+ Args:
+ wav_path (str): Path to the wav file.
+ sr (int, optional): Target sample rate.
+ If `sr` is specified and the loaded audio has a different sample rate, an AssertionError is raised.
+ Defaults to None.
+
+ Returns:
+ Tuple[np.ndarray, int]: Tuple containing the loaded waveform as a NumPy array and the sample rate.
+
+ """
+ wav, fs = sf.read(wav_path)
+ if wav.ndim != 1:
+ print('The wav file %s has %d channels, select the first one to proceed.' %(wav_path, wav.ndim))
+ wav = wav[:,0]
+ assert sr is None or fs == sr, f'{sr} kHz audio is required. Got {fs}'
+ peak = np.abs(wav).max()
+ if peak > 1.0:
+ wav /= peak
+ return wav, fs
+
+
+class ConfigWrapper(object):
+ """
+ Wrapper dict class to avoid annoying key dict indexing like:
+ `config.sample_rate` instead of `config["sample_rate"]`.
+ """
+ def __init__(self, **kwargs):
+ for k, v in kwargs.items():
+ if type(v) == dict:
+ v = ConfigWrapper(**v)
+ self[k] = v
+
+ def keys(self):
+ return self.__dict__.keys()
+
+ def items(self):
+ return self.__dict__.items()
+
+ def values(self):
+ return self.__dict__.values()
+
+ def to_dict_type(self):
+ return {
+ key: (value if not isinstance(value, ConfigWrapper) else value.to_dict_type())
+ for key, value in dict(**self).items()
+ }
+
+ def __len__(self):
+ return len(self.__dict__)
+
+ def __getitem__(self, key):
+ return getattr(self, key)
+
+ def __setitem__(self, key, value):
+ return setattr(self, key, value)
+
+ def __contains__(self, key):
+ return key in self.__dict__
+
+ def __repr__(self):
+ return self.__dict__.__repr__()
+
+
+def save_checkpoint(steps, epochs, model, optimizer, scheduler, checkpoint_path, dst_train=False):
+ """Save checkpoint.
+
+ Args:
+ checkpoint_path (str): Checkpoint path to be saved.
+
+ """
+ state_dict = {
+ "optimizer": {
+ "generator": optimizer["generator"].state_dict(),
+ "discriminator": optimizer["discriminator"].state_dict(),
+ },
+ "scheduler": {
+ "generator": scheduler["generator"].state_dict(),
+ "discriminator": scheduler["discriminator"].state_dict(),
+ },
+ "steps": steps,
+ "epochs": epochs,
+ }
+ if dst_train:
+ state_dict["model"] = {
+ "generator": model["generator"].module.state_dict(),
+ "discriminator": model["discriminator"].module.state_dict(),
+ }
+ else:
+ state_dict["model"] = {
+ "generator": model["generator"].state_dict(),
+ "discriminator": model["discriminator"].state_dict(),
+ }
+
+ if not os.path.exists(os.path.dirname(checkpoint_path)):
+ os.makedirs(os.path.dirname(checkpoint_path))
+ torch.save(state_dict, checkpoint_path)
+
+
+def load_checkpoint(model, optimizer, scheduler, checkpoint_path, load_only_params=False, dst_train=False):
+ """Load checkpoint.
+
+ Args:
+ checkpoint_path (str): Checkpoint path to be loaded.
+ load_only_params (bool): Whether to load only model parameters.
+
+ """
+ state_dict = torch.load(checkpoint_path, map_location="cpu")
+ if dst_train:
+ model["generator"].module.load_state_dict(
+ state_dict["model"]["generator"]
+ )
+ model["discriminator"].module.load_state_dict(
+ state_dict["model"]["discriminator"]
+ )
+ else:
+ model["generator"].load_state_dict(state_dict["model"]["generator"])
+ model["discriminator"].load_state_dict(
+ state_dict["model"]["discriminator"]
+ )
+ optimizer["generator"].load_state_dict(
+ state_dict["optimizer"]["generator"]
+ )
+ optimizer["discriminator"].load_state_dict(
+ state_dict["optimizer"]["discriminator"]
+ )
+ scheduler["generator"].load_state_dict(
+ state_dict["scheduler"]["generator"]
+ )
+ scheduler["discriminator"].load_state_dict(
+ state_dict["scheduler"]["discriminator"]
+ )
+
+ steps = state_dict["steps"]
+ epochs = state_dict["epochs"]
+
+ return steps, epochs