00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef SPECTMORPH_NOISE_BAND_PARTITION_HH
00020 #define SPECTMORPH_NOISE_BAND_PARTITION_HH
00021
00022 #include <vector>
00023
00024 #include "smrandom.hh"
00025
00026 namespace SpectMorph
00027 {
00028
00029 class NoiseBandPartition
00030 {
00031 std::vector<int> band_count;
00032 std::vector<int> band_start;
00033 size_t spectrum_size;
00034
00035 public:
00036 NoiseBandPartition (size_t n_bands, size_t n_spectrum_bins, double mix_freq);
00037 void noise_envelope_to_spectrum (SpectMorph::Random& random_gen, const std::vector<float>& envelope, float *spectrum, double scale);
00038
00039 size_t n_bands();
00040 size_t n_spectrum_bins();
00041 };
00042
00043 }
00044
00045 #endif