@@ -263,6 +263,17 @@ int main()
263263}
264264```
265265
266+ ##### Godot
267+
268+ ``` gdscript
269+ extends Node
270+
271+ func _ready() -> void:
272+ var value = rhythm_game_utilities.inverse_lerp(0, 10, 5)
273+
274+ print(value) # 0.5
275+ ```
276+
266277#### ` Common.Lerp `
267278
268279> Languages: ` C# ` ` C++ `
@@ -297,6 +308,17 @@ int main()
297308}
298309```
299310
311+ ##### Godot
312+
313+ ``` gdscript
314+ extends Node
315+
316+ func _ready() -> void:
317+ var value = rhythm_game_utilities.lerp(0, 10, 0.5)
318+
319+ print(value) # 5
320+ ```
321+
300322### ` Parsers `
301323
302324Read more about ` .chart ` files: < https://github.com/TheNathannator/GuitarGame_ChartFormats/blob/main/doc/FileFormats/.chart/Core%20Infrastructure.md >
@@ -724,6 +746,26 @@ int main()
724746}
725747```
726748
749+ ##### Godot
750+
751+ ``` gdscript
752+ extends Node
753+
754+ func _ready() -> void:
755+ var seconds = 5;
756+ var resolution = 192;
757+
758+ var bpmChanges = {
759+ 0: 88000, 3840: 112000, 9984: 89600,
760+ 22272: 112000, 33792: 111500, 34560: 112000,
761+ 42240: 111980
762+ }
763+
764+ var ticks = rhythm_game_utilities.convert_seconds_to_ticks(seconds, resolution, bpmChanges);
765+
766+ print(ticks) # 1408
767+ ```
768+
727769#### ` Utilities.ConvertTickToPosition `
728770
729771> Languages: ` C# ` ` C++ `
@@ -764,6 +806,20 @@ int main()
764806}
765807```
766808
809+ ##### Godot
810+
811+ ``` gdscript
812+ extends Node
813+
814+ func _ready() -> void:
815+ var tick = 2784;
816+ var resolution = 192;
817+
818+ var position = rhythm_game_utilities.convert_tick_to_position(tick, resolution);
819+
820+ print(position) # 14.5
821+ ```
822+
767823#### ` Utilities.IsOnTheBeat `
768824
769825> Languages: ` C# ` ` C++ `
@@ -808,6 +864,20 @@ int main()
808864}
809865```
810866
867+ ##### Godot
868+
869+ ``` gdscript
870+ extends Node
871+
872+ func _ready() -> void:
873+ var bpm = 120;
874+ var currentTime = 10;
875+ var delta = 0.05;
876+
877+ if rhythm_game_utilities.is_on_the_beat(bpm, currentTime, delta):
878+ print("Is on the beat!")
879+ ```
880+
811881#### ` Utilities.RoundUpToTheNearestMultiplier `
812882
813883> Languages: ` C# ` ` C++ `
@@ -842,6 +912,17 @@ int main()
842912}
843913```
844914
915+ ##### Godot
916+
917+ ``` gdscript
918+ extends Node
919+
920+ func _ready() -> void:
921+ var value = rhythm_game_utilities.round_up_to_the_nearest_multiplier(12, 10);
922+
923+ print(value) # 20
924+ ```
925+
845926## Architecture
846927
847928The current architecture for this project looks like this:
0 commit comments