### JUCEApplicationBase::initialise Source: https://docs.juce.com/master/classjuce_1_1JUCEApplicationBase.html Called once when the application starts to perform initial setup, such as creating windows. The event dispatch loop begins after this method returns. ```APIDOC ## JUCEApplicationBase::initialise(const String& _commandLineParameters_) ### Description Called when the application starts. This will be called once to let the application do whatever initialisation it needs, create its windows, etc. After the method returns, the normal event-dispatch loop will be run, until the quit() method is called, at which point the shutdown() method will be called to let the application clear up anything it needs to delete. If during the initialise() method, the application decides not to start-up after all, it can just call the quit() method and the event loop won't be run. ### Method `virtual void initialise(const String& _commandLineParameters_)` ### Parameters #### Path Parameters - **_commandLineParameters_** (const String&) - The line passed in does not include the name of the executable, just the parameter list. To get the parameters as an array, you can call JUCEApplication::getCommandLineParameters(). ``` -------------------------------- ### start() Source: https://docs.juce.com/master/classjuce_1_1AudioIODevice.html Starts the audio device playing, associating it with a callback. ```APIDOC ## start() ### Description Starts the device actually playing. This must be called after the device has been opened. ### Parameters * **callback** (`AudioIODeviceCallback *`) - The callback to use for streaming the data. ### See Also AudioIODeviceCallback, open ``` -------------------------------- ### start() Source: https://docs.juce.com/master/classjuce_1_1MidiInput.html Starts the MIDI input device. Once started, the device will send MIDI messages to the registered MidiInputCallback. ```APIDOC ## start() ### Description Starts the MIDI input device. After this method is called, the device will begin sending MIDI messages to the `MidiInputCallback` object that was specified when the device was opened. ### Method `void juce::MidiInput::start()` ### See also `stop()` ``` -------------------------------- ### midiStart() Source: https://docs.juce.com/master/classjuce_1_1MidiMessage.html Creates a MIDI start event. This is a static method that returns a MidiMessage object representing a MIDI start command. ```APIDOC ## midiStart() ### Description Creates a midi start event. ### Method static MidiMessage ### Parameters None ### Returns A MidiMessage object representing a MIDI start event. ``` -------------------------------- ### start() Source: https://docs.juce.com/master/classjuce_1_1Animator.html Marks the Animator ready for starting. This function must be called to allow the Animator to move out of the idle state. The on start callback will be executed at the next update, followed by the first call to its update function. ```APIDOC ## void juce::Animator::start() const Marks the Animator ready for starting. You must call this function to allow the Animator to move out of the idle state. After calling this function the Animator's on start callback will be executed at the next update immediately followed by the first call to it's update function. You can call this function before or after adding the Animator to an AnimatorUpdater. Until start() is called the Animator will just sit idly in the updater's queue. ``` -------------------------------- ### Example JUCE Application Class Source: https://docs.juce.com/master/classjuce_1_1JUCEApplicationBase.html This example shows how to subclass JUCEApplication to create a basic JUCE application. It implements the necessary virtual methods for initialization, shutdown, and defining application name and version. ```cpp class MyJUCEApp : public JUCEApplication { public: MyJUCEApp() {} ~MyJUCEApp() {} void initialise (const String& commandLine) override { myMainWindow.reset (new MyApplicationWindow()); myMainWindow->setBounds (100, 100, 400, 500); myMainWindow->setVisible (true); } void shutdown() override { myMainWindow = nullptr; } const String getApplicationName() override { return "Super JUCE-o-matic"; } const String getApplicationVersion() override { return "1.0"; } private: std::unique_ptr myMainWindow; }; ``` -------------------------------- ### getCurrentRangeStart Source: https://docs.juce.com/master/classjuce_1_1ScrollBar.html Gets the current starting position of the scrollbar's thumb. ```APIDOC ## getCurrentRangeStart () ### Description Returns the position of the top (or left) edge of the scrollbar's thumb. ### Returns * **double** - The current starting position of the thumb. ``` -------------------------------- ### prepare Source: https://docs.juce.com/master/classjuce_1_1dsp_1_1DryWetMixer.html Initialises the processor with the given audio processing specifications. ```APIDOC ## prepare(const ProcessSpec &spec) ### Description Initialises the processor. ### Method void ### Parameters * **spec** (const ProcessSpec &) - The audio processing specifications. ``` -------------------------------- ### Get Number of Elements in C Array Source: https://docs.juce.com/master/namespacejuce.html A handy constexpr function for getting the number of elements in a simple const C array. Example usage is provided. ```cpp template int juce::numElementsInArray (Type(&)[N]) noexcept { return N; } static int myArray[] = { 1, 2, 3 }; int numElements = numElementsInArray (myArray) // returns 3 ``` -------------------------------- ### audioDeviceAboutToStart Source: https://docs.juce.com/master/classjuce_1_1AudioIODeviceCallback-members.html This pure virtual function is called when the audio device is about to start. It must be implemented by subclasses to handle device startup logic. ```APIDOC ## audioDeviceAboutToStart ### Description This pure virtual function is called when the audio device is about to start. It must be implemented by subclasses to handle device startup logic. ### Signature `virtual void audioDeviceAboutToStart(AudioIODevice *device) = 0` ### Parameters * **device** (AudioIODevice *) - A pointer to the audio device that is about to start. ``` -------------------------------- ### Listing Available Audio Device Types and Devices Source: https://docs.juce.com/master/classjuce_1_1AudioIODeviceType.html Demonstrates how to get a list of available audio driver types and then enumerate the devices for each type. This involves creating an OwnedArray of AudioIODeviceType, populating it, and then iterating through it to get device names. ```cpp OwnedArray types; myAudioDeviceManager.createAudioDeviceTypes (types); for (int i = 0; i < types.size(); ++i) { String typeName (types[i]->getTypeName()); // This will be things like "DirectSound", "CoreAudio", etc. types[i]->scanForDevices(); // This must be called before getting the list of devices StringArray deviceNames (types[i]->getDeviceNames()); // This will now return a list of available devices of this type for (int j = 0; j < deviceNames.size(); ++j) { AudioIODevice* device = types[i]->createDevice (deviceNames [j]); ... } } ``` -------------------------------- ### juce::ScrollBar::getCurrentRangeStart Source: https://docs.juce.com/master/classjuce_1_1ScrollBar.html Gets the current starting position (top or left) of the scrollbar's thumb. ```APIDOC ## getCurrentRangeStart() ### Description Returns the position of the top of the thumb. ### Returns * `double` - The current starting position of the thumb. ### See also * `getCurrentRange` * `setCurrentRangeStart` ``` -------------------------------- ### Getting Bytes Between Samples Source: https://docs.juce.com/master/classjuce_1_1AudioData_1_1Pointer.html Returns the number of bytes between the start addresses of consecutive samples, considering interleaving. ```cpp int getNumBytesBetweenSamples () const noexcept; ``` -------------------------------- ### Basic Console Application Structure Source: https://docs.juce.com/master/structjuce_1_1ConsoleApplication.html Demonstrates the typical setup for a console application using juce::ConsoleApplication. It shows how to add help, version, and custom commands, and then parse arguments to execute the appropriate command. ```cpp int main (int argc, char* argv[]) { ConsoleApplication app; app.addHelpCommand ("--help|-h", "Usage:", true); app.addVersionCommand ("--version|-v", "MyApp version 1.2.3"); app.addCommand ({ "--foo", "--foo filename", "Performs a foo operation on the given file", [] (const auto& args) { doFoo (args); }}); return app.findAndRunCommand (argc, argv); } ``` -------------------------------- ### AudioPlayHead::getPosition Source: https://docs.juce.com/master/classjuce_1_1AudioPlayHead.html Fetches details about the transport's position at the start of the current processing block. This is the preferred method for getting current playback information. ```APIDOC ## getPosition ### Description Fetches details about the transport's position at the start of the current processing block. ### Method virtual Optional< PositionInfo > getPosition () const =0 ### Returns An Optional containing the current playback details if available, otherwise an empty Optional. ``` -------------------------------- ### prepare Source: https://docs.juce.com/master/classjuce_1_1dsp_1_1Reverb.html Initialises the reverb. ```APIDOC ## prepare() ### Description Initialises the reverb. ### Method `void prepare(const ProcessSpec& spec)` ### Parameters * **spec** (const ProcessSpec&) - The process specification, including sample rate. ``` -------------------------------- ### withStart() Source: https://docs.juce.com/master/classjuce_1_1Range.html Returns a range with the same end as this one, but a different start. If the new start position is higher than the current end of the range, the end point will be pushed along to equal it, returning an empty range at the new position. ```APIDOC ## withStart() ### Description Returns a range with the same end as this one, but a different start. If the new start position is higher than the current end of the range, the end point will be pushed along to equal it, returning an empty range at the new position. ### Method `Range withStart(const ValueType _newStart_) const` ``` -------------------------------- ### prepare Source: https://docs.juce.com/master/classjuce_1_1dsp_1_1Compressor.html Initializes the compressor processor with the specified audio processing specifications. ```APIDOC ## prepare(const ProcessSpec &spec) ### Description Initialises the processor. ### Method void prepare(const ProcessSpec &spec) ### Parameters #### Path Parameters * **spec** (const ProcessSpec &) - Required - The audio processing specifications. ``` -------------------------------- ### Get Oversampling Factor Source: https://docs.juce.com/master/classjuce_1_1dsp_1_1Oversampling.html Returns the current multiplication factor by which the input signal's sample rate is increased. For example, a factor of 2 means the internal processing occurs at twice the input sample rate. ```cpp size_t getOversamplingFactor () const noexcept ``` -------------------------------- ### start() Source: https://docs.juce.com/master/functions_s.html Initiates a process or operation, returning various JUCE objects depending on the context. ```APIDOC ## start() ### Description Initiates a process or operation. The return type varies based on the JUCE class it's called on, potentially returning objects like juce::Animator, juce::AudioIODevice, juce::MidiInput, juce::ChildProcess, among others. ### Method Various (e.g., member function) ### Endpoint N/A (Function call) ### Parameters None explicitly documented for the base function. ``` -------------------------------- ### Example Translation File Format Source: https://docs.juce.com/master/classjuce_1_1LocalisedStrings.html Illustrates the expected format for a translation file, including language and country code declarations, followed by key-value pairs for translations. Comments can be added using lines that do not start with a quote. ```plaintext language: French countries: fr be mc ch lu "hello" = "bonjour" "goodbye" = "au revoir" ``` -------------------------------- ### startAsProcess() Source: https://docs.juce.com/master/functions_s.html Initiates an operation and returns a juce::File object. ```APIDOC ## startAsProcess() ### Description Starts an operation, likely related to file handling or process execution, and returns a juce::File object. ### Method Various (e.g., member function) ### Endpoint N/A (Function call) ### Parameters None explicitly documented. ``` -------------------------------- ### startAsProcess() Source: https://docs.juce.com/master/classjuce_1_1File.html Launches the file as a process. If the file is executable, it will be run. If it's a document, it will launch with its default viewer. If it's a folder, it will be opened in the OS's file explorer. ```APIDOC ## startAsProcess() ### Description Launches the file as a process. If the file is executable, this will run it. If it's a document of some kind, it will launch the document with its default viewer application. If it's a folder, it will be opened in Explorer, Finder, or equivalent. ### Method const ### Parameters #### Query Parameters - **_parameters_** (const String &) - Optional - Parameters to pass to the process. ### Returns bool ``` -------------------------------- ### start Source: https://docs.juce.com/master/classjuce_1_1AudioTransportSource.html Starts playing (if a source has been selected). If it starts playing, this will send a message to any ChangeListeners that are registered with this object. ```APIDOC ## start() ### Description Starts playing (if a source has been selected). If it starts playing, this will send a message to any ChangeListeners that are registered with this object. ### Method Signature `void juce::AudioTransportSource::start()` ``` -------------------------------- ### start Source: https://docs.juce.com/master/classjuce_1_1AudioTransportSource.html Initiates audio playback, provided that an audio source has been previously set. ```APIDOC ## void start() Starts playing (if a source has been selected). ``` -------------------------------- ### Start Timer with Millisecond Interval Source: https://docs.juce.com/master/classjuce_1_1Timer.html Starts the timer and sets the length of interval required in milliseconds. If the timer is already started, this will reset it. ```cpp void startTimer (int intervalInMilliseconds) noexcept ``` -------------------------------- ### start Source: https://docs.juce.com/master/classjuce_1_1ScheduledEventThread.html Starts the event processing thread. ```APIDOC ## start() template | void juce::ScheduledEventThread< Event >::start | ( | __ | ) | ### Description Begins the execution of the event processing thread. Events added after this call will be processed. ``` -------------------------------- ### Setting up KeyPressMappingSet in a MainWindow Source: https://docs.juce.com/master/classjuce_1_1KeyPressMappingSet.html Demonstrates how to initialize an ApplicationCommandManager, register commands, reset to default mappings, restore from XML, and add the KeyPressMappingSet as a key listener to a top-level component. ```cpp class MyMainWindow : public Component { ApplicationCommandManager* myCommandManager; public: MyMainWindow() { myCommandManager = new ApplicationCommandManager(); // first, make sure the command manager has registered all the commands that its // targets can perform myCommandManager->registerAllCommandsForTarget (myCommandTarget1); myCommandManager->registerAllCommandsForTarget (myCommandTarget2); // this will use the command manager to initialise the KeyPressMappingSet with // the default keypresses that were specified when the targets added their commands // to the manager. myCommandManager->getKeyMappings()->resetToDefaultMappings(); // having set up the default key-mappings, you might now want to load the last set // of mappings that the user configured. myCommandManager->getKeyMappings()->restoreFromXml (lastSavedKeyMappingsXML); // Now tell our top-level window to send any keypresses that arrive to the // KeyPressMappingSet, which will use them to invoke the appropriate commands. addKeyListener (myCommandManager->getKeyMappings()); } ... } ``` -------------------------------- ### StandalonePluginHolder::startPlaying() Source: https://docs.juce.com/master/classjuce_1_1StandalonePluginHolder.html Starts the audio playback for the plugin. ```APIDOC ## startPlaying() ### Description Initiates audio playback for the plugin. This typically involves setting up the audio device and starting the processing. ### Method `void startPlaying()` ### Remarks References `deviceManager`, `player`, and `processor`. It is referenced by `init()`. ``` -------------------------------- ### withEnd() Source: https://docs.juce.com/master/classjuce_1_1Range.html Returns a range with the same start position as this one, but a different end. If the new end position is below the current start of the range, the start point will be pushed back to equal the new end point. ```APIDOC ## withEnd() ### Description Returns a range with the same start position as this one, but a different end. If the new end position is below the current start of the range, the start point will be pushed back to equal the new end point. ### Method `Range withEnd(const ValueType _newEnd_) const` ``` -------------------------------- ### prepare Source: https://docs.juce.com/master/classjuce_1_1dsp_1_1Phaser.html Initializes the processor with the specified processing specifications. ```APIDOC ## prepare(const ProcessSpec &spec) ### Description Initialises the processor. ### Method void ### Parameters * **spec** (const ProcessSpec &) - The processing specifications. ``` -------------------------------- ### startDownloads() Source: https://docs.juce.com/master/functions_s.html Initiates the download process for in-app purchases. ```APIDOC ## startDownloads() ### Description Begins the process of downloading content related to in-app purchases. Returns a juce::InAppPurchases object. ### Method Various (e.g., member function) ### Endpoint N/A (Function call) ### Parameters None explicitly documented. ``` -------------------------------- ### setEnd() Source: https://docs.juce.com/master/classjuce_1_1Range.html Changes the end position of the range, leaving the start unchanged. If the new end position is below the current start of the range, the start point will be pushed back to equal the new end point. ```APIDOC ## setEnd() ### Description Changes the end position of the range, leaving the start unchanged. If the new end position is below the current start of the range, the start point will be pushed back to equal the new end point. ### Method `void setEnd(const ValueType _newEnd_)` ``` -------------------------------- ### start() Source: https://docs.juce.com/master/classjuce_1_1PerformanceCounter.html Starts the timing for a code segment. This should be called immediately before the code you want to measure. ```APIDOC ## start() ### Description Starts timing a code segment. ### Method void start() noexcept ``` -------------------------------- ### initialise Source: https://docs.juce.com/master/classjuce_1_1AudioDeviceManager.html Opens a set of audio devices ready for use, with options for specifying channel needs, saved state, and preferred devices. ```APIDOC ## initialise ### Description Opens a set of audio devices ready for use. This method allows for detailed configuration including the number of input and output channels, an optional saved state XML, a flag to select the default device on failure, and preferred device names or setups. ### Method `String initialise (int maxNumInputChannelsNeeded, int maxNumOutputChannelsNeeded, const XmlElement *savedState, bool selectDefaultDeviceOnFailure, const String &preferredDefaultDeviceName=String(), const AudioDeviceSetup *preferredSetupOptions=nullptr)` ### Parameters * **maxNumInputChannelsNeeded** (int) - The minimum number of input channels required. * **maxNumOutputChannelsNeeded** (int) - The minimum number of output channels required. * **savedState** (const XmlElement *) - An optional XML element containing saved device settings. * **selectDefaultDeviceOnFailure** (bool) - If true, attempts to select a default device if the specified configuration fails. * **preferredDefaultDeviceName** (const String &) - The name of the preferred default audio device (optional). * **preferredSetupOptions** (const AudioDeviceSetup *) - Optional preferred audio device setup options. ``` -------------------------------- ### initialise() Source: https://docs.juce.com/master/classjuce_1_1AudioDeviceManager.html Opens a set of audio devices ready for use. This function attempts to open either a default audio device or one that was previously saved as XML. It returns an error message if any issues occur, or an empty string upon success. ```APIDOC ## initialise() ### Description Opens a set of audio devices ready for use. This will attempt to open either a default audio device, or one that was previously saved as XML. ### Method `String juce::AudioDeviceManager::initialise(int _maxNumInputChannelsNeeded, int _maxNumOutputChannelsNeeded, const XmlElement *_savedState, bool _selectDefaultDeviceOnFailure, const String &_preferredDefaultDeviceName = String(), const AudioDeviceSetup *_preferredSetupOptions = nullptr)` ### Parameters #### Path Parameters - None #### Query Parameters - None #### Request Body - None ### Parameters - **_maxNumInputChannelsNeeded** (int) - The maximum number of input channels your app would like to use (the actual number of channels opened may be less than the number requested). - **_maxNumOutputChannelsNeeded** (int) - The maximum number of output channels your app would like to use (the actual number of channels opened may be less than the number requested). - **_savedState** (const XmlElement *) - Either a previously-saved state that was produced by createStateXml(), or nullptr if you want the manager to choose the best device to open. - **_selectDefaultDeviceOnFailure** (bool) - If true, then if the device specified in the XML fails to open, then a default device will be used instead. If false, then on failure, no device is opened. - **_preferredDefaultDeviceName** (const String &) - If this is not empty, and there's a device with this name, then that will be used as the default device (assuming that there wasn't one specified in the XML). The string can actually be a simple wildcard, containing "*" and "?" characters. - **_preferredSetupOptions** (const AudioDeviceSetup *) - If this is non-null, the structure will be used as the set of preferred settings when opening the device. If you use this parameter, the preferredDefaultDeviceName field will be ignored. If you set the outputDeviceName or inputDeviceName data members of the AudioDeviceSetup to empty strings, then a default device will be used. ### Returns - **String** - An error message if anything went wrong, or an empty string if it worked ok. ``` -------------------------------- ### getPpqPositionOfLastBarStart() Source: https://docs.juce.com/master/classjuce_1_1AudioPlayHead_1_1PositionInfo.html Retrieves the position of the start of the last bar, in units of quarter-notes (PPQ). This is the time from the start of the timeline to the start of the current bar. Note that this value may be unavailable on some hosts. Returns an Optional. ```APIDOC ## getPpqPositionOfLastBarStart() ### Description The position of the start of the last bar, in units of quarter-notes. This is the time from the start of the timeline to the start of the current bar, in ppq units. Note - this value may be unavailable on some hosts, e.g. Pro-Tools. ### Method GET ### Endpoint /AudioPlayHead/PositionInfo/getPpqPositionOfLastBarStart ### Returns Optional< double > ``` -------------------------------- ### Creating and Initializing a SplashScreen Source: https://docs.juce.com/master/classjuce_1_1SplashScreen.html Example of creating a SplashScreen instance within the JUCEApplicationBase::initialise() method and launching background initialization tasks. ```cpp void MyApp::initialise (const String& commandLine) { splash = new SplashScreen ("Welcome to my app!", ImageFileFormat::loadFrom (File ("/foobar/splash.jpg")), true); // now kick off your initialisation work on some kind of thread or task, and launchBackgroundInitialisationThread(); } ``` -------------------------------- ### substring() Source: https://docs.juce.com/master/classjuce_1_1String.html Returns a section of the string, starting from a given position up to the end of the string. If the start index is beyond the string length, an empty string is returned. If the start index is zero or less, the whole string is returned. ```APIDOC ## substring() ### Description Returns a section of the string, starting from a given position up to the end of the string. ### Parameters #### Path Parameters * **startIndex** (int) - Required - The first character to include. If this is beyond the end of the string, an empty string is returned. If it is zero or less, the whole string is returned. ### Returns * **string** - The substring from startIndex up to the end of the string. ``` -------------------------------- ### init Source: https://docs.juce.com/master/classjuce_1_1StandalonePluginHolder.html Initializes the audio and MIDI devices for the standalone plugin holder. ```APIDOC ## void init(bool enableAudioInput, const String &preferredDefaultDeviceName) ### Description Initializes the audio and MIDI devices for the standalone plugin holder. This method sets up the audio input and can configure a preferred default device name. ### Parameters * **enableAudioInput** (bool) - Whether to enable audio input. * **preferredDefaultDeviceName** (const String &) - The name of the preferred default audio device. ``` -------------------------------- ### Get Current Position Source: https://docs.juce.com/master/classjuce_1_1AnimatedPosition.html Retrieves the current value of the AnimatedPosition. This can be used to get the position at any time. ```cpp double getPosition () const noexcept ``` -------------------------------- ### prepareToPlay Source: https://docs.juce.com/master/classjuce_1_1AudioSourcePlayer.html An alternative method for initialising the source without an AudioIODevice. ```APIDOC ## void prepareToPlay(double _sampleRate, int _blockSize) ### Description An alternative method for initialising the source without an AudioIODevice. ### Parameters #### Path Parameters * **_sampleRate** (double) - Required - The sample rate for playback. * **_blockSize** (int) - Required - The block size for playback. ``` -------------------------------- ### prepareToPlay Source: https://docs.juce.com/master/classjuce_1_1AudioSourcePlayer.html An alternative method for initialising the source without an AudioIODevice. ```APIDOC ## prepareToPlay(double sampleRate, int blockSize) ### Description An alternative method for initialising the source without an AudioIODevice. ### Method void ### Endpoint prepareToPlay ### Parameters #### Path Parameters * **sampleRate** (double) - Required - The sample rate. * **blockSize** (int) - Required - The block size. ``` -------------------------------- ### Start Animator Source: https://docs.juce.com/master/classjuce_1_1Animator.html Marks the Animator as ready to start. Calling this allows the Animator to move from the idle state. The on start callback and the first update call occur at the next update cycle. This can be called before or after adding the Animator to an AnimatorUpdater. ```cpp void start() const ``` -------------------------------- ### Namespace Functions starting with 'd' Source: https://docs.juce.com/master/namespacemembers_func_d.html Lists functions within the 'juce' namespace that start with the letter 'd'. ```APIDOC ## degreesToRadians() ### Description Converts degrees to radians. ### Method Not applicable (function signature) ### Endpoint Not applicable (function signature) ### Parameters None explicitly documented. ### Response Not applicable (function signature) ## deleteAndZero() ### Description Deletes a pointer and sets it to zero. ### Method Not applicable (function signature) ### Endpoint Not applicable (function signature) ### Parameters None explicitly documented. ### Response Not applicable (function signature) ``` -------------------------------- ### JUCE PushNotifications Settings Example Source: https://docs.juce.com/master/structjuce_1_1PushNotifications_1_1Settings.html Demonstrates how to set up notification actions, categories, and overall settings for JUCE push notifications. This includes defining actions like 'OK!', 'Cancel', and text input, then grouping them into categories and finally configuring the main settings object. ```cpp using Action = juce::PushNotifications::Settings::Action; using Category = juce::PushNotifications::Settings::Category; Action okAction; okAction.identifier = "okAction"; okAction.title = "OK!"; okAction.style = Action::button; okAction.triggerInBackground = true; Action cancelAction; cancelAction.identifier = "cancelAction"; cancelAction.title = "Cancel"; cancelAction.style = Action::button; cancelAction.triggerInBackground = true; cancelAction.destructive = true; Action textAction; textAction.identifier = "textAction"; textAction.title = "Enter text"; textAction.style = Action::text; textAction.triggerInBackground = true; textAction.destructive = false; textAction.textInputButtonText = "Ok"; textAction.textInputPlaceholder = "Enter text..."; Category okCategory; okCategory.identifier = "okCategory"; okCategory.actions = { okAction }; Category okCancelCategory; okCancelCategory.identifier = "okCancelCategory"; okCancelCategory.actions = { okAction, cancelAction }; Category textCategory; textCategory.identifier = "textCategory"; textCategory.actions = { textAction }; textCategory.sendDismissAction = true; juce::PushNotifications::Settings settings; settings.allowAlert = true; settings.allowBadge = true; settings.allowSound = true; settings.categories = { okCategory, okCancelCategory, textCategory }; ``` -------------------------------- ### AnimatorSetBuilder Constructor with Starting Animator Source: https://docs.juce.com/master/classjuce_1_1AnimatorSetBuilder.html Initializes a new AnimatorSetBuilder with a specified Animator that will be the first one to start. ```cpp AnimatorSetBuilder (Animator startingAnimator) ``` -------------------------------- ### JUCE Path::startNewSubPath Method Source: https://docs.juce.com/master/classjuce_1_1Path.html Begins a new subpath with a given starting position. ```cpp void startNewSubPath(float startX, float startY) ``` -------------------------------- ### SHA256 Constructor Example Source: https://docs.juce.com/master/classjuce_1_1SHA256.html Example demonstrating the creation of a SHA256 checksum from a UTF-8 buffer using the toUTF8() method. ```cpp SHA256 checksum (myString.toUTF8()); ``` -------------------------------- ### Enumerate Range with Starting Value Source: https://docs.juce.com/master/namespacejuce.html Returns an `IteratorPair` that iterates over a range while providing an index for each element. The starting index can be specified. ```cpp template> auto juce::enumerate ( Range && _range_ , Index _startingValue_ = {} ) ``` -------------------------------- ### audioDeviceAboutToStart Source: https://docs.juce.com/master/classjuce_1_1AudioProcessorPlayer.html Called before audio callbacks begin, allowing initialization based on the audio device's sample rate and buffer size. ```APIDOC ## audioDeviceAboutToStart() ### Description Called to indicate that the device is about to start calling back. This will be called just before the audio callbacks begin, either when this callback has just been added to an audio device, or after the device has been restarted because of a sample-rate or block-size change. You can use this opportunity to find out the sample rate and block size that the device is going to use by calling the AudioIODevice::getCurrentSampleRate() and AudioIODevice::getCurrentBufferSizeSamples() on the supplied pointer. ### Method void ### Parameters * **_device_** (AudioIODevice *) - The audio IO device that will be used to drive the callback. Note that if you're going to store this this pointer, it is only valid until the next time that audioDeviceStopped is called. ``` -------------------------------- ### Initialize AudioProcessorValueTreeState with createParameterLayout() Source: https://docs.juce.com/master/classjuce_1_1AudioProcessorValueTreeState.html Demonstrates initializing AudioProcessorValueTreeState using a separate function that returns a ParameterLayout, allowing for programmatic parameter creation. ```cpp AudioProcessorValueTreeState::ParameterLayout createParameterLayout() { AudioProcessorValueTreeState::ParameterLayout layout; for (int i = 1; i < 9; ++i) layout.add (std::make_unique (String (i), String (i), 0, i, 0)); return layout; } YourAudioProcessor() : apvts (*this, &undoManager, "PARAMETERS", createParameterLayout()) { } ``` -------------------------------- ### initialise Source: https://docs.juce.com/master/classjuce_1_1OpenGLAppComponent.html Implement this method to set up any GL objects needed for rendering. The GL context is active when this method is called. Note that this method may be called multiple times if the GL context is recreated. ```APIDOC ## initialise() virtual void juce::OpenGLAppComponent::initialise() ``` -------------------------------- ### Start Timer with Hertz Interval Source: https://docs.juce.com/master/classjuce_1_1Timer.html Starts the timer with an interval specified in Hertz. This is effectively the same as calling startTimer (1000 / timerFrequencyHz). ```cpp void startTimerHz (int timerFrequencyHz) noexcept ``` -------------------------------- ### StandalonePluginHolder::init() Source: https://docs.juce.com/master/classjuce_1_1StandalonePluginHolder.html Initializes the StandalonePluginHolder, enabling audio input and setting a preferred default audio device. ```APIDOC ## init(bool _enableAudioInput_, const String & _preferredDefaultDeviceName_) ### Description Initializes the plugin holder. This method can enable audio input and set a preferred default audio device. ### Method `void init(bool _enableAudioInput_, const String & _preferredDefaultDeviceName_)` ### Remarks References `autoOpenMidiDevices`, `options`, `reloadPluginState()`, `startPlaying()`, and `juce::Timer::startTimer()`. It is also referenced by the constructor `StandalonePluginHolder()`. ``` -------------------------------- ### LinkedListPointer Dereference and Get Operations Source: https://docs.juce.com/master/classjuce_1_1LinkedListPointer.html Details the dereference operator and the get() method, both of which return the item the pointer currently points to. ```APIDOC ## ◆ operator ObjectType *() template | juce::LinkedListPointer< ObjectType >::operator ObjectType * | ( | __| ) | const ---|---|---|---|--- inlinenoexcept Returns the item which this pointer points to. ## ◆ get() template | ObjectType * juce::LinkedListPointer< ObjectType >::get | ( | __| ) | const ---|---|---|---|--- inlinenoexcept Returns the item which this pointer points to. ``` -------------------------------- ### prepare Source: https://docs.juce.com/master/classjuce_1_1dsp_1_1Limiter.html Initialises the processor with the given processing specification. ```APIDOC ## prepare(const ProcessSpec &spec) ### Description Initialises the processor with the given processing specification. ### Method void ### Parameters #### Path Parameters - **spec** (const ProcessSpec &) - Required - The processing specification. ``` -------------------------------- ### getSubscribeIdForKey Source: https://docs.juce.com/master/classjuce_1_1midi__ci_1_1Device.html If a subscription has started successfully, this method returns the subscribeId assigned to it by the remote device. Returns nullopt if the subscription has not started or is invalid. ```APIDOC ## ◆ getSubscribeIdForKey() ### Description If the provided subscription has started successfully, this returns the subscribeId assigned to the subscription by the remote device. ### Method std::optional< String > ### Parameters #### Path Parameters - **key** (SubscriptionKey) - Description: The subscription key. ``` -------------------------------- ### Get Wants Keyboard Focus Source: https://docs.juce.com/master/classjuce_1_1BooleanPropertyComponent.html Returns true if the component is interested in getting keyboard focus. This reflects the setting made by setWantsKeyboardFocus. ```APIDOC ## getWantsKeyboardFocus ### Description Returns true if the component is interested in getting keyboard focus. ### Method bool const noexcept ``` -------------------------------- ### Starting a Real-time Thread with Audio Processing Time Source: https://docs.juce.com/master/classjuce_1_1AudioWorkgroup.html Demonstrates how to start a real-time thread, specifying the approximate audio processing time required per frame. This is useful for setting up threads that need to adhere to specific audio processing budgets. ```cpp startRealtimeThread (Thread::RealtimeOptions{}.withApproximateAudioProcessingTime (samplesPerFrame, sampleRate)); ``` -------------------------------- ### use Source: https://docs.juce.com/master/classjuce_1_1OpenGLShaderProgram.html Selects this program into the current context. ```APIDOC ## use() ### Description Selects this program into the current context, making it active for rendering. ### Method `void use() const noexcept` ``` -------------------------------- ### Audio Device About To Start Source: https://docs.juce.com/master/classjuce_1_1AudioIODeviceCallback.html Called to indicate that the audio device is about to start calling back. This is a pure virtual function that must be implemented by subclasses. ```cpp virtual void audioDeviceAboutToStart (AudioIODevice *device) = 0; ``` -------------------------------- ### Example of ValueTree Initialization Source: https://docs.juce.com/master/classjuce_1_1ValueTree.html Demonstrates creating a complex ValueTree structure using nested initializers for properties and subtrees. ```cpp ValueTree groups { { "ParameterGroups", {}, { { "Group", {{ "name", "Tone Controls" }}}, { { "Parameter", {{ "id", "distortion" }, { "value", 0.5 }}}, { "Parameter", {{ "id", "reverb" }, { "value", 0.5 }}} } }, { { "Group", {{ "name", "Other Controls" }}}, { { "Parameter", {{ "id", "drywet" }, { "value", 0.5 }}}, { "Parameter", {{ "id", "gain" }, { "value", 0.5 }}} } } } }; ``` -------------------------------- ### create7point0point6() Source: https://docs.juce.com/master/classjuce_1_1AudioChannelSet.html Creates an AudioChannelSet for a 7.0.6 surround setup. This configuration expands on the 7.0.4 setup by adding more top channels for enhanced spatial audio. ```APIDOC ## create7point0point6() ### Description Creates a set for 7.0.6 surround setup (left, right, centre, leftSurroundSide, rightSurroundSide, leftSurroundRear, rightSurroundRear, topFrontLeft, topFrontRight, topSideLeft, topSideRight, topRearLeft, topRearRight). ### Method static ### Endpoint N/A (This is a static factory method, not an HTTP endpoint) ### Parameters None ### Request Example N/A ### Response #### Success Response - **AudioChannelSet**: An instance of AudioChannelSet representing the 7.0.6 layout. ### Response Example N/A ``` -------------------------------- ### create7point1point4() Source: https://docs.juce.com/master/classjuce_1_1AudioChannelSet.html Creates an AudioChannelSet for a Dolby Atmos 7.1.4 surround setup. This configuration adds an LFE (Low-Frequency Effects) channel to the 7.0.4 setup. ```APIDOC ## create7point1point4() ### Description Creates a set for Dolby Atmos 7.1.4 surround setup (left, right, centre, leftSurroundSide, rightSurroundSide, leftSurroundRear, rightSurroundRear, LFE, topFrontLeft, topFrontRight, topRearLeft, topRearRight). ### Method static ### Endpoint N/A (This is a static factory method, not an HTTP endpoint) ### Parameters None ### Request Example N/A ### Response #### Success Response - **AudioChannelSet**: An instance of AudioChannelSet representing the 7.1.4 layout. ### Response Example N/A ``` -------------------------------- ### beginNewTransaction() [1/2] Source: https://docs.juce.com/master/classjuce_1_1UndoManager.html Starts a new group of actions that will be treated as a single transaction. Actions performed between this call and the next transaction start will be undone/redone together. ```APIDOC ## beginNewTransaction() ### Description Starts a new group of actions that together will be treated as a single transaction. All actions that are passed to the perform() method between calls to this method are grouped together and undone/redone together by a single call to undo() or redo(). ### Method void ``` -------------------------------- ### startDownloads Source: https://docs.juce.com/master/classjuce_1_1InAppPurchases.html iOS only: Starts downloads of hosted content from the store for the specified downloads. ```APIDOC ## startDownloads(const Array< Download* >& downloads) ### Description iOS only: Starts downloads of hosted content from the store. ### Method N/A (This is an iOS specific download management method) ### Endpoint N/A ### Parameters #### Path Parameters - **downloads** (Array< Download* >) - Required - An array of Download objects for which to start downloads. ### Response None. Download progress and completion will be notified via listeners. ``` -------------------------------- ### create9point1point4() Source: https://docs.juce.com/master/classjuce_1_1AudioChannelSet.html Creates an AudioChannelSet for a 9.1.4 Atmos surround setup. This configuration adds an LFE channel to the 9.0.4 setup, providing a more impactful low-frequency experience. ```APIDOC ## create9point1point4() ### Description Creates a set for a 9.1.4 Atmos surround setup (left, right, centre, LFE, leftSurroundSide, rightSurroundSide, leftSurroundRear, rightSurroundRear, wideLeft, wideRight, topFrontLeft, topFrontRight, topRearLeft, topRearRight). ### Method static ### Endpoint N/A (This is a static factory method, not an HTTP endpoint) ### Parameters None ### Request Example N/A ### Response #### Success Response - **AudioChannelSet**: An instance of AudioChannelSet representing the 9.1.4 layout. ### Response Example N/A ``` -------------------------------- ### prepareToPlay() Source: https://docs.juce.com/master/classjuce_1_1AudioProcessorGraph_1_1AudioGraphIOProcessor.html Prepares the processor for playback, called before audio starts. ```APIDOC ## prepareToPlay() ### Description Called before playback starts, to let the processor prepare itself. The sample rate is the target sample rate, and will remain constant until playback stops. You can call getTotalNumInputChannels and getTotalNumOutputChannels or query the busLayout member variable to find out the number of channels your processBlock callback must process. The maximumExpectedSamplesPerBlock value is a strong hint about the maximum number of samples that will be provided in each block. You may want to use this value to resize internal buffers. You should program defensively in case a buggy host exceeds this value. The actual block sizes that the host uses may be different each time the callback happens: completely variable block sizes can be expected from some hosts. See also busLayout, getTotalNumInputChannels, getTotalNumOutputChannels ### Method `void prepareToPlay(double _sampleRate, int _maximumExpectedSamplesPerBlock) override virtual` ``` -------------------------------- ### prepare Source: https://docs.juce.com/master/classjuce_1_1dsp_1_1Chorus.html Initializes the chorus processor with the specified processing specifications. ```APIDOC ## prepare(const ProcessSpec &spec) ### Description Initialises the processor. ### Method void ### Parameters #### Path Parameters * **spec** (const ProcessSpec &) - Required - The processing specifications. ``` -------------------------------- ### addArc Source: https://docs.juce.com/master/classjuce_1_1Path.html Adds an elliptical arc to the current path. Allows specifying the bounding box, start and end angles in radians, and whether to start a new sub-path. ```APIDOC ## addArc ### Description Adds an elliptical arc to the current path. ### Method void ### Parameters - **x** (float) - The x-coordinate of the top-left corner of the bounding box. - **y** (float) - The y-coordinate of the top-left corner of the bounding box. - **width** (float) - The width of the bounding box. - **height** (float) - The height of the bounding box. - **toRadians** (float) - The starting angle of the arc in radians. - **toRadians** (float) - The ending angle of the arc in radians. - **startAsNewSubPath** (bool) - Optional. If true, starts a new sub-path for the arc. Defaults to false. ``` -------------------------------- ### StandalonePluginHolder Constructor Source: https://docs.juce.com/master/classjuce_1_1StandalonePluginHolder.html Creates an instance of the default plugin. The settings object can be a PropertySet that the class should use to store its settings; takeOwnershipOfSettings indicates whether this object will delete the settings automatically when no longer needed. The settings can also be nullptr. A default device name can be passed in. Preferably a complete setup options object can be used, which takes precedence over the preferredDefaultDeviceName and allows you to select the input & output device names, sample rate, buffer size etc. In all instances, the settingsToUse will take precedence over the "preferred" options if not null. ```cpp StandalonePluginHolder ( PropertySet *_settingsToUse, bool _takeOwnershipOfSettings = true, const String &_preferredDefaultDeviceName = String(), const AudioDeviceManager::AudioDeviceSetup *_preferredSetupOptions = nullptr, const Array< PluginInOuts > &_channels = Array< PluginInOuts >(), bool _shouldAutoOpenMidiDevices = true ) ``` -------------------------------- ### getXRunCount Source: https://docs.juce.com/master/classjuce_1_1AudioIODevice.html Retrieves the number of audio buffer under- or over-runs (XRuns) reported by the OS since playback or recording started. Returns -1 if not supported or not started. ```APIDOC ## getXRunCount() ### Description Returns the number of under- or over runs reported by the OS since playback/recording has started. This number may be different than determining the Xrun count manually (by measuring the time spent in the audio callback) as the OS may be doing some buffering internally - especially on mobile devices. Returns -1 if playback/recording has not started yet or if getting the underrun count is not supported for this device (Android SDK 23 and lower). ### Method `virtual int juce::AudioIODevice::getXRunCount() const noexcept` ``` -------------------------------- ### setDataToReferTo() (without start sample) Source: https://docs.juce.com/master/classjuce_1_1AudioBuffer.html Makes this buffer point to a pre-allocated set of channel data arrays. This version assumes data starts at sample 0. ```APIDOC ## setDataToReferTo() [2/2] ### Description Makes this buffer point to a pre-allocated set of channel data arrays. This allows dynamic changes to the channels being referenced. Note that if the buffer is resized or its number of channels is changed, it will re-allocate memory internally and copy the existing data to this new area, so it will then stop directly addressing this memory. ### Parameters * **_dataToReferTo_** (Type *const *) - A pre-allocated array containing pointers to the data for each channel that should be used by this buffer. The buffer will only refer to this memory, it won't try to delete it when the buffer is deleted or resized. * **_newNumChannels_** (int) - The number of channels to use. This must correspond to the number of elements in the array passed in. * **_newNumSamples_** (int) - The number of samples to use. This must correspond to the size of the arrays passed in. ### Note The hasBeenCleared method will return false after this call. ``` -------------------------------- ### Create and Show a Simple Popup Menu Source: https://docs.juce.com/master/classjuce_1_1PopupMenu.html Demonstrates how to create a basic popup menu, add items with IDs and text, and display it asynchronously. The callback function handles user selection or dismissal. ```cpp void MyWidget::mouseDown (const MouseEvent& e) { PopupMenu m; m.addItem (1, "item 1"); m.addItem (2, "item 2"); m.showMenuAsync (PopupMenu::Options(), [] (int result) { if (result == 0) { // user dismissed the menu without picking anything } else if (result == 1) { // user picked item 1 } else if (result == 2) { // user picked item 2 } }); } ``` -------------------------------- ### Basic Component Dragging Example Source: https://docs.juce.com/master/classjuce_1_1ComponentDragger.html This example demonstrates the fundamental usage of ComponentDragger within a custom component. It shows how to initiate dragging in mouseDown and continue it in mouseDrag. ```cpp class MyDraggableComp { ComponentDragger myDragger; void mouseDown (const MouseEvent& e) { myDragger.startDraggingComponent (this, e); } void mouseDrag (const MouseEvent& e) { myDragger.dragComponent (this, e, nullptr); } }; ``` -------------------------------- ### begin() Source: https://docs.juce.com/master/classjuce_1_1HashMap.html Returns a start iterator for iterating over the values in the hash-map. ```APIDOC ## begin() ### Description Returns a start iterator for the values in this hash-map. ### Method `Iterator begin() const noexcept` ### Return Value An `Iterator` object pointing to the beginning of the hash-map's values. ### References * `juce::HashMap< KeyType, ValueType, HashFunctionType, TypeOfCriticalSectionToUse >::Iterator::next()` ``` -------------------------------- ### create9point0point6 Source: https://docs.juce.com/master/classjuce_1_1AudioChannelSet.html Creates a channel set for a 9.0.6 Dolby Atmos surround setup. This configuration expands on the 9.0.4 setup with additional top speakers for greater verticality. ```APIDOC ## create9point0point6 ### Description Creates a channel set for a 9.0.6 Dolby Atmos surround setup, featuring additional top speakers for increased vertical audio immersion. ### Method static AudioChannelSet JUCE_CALLTYPE ### Endpoint N/A (Static method call) ### Parameters None ### Response - **AudioChannelSet**: A new AudioChannelSet object configured for a 9.0.6 Atmos setup. ``` -------------------------------- ### startPlaying Source: https://docs.juce.com/master/classjuce_1_1StandalonePluginHolder.html Starts the audio playback of the standalone plugin. ```APIDOC ## void startPlaying() ### Description Initiates audio playback for the standalone plugin instance. This will begin processing audio through the configured audio devices. ``` -------------------------------- ### createNewDevice Source: https://docs.juce.com/master/functions_func_c.html Initializes a new MIDI input or output device. ```APIDOC ## createNewDevice() ### Description Creates a new MIDI input or output device. ### Method Not specified (likely a static factory method or constructor). ### Endpoint N/A (C++ function) ### Returns `juce::MidiInput`, `juce::MidiOutput` - A new MIDI device instance. ```