UseFace Lua Script(face.lua.path
in face.json) is loaded when Kicooya starts.
UseFace Lua Script must return an instance that extends kicooya.face.userFace
.
Classes and functions related to Kicooya that are not published as specifications in this document are not assumed to be used from kicooya.face.userFace
at this time.
class kicooya.face.userFace
class kicooya.audioAnalyzer
class kicooya.musicDB.song
class kicooya.font
class kicooya.filePlayer
Class for creating your own Kicooya media playback screen (UserFace).
Constructor.
This function is called only once when kicooya startup.
-
arguments
arg
[string
] Arguments specified byface.lua.arg
in face.json
This function is called when the active state of the playback screen is changed.
-
arguments
active
[boolean
] Whether the playback screen is active or not.
This function is called when the playback status changes of a song.
This function is called when the currently playing song changed.
-
arguments
song
[kicooya.musicDB.song
] Song information of currently playing
This function is called when the currently playing song changed, so draw a background.
This function is called frame by frame when a drawing, so draw what needs to be moved.
This function is called when drawing the AudioVisualizer. If this function is defined, the process of parsing audio data for rendering is performed. If you do not need to draw the AudioVisualizer, do not define this function.
-
arguments
analyzer
[kicooya.audioAnalyzer
] Audio data analysis information currently playing
This class is used to get audio data analysis information currently playing.
Returns the number of frequency/sound pressure (dB SPL) data for the audio data currently playing.
-
return values
- [
integer
] Number of frequency/sound pressure data
- [
Returns the frequency/sound pressure (dB SPL) of the audio currently playing.
-
arguments
index
[integer
] The index of the data
-
return values
- [
integer
] Frequency - [
integer
] Left Sound Pressure (dB SPL) - [
integer
] Right Sound Pressure (dB SPL)
- [
Returns the number of data for the audio buffer currently playing.
-
return values
- [
integer
] Number of data
- [
Returns the the audio buffer currently playing.
-
arguments
index
[integer
] The index of the data
-
return values
- [Float] Left audio data
- [Float] Right audio data
This class is used to get song information.
Returns the file path.
-
return values
- [
string
] File path
- [
Returns the large art image.
-
return values
- [
playdate.graphics.image
] Large art image
- [
Returns the small art image.
-
return values
- [
playdate.graphics.image
] Small art image
- [
Returns the size of a file.
-
return values
- [
integer
] size of a file
- [
Returns string human readable file size.
-
return values
- [
string
] Human readable file size
- [
Returns the modification date/time of the file.
-
return values
- [
table
] Same table asplaydate.file.modtime
, * Seeplaydate.file.modtime
documentation.
- [
Returns string human readable last modified of file.
-
return values
- [
string
] human readable last modified of file
- [
Returns the title.
-
return values
- [
string
] Title
- [
Returns the artist.
-
return values
- [
string
] Artist
- [
Returns the album.
-
return values
- [
string
] Album
- [
Returns the album artist.
-
return values
- [
string
] Album artist
- [
Returns the genre.
-
return values
- [
string
] Genre
- [
Returns the composer.
-
return values
- [
string
] Composer
- [
Return the name of the person or group that encoded.
-
return values
- [
string
] The name of the person or group that encoded
- [
Returns track information as TRCK/TRK(ID3Tag) string.
-
return values
- [
string
] track information
- [
Returns the track number.
-
return values
- [
integer
] Track number
- [
Returns the number of tracks.
-
return values
- [
integer
] Number of tracks
- [
Returns disc information as TPOS/TPA(ID3Tag) string.
-
return values
- [
string
] disc information
- [
Returns the disc number.
-
return values
- [
integer
] Disc number
- [
Returns the number of discs.
-
return values
- [
integer
] Number of discs
- [
Returns the year.
-
return values
- [
integer
] Year
- [
Returns the bitrate.
-
return values
- [
integer
] Bitrate
- [
Returns the sampling rate.
-
return values
- [
integer
] Sampling rate
- [
Returns the channel count.
-
return values
- [
integer
] Channel count
- [
Returns the file format.
Returns either "MP3(mono)" or "MP3(stereo)" because MP3 is the only format that can be played at this time.
-
return values
- [
string
] File format.
- [
This class is used to get playdate.graphics.font
held by Kicooya.
Returns the font specified by the font UID.
-
arguments
id
[string
] Font UID
-
return values
- [
playdate.graphics.font
] Font
- [
Font UID | Font file path |
---|---|
AshevilleSans24Light | assets/fonts/Asheville/Asheville Sans 24 Light/Asheville-Sans-24-Light |
AshevilleSans14Light | assets/fonts/Asheville/Asheville Sans 14 Light/Asheville-Sans-14-Light |
AshevilleSans14Bold | assets/fonts/Asheville/Asheville Sans 14 Bold/Asheville-Sans-14-Bold |
FullCircle | assets/fonts/Full Circle/font-full-circle |
CuberickBold | assets/fonts/Cuberick/font-Cuberick-Bold |
NontendoLight | assets/fonts/Nontendo/Nontendo-Light |
NontendoBold | assets/fonts/Nontendo/Nontendo-Bold |
OklahomaBold | assets/fonts/Oklahoma/Oklahoma-Bold |
Shinonome14B | assets/fonts/Shinonome/Shinonome14B |
Shinonome16B | assets/fonts/Shinonome/Shinonome16B |
Roobert10Bold | assets/fonts/Roobert/Roobert-10-Bold |
Roobert11Medium | assets/fonts/Roobert/Roobert-11-Medium |
Roobert20Medium | assets/fonts/Roobert/Roobert-20-Medium |
Returns the font for drawing titles according to the OPTION -> FONTS
setting.
-
return values
- [
playdate.graphics.font
] Font
- [
Returns the font for drawing the description according to the OPTION -> FONTS
setting.
-
return values
- [
playdate.graphics.font
] Font
- [
This class is used to operate the file player.
Starts playing the file.
Stops the currently playing.
Pauses the currently playing.
Returns whether the filePlayer is playing.
-
return values
- [
boolean
] Whether the filePlayer is playing
- [
Returns the length of the song file.
-
return values
- [
float
] Length(seconds) of the song file
- [
Returns the current offset of the fileplayer.
-
return values
- [
float
] Current offset(Second)
- [
Sets the current offset of the fileplayer.
-
arguments
second
[float
] Current offset(Second)
Repeat mode constants.
kicooya.filePlayer.repeatMode.repeatOff
Repeat offkicooya.filePlayer.repeatMode.repeatOn
Repeat onkicooya.filePlayer.repeatMode.repeat1
Repeat one file
Sets repeat mode.
-
arguments
mode
[kicooya.filePlayer.repeatMode
] Repeat mode
Gets repeat mode.
-
return values
- [
kicooya.filePlayer.repeatMode
] Repeat mode
- [
Returns the currently playing song.
-
return values
- [
kicooya.musicDB.song
] Currently playing song
- [
This class is used to get pattern held by Kicooya.