Public Member Functions | List of all members
ScriptingApi::Engine Class Reference

Inherits ScriptingObject, and ApiClass.

Public Member Functions

void allNotesOff ()
ScriptingObjects::ScriptingMessageHolder * createMessageHolder ()
ScriptingObjects::MidiList * createMidiList ()
ScriptingObjects::ScriptSliderPackData * createSliderPackData ()
ScriptingObjects::TimerObject * createTimerObject ()
String doubleToString (double value, int digits)
void dumpAsJSON (var object, String fileName)
double getCpuUsage () const
String getCurrentUserPresetName ()
double getDecibelsForGainFactor (double gainFactor) const
var getDeviceResolution ()
String getDeviceType ()
double getFrequencyForMidiNoteNumber (int midiNumber) const
double getGainFactorForDecibels (double decibels) const
double getHostBpm () const
String getMacroName (int index)
double getMemoryUsage () const
int getMidiNoteFromName (String midiNoteName) const
String getMidiNoteName (int midiNumber) const
double getMilliSecondsForSamples (double samples) const
double getMilliSecondsForTempo (int tempoIndex) const
int getNumVoices () const
String getOS ()
double getPitchRatioFromSemitones (double semiTones) const
DynamicObject * getPlayHead ()
var getRegexMatches (String stringToMatch, String regex)
double getSampleRate () const
double getSamplesForMilliSeconds (double milliSeconds) const
double getSemitonesFromPitchRatio (double pitchRatio) const
var getSettingsWindowObject ()
double getUptime () const
String getVersion ()
var getZoomLevel () const
bool isPlugin () const
void loadFont (const String &fileName)
var loadFromJSON (String fileName)
void loadNextUserPreset (bool stayInDirectory)
void loadPreviousUserPreset (bool stayInDirectory)
bool matchesRegex (String stringToMatch, String regex)
void redo ()
void saveUserPreset (String presetName)
void setCompileProgress (var progress)
void setKeyColour (int keyNumber, int colourAsHex)
void setLowestKeyToDisplay (int keyNumber)
void showErrorMessage (String message, bool isCritical)
void showMessage (String message)
void undo ()

Detailed Description

All scripting methods related to the main engine can be accessed here.

Member Function Documentation

void allNotesOff ( )

Sends an allNotesOff message at the next buffer.

ScriptingObjects::ScriptingMessageHolder* createMessageHolder ( )

Creates a storage object for Message events.

ScriptingObjects::MidiList* createMidiList ( )

Creates a MIDI List object.

ScriptingObjects::ScriptSliderPackData* createSliderPackData ( )

Creates a SliderPack Data object.

ScriptingObjects::TimerObject* createTimerObject ( )

Creates a new timer object.

String doubleToString ( double  value,
int  digits 

Returns a string of the value with the supplied number of digits.

void dumpAsJSON ( var  object,
String  fileName 

Exports an object as JSON.

double getCpuUsage ( ) const

Returns the current CPU usage in percent (0 ... 100)

String getCurrentUserPresetName ( )

Returns the currently loaded user preset (without extension).

double getDecibelsForGainFactor ( double  gainFactor) const

Converts gain factor (0.0 .. 1.0) to decibel (-100.0 ... 0).

var getDeviceResolution ( )

Returns the full screen resolution for the current device.

String getDeviceType ( )

Returns the mobile device that this software is running on.

double getFrequencyForMidiNoteNumber ( int  midiNumber) const

Converts midi note number 0 ... 127 to Frequency 20 ... 20.000.

double getGainFactorForDecibels ( double  decibels) const

Converts decibel (-100.0 ... 0.0) to gain factor (0.0 ... 1.0).

double getHostBpm ( ) const

Returns the Bpm of the host.

String getMacroName ( int  index)

Returns the name for the given macro index.

double getMemoryUsage ( ) const

Returns the current memory usage in MB.

int getMidiNoteFromName ( String  midiNoteName) const

Converts MIDI note name to MIDI number ("C3" for middle C).

String getMidiNoteName ( int  midiNumber) const

Converts MIDI note number to Midi note name ("C3" for middle C).

double getMilliSecondsForSamples ( double  samples) const

Converts samples to milli seconds.

double getMilliSecondsForTempo ( int  tempoIndex) const

Returns the millisecond value for the supplied tempo (HINT: Use "TempoSync" mode from Slider!)

int getNumVoices ( ) const

Returns the amount of currently active voices.

String getOS ( )

Returns the current operating system ("OSX" or ("WIN").

double getPitchRatioFromSemitones ( double  semiTones) const

Converts a semitone value to a pitch ratio (-12 ... 12) -> (0.5 ... 2.0)

DynamicObject* getPlayHead ( )

Allows access to the data of the host (playing status, timeline, etc...).

var getRegexMatches ( String  stringToMatch,
String  regex 

Returns an array with all matches.

double getSampleRate ( ) const

Returns the current sample rate.

double getSamplesForMilliSeconds ( double  milliSeconds) const

Converts milli seconds to samples

double getSemitonesFromPitchRatio ( double  pitchRatio) const

Converts a pitch ratio to semitones (0.5 ... 2.0) -> (-12 ... 12)

var getSettingsWindowObject ( )

Returns a object that contains the properties for the settings dialog.

double getUptime ( ) const

Returns the uptime of the engine in seconds.

String getVersion ( )

Returns the product version (not the HISE version!).

var getZoomLevel ( ) const

Returns the current Zoom Level.

bool isPlugin ( ) const

Returns true if running as VST / AU / AAX plugin.

void loadFont ( const String &  fileName)

Loads a font file.

var loadFromJSON ( String  fileName)

Imports a JSON file as object.

void loadNextUserPreset ( bool  stayInDirectory)

Loads the next user preset.

void loadPreviousUserPreset ( bool  stayInDirectory)

Loads the previous user preset.

bool matchesRegex ( String  stringToMatch,
String  regex 

Matches the string against the regex token.

void redo ( )

Redo the last controller change.

void saveUserPreset ( String  presetName)

Asks for a preset name (if presetName is empty) and saves the current user preset.

void setCompileProgress ( var  progress)

Displays the progress (0.0 to 1.0) in the progress bar of the editor.

void setKeyColour ( int  keyNumber,
int  colourAsHex 

Sets a key of the global keyboard to the specified colour (using the form 0x00FF00 for eg. of the key to the specified colour.

void setLowestKeyToDisplay ( int  keyNumber)

Changes the lowest visible key on the on screen keyboard.

void showErrorMessage ( String  message,
bool  isCritical 

Shows a error message on the compiled plugin (or prints it on the console). Use isCritical if you want to disable the "Ignore" Button.

void showMessage ( String  message)

Shows a message with an overlay on the compiled plugin with an "OK" button in order to notify the user about important events.

void undo ( )

Reverts the last controller change.

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