-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2892d65
commit 10bb65a
Showing
10 changed files
with
192 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Normalize EOL for all files that Git considers text files. | ||
* text=auto eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Godot 4+ specific ignores | ||
.godot/ | ||
addons/godot-openmpt/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
extends Control | ||
|
||
func _ready() -> void: | ||
%PauseBtn.disabled = true | ||
|
||
func _process(delta: float) -> void: | ||
var stream_player = %AudioStreamPlayer | ||
if stream_player.has_stream_playback(): | ||
var stream_playback = stream_player.get_stream_playback() | ||
var current_pattern = stream_playback.get_current_pattern() | ||
%InfoText.text = "Row: %d/%d Order: %d/%d Pattern: %d/%d" % [ | ||
stream_playback.get_current_row(), | ||
stream_player.stream.get_pattern_num_rows(current_pattern), | ||
stream_playback.get_current_order(), | ||
stream_player.stream.get_num_orders(), | ||
current_pattern, | ||
stream_player.stream.get_num_patterns()] | ||
else: | ||
%InfoText.text = "" | ||
|
||
func _on_play_btn_pressed() -> void: | ||
%AudioStreamPlayer.play() | ||
%PauseBtn.disabled = false | ||
func _on_pause_btn_pressed() -> void: | ||
%AudioStreamPlayer.stream_paused = !%AudioStreamPlayer.stream_paused | ||
if %AudioStreamPlayer.stream_paused: | ||
%PlayBtn.disabled = true | ||
%StopBtn.disabled = true | ||
%PauseBtn.text = "Unpause" | ||
else: | ||
%PlayBtn.disabled = false | ||
%StopBtn.disabled = false | ||
%PauseBtn.text = "Pause" | ||
func _on_stop_btn_pressed() -> void: | ||
%AudioStreamPlayer.stop() | ||
%PauseBtn.disabled = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
[gd_scene load_steps=3 format=3 uid="uid://dhy0aj7k743jx"] | ||
|
||
[ext_resource type="AudioStream" uid="uid://cje6373yknfle" path="res://examples/deusesque.xm" id="1_6yod7"] | ||
[ext_resource type="Script" path="res://examples/1-Simple Playback/simple_playback.gd" id="1_flpse"] | ||
|
||
[node name="SimplePlayback" type="Control"] | ||
layout_mode = 3 | ||
anchors_preset = 15 | ||
anchor_right = 1.0 | ||
anchor_bottom = 1.0 | ||
grow_horizontal = 2 | ||
grow_vertical = 2 | ||
script = ExtResource("1_flpse") | ||
|
||
[node name="CenterContainer" type="CenterContainer" parent="."] | ||
layout_mode = 1 | ||
anchors_preset = 15 | ||
anchor_right = 1.0 | ||
anchor_bottom = 1.0 | ||
grow_horizontal = 2 | ||
grow_vertical = 2 | ||
|
||
[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"] | ||
layout_mode = 2 | ||
alignment = 1 | ||
|
||
[node name="HBoxContainer" type="HBoxContainer" parent="CenterContainer/VBoxContainer"] | ||
layout_mode = 2 | ||
alignment = 1 | ||
|
||
[node name="PlayBtn" type="Button" parent="CenterContainer/VBoxContainer/HBoxContainer"] | ||
unique_name_in_owner = true | ||
layout_mode = 2 | ||
text = "Play" | ||
|
||
[node name="PauseBtn" type="Button" parent="CenterContainer/VBoxContainer/HBoxContainer"] | ||
unique_name_in_owner = true | ||
layout_mode = 2 | ||
text = "Pause" | ||
|
||
[node name="StopBtn" type="Button" parent="CenterContainer/VBoxContainer/HBoxContainer"] | ||
unique_name_in_owner = true | ||
layout_mode = 2 | ||
text = "Stop | ||
" | ||
|
||
[node name="InfoText" type="Label" parent="CenterContainer/VBoxContainer"] | ||
unique_name_in_owner = true | ||
layout_mode = 2 | ||
|
||
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."] | ||
unique_name_in_owner = true | ||
stream = ExtResource("1_6yod7") | ||
|
||
[connection signal="pressed" from="CenterContainer/VBoxContainer/HBoxContainer/PlayBtn" to="." method="_on_play_btn_pressed"] | ||
[connection signal="pressed" from="CenterContainer/VBoxContainer/HBoxContainer/PauseBtn" to="." method="_on_pause_btn_pressed"] | ||
[connection signal="pressed" from="CenterContainer/VBoxContainer/HBoxContainer/StopBtn" to="." method="_on_stop_btn_pressed"] |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[remap] | ||
|
||
importer="dudejoe870.openmptimporter" | ||
type="AudioStreamMPT" | ||
uid="uid://cje6373yknfle" | ||
path="res://.godot/imported/deusesque.xm-d80fe518a5e97fb7c0baab4e52327b29.res" | ||
|
||
[deps] | ||
|
||
source_file="res://examples/deusesque.xm" | ||
dest_files=["res://.godot/imported/deusesque.xm-d80fe518a5e97fb7c0baab4e52327b29.res"] | ||
|
||
[params] | ||
|
||
force/mono=false | ||
playback/loop_mode=1 | ||
load/skip_plugins=false | ||
load/skip_subsongs_init=false |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
[remap] | ||
|
||
importer="texture" | ||
type="CompressedTexture2D" | ||
uid="uid://ct0xwt4cmo8aa" | ||
path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex" | ||
metadata={ | ||
"vram_texture": false | ||
} | ||
|
||
[deps] | ||
|
||
source_file="res://icon.svg" | ||
dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"] | ||
|
||
[params] | ||
|
||
compress/mode=0 | ||
compress/high_quality=false | ||
compress/lossy_quality=0.7 | ||
compress/hdr_compression=1 | ||
compress/normal_map=0 | ||
compress/channel_pack=0 | ||
mipmaps/generate=false | ||
mipmaps/limit=-1 | ||
roughness/mode=0 | ||
roughness/src_normal="" | ||
process/fix_alpha_border=true | ||
process/premult_alpha=false | ||
process/normal_map_invert_y=false | ||
process/hdr_as_srgb=false | ||
process/hdr_clamp_exposure=false | ||
process/size_limit=0 | ||
detect_3d/compress_to=1 | ||
svg/scale=1.0 | ||
editor/scale_with_editor_scale=false | ||
editor/convert_colors_with_editor_theme=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
; Engine configuration file. | ||
; It's best edited using the editor UI and not directly, | ||
; since the parameters that go here are not all obvious. | ||
; | ||
; Format: | ||
; [section] ; section goes between [] | ||
; param=value ; assign values to parameters | ||
|
||
config_version=5 | ||
|
||
[application] | ||
|
||
config/name="Godot-OpenMPT-example" | ||
run/main_scene="res://examples/1-Simple Playback/simple_playback.tscn" | ||
config/features=PackedStringArray("4.2", "Mobile") | ||
config/icon="res://icon.svg" | ||
|
||
[dotnet] | ||
|
||
project/assembly_name="Godot-OpenMPT-example" | ||
|
||
[editor_plugins] | ||
|
||
enabled=PackedStringArray("res://addons/godot-openmpt/plugin.cfg") | ||
|
||
[rendering] | ||
|
||
renderer/rendering_method="mobile" |