Deluge Firmware 1.3.0
Build date: 2025.06.05
Loading...
Searching...
No Matches
StemExport Class Reference
Collaboration diagram for StemExport:

Public Member Functions

void startStemExportProcess (StemExportType stemExportType)
 
void stopStemExportProcess ()
 Stop stem export process.
 
void startOutputRecordingUntilLoopEndAndSilence ()
 Simulate pressing record and play in order to trigger resampling of out output that ends when loop ends.
 
void stopPlayback ()
 simulate pressing play
 
void stopOutputRecording ()
 simulate pressing record
 
bool checkForLoopEnd ()
 
bool checkForSilence ()
 
int32_t disarmAllInstrumentsForStemExport (StemExportType stemExportType)
 disarms and prepares all the instruments so that they can be exported
 
int32_t exportInstrumentStems (StemExportType stemExportType)
 
int32_t exportMixdownStem (StemExportType stemExportType)
 
void restoreAllInstrumentMutes (int32_t totalNumOutputs)
 set instrument mutes back to their previous state (before exporting stems)
 
int32_t disarmAllClipsForStemExport ()
 disarms and prepares all the clips so that they can be exported
 
int32_t exportClipStems (StemExportType stemExportType)
 
void restoreAllClipMutes (int32_t totalNumClips)
 set clip mutes back to their previous state (before exporting stems)
 
void getLoopLengthOfLongestNotEmptyNoteRow (Clip *clip)
 
void getLoopEndPointInSamplesForAudioFile (int32_t loopLength)
 converts clip loop length into samples so that clip end position can be written to clip stem
 
bool writeLoopEndPos ()
 
bool startCurrentStemExport (StemExportType stemExportType, Output *output, bool &muteState, int32_t fileNumber, bool exportStem)
 
void finishCurrentStemExport (StemExportType stemExportType, bool &muteState)
 
void finishStemExportProcess (StemExportType stemExportType, int32_t elementsProcessed)
 
void updateScrollPosition (StemExportType stemExportType, int32_t indexNumber)
 
void displayStemExportProgress (StemExportType stemExportType)
 display how many stems we've exported so far
 
void displayStemExportProgressOLED (StemExportType stemExportType)
 
void displayStemExportProgress7SEG ()
 
Error getUnusedStemRecordingFilePath (String *filePath, AudioRecordingFolder folder)
 
Error getUnusedStemRecordingFolderPath (String *filePath, AudioRecordingFolder folder)
 
void setWavFileNameForStemExport (StemExportType type, Output *output, int32_t fileNumber)
 
bool inContextMenu ()
 

Public Attributes

bool processStarted
 
bool stopRecording
 
StemExportType currentStemExportType
 
uint32_t timePlaybackStopped
 
uint32_t timeThereWasLastSomeActivity
 
bool allowNormalization
 
bool exportToSilence
 
bool includeSongFX
 
bool renderOffline
 
bool exportMixdown
 
int32_t loopLengthToStopStemExport
 
int32_t loopEndPointInSamplesForAudioFile
 
int32_t numStemsExported
 
int32_t totalNumStemsToExport
 
int32_t highestUsedStemFolderNumber
 
String lastFolderNameForStemExport
 
String wavFileNameForStemExport
 
bool wavFileNameForStemExportSet
 

Member Function Documentation

◆ checkForLoopEnd()

bool StemExport::checkForLoopEnd ( )

if we're exporting clip stems in song or inside a clip (e.g. not arrangement tracks) we want to export up to length of the longest sequence in the clip (clip or note row loop length) when we reach longest loop length, we stop playback and allow recording to continue until silence

◆ checkForSilence()

bool StemExport::checkForSilence ( )

we want to check for 12 seconds of silence so we can stop recording if we don't find silence after 60 seconds, stop recording

◆ exportClipStems()

int32_t StemExport::exportClipStems ( StemExportType stemExportType)

