MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / OnClicked

Method OnClicked

Source/SamplerGrid.cpp:372–388  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

370}
371
372void SamplerGrid::OnClicked(float x, float y, bool right)
373{
374 IDrawableModule::OnClicked(x, y, right);
375
376 mGrid->TestClick(x, y, right);
377
378 if (x >= mEditSampleX && x < mEditSampleX + mEditSampleWidth &&
379 y >= mEditSampleY && y < mEditSampleY + mEditSampleHeight)
380 {
381 if (mEditSample)
382 {
383 //TODO(Ryan) multichannel
384 ChannelBuffer temp(mEditSample->mSampleData + mEditSample->mSampleStart, mEditSample->mSampleEnd - mEditSample->mSampleStart);
385 TheSynth->GrabSample(&temp, "gridsample", K(window));
386 }
387 }
388}
389
390void SamplerGrid::MouseReleased()
391{

Callers

nothing calls this directly

Calls 2

TestClickMethod · 0.45
GrabSampleMethod · 0.45

Tested by

no test coverage detected