Unified · Split
| @@ -108,7 +108,6 @@ void t808Cowbell_init(t808Cowbell* const cowbell) { · 107 unmodified lines | |||
| 108 | void t808Hihat_on(t808Hihat* const hihat, float vel) { | 108 | void t808Hihat_on(t808Hihat* const hihat, float vel) { |
| 109 | 109 | ||
| 110 | tEnvelope_on(&hihat->envGain, vel); | 110 | tEnvelope_on(&hihat->envGain, vel); |
| 111 | tEnvelope_on(&hihat->noiseFMGain, vel); | ||
| 112 | tEnvelope_on(&hihat->envStick, vel); | 111 | tEnvelope_on(&hihat->envStick, vel); |
| 113 | 112 | ||
| 114 | } | 113 | } |
| @@ -126,15 +125,13 @@ float t808Hihat_tick(t808Hihat* const hihat) { · 11 unmodified lines | |||
| 126 | 125 | ||
| 127 | 126 | ||
| 128 | float myNoise = tNoise_tick(&hihat->n); | 127 | float myNoise = tNoise_tick(&hihat->n); |
| 129 | //float FM_Noise = myNoise * tEnvelope_tick(&hihat->noiseFMGain); | 128 | |
| 130 | float FM_Noise = myNoise; | 129 | tSquare_setFreq(&hihat->p[0], ((2.0f + hihat->stretch) * hihat->freq)); |
| 131 | //FM the hat with the noise | 130 | tSquare_setFreq(&hihat->p[1], ((3.00f + hihat->stretch) * hihat->freq)); |
| 132 | tSquare_setFreq(&hihat->p[0], (2.0f * hihat->freq + hihat->stretch) + (FM_Noise * hihat->FM_amount)); | 131 | tSquare_setFreq(&hihat->p[2], ((4.16f + hihat->stretch) * hihat->freq)); |
| 133 | tSquare_setFreq(&hihat->p[1], (3.00f * hihat->freq + hihat->stretch) + (FM_Noise * hihat->FM_amount)); | 132 | tSquare_setFreq(&hihat->p[3], ((5.43f + hihat->stretch) * hihat->freq)); |
| 134 | tSquare_setFreq(&hihat->p[2], (4.16f * hihat->freq + hihat->stretch) + (FM_Noise * hihat->FM_amount)); | 133 | tSquare_setFreq(&hihat->p[4], ((6.79f + hihat->stretch) * hihat->freq)); |
| 135 | tSquare_setFreq(&hihat->p[3], (5.43f * hihat->freq + hihat->stretch) + (FM_Noise * hihat->FM_amount)); | 134 | tSquare_setFreq(&hihat->p[5], ((8.21f + hihat->stretch) * hihat->freq)); |
| 136 | tSquare_setFreq(&hihat->p[4], (6.79f * hihat->freq + hihat->stretch) + (FM_Noise * hihat->FM_amount)); | ||
| 137 | tSquare_setFreq(&hihat->p[5], (8.21f * hihat->freq + hihat->stretch) + (FM_Noise * hihat->FM_amount)); | ||
| 138 | 135 | ||
| 139 | for (int i = 0; i < 6; i++) | 136 | for (int i = 0; i < 6; i++) |
| 140 | { | 137 | { |