title: How does AudioKit's AKNodeOutputPlot pull it's data?
body: <p>I'm very new to the AudioKit framework and I have been trying to understand a bit more about the DSP side to it.   Whilst rummaging around in the source code I realised that AKNodeOutputPlot does not pull data from the node the same way others would.  </p>
  
  <p>In the DSP code for the AKAmplitudeTracker an RMS value is calculated for each channel and the result is briefly written to the output buffer but at the end of the for loop the node is essentially bypassed by setting the output to the original input:</p>
  
  <pre><code>void process(AUAudioFrameCount frameCount, AUAudioFrameCount bufferOffset) override {
  
      for (int frameIndex = 0; frameIndex &lt; frameCount; ++frameIndex) {
  
          int frameOffset = int(frameIndex + bufferOffset);
  
          for (int channel = 0; channel &lt; channels; ++channel) {
              float *in  = (float *)inBufferListPtr-&gt;mBuffers[channel].mData  + frameOffset;
              float temp = *in;
              float *out = (float *)outBufferListPtr-&gt;mBuffers[channel].mData + frameOffset;
              if (channel == 0) {
                  if (started) {
                      sp_rms_compute(sp, leftRMS, in, out);
                      leftAmplitude = *out;
                  } else {
                      leftAmplitude = 0;
                  }
              } else {
                  if (started) {
                      sp_rms_compute(sp, rightRMS, in, out);
                      rightAmplitude = *out;
                  } else {
                      rightAmplitude = 0;
                  }
              }
              *out = temp;
          }
      }
  }
  </code></pre>
  
  <p>This makes sense since outputting the RMS value to the device speakers would sound terrible but when this node is used as the input to the AKNodeOutputPlot object RMS values are plotted.  </p>
  
  <p><img src="https://i.imgur.com/BkevC3a.png" alt="input and rms plot"></p>
  
  <p>I assumed that the leftAmplitude and rightAmplitude variables were being referenced somewhere but even if they are zeroed out the plot works just fine.  I'm interested in doing some work on the signal without effecting the output so I'd love it someone could help me figure how the AKPlot is grabbing this data.</p>
  
  <p>Cheers</p>