Skip to content

Commit 98c18d7

Browse files
author
Godot Organization
committed
classref: Sync with current master branch (10e1114)
1 parent c18df6d commit 98c18d7

36 files changed

+1369
-292
lines changed

classes/[email protected]

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ Add a custom icon to the current script. The icon specified at ``icon_path`` is
662662

663663
\ **Note:** As annotations describe their subject, the :ref:`@icon<class_@GDScript_annotation_@icon>` annotation must be placed before the class definition and inheritance.
664664

665-
\ **Note:** Unlike most other annotations, the argument of the :ref:`@icon<class_@GDScript_annotation_@icon>` annotation must be a string literal (constant expressions are not supported).
665+
\ **Note:** Unlike other annotations, the argument of the :ref:`@icon<class_@GDScript_annotation_@icon>` annotation must be a string literal (constant expressions are not supported).
666666

667667
.. rst-class:: classref-item-separator
668668

@@ -748,20 +748,6 @@ Mark the current script as a tool script, allowing it to be loaded and executed
748748

749749
----
750750

751-
.. _class_@GDScript_annotation_@uid:
752-
753-
.. rst-class:: classref-annotation
754-
755-
**@uid** **(** :ref:`String<class_String>` uid **)**
756-
757-
Stores information about UID of this script. This annotation is auto-generated when saving the script and must not be modified manually. Only applies to scripts saved as separate files (i.e. not built-in).
758-
759-
\ **Note:** Unlike most other annotations, the argument of the :ref:`@uid<class_@GDScript_annotation_@uid>` annotation must be a string literal (constant expressions are not supported).
760-
761-
.. rst-class:: classref-item-separator
762-
763-
----
764-
765751
.. _class_@GDScript_annotation_@warning_ignore:
766752

767753
.. rst-class:: classref-annotation

classes/[email protected]

Lines changed: 65 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2393,6 +2393,42 @@ Group Switch key mask.
23932393

23942394
----
23952395

2396+
.. _enum_@GlobalScope_KeyLocation:
2397+
2398+
.. rst-class:: classref-enumeration
2399+
2400+
enum **KeyLocation**:
2401+
2402+
.. _class_@GlobalScope_constant_KEY_LOCATION_UNSPECIFIED:
2403+
2404+
.. rst-class:: classref-enumeration-constant
2405+
2406+
:ref:`KeyLocation<enum_@GlobalScope_KeyLocation>` **KEY_LOCATION_UNSPECIFIED** = ``0``
2407+
2408+
Used for keys which only appear once, or when a comparison doesn't need to differentiate the ``LEFT`` and ``RIGHT`` versions.
2409+
2410+
For example, when using :ref:`InputEvent.is_match<class_InputEvent_method_is_match>`, an event which has :ref:`KEY_LOCATION_UNSPECIFIED<class_@GlobalScope_constant_KEY_LOCATION_UNSPECIFIED>` will match any :ref:`KeyLocation<enum_@GlobalScope_KeyLocation>` on the passed event.
2411+
2412+
.. _class_@GlobalScope_constant_KEY_LOCATION_LEFT:
2413+
2414+
.. rst-class:: classref-enumeration-constant
2415+
2416+
:ref:`KeyLocation<enum_@GlobalScope_KeyLocation>` **KEY_LOCATION_LEFT** = ``1``
2417+
2418+
A key which is to the left of its twin.
2419+
2420+
.. _class_@GlobalScope_constant_KEY_LOCATION_RIGHT:
2421+
2422+
.. rst-class:: classref-enumeration-constant
2423+
2424+
:ref:`KeyLocation<enum_@GlobalScope_KeyLocation>` **KEY_LOCATION_RIGHT** = ``2``
2425+
2426+
A key which is to the right of its twin.
2427+
2428+
.. rst-class:: classref-item-separator
2429+
2430+
----
2431+
23962432
.. _enum_@GlobalScope_MouseButton:
23972433

23982434
.. rst-class:: classref-enumeration
@@ -2835,151 +2871,161 @@ enum **MIDIMessage**:
28352871

28362872
:ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_NONE** = ``0``
28372873

2838-
Enum value which doesn't correspond to any MIDI message. This is used to initialize :ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` properties with a generic state.
2874+
Does not correspond to any MIDI message. This is the default value of :ref:`InputEventMIDI.message<class_InputEventMIDI_property_message>`.
28392875

