WaveEditor Documentation

Written by CyanPhase (Edward Blake)

This plugin system allows for applying effects, and other low level manipulation of the Wavetable entries. Examples of WaveEditor plugins are HD CoolEditor and 7900's Effects. With Overloader 1.5, the wavetable also allows for 24-bit packed int, 32-bit PCM and 32-bit float samples, the WaveEditor and WTHelper interfaces contain support for these alternative encodings. The API is relatively flexible and allows for a variety of functionality. Here's a description of each function of the CWaveEditor class.

CWaveEditor class
Function Description
Init This function is called when the waveeditor is getting loaded.
GetNumOfCommands This function is called during initialization to get the number of commands this waveeditor supports.
EnumerateCommands This function is called during initialization to get the names of the commands from 0 to N.
Start This function is called to perform an action on a wavetable entry, or basically when the item is clicked in the Effects button menu.
DispatchCommand This function is called for various functions, it is extendable.
DispatchCommandEx This function is called for various functions.
WaveEditorVersion This function is used to get the WaveEditor's API version.
GetExtensionsClass This function is used to retrieve other extension classes, similar in a way to how COM works.


CCBWaveEditor class (Callback)
Function Description
GetMainBuzzWindow Get the main buzz window handle
GetWaveTableWindow Get the wavetable window handle
CreateNewEntry Create a new entry in a free slot
GetNumOfNotes Get number of notes in a entry
IsThereSample Check if there is a sample in a slot
GetSampleName Get the sample's name
GetSamples Get actual Samples, this can be 16-bit, 24-bit, or 32-bit in size.
GetNumSamples Get number of samples in this entry
GetNumChannels Get number of channels
GetLoopStart Get loop start
GetLoopEnd Get loop end
GetSamplerate Get sample rate
GetRootNote Get root note
GetVolume Get the volume of the sample
IsLooped Check if this sample is looped
SetNumChannels Set the number of channels
SetLoopStart Set the loop start
SetLoopEnd Set the loop end
SetSamplerate Set the sample rate
SetRootNote Set the root note
SetVolume Set the volume
SetLooped Set if this sample is looped
SetTo16BitPCM Set this sample flags to 16bit PCM.
SetTo32BitFloat Set this sample flags to 32bit floating point. In reality, the sample is offset by 8 bytes from the beginning (this information is useful for making machines to read the format, the first byte actually has the format number), but GetSamples compensates for this.
CreateSpecificEntry Create a new sample in a specific slot.
GetFileBrowserWnd Get the file browser's current window handle.
WavePlayerReserve Reserve (Resets) the player memory buffer
WavePlayerCreateBuffer Creates a buffer of stereo float samples to play
WavePlayerPlay Plays the sample on the current audio driver
SetSampleName Sets the name of the sample
SetTo32BitPCM Set the sample flags to 32-bit PCM. In reality, the sample is offset by 8 bytes from the beginning (this information is useful for making machines to read the format, the first byte actually has the format number), but GetSamples compensates for this.
SetTo24BitPInt Set the sample flags to 24-bit packed int. 3 bytes is used for each sample. In reality, the sample is offset by 8 bytes from the beginning (this information is useful for making machines to read the format, the first byte actually has the format number), but GetSamples compensates for this.
GetSampleType Get the sample type id (bitdepth and\or format) of the sample. Can be used to know which format the sample format is in.
SetSampleType Set the sample type id (bitdepth and\or format) of the sample. Can be used to set the format of a sample manually instead of using SetToXXX. Though this is not really recommended.


CWaveEditorDirectWork class
Function Description
AboutImplementation This function is called to return a string describing your direct work player. This is optional.
WorkStereo Works basically the same as a Buzz Machine's WorkStereo Function.
Stop This function is called to stop the stream of audio. this handled by the plugin's code to stop the previewing\wave playing. This function will get called if the user presses the "stop" button in the wavetable.