Package org.jjazz.phrase.api
Class PhraseSamples
java.lang.Object
org.jjazz.phrase.api.PhraseSamples
Generate basic sample phrases.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Phrase
getBasicDrumPhrase
(float startPosInBeats, int nbBars, TimeSignature ts, int channel) Get a basic drums phrase.static Phrase
getCscalePhrase
(int channel, float startPos, float nbBeats) Build a Phrase with 12 notes C-D-E-F-G-A-B-C that fit into nbBeats.static Phrase
getRandomPhrase
(int channel, int nbBars, int nbNotes) Get a phrase with random notes at random positions.
-
Constructor Details
-
PhraseSamples
public PhraseSamples()
-
-
Method Details
-
getCscalePhrase
Build a Phrase with 12 notes C-D-E-F-G-A-B-C that fit into nbBeats.- Parameters:
channel
-startPos
- Position of the 1st note 'C'nbBeats
-- Returns:
-
getRandomPhrase
Get a phrase with random notes at random positions.- Parameters:
channel
-nbBars
- Number of 4/4 bars.nbNotes
- Number of random notes to generate.- Returns:
-
getBasicDrumPhrase
public static Phrase getBasicDrumPhrase(float startPosInBeats, int nbBars, TimeSignature ts, int channel) Get a basic drums phrase.- Parameters:
startPosInBeats
-nbBars
-ts
-channel
- The channel of the returned phrase- Returns:
-