28402876
.. _class_@GlobalScope_constant_MIDI_MESSAGE_NOTE_OFF:
28412877

28422878
.. rst-class:: classref-enumeration-constant
28432879

28442880
:ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_NOTE_OFF** = ``8``
28452881

2846-
MIDI note OFF message. Not all MIDI devices send this event; some send :ref:`MIDI_MESSAGE_NOTE_ON<class_@GlobalScope_constant_MIDI_MESSAGE_NOTE_ON>` with zero velocity instead. See the documentation of :ref:`InputEventMIDI<class_InputEventMIDI>` for information of how to use MIDI inputs.
2882+
MIDI message sent when a note is released.
2883+
2884+
\ **Note:** Not all MIDI devices send this message; some may send :ref:`MIDI_MESSAGE_NOTE_ON<class_@GlobalScope_constant_MIDI_MESSAGE_NOTE_ON>` with :ref:`InputEventMIDI.velocity<class_InputEventMIDI_property_velocity>` set to ``0``.
28472885

28482886
.. _class_@GlobalScope_constant_MIDI_MESSAGE_NOTE_ON:
28492887

28502888
.. rst-class:: classref-enumeration-constant
28512889

28522890
:ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_NOTE_ON** = ``9``
28532891

2854-
MIDI note ON message. Some MIDI devices send this event with velocity zero instead of :ref:`MIDI_MESSAGE_NOTE_OFF<class_@GlobalScope_constant_MIDI_MESSAGE_NOTE_OFF>`, but implementations vary. See the documentation of :ref:`InputEventMIDI<class_InputEventMIDI>` for information of how to use MIDI inputs.
2892+
MIDI message sent when a note is pressed.
28552893

28562894
.. _class_@GlobalScope_constant_MIDI_MESSAGE_AFTERTOUCH:
28572895

28582896
.. rst-class:: classref-enumeration-constant
28592897

28602898
:ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_AFTERTOUCH** = ``10``
28612899

2862-
MIDI aftertouch message. This message is most often sent by pressing down on the key after it "bottoms out".
2900+
MIDI message sent to indicate a change in pressure while a note is being pressed down, also called aftertouch.
28632901

28642902
.. _class_@GlobalScope_constant_MIDI_MESSAGE_CONTROL_CHANGE:
28652903

28662904
.. rst-class:: classref-enumeration-constant
28672905

28682906
:ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_CONTROL_CHANGE** = ``11``
28692907

2870-
MIDI control change message. This message is sent when a controller value changes. Controllers include devices such as pedals and levers.
2908+
MIDI message sent when a controller value changes. In a MIDI device, a controller is any input that doesn't play notes. These may include sliders for volume, balance, and panning, as well as switches and pedals. See the `General MIDI specification <https://en.wikipedia.org/wiki/General_MIDI#Controller_events>`__ for a small list.
28712909

28722910
.. _class_@GlobalScope_constant_MIDI_MESSAGE_PROGRAM_CHANGE:
28732911

28742912
.. rst-class:: classref-enumeration-constant
28752913

28762914
:ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_PROGRAM_CHANGE** = ``12``
28772915

2878-
MIDI program change message. This message sent when the program patch number changes.
2916+
MIDI message sent when the MIDI device changes its current instrument (also called *program* or *preset*).
28792917

28802918
.. _class_@GlobalScope_constant_MIDI_MESSAGE_CHANNEL_PRESSURE:
28812919

28822920
.. rst-class:: classref-enumeration-constant
28832921

28842922
:ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_CHANNEL_PRESSURE** = ``13``
28852923

2886-
MIDI channel pressure message. This message is most often sent by pressing down on the key after it "bottoms out". This message is different from polyphonic after-touch as it indicates the highest pressure across all keys.
2924+
MIDI message sent to indicate a change in pressure for the whole channel. Some MIDI devices may send this instead of :ref:`MIDI_MESSAGE_AFTERTOUCH<class_@GlobalScope_constant_MIDI_MESSAGE_AFTERTOUCH>`.
28872925

28882926
.. _class_@GlobalScope_constant_MIDI_MESSAGE_PITCH_BEND:
28892927

28902928
.. rst-class:: classref-enumeration-constant
28912929

