43class SampleBrowser final :
public Browser {
46 bool getGreyoutColsAndRows(uint32_t* cols, uint32_t* rows)
override;
47 bool opened()
override;
48 void focusRegained()
override;
49 ActionResult buttonAction(deluge::hid::Button b,
bool on,
bool inCardRoutine)
override;
50 ActionResult verticalEncoderAction(int32_t offset,
bool inCardRoutine)
override;
51 ActionResult horizontalEncoderAction(int32_t offset)
override;
52 ActionResult padAction(int32_t x, int32_t y, int32_t velocity)
override;
53 bool canSeeViewUnderneath()
override;
54 Error claimAudioFileForInstrument(
bool makeWaveTableWorkAtAllCosts =
false);
55 Error claimAudioFileForAudioClip();
56 void scrollFinished()
override;
57 bool importFolderAsKit();
58 bool importFolderAsMultisamples();
59 ActionResult timerCallback()
override;
60 bool claimCurrentFile(int32_t mayDoPitchDetection = 1, int32_t mayDoSingleCycle = 1, int32_t mayDoWaveTable = 1,
61 bool loadWithoutExiting =
false);
62 bool renderMainPads(uint32_t whichRows,
RGB image[][kDisplayWidth + kSideBarWidth],
63 uint8_t occupancyMask[][kDisplayWidth + kSideBarWidth],
bool drawUndefinedArea =
true)
override;
64 void exitAndNeverDeleteDrum();
70 MenuItem* menuItemHeadingTo{
nullptr};
73 UIType
getUIType()
override {
return UIType::SAMPLE_BROWSER; }
74 bool canDisplayFavourites()
override {
return true; }
77 void enterKeyPress()
override;
78 void exitAction()
override;
79 ActionResult backButtonAction()
override;
80 void folderContentsReady(int32_t entryDirection)
override;
81 void currentFileChanged(int32_t movementDirection)
override;
84 void displayCurrentFilename();
85 void previewIfPossible(int32_t movementDirection = 1);
86 void audioFileIsNowSet();
87 bool canImportWholeKit();
88 bool loadAllSamplesInFolder(
bool detectPitch, int32_t* getNumSamples, Sample*** getSortArea,
89 bool* getDoingSingleCycle =
nullptr, int32_t* getNumCharsInPrefix =
nullptr);
90 Error getCurrentFilePath(String* path)
override;
91 void drawKeysOverWaveform();
92 void autoDetectSideChainSending(SoundDrum* drum, Source* source,
char const* fileName);
93 void possiblySetUpBlinking();
97 bool currentlyShowingSamplePreview;
99 bool qwertyCurrentlyDrawnOnscreen;