Static Public Member Functions | List of all members
SampleImporter Class Reference

This class handles all import logic for different sample formats. More...

Static Public Member Functions

static void closeGaps (Array< ModulatorSamplerSound * > &selection, bool closeNoteGaps, bool increaseUpperLimit=true)
 This scans all sounds in the array and closes existing gaps in the sample map. More...
 
static void importNewAudioFiles (Component *childComponentOfMainEditor, ModulatorSampler *sampler, const StringArray &fileNames, BigInteger draggedRootNotes=0)
 Imports audio files into the sampler. More...
 
static void loadAudioFilesRaw (Component *childComponentOfMainEditor, ModulatorSampler *sampler, const StringArray &fileNames)
 Loads audio files without any mapping. More...
 
static void loadAudioFilesUsingDropPoint (Component *childComponentOfMainEditor, ModulatorSampler *sampler, const StringArray &fileNames, BigInteger rootNotes)
 Loads audio files into the sampler by using the drop point to specify the root notes. More...
 
static void loadAudioFilesUsingFileName (Component *childComponentOfMainEditor, ModulatorSampler *sampler, const StringArray &fileNames, bool useVelocityAutomap)
 Loads audio files into the sampler by searching the file name for root note information. More...
 
static void loadAudioFilesUsingPitchDetection (Component *childComponentOfMainEditor, ModulatorSampler *sampler, const StringArray &fileNames, bool useVelocityAutomap)
 Loads audio files into the sampler by using a pitch detection algorithm that sets the root note automatically. More...
 

Detailed Description

This class handles all import logic for different sample formats.

It converts all supported formats to an xml element called samplemap, which can be fed to the ModulatorSampler.

Member Function Documentation

void closeGaps ( Array< ModulatorSamplerSound * > &  selection,
bool  closeNoteGaps,
bool  increaseUpperLimit = true 
)
static

This scans all sounds in the array and closes existing gaps in the sample map.

Parameters
selectionan array with the pointers to all sounds that should be processed. It is ok to only pass a selection of the sounds here.
closeNoteGapsif true, then it closes gaps that occur between notes. If false, it searches for gaps in the velocity mapping.
increaseUpperLimitif true, then the upper limit of the lower sound is increased until the gap is filled.
void importNewAudioFiles ( Component *  childComponentOfMainEditor,
ModulatorSampler sampler,
const StringArray &  fileNames,
BigInteger  draggedRootNotes = 0 
)
static

Imports audio files into the sampler.

It opens an dialog which lets the user specify the import mode.

Parameters
samplerthe sampler that loads the files
fileNamesthe absolute file names of the files. They must be ".wav" files.
draggedRootNotesif the files were dragged onto the sample map editor, you can pass the root notes here for FileImportDialog::DropPoint
See also
FileImportDialog
void loadAudioFilesRaw ( Component *  childComponentOfMainEditor,
ModulatorSampler sampler,
const StringArray &  fileNames 
)
static

Loads audio files without any mapping.

void loadAudioFilesUsingDropPoint ( Component *  childComponentOfMainEditor,
ModulatorSampler sampler,
const StringArray &  fileNames,
BigInteger  rootNotes 
)
static

Loads audio files into the sampler by using the drop point to specify the root notes.

Since all samples are mapped along the note scale, the velocity automap is not possible.

void loadAudioFilesUsingFileName ( Component *  childComponentOfMainEditor,
ModulatorSampler sampler,
const StringArray &  fileNames,
bool  useVelocityAutomap 
)
static

Loads audio files into the sampler by searching the file name for root note information.

void loadAudioFilesUsingPitchDetection ( Component *  childComponentOfMainEditor,
ModulatorSampler sampler,
const StringArray &  fileNames,
bool  useVelocityAutomap 
)
static

Loads audio files into the sampler by using a pitch detection algorithm that sets the root note automatically.

©2017 HISE. This documentation is autogenerated from the HISE source code using Doxygen.