28922930
:ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_PITCH_BEND** = ``14``
28932931

2894-
MIDI pitch bend message. This message is sent to indicate a change in the pitch bender (wheel or lever, typically).
2932+
MIDI message sent when the value of the pitch bender changes, usually a wheel on the MIDI device.
28952933

28962934
.. _class_@GlobalScope_constant_MIDI_MESSAGE_SYSTEM_EXCLUSIVE:
28972935

28982936
.. rst-class:: classref-enumeration-constant
28992937

29002938
:ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_SYSTEM_EXCLUSIVE** = ``240``
29012939

2902-
MIDI system exclusive message. This has behavior exclusive to the device you're receiving input from. Getting this data is not implemented in Godot.
2940+
MIDI system exclusive (SysEx) message. This type of message is not standardized and it's highly dependent on the MIDI device sending it.
2941+
2942+
\ **Note:** Getting this message's data from :ref:`InputEventMIDI<class_InputEventMIDI>` is not implemented.
29032943

29042944
.. _class_@GlobalScope_constant_MIDI_MESSAGE_QUARTER_FRAME:
29052945

29062946
.. rst-class:: classref-enumeration-constant
29072947

29082948
:ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_QUARTER_FRAME** = ``241``
29092949

2910-
MIDI quarter frame message. Contains timing information that is used to synchronize MIDI devices. Getting this data is not implemented in Godot.
2950+
MIDI message sent every quarter frame to keep connected MIDI devices synchronized. Related to :ref:`MIDI_MESSAGE_TIMING_CLOCK<class_@GlobalScope_constant_MIDI_MESSAGE_TIMING_CLOCK>`.
2951+
2952+
\ **Note:** Getting this message's data from :ref:`InputEventMIDI<class_InputEventMIDI>` is not implemented.
29112953

29122954
.. _class_@GlobalScope_constant_MIDI_MESSAGE_SONG_POSITION_POINTER:
29132955

29142956
.. rst-class:: classref-enumeration-constant
29152957

29162958
:ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_SONG_POSITION_POINTER** = ``242``
29172959

2918-
MIDI song position pointer message. Gives the number of 16th notes since the start of the song. Getting this data is not implemented in Godot.
2960+
MIDI message sent to jump onto a new position in the current sequence or song.
2961+
2962+
\ **Note:** Getting this message's data from :ref:`InputEventMIDI<class_InputEventMIDI>` is not implemented.
29192963

29202964
.. _class_@GlobalScope_constant_MIDI_MESSAGE_SONG_SELECT:
29212965

29222966
.. rst-class:: classref-enumeration-constant
29232967

29242968
:ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_SONG_SELECT** = ``243``
29252969

2926-
MIDI song select message. Specifies which sequence or song is to be played. Getting this data is not implemented in Godot.
2970+
MIDI message sent to select a sequence or song to play.
2971+
2972+
\ **Note:** Getting this message's data from :ref:`InputEventMIDI<class_InputEventMIDI>` is not implemented.
29272973

29282974
.. _class_@GlobalScope_constant_MIDI_MESSAGE_TUNE_REQUEST:
29292975

29302976
.. rst-class:: classref-enumeration-constant
29312977

29322978
:ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_TUNE_REQUEST** = ``246``
29332979

2934-
MIDI tune request message. Upon receiving a tune request, all analog synthesizers should tune their oscillators.
2980+
MIDI message sent to request a tuning calibration. Used on analog synthesizers. Most modern MIDI devices do not need this message.
29352981

29362982
.. _class_@GlobalScope_constant_MIDI_MESSAGE_TIMING_CLOCK:
29372983

29382984
.. rst-class:: classref-enumeration-constant
29392985

29402986
:ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_TIMING_CLOCK** = ``248``
29412987

2942-
MIDI timing clock message. Sent 24 times per quarter note when synchronization is required.
2988+
MIDI message sent 24 times after :ref:`MIDI_MESSAGE_QUARTER_FRAME<class_@GlobalScope_constant_MIDI_MESSAGE_QUARTER_FRAME>`, to keep connected MIDI devices synchronized.
29432989

29442990
.. _class_@GlobalScope_constant_MIDI_MESSAGE_START:
29452991

29462992
.. rst-class:: classref-enumeration-constant
29472993

29482994
:ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_START** = ``250``
29492995

