All Classes Namespaces Functions Variables Enumerations Enumerator Modules Pages
Public Member Functions | List of all members
ScriptingApi::Engine Class Reference
Inheritance diagram for ScriptingApi::Engine:
ScriptingObject ApiClass

Public Member Functions

void loadFont (const String &fileName)
double getSampleRate () const
double getSamplesForMilliSeconds (double milliSeconds) const
double getMilliSecondsForSamples (double samples) const
double getGainFactorForDecibels (double decibels) const
double getDecibelsForGainFactor (double gainFactor) const
double getFrequencyForMidiNoteNumber (int midiNumber) const
double getPitchRatioFromSemitones (double semiTones) const
double getSemitonesFromPitchRatio (double pitchRatio) const
String getMidiNoteName (int midiNumber) const
int getMidiNoteFromName (String midiNoteName) const
void allNotesOff ()
double getUptime () const
void setKeyColour (int keyNumber, int colourAsHex)
void setLowestKeyToDisplay (int keyNumber)
void showErrorMessage (String message, bool isCritical)
void showMessage (String message)
double getMilliSecondsForTempo (int tempoIndex) const
void loadNextUserPreset (bool stayInDirectory)
void loadPreviousUserPreset (bool stayInDirectory)
String getCurrentUserPresetName ()
void saveUserPreset (String presetName)
double getHostBpm () const
double getMemoryUsage () const
double getCpuUsage () const
int getNumVoices () const
String getMacroName (int index)
String getOS ()
String getDeviceType ()
var getDeviceResolution ()
bool isPlugin () const
var getZoomLevel () const
String getVersion ()
double getMasterPeakLevel (int channel)
var getSettingsWindowObject ()
DynamicObject * getPlayHead ()
ScriptingObjects::MidiList * createMidiList ()
ScriptingObjects::ScriptSliderPackData * createSliderPackData ()
ScriptingObjects::TimerObject * createTimerObject ()
ScriptingObjects::ScriptingMessageHolder * createMessageHolder ()
void dumpAsJSON (var object, String fileName)
var loadFromJSON (String fileName)
void setCompileProgress (var progress)
bool matchesRegex (String stringToMatch, String regex)
var getRegexMatches (String stringToMatch, String regex)
String doubleToString (double value, int digits)
void undo ()
void redo ()
- Public Member Functions inherited from ApiClass
 ApiClass (int numConstants_)
void addConstant (String constantName, var value)
const var getConstantValue (int index) const
int getConstantIndex (const Identifier &id) const
Identifier getConstantName (int index) const
void addFunction (const Identifier &id, call0 newFunction)
void addFunction1 (const Identifier &id, call1 newFunction)
void addFunction2 (const Identifier &id, call2 newFunction)
void addFunction3 (const Identifier &id, call3 newFunction)
void addFunction4 (const Identifier &id, call4 newFunction)
void addFunction5 (const Identifier &id, call5 newFunction)
void getIndexAndNumArgsForFunction (const Identifier &id, int &index, int &numArgs) const
var callFunction (int index, var *args, int numArgs)
void getAllFunctionNames (Array< Identifier > &ids) const
void getAllConstants (Array< Identifier > &ids) const

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 getMasterPeakLevel ( int  channel)

Returns the current peak volume (0...1) for the given channel.

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.