XJ music engine  1.9.6
In-game runtime engine for XJ music.
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
XJ::Step Class Reference

#include <Step.h>

Public Member Functions

 Step (PitchClass pitchClass, int deltaOctave)
 

Static Public Member Functions

static Step to (PitchClass pitchClass, int deltaOctave)
 
static int delta (PitchClass from, PitchClass to)
 
static Step step (PitchClass from, int inc)
 
static Step stepUp (PitchClass from, int inc)
 
static Step stepDown (PitchClass from, int inc)
 

Public Attributes

PitchClass pitchClass
 
int deltaOctave
 

Detailed Description

Represents a Step to another note, including optional +/- octave delta

Constructor & Destructor Documentation

◆ Step()

Step::Step ( PitchClass  pitchClass,
int  deltaOctave 
)

Construct a step to a particular pitch class and optional +/- octave delta

Member Function Documentation

◆ delta()

int Step::delta ( PitchClass  from,
PitchClass  to 
)
static

Nearest difference, +/- semitones, to another target pitchClass

Parameters
frompitch class
topitch class
Returns
difference +/- semitones

◆ step()

Step Step::step ( PitchClass  from,
int  inc 
)
static

Note stepped +/- semitones to a new Note

Parameters
inc+/- semitones to transpose
Returns
Note

◆ stepDown()

Step Step::stepDown ( PitchClass  from,
int  inc 
)
static

Note stepped - semitones to a new Note

Parameters
inc- semitones to transpose
Returns
Note

◆ stepUp()

Step Step::stepUp ( PitchClass  from,
int  inc 
)
static

Note stepped + semitones to a new Note

Parameters
inc+ semitones to transpose
Returns
Note

◆ to()

Step Step::to ( PitchClass  pitchClass,
int  deltaOctave 
)
static

Represents a step to a particular pitch class, optionally +/- octave Preferred usage:

Step step = Step.to(PitchClass.C, -1);

Parameters
pitchClassto step to
deltaOctaveoptional change of octave +/-
Returns
Step

Member Data Documentation

◆ deltaOctave

int XJ::Step::deltaOctave

◆ pitchClass

PitchClass XJ::Step::pitchClass

The documentation for this class was generated from the following files: