| 65 | } |
| 66 | |
| 67 | void AudioLevelToCV::DrawModule() |
| 68 | { |
| 69 | if (Minimized() || IsVisible() == false) |
| 70 | return; |
| 71 | |
| 72 | mGainSlider->Draw(); |
| 73 | mAttackSlider->Draw(); |
| 74 | mReleaseSlider->Draw(); |
| 75 | mMinSlider->Draw(); |
| 76 | mMaxSlider->Draw(); |
| 77 | |
| 78 | ofPushStyle(); |
| 79 | ofSetColor(0, 255, 0, gModuleDrawAlpha); |
| 80 | ofBeginShape(); |
| 81 | float x, y; |
| 82 | float w, h; |
| 83 | mGainSlider->GetPosition(x, y, K(local)); |
| 84 | mGainSlider->GetDimensions(w, h); |
| 85 | for (int i = 0; i < gBufferSize; ++i) |
| 86 | { |
| 87 | ofVertex(ofMap(mModulationBuffer[i], 0, 1, x, x + w, K(clamp)), ofMap(i, 0, gBufferSize, y, y + h), K(clamp)); |
| 88 | } |
| 89 | ofEndShape(); |
| 90 | ofPopStyle(); |
| 91 | } |
| 92 | |
| 93 | void AudioLevelToCV::Process(double time) |
| 94 | { |
nothing calls this directly
no test coverage detected