Compare commits
No commits in common. "17df80de65cfa4aa94ea634ced25c3a898bd2610" and "64bcda5ec8b39c2d2b49e48838d84f03b0e60f8e" have entirely different histories.
17df80de65
...
64bcda5ec8
|
@ -1,4 +0,0 @@
|
||||||
|
|
||||||
TapTapTapTap.apk
|
|
||||||
TapTapTapTap.apk.idsig
|
|
||||||
.import/*
|
|
Before Width: | Height: | Size: 102 KiB |
|
@ -1,34 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="StreamTexture"
|
|
||||||
path="res://.import/Button Pressed.png-acc2bc337bb9dfcad2aec007d83448b3.stex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://Button Pressed.png"
|
|
||||||
dest_files=[ "res://.import/Button Pressed.png-acc2bc337bb9dfcad2aec007d83448b3.stex" ]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
compress/mode=0
|
|
||||||
compress/lossy_quality=0.7
|
|
||||||
compress/hdr_mode=0
|
|
||||||
compress/bptc_ldr=0
|
|
||||||
compress/normal_map=0
|
|
||||||
flags/repeat=0
|
|
||||||
flags/filter=true
|
|
||||||
flags/mipmaps=false
|
|
||||||
flags/anisotropic=false
|
|
||||||
flags/srgb=2
|
|
||||||
process/fix_alpha_border=true
|
|
||||||
process/premult_alpha=false
|
|
||||||
process/HDR_as_SRGB=false
|
|
||||||
process/invert_color=false
|
|
||||||
stream=false
|
|
||||||
size_limit=0
|
|
||||||
detect_3d=true
|
|
||||||
svg/scale=1.0
|
|
BIN
Button.png
Before Width: | Height: | Size: 51 KiB |
|
@ -1,34 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="StreamTexture"
|
|
||||||
path="res://.import/Button.png-db95f38c36cb47c93767cda66da72387.stex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://Button.png"
|
|
||||||
dest_files=[ "res://.import/Button.png-db95f38c36cb47c93767cda66da72387.stex" ]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
compress/mode=0
|
|
||||||
compress/lossy_quality=0.7
|
|
||||||
compress/hdr_mode=0
|
|
||||||
compress/bptc_ldr=0
|
|
||||||
compress/normal_map=0
|
|
||||||
flags/repeat=0
|
|
||||||
flags/filter=true
|
|
||||||
flags/mipmaps=false
|
|
||||||
flags/anisotropic=false
|
|
||||||
flags/srgb=2
|
|
||||||
process/fix_alpha_border=true
|
|
||||||
process/premult_alpha=false
|
|
||||||
process/HDR_as_SRGB=false
|
|
||||||
process/invert_color=false
|
|
||||||
stream=false
|
|
||||||
size_limit=0
|
|
||||||
detect_3d=true
|
|
||||||
svg/scale=1.0
|
|
BIN
Inter-Black.otf
35
Main.gd
|
@ -3,24 +3,23 @@ extends Control
|
||||||
var times = []
|
var times = []
|
||||||
var i = 0
|
var i = 0
|
||||||
var bpm: float
|
var bpm: float
|
||||||
onready var BPMNumber = $"BPMNumber"
|
onready var button = $Button
|
||||||
|
onready var DisplayBPM = $Label
|
||||||
|
|
||||||
func count():
|
func _ready():
|
||||||
|
button.connect("pressed", self, "_button_pressed")
|
||||||
|
|
||||||
|
func _button_pressed():
|
||||||
times.append(OS.get_ticks_usec())
|
times.append(OS.get_ticks_usec())
|
||||||
var avgDelta
|
if (i!=0):
|
||||||
#RESET STUFF THAT DIDN'T WORK
|
var delta = times[i]-times[i-1]
|
||||||
#var delta
|
print(delta)
|
||||||
#if (avgDelta && delta>(avgDelta*2)):
|
if (i > 8 && delta > 240000000 / bpm):
|
||||||
# i=0
|
i = 0
|
||||||
# times.clear()
|
bpm = 0
|
||||||
# bpm=0
|
else:
|
||||||
#print(str(delta) + " " + str(avgDelta))
|
bpm = 60000000 / delta
|
||||||
if (i>3):
|
i += 1
|
||||||
avgDelta = ((times[i]-times[i-1]) + (times[i-1]-times[i-2]) + (times[i-2]-times[i-3]) + (times[i-3]-times[i-4]))/4
|
DisplayBPM.text = str(bpm) + "BPM"
|
||||||
bpm = 60000000 / avgDelta
|
else:
|
||||||
BPMNumber.text = str(bpm) + "BPM"
|
|
||||||
# delta = (times[i]-times[i-1])
|
|
||||||
i += 1
|
i += 1
|
||||||
|
|
||||||
func _on_Tap_button_down():
|
|
||||||
count()
|
|
||||||
|
|
37
Main.tscn
|
@ -1,13 +1,6 @@
|
||||||
[gd_scene load_steps=6 format=2]
|
[gd_scene load_steps=2 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://Main.gd" type="Script" id=1]
|
[ext_resource path="res://Main.gd" type="Script" id=1]
|
||||||
[ext_resource path="res://Button.png" type="Texture" id=2]
|
|
||||||
[ext_resource path="res://Button Pressed.png" type="Texture" id=3]
|
|
||||||
[ext_resource path="res://Inter-Black.otf" type="DynamicFontData" id=4]
|
|
||||||
|
|
||||||
[sub_resource type="DynamicFont" id=1]
|
|
||||||
size = 128
|
|
||||||
font_data = ExtResource( 4 )
|
|
||||||
|
|
||||||
[node name="Control" type="Control"]
|
[node name="Control" type="Control"]
|
||||||
anchor_left = 0.5
|
anchor_left = 0.5
|
||||||
|
@ -23,17 +16,12 @@ __meta__ = {
|
||||||
"_edit_use_anchors_": false
|
"_edit_use_anchors_": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[node name="BPMNumber" type="Label" parent="."]
|
[node name="Label" type="Label" parent="."]
|
||||||
anchor_left = 0.5
|
anchor_left = 0.5
|
||||||
anchor_top = 0.5
|
|
||||||
anchor_right = 0.5
|
anchor_right = 0.5
|
||||||
anchor_bottom = 0.5
|
margin_left = -147.0
|
||||||
margin_left = -261.0
|
margin_right = 147.0
|
||||||
margin_top = -469.0
|
margin_bottom = 141.0
|
||||||
margin_right = 262.0
|
|
||||||
margin_bottom = -314.0
|
|
||||||
custom_fonts/font = SubResource( 1 )
|
|
||||||
custom_colors/font_color = Color( 1, 0.486275, 0, 1 )
|
|
||||||
text = "--"
|
text = "--"
|
||||||
align = 1
|
align = 1
|
||||||
valign = 1
|
valign = 1
|
||||||
|
@ -41,19 +29,16 @@ __meta__ = {
|
||||||
"_edit_use_anchors_": false
|
"_edit_use_anchors_": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[node name="TapButton" type="TextureButton" parent="."]
|
[node name="Button" type="Button" parent="."]
|
||||||
anchor_left = 0.5
|
anchor_left = 0.5
|
||||||
anchor_top = 0.5
|
anchor_top = 0.5
|
||||||
anchor_right = 0.5
|
anchor_right = 0.5
|
||||||
anchor_bottom = 0.5
|
anchor_bottom = 0.5
|
||||||
margin_left = -510.0
|
margin_left = -310.0
|
||||||
margin_top = -206.0
|
margin_top = -133.0
|
||||||
margin_right = 510.0
|
margin_right = 310.0
|
||||||
margin_bottom = 814.0
|
margin_bottom = 132.0
|
||||||
texture_normal = ExtResource( 2 )
|
text = "Tap"
|
||||||
texture_pressed = ExtResource( 3 )
|
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
"_edit_use_anchors_": false
|
"_edit_use_anchors_": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[connection signal="button_down" from="TapButton" to="." method="_on_Tap_button_down"]
|
|
||||||
|
|
BIN
Splash.png
Before Width: | Height: | Size: 19 KiB |
|
@ -1,34 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="StreamTexture"
|
|
||||||
path="res://.import/Splash.png-a2c00b34950005c5d52b66725d00fc48.stex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://Splash.png"
|
|
||||||
dest_files=[ "res://.import/Splash.png-a2c00b34950005c5d52b66725d00fc48.stex" ]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
compress/mode=0
|
|
||||||
compress/lossy_quality=0.7
|
|
||||||
compress/hdr_mode=0
|
|
||||||
compress/bptc_ldr=0
|
|
||||||
compress/normal_map=0
|
|
||||||
flags/repeat=0
|
|
||||||
flags/filter=true
|
|
||||||
flags/mipmaps=false
|
|
||||||
flags/anisotropic=false
|
|
||||||
flags/srgb=2
|
|
||||||
process/fix_alpha_border=true
|
|
||||||
process/premult_alpha=false
|
|
||||||
process/HDR_as_SRGB=false
|
|
||||||
process/invert_color=false
|
|
||||||
stream=false
|
|
||||||
size_limit=0
|
|
||||||
detect_3d=true
|
|
||||||
svg/scale=1.0
|
|
Before Width: | Height: | Size: 23 KiB |
|
@ -1,34 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="StreamTexture"
|
|
||||||
path="res://.import/adaptive-icon-bg.png-fce29ad796cd4d22acea1631bf4ccf25.stex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://adaptive-icon-bg.png"
|
|
||||||
dest_files=[ "res://.import/adaptive-icon-bg.png-fce29ad796cd4d22acea1631bf4ccf25.stex" ]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
compress/mode=0
|
|
||||||
compress/lossy_quality=0.7
|
|
||||||
compress/hdr_mode=0
|
|
||||||
compress/bptc_ldr=0
|
|
||||||
compress/normal_map=0
|
|
||||||
flags/repeat=0
|
|
||||||
flags/filter=true
|
|
||||||
flags/mipmaps=false
|
|
||||||
flags/anisotropic=false
|
|
||||||
flags/srgb=2
|
|
||||||
process/fix_alpha_border=true
|
|
||||||
process/premult_alpha=false
|
|
||||||
process/HDR_as_SRGB=false
|
|
||||||
process/invert_color=false
|
|
||||||
stream=false
|
|
||||||
size_limit=0
|
|
||||||
detect_3d=true
|
|
||||||
svg/scale=1.0
|
|
Before Width: | Height: | Size: 2.4 KiB |
|
@ -1,34 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="StreamTexture"
|
|
||||||
path="res://.import/adaptive-icon-fg.png-62e92cc71449296474250401da45150b.stex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://adaptive-icon-fg.png"
|
|
||||||
dest_files=[ "res://.import/adaptive-icon-fg.png-62e92cc71449296474250401da45150b.stex" ]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
compress/mode=0
|
|
||||||
compress/lossy_quality=0.7
|
|
||||||
compress/hdr_mode=0
|
|
||||||
compress/bptc_ldr=0
|
|
||||||
compress/normal_map=0
|
|
||||||
flags/repeat=0
|
|
||||||
flags/filter=true
|
|
||||||
flags/mipmaps=false
|
|
||||||
flags/anisotropic=false
|
|
||||||
flags/srgb=2
|
|
||||||
process/fix_alpha_border=true
|
|
||||||
process/premult_alpha=false
|
|
||||||
process/HDR_as_SRGB=false
|
|
||||||
process/invert_color=false
|
|
||||||
stream=false
|
|
||||||
size_limit=0
|
|
||||||
detect_3d=true
|
|
||||||
svg/scale=1.0
|
|
|
@ -33,16 +33,16 @@ version/name="1.0"
|
||||||
package/unique_name="org.godotengine.$genname"
|
package/unique_name="org.godotengine.$genname"
|
||||||
package/name=""
|
package/name=""
|
||||||
package/signed=true
|
package/signed=true
|
||||||
launcher_icons/main_192x192="res://icon.png"
|
launcher_icons/main_192x192=""
|
||||||
launcher_icons/adaptive_foreground_432x432="res://adaptive-icon-fg.png"
|
launcher_icons/adaptive_foreground_432x432=""
|
||||||
launcher_icons/adaptive_background_432x432="res://adaptive-icon-bg.png"
|
launcher_icons/adaptive_background_432x432=""
|
||||||
graphics/32_bits_framebuffer=true
|
graphics/32_bits_framebuffer=true
|
||||||
graphics/opengl_debug=false
|
graphics/opengl_debug=false
|
||||||
xr_features/xr_mode=0
|
xr_features/xr_mode=0
|
||||||
xr_features/degrees_of_freedom=0
|
xr_features/degrees_of_freedom=0
|
||||||
xr_features/hand_tracking=0
|
xr_features/hand_tracking=0
|
||||||
xr_features/focus_awareness=false
|
xr_features/focus_awareness=false
|
||||||
screen/immersive_mode=false
|
screen/immersive_mode=true
|
||||||
screen/support_small=true
|
screen/support_small=true
|
||||||
screen/support_normal=true
|
screen/support_normal=true
|
||||||
screen/support_large=true
|
screen/support_large=true
|
||||||
|
|
BIN
icon.png
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 3.2 KiB |
|
@ -12,9 +12,6 @@ config_version=4
|
||||||
|
|
||||||
config/name="TapTapTapTap"
|
config/name="TapTapTapTap"
|
||||||
run/main_scene="res://Main.tscn"
|
run/main_scene="res://Main.tscn"
|
||||||
boot_splash/image="res://Splash.png"
|
|
||||||
boot_splash/fullsize=false
|
|
||||||
boot_splash/bg_color=Color( 0, 0, 0, 1 )
|
|
||||||
config/icon="res://icon.png"
|
config/icon="res://icon.png"
|
||||||
|
|
||||||
[display]
|
[display]
|
||||||
|
@ -33,5 +30,4 @@ common/enable_pause_aware_picking=true
|
||||||
quality/driver/driver_name="GLES2"
|
quality/driver/driver_name="GLES2"
|
||||||
vram_compression/import_etc=true
|
vram_compression/import_etc=true
|
||||||
vram_compression/import_etc2=false
|
vram_compression/import_etc2=false
|
||||||
environment/default_clear_color=Color( 0, 0, 0, 1 )
|
|
||||||
environment/default_environment="res://default_env.tres"
|
environment/default_environment="res://default_env.tres"
|
||||||
|
|