Interface NoteStep
public interface NoteStep
Object that describes the content of a step at a given position: x for the time, and y for the key.
- Since:
- API version 10
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiondoublechance()Gets the note chance.intchannel()doubleduration()doublegain()booleanbooleanbooleanisMuted()booleanbooleanbooleandoublepan()doublepressure()intintdoubleintdoubledoubledoublevoidsetChance(double chance) Sets the note chance.voidsetDuration(double duration) If there is a note started at this position, it will update the duration of the note.voidsetGain(double gain) If there is a note started at this position, it will update the gain of the note.voidsetIsChanceEnabled(boolean isEnabled) voidsetIsMuted(boolean value) Mutes the note if values is true.voidsetIsOccurrenceEnabled(boolean isEnabled) voidsetIsRecurrenceEnabled(boolean isEnabled) voidsetIsRepeatEnabled(boolean isEnabled) voidsetOccurrence(NoteOccurrence condition) voidsetPan(double pan) If there is a note started at this position, it will update the panning of the note.voidsetPressure(double pressure) If there is a note started at this position, it will update the pressure of the note.voidsetRecurrence(int length, int mask) voidsetReleaseVelocity(double velocity) If there is a note started at this position, it will update the release velocity of the note.voidsetRepeatCount(int count) voidsetRepeatCurve(double curve) voidsetRepeatVelocityCurve(double curve) voidsetRepeatVelocityEnd(double velocityEnd) voidsetTimbre(double timbre) If there is a note started at this position, it will update the timbre of the note.voidsetTranspose(double transpose) If there is a note started at this position, it will update the pitch offset of the note.voidsetVelocity(double velocity) If there is a note started at this position, it will update the velocity of the note.voidsetVelocitySpread(double amount) state()doubletimbre()doubledoublevelocity()doubleintx()inty()
-
Method Details
-
x
int x()- Returns:
- the position of the step (time)
- Since:
- API version 10
-
y
int y()- Returns:
- the position of the step (key)
- Since:
- API version 10
-
channel
int channel()- Returns:
- the note's channel, in the range 0..15.
- Since:
- API version 10
-
state
NoteStep.State state()- Returns:
- the state of the step, it lets you know if a note starts.
- Since:
- API version 10
-
velocity
double velocity()- Returns:
- the velocity of the step, in the range 0..1
- Since:
- API version 10
-
setVelocity
void setVelocity(double velocity) If there is a note started at this position, it will update the velocity of the note.- Parameters:
velocity- between 0 and 1- Since:
- API version 10
-
releaseVelocity
double releaseVelocity()- Returns:
- the release velocity of the step, in the range 0..1
- Since:
- API version 10
-
setReleaseVelocity
void setReleaseVelocity(double velocity) If there is a note started at this position, it will update the release velocity of the note.- Parameters:
velocity- between 0 and 1- Since:
- API version 10
-
velocitySpread
double velocitySpread()- Since:
- API version 14
-
setVelocitySpread
void setVelocitySpread(double amount) - Parameters:
amount- velocity spread amount in the range 0..1- Since:
- API version 14
-
duration
double duration()- Returns:
- the duration of the step in beats
- Since:
- API version 10
-
setDuration
void setDuration(double duration) If there is a note started at this position, it will update the duration of the note.- Parameters:
duration- in beats- Since:
- API version 10
-
pan
double pan()- Returns:
- the pan of the step in the range -1..1
- Since:
- API version 10
-
setPan
void setPan(double pan) If there is a note started at this position, it will update the panning of the note.- Parameters:
pan- -1 for left, +1 for right- Since:
- API version 10
-
timbre
double timbre()- Returns:
- the timbre of the step, in the range -1..1
- Since:
- API version 10
-
setTimbre
void setTimbre(double timbre) If there is a note started at this position, it will update the timbre of the note.- Parameters:
timbre- from -1 to +1- Since:
- API version 10
-
pressure
double pressure()- Returns:
- the pressure of the step, in the range 0..1
- Since:
- API version 10
-
setPressure
void setPressure(double pressure) If there is a note started at this position, it will update the pressure of the note.- Parameters:
pressure- from 0 to +1- Since:
- API version 10
-
gain
double gain()- Returns:
- the gain of the step, in the range 0..1
- Since:
- API version 10
-
setGain
void setGain(double gain) If there is a note started at this position, it will update the gain of the note.- Parameters:
gain- in the range 0..1, a value of 0.5 results in a gain of 0dB.- Since:
- API version 10
-
transpose
double transpose()- Returns:
- the transpose of the step, in semitones
- Since:
- API version 10
-
setTranspose
void setTranspose(double transpose) If there is a note started at this position, it will update the pitch offset of the note.- Parameters:
transpose- in semitones, from -96 to +96- Since:
- API version 10
-
isIsSelected
boolean isIsSelected()- Returns:
- true if a note exists and is selected
- Since:
- API version 10
-
chance
double chance()Gets the note chance.- Returns:
- the probability, 0..1
- Since:
- API version 14
-
setChance
void setChance(double chance) Sets the note chance.- Parameters:
chance- 0..1- Since:
- API version 14
-
isChanceEnabled
boolean isChanceEnabled()- Since:
- API version 14
-
setIsChanceEnabled
void setIsChanceEnabled(boolean isEnabled) - Since:
- API version 14
-
isOccurrenceEnabled
boolean isOccurrenceEnabled()- Since:
- API version 14
-
setIsOccurrenceEnabled
void setIsOccurrenceEnabled(boolean isEnabled) - Since:
- API version 14
-
occurrence
NoteOccurrence occurrence()- Since:
- API version 14
-
setOccurrence
- Since:
- API version 14
-
isRecurrenceEnabled
boolean isRecurrenceEnabled()- Since:
- API version 14
-
setIsRecurrenceEnabled
void setIsRecurrenceEnabled(boolean isEnabled) - Since:
- API version 14
-
recurrenceLength
int recurrenceLength()- Since:
- API version 14
-
recurrenceMask
int recurrenceMask()- Since:
- API version 14
-
setRecurrence
void setRecurrence(int length, int mask) - Parameters:
length- from 1 to 8mask- bitfield, cycle N -> bit N; max 8 cycles- Since:
- API version 14
-
isRepeatEnabled
boolean isRepeatEnabled()- Since:
- API version 14
-
setIsRepeatEnabled
void setIsRepeatEnabled(boolean isEnabled) - Since:
- API version 14
-
repeatCount
int repeatCount()- Since:
- API version 14
-
setRepeatCount
void setRepeatCount(int count) - Parameters:
count- -127..127, positive values indicates a number of divisions, negative values a rate.- Since:
- API version 14
-
repeatCurve
double repeatCurve()- Since:
- API version 14
-
setRepeatCurve
void setRepeatCurve(double curve) - Parameters:
curve- -1..1- Since:
- API version 14
-
repeatVelocityEnd
double repeatVelocityEnd()- Since:
- API version 14
-
setRepeatVelocityEnd
void setRepeatVelocityEnd(double velocityEnd) - Parameters:
velocityEnd- -1..1, relative velocity amount applied to the note on velocity.- Since:
- API version 14
-
repeatVelocityCurve
double repeatVelocityCurve()- Since:
- API version 14
-
setRepeatVelocityCurve
void setRepeatVelocityCurve(double curve) - Parameters:
curve- -1..1- Since:
- API version 14
-
isMuted
boolean isMuted()- Returns:
- true if the note is muted
- Since:
- API version 14
-
setIsMuted
void setIsMuted(boolean value) Mutes the note if values is true.- Since:
- API version 14
-