2950-
MIDI start message. Start the current sequence playing. This message will be followed with Timing Clocks.
2996+
MIDI message sent to start the current sequence or song from the beginning.
29512997

29522998
.. _class_@GlobalScope_constant_MIDI_MESSAGE_CONTINUE:
29532999

29543000
.. rst-class:: classref-enumeration-constant
29553001

29563002
:ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_CONTINUE** = ``251``
29573003

2958-
MIDI continue message. Continue at the point the sequence was stopped.
3004+
MIDI message sent to resume from the point the current sequence or song was paused.
29593005

29603006
.. _class_@GlobalScope_constant_MIDI_MESSAGE_STOP:
29613007

29623008
.. rst-class:: classref-enumeration-constant
29633009

29643010
:ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_STOP** = ``252``
29653011

2966-
MIDI stop message. Stop the current sequence.
3012+
MIDI message sent to pause the current sequence or song.
29673013

29683014
.. _class_@GlobalScope_constant_MIDI_MESSAGE_ACTIVE_SENSING:
29693015

29703016
.. rst-class:: classref-enumeration-constant
29713017

29723018
:ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_ACTIVE_SENSING** = ``254``
29733019

2974-
MIDI active sensing message. This message is intended to be sent repeatedly to tell the receiver that a connection is alive.
3020+
MIDI message sent repeatedly while the MIDI device is idle, to tell the receiver that the connection is alive. Most MIDI devices do not send this message.
29753021

29763022
.. _class_@GlobalScope_constant_MIDI_MESSAGE_SYSTEM_RESET:
29773023

29783024
.. rst-class:: classref-enumeration-constant
29793025

29803026
:ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_SYSTEM_RESET** = ``255``
29813027

2982-
MIDI system reset message. Reset all receivers in the system to power-up status. It should not be sent on power-up itself.
3028+
MIDI message sent to reset a MIDI device to its default state, as if it was just turned on. It should not be sent when the MIDI device is being turned on.
29833029

29843030
.. rst-class:: classref-item-separator
29853031

classes/class_audioeffect.rst

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,24 @@ AudioEffect
1414

1515
**Inherited By:** :ref:`AudioEffectAmplify<class_AudioEffectAmplify>`, :ref:`AudioEffectCapture<class_AudioEffectCapture>`, :ref:`AudioEffectChorus<class_AudioEffectChorus>`, :ref:`AudioEffectCompressor<class_AudioEffectCompressor>`, :ref:`AudioEffectDelay<class_AudioEffectDelay>`, :ref:`AudioEffectDistortion<class_AudioEffectDistortion>`, :ref:`AudioEffectEQ<class_AudioEffectEQ>`, :ref:`AudioEffectFilter<class_AudioEffectFilter>`, :ref:`AudioEffectLimiter<class_AudioEffectLimiter>`, :ref:`AudioEffectPanner<class_AudioEffectPanner>`, :ref:`AudioEffectPhaser<class_AudioEffectPhaser>`, :ref:`AudioEffectPitchShift<class_AudioEffectPitchShift>`, :ref:`AudioEffectRecord<class_AudioEffectRecord>`, :ref:`AudioEffectReverb<class_AudioEffectReverb>`, :ref:`AudioEffectSpectrumAnalyzer<class_AudioEffectSpectrumAnalyzer>`, :ref:`AudioEffectStereoEnhance<class_AudioEffectStereoEnhance>`
1616

17-
Audio effect for audio.
17+
Base class for audio effect resources.
1818

1919
.. rst-class:: classref-introduction-group
2020

2121
Description
2222
-----------
2323

24-
Base resource for audio bus. Applies an audio effect on the bus that the resource is applied on.
24+
The base :ref:`Resource<class_Resource>` for every audio effect. In the editor, an audio effect can be added to the current bus layout through the Audio panel. At run-time, it is also possible to manipulate audio effects through :ref:`AudioServer.add_bus_effect<class_AudioServer_method_add_bus_effect>`, :ref:`AudioServer.remove_bus_effect<class_AudioServer_method_remove_bus_effect>`, and :ref:`AudioServer.get_bus_effect<class_AudioServer_method_get_bus_effect>`.
25+
26+
When applied on a bus, an audio effect creates a corresponding :ref:`AudioEffectInstance<class_AudioEffectInstance>`. The instance is directly responsible for manipulating the sound, based on the original audio effect's properties.
2527