iterates through all clips, arming one clip at a time for recording simulates the button combo action of pressing record + play twice to enable resample and stop recording at the end of the clip's loop length

◆ exportInstrumentStems()

int32_t StemExport::exportInstrumentStems ( StemExportType stemExportType)

iterates through all instruments, arming one instrument at a time for recording simulates the button combo action of pressing record + play twice to enable resample and stop recording at the end of the arrangement

◆ exportMixdownStem()

int32_t StemExport::exportMixdownStem ( StemExportType stemExportType)

iterates through all instruments, checking if there's any that should be exported (unmuted) then exports them all as a single stem simulates the button combo action of pressing record + play twice to enable resample and stop recording at the end of the arrangement

◆ finishCurrentStemExport()

void StemExport::finishCurrentStemExport ( StemExportType stemExportType,
bool & muteState )

mute clip or output after recording it so that it's not recorded next time update recording mode if it needs to be updated increment number of stems exported so progress can be displayed

◆ getLoopLengthOfLongestNotEmptyNoteRow()

void StemExport::getLoopLengthOfLongestNotEmptyNoteRow ( Clip * clip)

for clip export, gets length of longest note row that isn't empty we will use this length to record that clip until longest note row is fully recorded

◆ getUnusedStemRecordingFolderPath()

Error StemExport::getUnusedStemRecordingFolderPath ( String * filePath,
AudioRecordingFolder folder )

gets folder path in SAMPLES/EXPORTS to write stems to within the STEMS folder, it will try to create a folder with the name of the SONG if it cannot create a folder with the SONG name because it already exists, it will continue creating folder path if it cannot create a folder and the folder does not already exist, then function will return an error after SAMPLES/EXPORTS/*SONG NAME*‍/ is created, it will try to create a folder for the type of export (ARRANGER or SONG). if it cannot create a folder of the name ARRANGER or SONG because it already exists, it will append an incremental number to the end of the ARRANGER or SONG folder name and try to create a folder with that new name thus we will end up with a folder path of SAMPLES/EXPORTS/*SONG NAME*‍/TRACKS##/ or SAMPLES/EXPORTS/*SONG NAME*‍/CLIPS##/ this function gets called every time a stem recording is being written to a file to avoid unecessary file system calls, it will save the last song and arranger/song sub-folder name saved to a String including the last incremental folder number and use that to obtain the filePath for the next stem export job (e.g. if you are exporting the same song more and stem export type than once)

◆ inContextMenu()

bool StemExport::inContextMenu ( )

used to check if we should exit out of context menu when recording ends or if we should display progress pop-up

◆ setWavFileNameForStemExport()

void StemExport::setWavFileNameForStemExport ( StemExportType stemExportType,
Output * output,
int32_t fileNumber )

based on Stem Export Type, will set a WAV file name in the format of: /OutputType_StemExportType_OutputName_IndexNumber.WAV example: /SYNTH_CLIP_BASS SYNTH_TEMPO_ROOT NOTE-SCALE_00000.WAV example: /SYNTH_TRACK_BASS SYNTH_TEMPO_ROOT NOTE-SCALE_00000.WAV example: /MIXDOWN_TEMPO_ROOT NOTE-SCALE.WAV this wavFileName is then concatenate to the filePath name to export the WAV file

◆ startStemExportProcess()

void StemExport::startStemExportProcess ( StemExportType stemExportType)

starts stem export process which includes setting up UI mode, timer, and preparing instruments / clips for exporting

◆ updateScrollPosition()

void StemExport::updateScrollPosition ( StemExportType stemExportType,
int32_t indexNumber )

resets scroll position so that you can see the current clip or first clip in the top row of the grid

◆ writeLoopEndPos()

bool StemExport::writeLoopEndPos ( )

determines whether or not you should write loop end position in samples to the stem file we're only writing loop end marker to clip stems


The documentation for this class was generated from the following files: