Object grants access to the current Sound Generators internals (scoped). Depending on the type of Sound Generator, there are some function which will not work, because they are limited to a certain Processor type (You will get a error message if you try to use a illegal API call)
Adds a controller to the buffer.
Synth.addController(int channel, int number, int value, int timeStampSamples)
Adds a effect (index = -1 to append it at the end).
Synth.addEffect( String type, String id, int index)
Adds the event from the given holder and returns a event id for note ons.
Adds a Modulator to the synth's chain. If it already exists, it returns the index.
Synth.addModulator(int chainId, String type, String id)
Adds a note off to the buffer.
Synth.addNoteOff(int channel, int noteNumber, int timeStampSamples)
Adds a note on to the buffer.
Synth.addNoteOn(int channel, int noteNumber, int velocity, int timeStampSamples)
Adds a pitch fade to the given event ID.
Synth.addPitchFade(int eventId, int fadeTimeMilliseconds, int targetCoarsePitch, int targetFinePitch)
Adds the interface to the Container's body (or the frontend interface if compiled)
Fades all voices with the given event id to the target volume (in decibels).
Synth.addVolumeFade(int eventId, int fadeTimeMilliseconds, int targetVolume)
Creates a Builder object that can be used to create the module tree.
Defers all callbacks to the message thread (midi callbacks become read-only).
Returns an array of all effects that match the given regex.
Returns an array of all modulators that match the given regex.
Returns the attribute of the parent synth.
Returns the child synth with the supplied name.
Synth.getAudioSampleProcessor( String name)
Returns the child synth with the supplied name.
Synth.getChildSynth( String name)
Returns the child synth with the given index.
Returns a reference to a processor that holds a display buffer.
Synth.getDisplayBufferSource( String name)
Returns the Effect with the supplied name. Can only be called in onInit(). It looks also in all child processors.
Synth.getEffect( String name)
Searches the child processors and returns a list with every ID of the given type.
Synth.getIdList( String type)
Creates a reference to the given MIDI player.
Synth.getMidiPlayer( String playerId)
Returns the MidiProcessor with the supplied name. Can not be the own name!
Synth.getMidiProcessor( String name)
Returns the Modulator with the supplied name. Can be only called in onInit. It looks also in all child processors.
Synth.getModulator( String name)
Returns the index of the Modulator in the chain with the supplied chainId
Synth.getModulatorIndex(int chainId, String id)
Returns the number of child synths. Works with SynthGroups and SynthChains.
Returns the number of pressed keys (!= the number of playing voices!).
Creates a reference to the routing matrix of the given processor.
Synth.getRoutingMatrix( String processorId)
Returns the first sampler with the name name.
Synth.getSampler( String name)
Returns the sliderpack processor with the given name.
Synth.getSliderPackProcessor( String name)
Returns the first slot with the given name.
Synth.getSlotFX( String name)
Returns the table processor with the given name.
Synth.getTableProcessor( String name)
Returns the current timer interval in seconds.
Checks if the artificial event is active
Checks if the given key is pressed.
Checks if any key is pressed.
Returns true if the sustain pedal is pressed.
Checks if the timer for this script is running.
Sends a note off message. The envelopes will tail off.
Sends a note off message for the supplied event ID. This is more stable than the deprecated noteOff() method.
Sends a note off message for the supplied event ID with the given delay in samples.
Synth.noteOffDelayedByEventId(int eventId, int timestamp)
Injects a note off to the incoming MIDI buffer (similar to playNoteFromUI).
Synth.noteOffFromUI(int channel, int noteNumber)
Plays a note and returns the event id. Be careful or you get stuck notes!
Synth.playNote(int noteNumber, int velocity)
Injects a note on to the incoming MIDI buffer (just as if the virtual keyboard was pressed.
Synth.playNoteFromUI(int channel, int noteNumber, int velocity)
Plays a note and returns the event id with the given channel and start offset.
Synth.playNoteWithStartOffset(int channel, int number, int velocity, int offset)
Removes the given effect.
Removes the modulator.
Sends a controller event to the synth.
Synth.sendController(int controllerNumber, int controllerValue)
The same as sendController (for backwards compatibility)
Synth.sendControllerToChildSynths(int controllerNumber, int controllerValue)
Sets an attribute of the parent synth.
Synth.setAttribute(int attributeIndex, float newAttribute)
Sets the internal clock speed.
Sets one of the eight macro controllers to the newValue.
Synth.setMacroControl(int macroIndex, float newValue)
Calling this method will have the same effect as turning the respective Macro Control but you can use it for a more fine-grained control about what and when to send the value change.
Unlike everything else in a proper programming language, the range of the
argument starts with 1 (to be consistent with the labels in HISE).
argument is expected to be in the
0 - 127
value range, but it doesn't need to be an integer.
It's your responsibility to watch out that this call does not occur in a control that is connected to the same macro control or you might end up getting a recursive loop and freeze your system!
Sets a ModulatorAttribute.
Synth.setModulatorAttribute(int chainId, int modulatorIndex, int attributeIndex, float newValue)
If set to true, this will kill retriggered notes (default).
Use a uniform voice index for the given container.
Synth.setUseUniformVoiceHandler(String containerId, bool shouldUseUniformVoiceHandling)
This is a new feature introduced with HISE 3.5.0 and ensures that all sound generators will use the same voice index whenever a new voice is started. Synchronizing the voice indexes comes with a slight overhead (so it's disabled by default), but it allows you to use envelope modulators as global modulation source because now it can properly fetch the required modulation values because it's guaranteed that the voice indexes will match.
In order to use this function, call it with a container ID that you want to be used as root for the voice unification. This is not required to be the master container, so you can still perform additional MIDI processing (arpeggiators, glide scripts etc). However you need to ensure that beyond that point every sound generator will start not more than one voice for each incoming MIDI event.
Applies a gain factor to a specified voice.
Synth.setVoiceGainValue(int voiceIndex, float gainValue)
Applies a pitch factor (0.5 ... 2.0) to a specified voice.
Synth.setVoicePitchValue(int voiceIndex, double pitchValue)
Starts the timer of the synth.
Stops the timer of the synth. You can call this also in the timer callback.