Class DummyGenerator
- All Implemented Interfaces:
MusicGenerator
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongenerateMusic
(SongContext sgContext) Generate the note Phrases which correspond to a musical accompaniment for a given rhythm.static Phrase
getBasicBassPhrase
(float startPosInBeats, SimpleChordSequence cSeq, int channel) Get a basic bass phrase.
-
Constructor Details
-
DummyGenerator
-
-
Method Details
-
generateMusic
public HashMap<RhythmVoice,Phrase> generateMusic(SongContext sgContext) throws MusicGenerationException Description copied from interface:MusicGenerator
Generate the note Phrases which correspond to a musical accompaniment for a given rhythm.The service provider must compute notes for the specified context, one Phrase per RhythmVoice/Midi channel. Phrases must be generated for the standard rhythm's RhythmVoices, and also for the RhythmVoiceDelegates (if used by the rhythm) .
Notes must be generated for the context bars which use this generator's rhythm. For example, if context range is bars 3-4 with rhythm1 on bar3 and rhythm2 on bar4, then the rhythm1 generator must add notes for bar 3 only.
The MidiMix from
context
provides the Midi channel associated to each RhythmVoice viaMidiMix.getChannel(RhythmVoice)
.If the context song contains several rhythms, the method must add notes ONLY for bars which use this MidiMusicGenerator's rhythm.
Note that the following features are directly managed by the JJazzLab framework by postprocessing the output of generateMusic():
- Midi Instrument selection and settings (Program changes, Midi controller messages such as bank select, volume, reverb, panoramic)
- RP_SYS_Mute rhythm parameter handling (muting a specific track for a specific SongPart)
- RP_SYS_DrumsMix rhythm parameter handling (adjusting some drums track instruments velocity)
- RP_SYS_CustomPhrase rhythm parameter handling
- Handling of the channel's specific velocity shift
- Handling of the instrument's specific transposition
- Drums rerouting
- NC chord symbols- Specified by:
generateMusic
in interfaceMusicGenerator
- Parameters:
sgContext
- The information to be used for music generation- Returns:
- One Phrase per rhythm voice/channel.
- Throws:
MusicGenerationException
- If generator could not produce the expected music. The framework will notify the user of the error message associated to the exception.
-
getBasicBassPhrase
public static Phrase getBasicBassPhrase(float startPosInBeats, SimpleChordSequence cSeq, int channel) Get a basic bass phrase.- Parameters:
startPosInBeats
-cSeq
-channel
- The channel of the returned phrase- Returns:
-