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