2628
.. rst-class:: classref-introduction-group
2729

2830
Tutorials
2931
---------
3032

33+
- :doc:`Audio buses <../tutorials/audio/audio_buses>`
34+
3135
- `Audio Mic Record Demo <https://godotengine.org/asset-library/asset/527>`__
3236

3337
.. rst-class:: classref-reftable-group
@@ -57,9 +61,21 @@ Method Descriptions
5761

5862
:ref:`AudioEffectInstance<class_AudioEffectInstance>` **_instantiate** **(** **)** |virtual|
5963

60-
.. container:: contribute
64+
Override this method to customize the :ref:`AudioEffectInstance<class_AudioEffectInstance>` created when this effect is applied on a bus in the editor's Audio panel, or through :ref:`AudioServer.add_bus_effect<class_AudioServer_method_add_bus_effect>`.
65+
66+
::
67+
68+
extends AudioEffect
69+
70+
@export var strength = 4.0
71+
72+
func _instantiate():
73+
var effect = CustomAudioEffectInstance.new()
74+
effect.base = self
75+
76+
return effect
6177

62-
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
78+
\ **Note:** It is recommended to keep a reference to the original **AudioEffect** in the new instance. Depending on the implementation this allows the effect instance to listen for changes at run-time and be modified accordingly.
6379

6480
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
6581
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`

classes/class_audioeffectinstance.rst

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,21 @@ AudioEffectInstance
1414

1515
**Inherited By:** :ref:`AudioEffectSpectrumAnalyzerInstance<class_AudioEffectSpectrumAnalyzerInstance>`
1616

17-
.. container:: contribute
17+
Manipulates the audio it receives for a given effect.
1818

19-
There is currently no description for this class. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
19+
.. rst-class:: classref-introduction-group
20+
21+
Description
22+
-----------
23+
24+
An audio effect instance manipulates the audio it receives for a given effect. This instance is automatically created by an :ref:`AudioEffect<class_AudioEffect>` when it is added to a bus, and should usually not be created directly. If necessary, it can be fetched at run-time with :ref:`AudioServer.get_bus_effect_instance<class_AudioServer_method_get_bus_effect_instance>`.
25+
26+
.. rst-class:: classref-introduction-group
27+
28+
Tutorials
29+
---------
30+
31+
- :doc:`Audio buses <../tutorials/audio/audio_buses>`
2032

2133
.. rst-class:: classref-reftable-group
2234

@@ -47,9 +59,9 @@ Method Descriptions
4759

4860
void **_process** **(** const void* src_buffer, AudioFrame* dst_buffer, :ref:`int<class_int>` frame_count **)** |virtual|
4961

50-
.. container:: contribute
62+
Called by the :ref:`AudioServer<class_AudioServer>` to process this effect. When :ref:`_process_silence<class_AudioEffectInstance_private_method__process_silence>` is not overridden or it returns ``false``, this method is called only when the bus is active.
5163

52-
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
64+
\ **Note:** It is not useful to override this method in GDScript or C#. Only GDExtension can take advantage of it.
5365

5466
.. rst-class:: classref-item-separator
5567

@@ -61,9 +73,9 @@ void **_process** **(** const void* src_buffer, AudioFrame* dst_buffer, :ref:`in
6173

6274
:ref:`bool<class_bool>` **_process_silence** **(** **)** |virtual| |const|
6375

64-
.. container:: contribute
76+
Override this method to customize the processing behavior of this effect instance.
6577

66-
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
78+
Should return ``true`` to force the :ref:`AudioServer<class_AudioServer>` to always call :ref:`_process<class_AudioEffectInstance_private_method__process>`, even if the bus has been muted or cannot otherwise be heard.
6779

6880
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
6981
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`

classes/class_bone2d.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ Method Descriptions
104104

105105
void **apply_rest** **(** **)**
106106

107-
Stores the node's current transforms in :ref:`rest<class_Bone2D_property_rest>`.
107+
Resets the bone to the rest pose. This is equivalent to setting :ref:`Node2D.transform<class_Node2D_property_transform>` to :ref:`rest<class_Bone2D_property_rest>`.
108108

109109
.. rst-class:: classref-item-separator
110110

0 commit comments

Comments
 (0)