MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / coco_output_frames

Function coco_output_frames

src/models/vevo2/components.cpp:87–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85 if (frames <= 0) {
86 throw std::runtime_error("Vevo2 Coco tokenizer produced non-positive output frame count");
87 }
88 return frames;
89}
90
91double hz_to_octs(double frequency, double tuning, int64_t bins_per_octave) {
92 const double a440 = 440.0 * std::pow(2.0, tuning / static_cast<double>(bins_per_octave));
93 return std::log2(frequency / (a440 / 16.0));
94}
95
96double parabolic_shift(const std::vector<float> & power, int64_t freq_bins, int64_t frames, int64_t freq, int64_t frame) {
97 if (freq <= 0 || freq >= freq_bins - 1) {
98 return 0.0;
99 }
100 const auto at = [&](int64_t f) {

Callers 1

Calls 2

conv1d_output_framesFunction · 0.70

Tested by

no test coverage detected