HISE Docs

ProcessData

A data structure that contains the processing context for a DSP algorithm.
It has a compile-time channel amount to that you can use channel loop iterators without performance overhead (because it will be most likely unrolled).
This class is extremely lightweight to fit into 32 bytes and contains:


It also provides a few tools to make the code as lean as possible by providing access to its data using one of the three toXXXData functions:


Static functions

getNumChannels

int getNumChannels()

Gets the number of channels.

Class methods

ProcessData

ProcessData(float **d, int numSamples_, int numChannels_=NumChannels)

Creates a ProcessDataFix object from the given data pointer.

begin

ChannelPtr * begin() const

Allows iteration over the channel data.
The ChannelPtr return type can be passed into the toChannelData() method in order to create a dyn object that can be used to iterate over the channel's sample data:

ProcessData<2> data;

for(auto& ch: data)
{
    // Pass the `ch` iterator into the `toChannelData` function
    // in order to iterator over the float samples...
    for(float& s: data.toChannelData(ch))
    {
        s *= 0.5f;
    }
}


end

ChannelPtr * end() const

see begin().

operator[]

dyn< float > operator[](int channelIndex)

creates a iteratable channel object for the .

toFrameData

FrameProcessor< C > toFrameData()

Generates a frame processor that allows frame-based iteration over all given channels.

getNumSamples

int getNumSamples() const

Returns the amount of samples for this processing block. This value is guaranteed to be less than the blockSize value passed into the last prepare()

toChannelData

block toChannelData(const ChannelPtr &channelStart) const

Converts a ChannelPtr to a block.

toEventData

dyn< HiseEvent > toEventData() const

Creates a buffer of HiseEvents for the given chunk.