### Sample Class Methods Source: https://www.image-line.com/fl-studio-learning/fl-studio-online-manual/html/plugins/editortool_run.htm Methods for manipulating sample data within Edison. ```APIDOC ## Sample Class ### GetSampleAt(Position, Channel) Retrieve the value of a single sample (Position in samples). ### SetSampleAt(Position, Channel, Value) Set the value of a single sample (Position in samples). ### NormalizeFromTo(x1, x2, Vol, OnlyIfAbove = FALSE) Normalize the wave between sample positions x1 and x2 (inclusive). ### AmpFromTo(x1, x2, Vol) Amplify the wave between sample positions x1 and x2 (inclusive). ### SilenceFromTo(x1, x2) Change the sample values between positions x1 and x2 (inclusive) to zero. ### SineFromTo(x1, x2, Freq, Phase, Vol = 1.0) Change the samples between positions x1 and x2 (inclusive) to a sine wave. ### LoadFromClipboard Load a wave from the clipboard into this sample object. ### MsToSamples(Time) Convert a position value from milliseconds to samples. ### NormalizeFormat(Source, Mode = nfAll) Change the format of this sample to be compatible with the format of the source sample. See the mode constants above. ### GetRegion(Index) Retrieve an object for the region at Index (between 0 and RegionCount-1). ### CenterFromTo(x1, x2) Center the wave between the sample positions x1 and x2 (inclusive). ### ReverseFromTo(x1, x2) Reverse the wave between sample positions x1 and x2 (inclusive). ### ReversePolarityFromTo(x1, x2) Reverse polarity of the wave between sample positions x1 and x2 (inclusive). ### SwapChannelsFromTo(x1, x2) Swap the values of the channels of this wave between sample positions x1 and x2 (inclusive), for a stereo wave. ### InsertSilence(x1, x2) Insert a block of zero-valued samples (silence) between sample positions x1 and x2 (inclusive). This doesn't change the existing samples, it only inserts new samples at at position x1. ### NoiseFromTo(x1, x2, Mode = 1, Vol = 1) Change the samples between positions x1 and x2 (inclusive) to random values. Mode is 0 (uniform noise) or 1 (gaussian noise). ### DeleteFromTo(x1, x2, Copy = FALSE) Delete samples from x1 to x2 (inclusive). ### TrimFromTo(x1, x2) Trim samples from 0 to x1 (inclusive) and from x2 to the end of the sample. ### SamplesToMS(Time) Convert a position value from samples to milliseconds. ### LoadFromFile(Filename) Load a filename. This needs to be a complete filename with path. Use ScriptPath to complete it if necessary. ### LoadFromFile_Ask Shows an open dialog and loads the file into the sample if the user clicks OK. ### AddRegion(Name, SampleStart, SampleEnd) Add a new region. Returns the index of the new region (other regions may have been moved to another index). ### DeleteRegion(Index) Delete an existing region at Index. ``` -------------------------------- ### Sample Class Properties Source: https://www.image-line.com/fl-studio-learning/fl-studio-online-manual/html/plugins/editortool_run.htm Properties of the Sample class for accessing sample information. ```APIDOC ## Sample Class Properties ### Length The length of the wave, in samples. ### NumChans The channel count. ### SampleRate The sample rate, in Hertz. ### RegionCount The amount of regions. Can be zero or more. ``` -------------------------------- ### Dialog Classes and Functions Source: https://www.image-line.com/fl-studio-learning/fl-studio-online-manual/html/plugins/editortool_run.htm Utilities for creating and managing script dialogs. ```APIDOC ## Dialog Classes and Functions ### TScriptDialog #### AddInput(aName, Value) Adds a generic input control. #### AddInputKnob(aName, Value, Min, Max) Adds a knob input control. #### AddInputCombo(aName, ValueList, Value) Adds a combobox input control. #### GetInputValue(aName) Retrieve the current value of the input with the specified name. #### Execute Show the dialog. Returns TRUE if the user pressed OK, FALSE if the dialog was cancelled. ### CreateScriptDialog(Title, Description) Creates a new script dialog. ``` -------------------------------- ### Global Functions Source: https://www.image-line.com/fl-studio-learning/fl-studio-online-manual/html/plugins/editortool_run.htm Global functions available for use within Edison scripts. ```APIDOC ## Global Functions ### ProgressMsg(Msg, Pos, Total) Shows a progress message in Edison/FL. ### ShowMessage(Msg) Shows a message in a dialog box. ``` -------------------------------- ### Editor Class Properties Source: https://www.image-line.com/fl-studio-learning/fl-studio-online-manual/html/plugins/editortool_run.htm Properties of the Editor class for accessing editor selection information. ```APIDOC ## Editor Class Properties ### SelectionStartS Retrieve the start position of the selection in the editor, in samples. ### SelectionEndS Retrieve the end position of the selection in the editor, in samples. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.