Public Types | Public Member Functions | List of all members
SampleMap Class Reference

A SampleMap is a data structure that encapsulates all data loaded into an ModulatorSampler. More...

Inheritance diagram for SampleMap:
SafeChangeListener PoolBase::Listener

Public Types

enum  SaveMode { Undefined = 0, MultipleFiles, Monolith, MonolithEncrypted }
 A SamplerMap can be saved in multiple modes. More...
 

Public Member Functions

void changeListenerCallback (SafeChangeBroadcaster *b)
 Checks if the samplemap was changed and deletes it. More...
 
void clear (NotificationType n)
 Clears the sample map. More...
 
const ValueTree getValueTree () const
 Exports the SampleMap as ValueTree. More...
 
bool hasUnsavedChanges () const
 Checks if any ModulatorSamplerSound was changed since the last save. More...
 
void save ()
 Saves all data with the mode depending on the file extension. More...
 
- Public Member Functions inherited from PoolBase::Listener
virtual void poolEntryAdded ()
 Called whenever a pool entry was added. More...
 
virtual void poolEntryChanged (PoolReference referenceThatWasChanged)
 If a pool entry gets changed, this will be called. More...
 
virtual void poolEntryRemoved ()
 Called when a pool entry was removed. More...
 

Detailed Description

A SampleMap is a data structure that encapsulates all data loaded into an ModulatorSampler.

It saves / loads all sampler data (modulators, effects) as well as all loaded sound files.

It supports two saving modes (monolithic and file-system based). It only accesses the sampler data when saved or loaded, and uses a ChangeListener to check if a sound has changed.

Member Enumeration Documentation

enum SaveMode

A SamplerMap can be saved in multiple modes.

Enumerator
Undefined 

The default mode, until the map gets saved.

MultipleFiles 

Saves all data using this file structure:

  • the sample map will be saved as .xml file
  • the thumbnail data will be saved as thumbnail.dat
  • the samples will be saved into a '/samples' subfolder and replaced by relative file references.
  • the sampler data (modulators) will be stored as preset file (*.hip) containing a reference to the samplerMap
Monolith 

Saves everything into a big file which contains all data.

MonolithEncrypted 

Saves everything into a big file and encrypts the header data using a RSA Key which can be used to handle serial numbers.

Member Function Documentation

void changeListenerCallback ( SafeChangeBroadcaster b)
virtual

Checks if the samplemap was changed and deletes it.

Implements SafeChangeListener.

void clear ( NotificationType  n)

Clears the sample map.

const ValueTree getValueTree ( ) const

Exports the SampleMap as ValueTree.

If the relative mode is enabled, it writes the files to the subdirectory '/samples', if they don't exist yet.

bool hasUnsavedChanges ( ) const
inline

Checks if any ModulatorSamplerSound was changed since the last save.

This feature is currently disabled. It does not check if any other ModulatorSampler Properties were changed.

void save ( )

Saves all data with the mode depending on the file extension.

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