VCV Rack API v2
Loading...
Searching...
No Matches
rack::engine::Output Struct Reference

#include <Port.hpp>

Inheritance diagram for rack::engine::Output:
[legend]
Collaboration diagram for rack::engine::Output:
[legend]

Additional Inherited Members

- Public Types inherited from rack::engine::Port
enum  Type { INPUT , OUTPUT }
 
- Public Member Functions inherited from rack::engine::Port
void setVoltage (float voltage, uint8_t channel=0)
 Sets the voltage of the given channel.
 
float getVoltage (uint8_t channel=0)
 Returns the voltage of the given channel.
 
float getPolyVoltage (uint8_t channel)
 Returns the given channel's voltage if the port is polyphonic, otherwise returns the first voltage (channel 0).
 
float getNormalVoltage (float normalVoltage, uint8_t channel=0)
 Returns the voltage if a cable is connected, otherwise returns the given normal voltage.
 
float getNormalPolyVoltage (float normalVoltage, uint8_t channel)
 
float * getVoltages (uint8_t firstChannel=0)
 Returns a pointer to the array of voltages beginning with firstChannel.
 
void readVoltages (float *v)
 Copies the port's voltages to an array of size at least channels.
 
void writeVoltages (const float *v)
 Copies an array of size at least channels to the port's voltages.
 
void clearVoltages ()
 Sets all voltages to 0.
 
float getVoltageSum ()
 Returns the sum of all voltages.
 
float getVoltageRMS ()
 Returns the root-mean-square of all voltages.
 
template<typename T >
getVoltageSimd (uint8_t firstChannel)
 
template<typename T >
getPolyVoltageSimd (uint8_t firstChannel)
 
template<typename T >
getNormalVoltageSimd (T normalVoltage, uint8_t firstChannel)
 
template<typename T >
getNormalPolyVoltageSimd (T normalVoltage, uint8_t firstChannel)
 
template<typename T >
void setVoltageSimd (T voltage, uint8_t firstChannel)
 
void setChannels (uint8_t channels)
 Sets the number of polyphony channels.
 
int getChannels ()
 Returns the number of channels.
 
bool isConnected ()
 Returns whether a cable is connected to the Port.
 
bool isMonophonic ()
 Returns whether the cable exists and has 1 channel.
 
bool isPolyphonic ()
 Returns whether the cable exists and has more than 1 channel.
 
DEPRECATED float normalize (float normalVoltage)
 Use getNormalVoltage() instead.
 
- Public Attributes inherited from rack::engine::Port
union { 
 
   float   voltages [PORT_MAX_CHANNELS] = {} 
 Unstable API. More...
 
   float   value 
 DEPRECATED. More...
 
};  
 Voltage of the port.
 
union { 
 
   uint8_t   channels = 0 
 Number of polyphonic channels. More...
 
   uint8_t   active 
 DEPRECATED. More...
 
};  
 
Light plugLights [3]
 For rendering plug lights on cables.
 

The documentation for this struct was generated from the following file: