HISE Docs

AudioSampleProcessor

An AudioSampleProcessor object is a reference to a HISE module that can load audio files (eg. the Audio Loop Player or the Convolution Reverb ). The associated project folder is AudioFiles .

There are API calls that can load different audio files from the AudioFilePool , change the range within the audio file.

Normally you create an object of this type using Synth.getAudioSampleProcessor() and then call one of its methods.

Class methods

exists

Checks if the Object exists and prints a error message on the console if not.

AudioSampleProcessor.exists()



getAttribute

Returns the attribute with the given index.

AudioSampleProcessor.getAttribute(int index)



getAttributeId

Returns the attribute with the given index.

AudioSampleProcessor.getAttributeId(int index)



getAttributeIndex

Returns the index of the attribute with the given ID.

AudioSampleProcessor.getAttributeIndex(String id)



getAudioFile

Creates a ScriptAudioFile reference to the given index.

AudioSampleProcessor.getAudioFile(int slotIndex)



getFilename

Returns the filename (including wildcard) for the currently loaded file.

AudioSampleProcessor.getFilename()



getNumAttributes

Returns the number of attributes.

AudioSampleProcessor.getNumAttributes()



getSampleLength

Returns the length of the current sample selection in samples.

AudioSampleProcessor.getSampleLength()



getSampleStart

Returns the samplerange in the form [start, end].

AudioSampleProcessor.getSampleStart()



isBypassed

Checks if the audio sample player is bypassed.

AudioSampleProcessor.isBypassed()



setAttribute

Changes one of the Parameter. Look in the manual for the index numbers of each effect.

AudioSampleProcessor.setAttribute(int parameterIndex, float newValue)



setBypassed

Bypasses the audio sample player.

AudioSampleProcessor.setBypassed(bool shouldBeBypassed)



setFile

loads the file. You can use the wildcard {PROJECT_FOLDER} to get the audio file folder for the current project.

AudioSampleProcessor.setFile(String fileName)



setSampleRange

Sets the length of the current sample selection in samples.

AudioSampleProcessor.setSampleRange(int startSample, int endSample)