Workin on it

This commit is contained in:
Salt 2025-01-30 02:21:04 -06:00
parent 85a4a0e07c
commit 63285501fd
2 changed files with 43 additions and 0 deletions

2
.env Normal file

@ -0,0 +1,2 @@
export YDOTOOL_SOCKET=/tmp/.ydotool_socket
[ -f venv/bin/activate ] && . venv/bin/activate

41
patapon.py Executable file

@ -0,0 +1,41 @@
#! /usr/bin/env python3
import argparse
def ydotool(key):
pass
def playsong(song):
pass
def main():
# A list of all possible songs, expressed as their cardinal directions
# We'll map these to keystrokes later
songs = [
# March of Mobility
"L-L-L-R-",
# Aria of Attack
"R-R-L-R-",
# Lament of Defense
"U-U-L-R-",
# Hold-Tight Hoe-Down/Concerto of Charge
"R-R-U-U-",
# Melody with a Bounce/Jingle of Jump
"D-D-U-U-",
# Ballad of 1999/Pizzicato of Party
"L-R-D-U-",
# Song of Miracles (Djinn)
"D-DD-DD-",
# Leisurely Lullaby
# Not sure why you'd want to cast this on repeat, but you can I guess
"L-R-L-R-",
# Step Back Strut
"U-L-U-L-"
]
parser = argparse.ArgumentParser(
description="Play a sequence of Patapon commands on repeat forever. Makes no attempt to sync to the game -- that's your job"
)
parser.add_argument('song',default="R-R-L-R-",nargs="+",choices=songs,help="The song to play. Defaults to Aria of Attack. When expressing a song, use eighth notes, dashes, and cardinal directions to designate the drums. For example, party would be \"L-R-D-U-\", and djinn would be \"D-DD-DD-\"")
parser.add_argument('--bpm',type=int,default=120,help="The BPM of Patapon. Change if you're running the game at a higher speed")
args = parser.parse_args()
main()