Documentation ¶
Index ¶
Constants ¶
View Source
const ( ModeStandard = iota ModeTaiko ModeCatch ModeMania )
View Source
const ( HitTypeNote = 1 << iota HitTypeSlider // 1 << 1 = 2 NewCombo // Appears as 5 = 1 + 4 at first note. HitTypeSpinner // 1 << 3 = 8 ComboColourSkip1 ComboColourSkip2 ComboColourSkip3 HitTypeHoldNote // 1 << 7 = 128 )
View Source
const ( HitSoundNormal = 1 << iota HitSoundWhistle HitSoundFinish HitSoundClap )
View Source
const ComboMask = ^(NewCombo + ComboColourSkip1 + ComboColourSkip2 + ComboColourSkip3)
View Source
const ModeOsu = ModeStandard
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Difficulty ¶
type Format ¶
type Format struct { FormatVersion int // delimiter:(space) General Editor Metadata Difficulty Events []Event TimingPoints []TimingPoint Colours // Beware this is not a slice. HitObjects []HitObject }
Format is preferred name to Type because Type is a more general term.
func (Format) Background ¶ added in v0.6.0
type General ¶
type General struct { AudioFilename string AudioLeadIn int AudioHash string // deprecated PreviewTime int Countdown int SampleSet string StackLeniency float64 Mode int LetterboxInBreaks bool StoryFireInFront bool // deprecated UseSkinSprites bool AlwaysShowPlayfield bool // deprecated OverlayPosition string SkinPreference string EpilepsyWarning bool CountdownOffset int SpecialStyle bool WidescreenStoryboard bool SamplesMatchPlaybackRate bool }
type HitObject ¶
type HitObject struct { X int Y int Time int NoteType int HitSound int EndTime int SliderParams SliderParams HitSample HitSample }
func (HitObject) SampleFilename ¶ added in v0.6.0
func (HitObject) SliderDuration ¶
SliderDuration returns duration of slider in milliseconds.
func (HitObject) SliderLength ¶
If hit object is not slider, both count and unit will be zero.
type HitSample ¶
type HitSample struct { NormalSet int // Sample set of the normal sound. AdditionSet int // Sample set of the whistle, finish, and clap sounds. Index int // If this is 0, the timing point's sample index will be used. Volume int // If this is 0, the timing point's volume will be used. Filename string // Custom filename of the addition sound. }
type SliderParams ¶
type TimingPoint ¶
type TimingPoint struct { Time int BeatLength float64 Meter int SampleSet int SampleIndex int Volume int Uninherited bool Effects int }
func (TimingPoint) BPM ¶
func (tp TimingPoint) BPM() float64
BPM supposes the given timing point is Uninherited.
func (TimingPoint) BeatLengthScale ¶
func (tp TimingPoint) BeatLengthScale() float64
BeatLengthScale returns a beat scale, aka speed factor. The standard value is 1. BeatLengthScale supposes the given timing point is Inherited.
func (TimingPoint) IsFirstBarOmitted ¶
func (tp TimingPoint) IsFirstBarOmitted() bool
func (TimingPoint) IsInherited ¶
func (tp TimingPoint) IsInherited() bool
Inherited means some of its values are derived from the base timing point. The base timing point is called Uninherited. Todo: parent timing point or previous timing point?
Click to show internal directories.
Click to hide internal directories.