|
Gin
|
Files | |
| file | gin_easing.h |
| Collection of easing functions for animation and interpolation. | |
Namespaces | |
| namespace | Diff |
| Binary diff/patch utilities using the bsdiff algorithm. | |
| namespace | Lagrange |
| Lagrange interpolation functions for obtaining smooth curves from discrete points. | |
Classes | |
| class | DownloadManager |
| Asynchronous HTTP download manager with queue and progress tracking. More... | |
| struct | DownloadManager::DownloadResult |
| Result of a completed or failed download. More... | |
| class | EquationParser |
| Mathematical equation parser and evaluator with variable and function support. More... | |
| class | FileSystemWatcher |
| Cross-platform file system watcher for monitoring folder changes. More... | |
| class | FileSystemWatcher::Listener |
| Listener interface for receiving file system change notifications. More... | |
| class | Integrator |
| Numerical integration using the trapezoidal rule for discrete data points. More... | |
| class | LeastSquaresRegression |
| Performs least squares regression to fit a quadratic curve to data points. More... | |
| class | LinearRegression |
| Performs linear regression to fit a straight line to data points. More... | |
| class | LockFreeQueue< T > |
| A lock-free FIFO queue for single-producer, single-consumer scenarios. More... | |
| class | MessagePack |
| Converts between MessagePack binary format and juce::var. More... | |
| class | Point< T > |
| A lightweight 2D point class for projects that don't use juce_graphics. More... | |
| class | RealtimeAsyncUpdater |
| An asynchronous update dispatcher that bypasses the message queue. More... | |
| class | RealtimeEvent |
| A realtime-safe event synchronization primitive for cross-thread signaling. More... | |
| class | RIFFParser |
| Parses RIFF (Resource Interchange File Format) files. More... | |
| class | SharedMemory |
| Creates a block of shared memory. More... | |
| class | Spline |
| Cubic spline interpolation for smooth curves through discrete data points. More... | |
| class | Spline::Element |
| class | SystemSemaphore |
| A system-wide semaphore for inter-process synchronization. More... | |
| class | TextHistory |
| Undo/redo history management for text editing with efficient diff-based storage. More... | |
| class | PerlinNoise< T > |
| Generates Perlin noise - a type of gradient noise with natural-looking characteristics. More... | |
| class | RollingAverage |
| Maintains a rolling average of a series of numbers. More... | |
| class | TimeProfiler |
| A simple RAII-based time profiler for measuring execution duration. More... | |
| class | ValueTreeObject |
| Maintains an object hierarchy that mirrors a ValueTree structure. More... | |
| class | LambdaValueTreeListener |
| Listens to ValueTree changes using lambda functions instead of virtual methods. More... | |
| class | AsyncLambdaValueTreeListener |
| Asynchronous ValueTree listener using lambda functions. More... | |
Functions | |
| template<class T > | |
| T | easeLinear (T p) |
| Linear interpolation with no easing. | |
| template<class T > | |
| T | easeQuadraticIn (T p) |
| Quadratic easing in - accelerating from zero velocity. | |
| template<class T > | |
| T | easeQuadraticOut (T p) |
| Quadratic easing out - decelerating to zero velocity. | |
| template<class T > | |
| T | easeQuadraticInOut (T p) |
| Quadratic easing in/out - acceleration until halfway, then deceleration. | |
| template<class T > | |
| T | easeCubicIn (T p) |
| Cubic easing in - accelerating from zero velocity. | |
| template<class T > | |
| T | easeCubicOut (T p) |
| Cubic easing out - decelerating to zero velocity. | |
| template<class T > | |
| T | easeCubicInOut (T p) |
| Cubic easing in/out - acceleration until halfway, then deceleration. | |
| template<class T > | |
| T | easeQuarticIn (T p) |
| Quartic easing in - accelerating from zero velocity. | |
| template<class T > | |
| T | easeQuarticOut (T p) |
| Quartic easing out - decelerating to zero velocity. | |
| template<class T > | |
| T | easeQuarticInOut (T p) |
| Quartic easing in/out - acceleration until halfway, then deceleration. | |
| template<class T > | |
| T | easeQuinticIn (T p) |
| Quintic easing in - accelerating from zero velocity. | |
| template<class T > | |
| T | easeQuinticOut (T p) |
| Quintic easing out - decelerating to zero velocity. | |
| template<class T > | |
| T | easeQuinticInOut (T p) |
| Quintic easing in/out - acceleration until halfway, then deceleration. | |
| template<class T > | |
| T | easeSineIn (T p) |
| Sine easing in - accelerating from zero velocity. | |
| template<class T > | |
| T | easeSineOut (T p) |
| Sine easing out - decelerating to zero velocity. | |
| template<class T > | |
| T | easeSineInOut (T p) |
| Sine easing in/out - acceleration until halfway, then deceleration. | |
| template<class T > | |
| T | easeCircularIn (T p) |
| Circular easing in - accelerating from zero velocity. | |
| template<class T > | |
| T | easeCircularOut (T p) |
| Circular easing out - decelerating to zero velocity. | |
| template<class T > | |
| T | easeCircularInOut (T p) |
| Circular easing in/out - acceleration until halfway, then deceleration. | |
| template<class T > | |
| T | easeExponentialIn (T p) |
| Exponential easing in - accelerating from zero velocity. | |
| template<class T > | |
| T | easeExponentialOut (T p) |
| Exponential easing out - decelerating to zero velocity. | |
| template<class T > | |
| T | easeExponentialInOut (T p) |
| Exponential easing in/out - acceleration until halfway, then deceleration. | |
| template<class T > | |
| T | easeElasticIn (T p) |
| Elastic easing in - accelerating with oscillation. | |
| template<class T > | |
| T | easeElasticOut (T p) |
| Elastic easing out - decelerating with oscillation. | |
| template<class T > | |
| T | easeElasticInOut (T p) |
| Elastic easing in/out - acceleration and deceleration with oscillation. | |
| template<class T > | |
| T | easeBackIn (T p) |
| Back easing in - accelerating with slight overshoot. | |
| template<class T > | |
| T | easeBackOut (T p) |
| Back easing out - decelerating with overshoot. | |
| template<class T > | |
| T | easeBackInOut (T p) |
| Back easing in/out - acceleration and deceleration with overshoot. | |
| template<class T > | |
| T | easeBounceOut (T p) |
| Bounce easing out - decelerating with bounce effect. | |
| template<class T > | |
| T | easeBounceIn (T p) |
| Bounce easing in - accelerating with bounce effect. | |
| template<class T > | |
| T | easeBounceInOut (T p) |
| Bounce easing in/out - bouncing at both ends. | |
| bool | overwriteWithText (const juce::File &f, const juce::String &text, bool asUnicode=false, bool writeUnicodeHeaderBytes=false, const char *lineEndings=nullptr) |
| Overwrites a file with text content in a single atomic operation. | |
| bool | overwriteWithData (const juce::File &f, const juce::MemoryBlock &data) |
| Overwrites a file with binary data in a single atomic operation. | |
| bool | overwriteWithData (const juce::File &f, const void *data, size_t size) |
| Overwrites a file with binary data in a single atomic operation. | |
| juce::var | parsePlist (const juce::File &f) |
| Parses an Apple Property List (plist) file and returns its contents as a juce::var. | |
| juce::var | parsePlist (const juce::String &s) |
| Parses an Apple Property List (plist) from a string and returns its contents. | |
| juce::var | parsePlist (const juce::XmlElement &f) |
| Parses an Apple Property List (plist) from XML and returns its contents. | |
| int | getWavetableSize (const juce::MemoryBlock &m) |
| Extracts wavetable size from a RIFF file in memory. | |
| int | getWavetableSize (const juce::File &f) |
| Extracts wavetable size from a RIFF file. | |
| void | callInBackground (std::function< void(void)> function) |
| Executes a function on a background thread. | |
| template<typename T > | |
| void | multiThreadedFor (T start, T end, T interval, juce::ThreadPool *threadPool, std::function< void(T idx)> callback) |
| Executes a for loop in parallel across multiple threads. | |
| bool | compareAndReset (bool &flag) |
| Checks if a boolean flag is set, and if so, clears it and returns true. | |
| float | calculateRMS (const float *values, int n) |
| Calculates the Root Mean Square (RMS) of an array of values. | |
| float | calculateMedian (const float *values, int n) |
| Calculates the median value of an array of values. | |
| template<typename T > | |
| void | shuffleArray (juce::Random &r, T &array) |
| Randomly shuffles the elements of an array using the Fisher-Yates algorithm. | |
| int | versionStringToInt (const juce::String &versionString) |
| Converts a version string to an integer for comparison purposes. | |
| void | delayedLambda (std::function< void()> callback, int delayMS) |
| Executes a lambda function after a specified delay. | |
| template<typename T > | |
| juce::String | formatNumber (T v) |
| Formats a number as a string with appropriate decimal precision. | |
| juce::String | valueTreeToJSON (const juce::ValueTree &v) |
| Converts a ValueTree to a JSON string representation. | |
| juce::ValueTree | valueTreeFromJSON (const juce::String &jsonText) |
| Parses a JSON string and creates a ValueTree from it. | |
| T easeLinear | ( | T | p | ) |
Linear interpolation with no easing.
Modeled after the line y = x. Provides constant velocity with no acceleration or deceleration.
| p | Normalized time value [0, 1] |
Referenced by LinearEasing::ease().
| T easeQuadraticIn | ( | T | p | ) |
Quadratic easing in - accelerating from zero velocity.
Modeled after the parabola y = x^2. Starts slowly and accelerates.
| p | Normalized time value [0, 1] |
Referenced by QuadraticInEasing::ease(), and ModMatrix::shape().
| T easeQuadraticOut | ( | T | p | ) |
Quadratic easing out - decelerating to zero velocity.
Modeled after the parabola y = -x^2 + 2x. Starts quickly and decelerates.
| p | Normalized time value [0, 1] |
Referenced by QuadraticOutEasing::ease(), and ModMatrix::shape().
| T easeQuadraticInOut | ( | T | p | ) |
Quadratic easing in/out - acceleration until halfway, then deceleration.
Modeled after the piecewise quadratic:
| p | Normalized time value [0, 1] |
Referenced by QuadraticInOutEasing::ease(), and ModMatrix::shape().
| T easeCubicIn | ( | T | p | ) |
Cubic easing in - accelerating from zero velocity.
Modeled after the cubic y = x^3. Provides smoother acceleration than quadratic.
| p | Normalized time value [0, 1] |
Referenced by CubicInEasing::ease().
| T easeCubicOut | ( | T | p | ) |
Cubic easing out - decelerating to zero velocity.
Modeled after the cubic y = (x - 1)^3 + 1. Provides smoother deceleration than quadratic.
| p | Normalized time value [0, 1] |
Referenced by CubicOutEasing::ease().
| T easeCubicInOut | ( | T | p | ) |
Cubic easing in/out - acceleration until halfway, then deceleration.
Modeled after the piecewise cubic:
| p | Normalized time value [0, 1] |
Referenced by CubicInOutEasing::ease().
| T easeQuarticIn | ( | T | p | ) |
Quartic easing in - accelerating from zero velocity.
Modeled after the quartic x^4. More pronounced acceleration than cubic.
| p | Normalized time value [0, 1] |
Referenced by QuarticInEasing::ease().
| T easeQuarticOut | ( | T | p | ) |
Quartic easing out - decelerating to zero velocity.
Modeled after the quartic y = 1 - (x - 1)^4. More pronounced deceleration than cubic.
| p | Normalized time value [0, 1] |
Referenced by QuarticOutEasing::ease().
| T easeQuarticInOut | ( | T | p | ) |
Quartic easing in/out - acceleration until halfway, then deceleration.
Modeled after the piecewise quartic:
| p | Normalized time value [0, 1] |
Referenced by QuarticInOutEasing::ease().
| T easeQuinticIn | ( | T | p | ) |
Quintic easing in - accelerating from zero velocity.
Modeled after the quintic y = x^5. Very pronounced acceleration.
| p | Normalized time value [0, 1] |
Referenced by QuinticInEasing::ease().
| T easeQuinticOut | ( | T | p | ) |
Quintic easing out - decelerating to zero velocity.
Modeled after the quintic y = (x - 1)^5 + 1. Very pronounced deceleration.
| p | Normalized time value [0, 1] |
Referenced by QuinticOutEasing::ease().
| T easeQuinticInOut | ( | T | p | ) |
Quintic easing in/out - acceleration until halfway, then deceleration.
Modeled after the piecewise quintic:
| p | Normalized time value [0, 1] |
Referenced by QuinticInOutEasing::ease().
| T easeSineIn | ( | T | p | ) |
Sine easing in - accelerating from zero velocity.
Modeled after a quarter-cycle of a sine wave. Provides smooth, gradual acceleration.
| p | Normalized time value [0, 1] |
Referenced by SineInEasing::ease(), and ModMatrix::shape().
| T easeSineOut | ( | T | p | ) |
Sine easing out - decelerating to zero velocity.
Modeled after a quarter-cycle of a sine wave (different phase). Provides smooth, gradual deceleration.
| p | Normalized time value [0, 1] |
Referenced by SineOutEasing::ease(), and ModMatrix::shape().
| T easeSineInOut | ( | T | p | ) |
Sine easing in/out - acceleration until halfway, then deceleration.
Modeled after a half sine wave. Provides smooth, natural motion.
| p | Normalized time value [0, 1] |
Referenced by SineInOutEasing::ease(), and ModMatrix::shape().
| T easeCircularIn | ( | T | p | ) |
Circular easing in - accelerating from zero velocity.
Modeled after a shifted quadrant IV of a unit circle. Creates a gentle curve that accelerates more smoothly than polynomial easings.
| p | Normalized time value [0, 1] |
Referenced by CircularInEasing::ease().
| T easeCircularOut | ( | T | p | ) |
Circular easing out - decelerating to zero velocity.
Modeled after a shifted quadrant II of a unit circle. Creates a gentle curve that decelerates more smoothly than polynomial easings.
| p | Normalized time value [0, 1] |
Referenced by CircularOutEasing::ease().
| T easeCircularInOut | ( | T | p | ) |
Circular easing in/out - acceleration until halfway, then deceleration.
Modeled after the piecewise circular function:
| p | Normalized time value [0, 1] |
Referenced by CircularInOutEasing::ease().
| T easeExponentialIn | ( | T | p | ) |
Exponential easing in - accelerating from zero velocity.
Modeled after the exponential function y = 2^(10(x - 1)). Creates a very sharp, dramatic acceleration curve.
| p | Normalized time value [0, 1] |
Referenced by ExponentialInEasing::ease(), and ModMatrix::shape().
| T easeExponentialOut | ( | T | p | ) |
Exponential easing out - decelerating to zero velocity.
Modeled after the exponential function y = -2^(-10x) + 1. Creates a very sharp, dramatic deceleration curve.
| p | Normalized time value [0, 1] |
Referenced by ExponentialOutEasing::ease(), and ModMatrix::shape().
| T easeExponentialInOut | ( | T | p | ) |
Exponential easing in/out - acceleration until halfway, then deceleration.
Modeled after the piecewise exponential:
| p | Normalized time value [0, 1] |
Referenced by ExponentialInOutEasing::ease(), and ModMatrix::shape().
| T easeElasticIn | ( | T | p | ) |
Elastic easing in - accelerating with oscillation.
Modeled after a damped sine wave y = sin(13pi/2*x)*pow(2, 10 * (x - 1)). Creates an elastic, spring-like effect that overshoots and oscillates before settling.
| p | Normalized time value [0, 1] |
Referenced by ElasticInEasing::ease().
| T easeElasticOut | ( | T | p | ) |
Elastic easing out - decelerating with oscillation.
Modeled after a damped sine wave y = sin(-13pi/2*(x + 1))*pow(2, -10x) + 1. Creates an elastic, spring-like effect that overshoots and oscillates before settling.
| p | Normalized time value [0, 1] |
Referenced by ElasticOutEasing::ease().
| T easeElasticInOut | ( | T | p | ) |
Elastic easing in/out - acceleration and deceleration with oscillation.
Modeled after a piecewise exponentially-damped sine wave:
| p | Normalized time value [0, 1] |
Referenced by ElasticInOutEasing::ease().
| T easeBackIn | ( | T | p | ) |
Back easing in - accelerating with slight overshoot.
Modeled after the overshooting cubic y = x^3-x*sin(x*pi). Pulls back slightly before accelerating forward, creating anticipation.
| p | Normalized time value [0, 1] |
Referenced by BackInEasing::ease().
| T easeBackOut | ( | T | p | ) |
Back easing out - decelerating with overshoot.
Modeled after overshooting cubic y = 1-((1-x)^3-(1-x)*sin((1-x)*pi)). Overshoots the target slightly before settling back.
| p | Normalized time value [0, 1] |
Referenced by BackOutEasing::ease().
| T easeBackInOut | ( | T | p | ) |
Back easing in/out - acceleration and deceleration with overshoot.
Modeled after the piecewise overshooting cubic function:
| p | Normalized time value [0, 1] |
Referenced by BackInOutEasing::ease().
| T easeBounceOut | ( | T | p | ) |
Bounce easing out - decelerating with bounce effect.
Simulates a bouncing motion with decreasing amplitude, like a ball bouncing and coming to rest. Uses piecewise parabolic segments to create the bounce effect.
| p | Normalized time value [0, 1] |
Referenced by BounceOutEasing::ease(), easeBounceIn(), and easeBounceInOut().
| T easeBounceIn | ( | T | p | ) |
Bounce easing in - accelerating with bounce effect.
The inverse of easeBounceOut. Creates a bouncing motion at the start before accelerating to the final value.
| p | Normalized time value [0, 1] |
References easeBounceOut().
Referenced by BounceInEasing::ease(), and easeBounceInOut().
| T easeBounceInOut | ( | T | p | ) |
Bounce easing in/out - bouncing at both ends.
Combines bounce in and bounce out, creating a bouncing effect at both the start and end of the transition.
| p | Normalized time value [0, 1] |
References easeBounceIn(), and easeBounceOut().
Referenced by BounceInOutEasing::ease().
| bool overwriteWithText | ( | const juce::File & | f, |
| const juce::String & | text, | ||
| bool | asUnicode = false, |
||
| bool | writeUnicodeHeaderBytes = false, |
||
| const char * | lineEndings = nullptr |
||
| ) |
Overwrites a file with text content in a single atomic operation.
Unlike juce::File::replaceWithText(), this function writes directly to the target file without creating a temporary file first. This is faster but provides less safety if the write operation fails partway through.
| f | The file to overwrite |
| text | The text content to write |
| asUnicode | If true, writes as UTF-16, otherwise as UTF-8 |
| writeUnicodeHeaderBytes | If true and asUnicode is true, writes a BOM (byte order mark) |
| lineEndings | The line ending style to use (nullptr for platform default) |
Overwrites a file with binary data in a single atomic operation.
Unlike juce::File::replaceWithData(), this function writes directly to the target file without creating a temporary file first. This is faster but provides less safety if the write operation fails partway through.
| f | The file to overwrite |
| data | The memory block containing the data to write |
Overwrites a file with binary data in a single atomic operation.
Unlike juce::File::replaceWithData(), this function writes directly to the target file without creating a temporary file first. This is faster but provides less safety if the write operation fails partway through.
| f | The file to overwrite |
| data | Pointer to the data to write |
| size | Number of bytes to write |
| juce::var parsePlist | ( | const juce::File & | f | ) |
Parses an Apple Property List (plist) file and returns its contents as a juce::var.
Plist files are commonly used on macOS and iOS for storing application preferences and configuration data. Only XML plist format is supported; binary plists are not supported.
| f | The plist file to parse |
| juce::var parsePlist | ( | const juce::String & | s | ) |
Parses an Apple Property List (plist) from a string and returns its contents.
Parses plist data from a string containing XML-formatted plist content.
| s | A string containing XML plist data |
| juce::var parsePlist | ( | const juce::XmlElement & | f | ) |
Parses an Apple Property List (plist) from XML and returns its contents.
Converts a parsed XML element representing a plist into a juce::var structure.
| f | An XmlElement containing the plist data |
Extracts wavetable size from a RIFF file in memory.
Searches for a "clm " chunk in the RIFF data and extracts the wavetable size from it. This is used for wavetable synthesis formats that store metadata in RIFF chunks.
| m | MemoryBlock containing RIFF file data |
Referenced by getWavetableSize().
Extracts wavetable size from a RIFF file.
Searches for a "clm " chunk in the RIFF file and extracts the wavetable size from it. This is used for wavetable synthesis formats that store metadata in RIFF chunks.
| f | The RIFF file to read |
References getWavetableSize().
Executes a function on a background thread.
This is a convenience function for running code asynchronously without blocking the current thread. The function will be executed on a separate thread and return immediately.
| function | The function to execute on the background thread |
| void multiThreadedFor | ( | T | start, |
| T | end, | ||
| T | interval, | ||
| juce::ThreadPool * | threadPool, | ||
| std::function< void(T idx)> | callback | ||
| ) |
Executes a for loop in parallel across multiple threads.
This function distributes loop iterations across available CPU cores using a thread pool. Each thread processes a subset of iterations, with work distributed evenly. This is useful for parallelizing computationally intensive loops.
Example usage:
| start | The starting index (inclusive) |
| end | The ending index (exclusive) |
| interval | The step size between iterations |
| threadPool | The thread pool to use (if nullptr, runs serially on current thread) |
| callback | The function to call for each iteration, receiving the index as parameter |
Checks if a boolean flag is set, and if so, clears it and returns true.
This is useful for handling one-shot flags that need to be checked and reset atomically.
| flag | The boolean flag to check and reset |
Calculates the Root Mean Square (RMS) of an array of values.
RMS is the square root of the mean of the squares of the values, commonly used to measure the magnitude of a varying signal.
| values | Pointer to an array of float values |
| n | Number of values in the array |
Calculates the median value of an array of values.
The median is the middle value when the values are sorted. For an even number of values, it returns the average of the two middle values.
| values | Pointer to an array of float values |
| n | Number of values in the array |
Randomly shuffles the elements of an array using the Fisher-Yates algorithm.
This produces an unbiased random permutation where each possible ordering has equal probability of occurring.
| r | Reference to a juce::Random object used for generating random indices |
| array | The array to shuffle (must support size() and swap() methods) |
Referenced by PerlinNoise< T >::PerlinNoise().
Converts a version string to an integer for comparison purposes.
Parses version strings in the format "major.minor.patch" and converts them to a single integer value that can be compared numerically.
| versionString | The version string to convert (e.g., "1.2.3") |
Executes a lambda function after a specified delay.
The callback will be executed on the message thread after the specified delay. This is useful for deferred execution of code that needs to run later.
| callback | The function to execute after the delay |
| delayMS | The delay in milliseconds before executing the callback |
| juce::String formatNumber | ( | T | v | ) |
Formats a number as a string with appropriate decimal precision.
Automatically chooses the number of decimal places based on the magnitude of the value:
| v | The numeric value to format |
| juce::String valueTreeToJSON | ( | const juce::ValueTree & | v | ) |
Converts a ValueTree to a JSON string representation.
Serializes the entire ValueTree structure (including all properties and children) into JSON format. This is useful for saving, transmitting, or debugging ValueTree data.
| v | The ValueTree to convert |
| juce::ValueTree valueTreeFromJSON | ( | const juce::String & | jsonText | ) |
Parses a JSON string and creates a ValueTree from it.
The JSON must have been created by valueTreeToJSON() or follow the same format. This reconstructs the entire ValueTree structure from the JSON representation.
| jsonText | The JSON string to parse |