Changeset 321eb85 for src/temporal
- Timestamp:
- Oct 2, 2009, 12:49:59 AM (15 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
- Children:
- 2cc816a
- Parents:
- 847b374
- Location:
- src/temporal
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/temporal/a_weighting.c
r847b374 r321eb85 43 43 switch ( samplerate ) { 44 44 45 // adsgn 8000 45 46 case 8000: 46 47 b[0] = 6.306209468238731519207362907764036208391189575195312500e-01; … … 60 61 break; 61 62 63 // adsgn 16000 62 64 case 16000: 63 65 b[0] = 5.314898298235570806014038680586963891983032226562500000e-01; … … 77 79 break; 78 80 81 // adsgn 22050 79 82 case 22050: 80 83 b[0] = 4.492998504299193784916610638902056962251663208007812500e-01; … … 94 97 break; 95 98 99 // adsgn 24000 100 case 24000: 101 b[0] = 4.256263892891054001488271296693710610270500183105468750e-01; 102 b[1] = -8.512527785782106892753517968230880796909332275390625000e-01; 103 b[2] = -4.256263892891054556599783609271980822086334228515625000e-01; 104 b[3] = 1.702505557156421378550703593646176159381866455078125000e+00; 105 b[4] = -4.256263892891054556599783609271980822086334228515625000e-01; 106 b[5] = -8.512527785782106892753517968230880796909332275390625000e-01; 107 b[6] = 4.256263892891054001488271296693710610270500183105468750e-01; 108 a[0] = 1.000000000000000000000000000000000000000000000000000000e+00; 109 a[1] = -3.325996004241962733516402295208536088466644287109375000e+00; 110 a[2] = 3.677161079286316969216841243905946612358093261718750000e+00; 111 a[3] = -1.106476076828482035807610373012721538543701171875000000e+00; 112 a[4] = -4.726706734908718843257702246773988008499145507812500000e-01; 113 a[5] = 1.861941760230954034938122276798821985721588134765625000e-01; 114 a[6] = 4.178771337829546850262119050967157818377017974853515625e-02; 115 break; 116 117 // adsgn 32000 118 case 32000: 119 b[0] = 3.434583386824304196416335344110848382115364074707031250e-01; 120 b[1] = -6.869166773648609503055695313378237187862396240234375000e-01; 121 b[2] = -3.434583386824303641304823031532578170299530029296875000e-01; 122 b[3] = 1.373833354729721900611139062675647437572479248046875000e+00; 123 b[4] = -3.434583386824303641304823031532578170299530029296875000e-01; 124 b[5] = -6.869166773648609503055695313378237187862396240234375000e-01; 125 b[6] = 3.434583386824304196416335344110848382115364074707031250e-01; 126 a[0] = 1.000000000000000000000000000000000000000000000000000000e+00; 127 a[1] = -3.656446043233668063976438133977353572845458984375000000e+00; 128 a[2] = 4.831468450652579349480220116674900054931640625000000000e+00; 129 a[3] = -2.557597496581567764195597192156128585338592529296875000e+00; 130 a[4] = 2.533680394205302666144064005493419244885444641113281250e-01; 131 a[5] = 1.224430322452567110325105659285327419638633728027343750e-01; 132 a[6] = 6.764072168342137418572956875095769646577537059783935547e-03; 133 break; 134 135 // adsgn 44100 96 136 case 44100: 97 b[0] = 2.55741125204257513381378430494805797934532165527343750 e-01;137 b[0] = 2.557411252042575133813784304948057979345321655273437500e-01; 98 138 b[1] = -5.114822504085150267627568609896115958690643310546875000e-01; 99 139 b[2] = -2.557411252042575133813784304948057979345321655273437500e-01; … … 109 149 a[5] = -1.418254738303044160119270600262098014354705810546875000e-01; 110 150 a[6] = 4.351177233495117681327801761881346465088427066802978516e-03; 111 151 break; 152 153 // adsgn 48000 154 case 48000: 155 b[0] = 2.343017922995132285013397677175817079842090606689453125e-01; 156 b[1] = -4.686035845990265125138307666929904371500015258789062500e-01; 157 b[2] = -2.343017922995132007457641520886681973934173583984375000e-01; 158 b[3] = 9.372071691980530250276615333859808743000030517578125000e-01; 159 b[4] = -2.343017922995132007457641520886681973934173583984375000e-01; 160 b[5] = -4.686035845990265125138307666929904371500015258789062500e-01; 161 b[6] = 2.343017922995132285013397677175817079842090606689453125e-01; 162 a[0] = 1.000000000000000000000000000000000000000000000000000000e+00; 163 a[1] = -4.113043408775872045168853219365701079368591308593750000e+00; 164 a[2] = 6.553121752655050258340452273841947317123413085937500000e+00; 165 a[3] = -4.990849294163385074796224216697737574577331542968750000e+00; 166 a[4] = 1.785737302937575599059982778271660208702087402343750000e+00; 167 a[5] = -2.461905953194876706113802811159985139966011047363281250e-01; 168 a[6] = 1.122425003323123879339640041052916785702109336853027344e-02; 169 break; 170 171 // adsgn 88200 172 case 88200: 173 b[0] = 1.118876366882113199130444058937428053468465805053710938e-01; 174 b[1] = -2.237752733764226120705131961585721001029014587402343750e-01; 175 b[2] = -1.118876366882113337908322137081995606422424316406250000e-01; 176 b[3] = 4.475505467528452241410263923171442002058029174804687500e-01; 177 b[4] = -1.118876366882113337908322137081995606422424316406250000e-01; 178 b[5] = -2.237752733764226120705131961585721001029014587402343750e-01; 179 b[6] = 1.118876366882113199130444058937428053468465805053710938e-01; 180 a[0] = 1.000000000000000000000000000000000000000000000000000000e+00; 181 a[1] = -4.726938565651158441482948546763509511947631835937500000e+00; 182 a[2] = 9.076897983832765248735086061060428619384765625000000000e+00; 183 a[3] = -9.014855113464800950850985827855765819549560546875000000e+00; 184 a[4] = 4.852772261031594425162438710685819387435913085937500000e+00; 185 a[5] = -1.333877820398965186043938047077972441911697387695312500e+00; 186 a[6] = 1.460012549591642450064199465487035922706127166748046875e-01; 187 break; 188 189 // adsgn 96000 112 190 case 96000: 113 191 b[0] = 9.951898975972744976203898659150581806898117065429687500e-02; … … 127 205 break; 128 206 207 // adsgn 192000 129 208 case 192000: 130 209 b[0] = 3.433213424548713782469278044118254911154508590698242188e-02; -
src/temporal/a_weighting.h
r847b374 r321eb85 47 47 scripts in octave 3.0 (debian package 1:3.0.5-6+b2 with octave-signal 48 48 1.0.9-1+b1 on i386), with <pre> [b, a] = adsign(1/Fs) </pre> for various 49 sampling frequencies. 49 sampling frequencies (8000, 16000, 22050, 24000, 32000, 44100, 48000, 88200, 50 96000, and 192000 Hz). 51 52 The sampling frequency should normally be higher than 20kHz, but most common 53 file sampling rates have been included for completeness. 50 54 51 55 */ … … 58 62 59 63 \param samplerate sampling frequency of the signal to filter. Should be one of 60 8000, 16000, 22050, 44100, 96000, 192000.64 8000, 16000, 22050, 24000, 32000, 44100, 48000, 88200, 96000, and 192000 Hz 61 65 \param channels number of channels to allocate 62 66 -
src/temporal/c_weighting.c
r847b374 r321eb85 42 42 switch ( samplerate ) { 43 43 44 // cdsgn 8000 44 45 case 8000: 45 46 b[0] = 6.782173932405135552414776611840352416038513183593750000e-01; … … 55 56 break; 56 57 58 // cdsgn 16000 57 59 case 16000: 58 60 b[0] = 4.971057193673903418229542694461997598409652709960937500e-01; … … 68 70 break; 69 71 72 // cdsgn 22050 70 73 case 22050: 71 74 b[0] = 4.033381299002754549754001800465630367398262023925781250e-01; … … 81 84 break; 82 85 86 // cdsgn 24000 87 case 24000: 88 b[0] = 3.786678621924967069745093795063439756631851196289062500e-01; 89 b[1] = 0.000000000000000000000000000000000000000000000000000000e+00; 90 b[2] = -7.573357243849934139490187590126879513263702392578125000e-01; 91 b[3] = 0.000000000000000000000000000000000000000000000000000000e+00; 92 b[4] = 3.786678621924967069745093795063439756631851196289062500e-01; 93 a[0] = 1.000000000000000000000000000000000000000000000000000000e+00; 94 a[1] = -1.529945307555420797029910318087786436080932617187500000e+00; 95 a[2] = 1.283553182116208835061854642844991758465766906738281250e-01; 96 a[3] = 3.494608072385725350272878131363540887832641601562500000e-01; 97 a[4] = 5.217291949300089520802359288609295617789030075073242188e-02; 98 break; 99 100 // cdsgn 32000 101 case 32000: 102 b[0] = 2.977986488230693340462096330156782642006874084472656250e-01; 103 b[1] = 0.000000000000000000000000000000000000000000000000000000e+00; 104 b[2] = -5.955972976461386680924192660313565284013748168945312500e-01; 105 b[3] = 0.000000000000000000000000000000000000000000000000000000e+00; 106 b[4] = 2.977986488230693340462096330156782642006874084472656250e-01; 107 a[0] = 1.000000000000000000000000000000000000000000000000000000e+00; 108 a[1] = -1.812455387128179218336754274787381291389465332031250000e+00; 109 a[2] = 6.425013281155662614452239722595550119876861572265625000e-01; 110 a[3] = 1.619857574578579817448087396769551560282707214355468750e-01; 111 a[4] = 7.987649713547682189807019881300220731645822525024414062e-03; 112 break; 113 114 // cdsgn 44100 83 115 case 44100: 84 116 b[0] = 2.170085619492190254220531642204150557518005371093750000e-01; … … 94 126 break; 95 127 128 // cdsgn 48000 129 case 48000: 130 b[0] = 1.978871200263932761398422144338837824761867523193359375e-01; 131 b[1] = 0.000000000000000000000000000000000000000000000000000000e+00; 132 b[2] = -3.957742400527865522796844288677675649523735046386718750e-01; 133 b[3] = 0.000000000000000000000000000000000000000000000000000000e+00; 134 b[4] = 1.978871200263932761398422144338837824761867523193359375e-01; 135 a[0] = 1.000000000000000000000000000000000000000000000000000000e+00; 136 a[1] = -2.219172914052801814932536217384040355682373046875000000e+00; 137 a[2] = 1.455135878947171557129536267893854528665542602539062500e+00; 138 a[3] = -2.484960738877830532800317087094299495220184326171875000e-01; 139 a[4] = 1.253882314727246607977129144728678511455655097961425781e-02; 140 break; 141 142 // cdsgn 88200 143 case 88200: 144 b[0] = 9.221909851156021020734954163344809785485267639160156250e-02; 145 b[1] = 0.000000000000000000000000000000000000000000000000000000e+00; 146 b[2] = -1.844381970231204204146990832668961957097053527832031250e-01; 147 b[3] = 0.000000000000000000000000000000000000000000000000000000e+00; 148 b[4] = 9.221909851156021020734954163344809785485267639160156250e-02; 149 a[0] = 1.000000000000000000000000000000000000000000000000000000e+00; 150 a[1] = -2.785795902923448696952846148633398115634918212890625000e+00; 151 a[2] = 2.727736758747444145711824603495188057422637939453125000e+00; 152 a[3] = -1.097007502819661528548067508381791412830352783203125000e+00; 153 a[4] = 1.550674356752141103132913713125162757933139801025390625e-01; 154 break; 155 156 // cdsgn 96000 96 157 case 96000: 97 158 b[0] = 8.182864044979756834585771230194950476288795471191406250e-02; … … 107 168 break; 108 169 170 // cdsgn 192000 109 171 case 192000: 110 172 b[0] = 2.784755468532278815940728122768632601946592330932617188e-02; -
src/temporal/c_weighting.h
r847b374 r321eb85 47 47 scripts in octave 3.0 (debian package 1:3.0.5-6+b2 with octave-signal 48 48 1.0.9-1+b1 on i386), with <pre> [b, a] = cdsign(1/Fs) </pre> for various 49 sampling frequencies. 49 sampling frequencies (8000, 16000, 22050, 24000, 32000, 44100, 48000, 88200, 50 96000, and 192000 Hz). 51 52 The sampling frequency should normally be higher than 20kHz, but most common 53 file sampling rates have been included for completeness. 50 54 51 55 */ … … 58 62 59 63 \param samplerate sampling frequency of the signal to filter. Should be one of 60 8000, 16000, 22050, 44100, 96000, 192000.64 8000, 16000, 22050, 24000, 32000, 44100, 48000, 88200, 96000, and 192000 Hz 61 65 \param channels number of channels to allocate 62 66
Note: See TracChangeset
for help on using the changeset viewer.