Class DrumsMixTransform

java.lang.Object
org.jjazz.phrasetransform.api.DrumsMixTransform
All Implemented Interfaces:
Comparable<PhraseTransform>, PhraseTransform

public class DrumsMixTransform extends Object implements PhraseTransform
Change velocity of drums notes.

  • Field Details

    • PROP_BD_OFFSET

      public static final String PROP_BD_OFFSET
    • PROP_SD_OFFSET

      public static final String PROP_SD_OFFSET
    • PROP_HH_OFFSET

      public static final String PROP_HH_OFFSET
    • PROP_TOMS_OFFSET

      public static final String PROP_TOMS_OFFSET
    • PROP_CRASH_OFFSET

      public static final String PROP_CRASH_OFFSET
    • PROP_CYMBAL_OFFSET

      public static final String PROP_CYMBAL_OFFSET
    • PROP_PERC_OFFSET

      public static final String PROP_PERC_OFFSET
  • Constructor Details

    • DrumsMixTransform

      public DrumsMixTransform()
      Create a DrumsMixTransform.

  • Method Details

    • getInfo

      public PhraseTransform.Info getInfo()
      Description copied from interface: PhraseTransform
      Get the information for this transform.
      Specified by:
      getInfo in interface PhraseTransform
      Returns:
    • getBassDrumOffset

      public int getBassDrumOffset()
    • setBassDrumOffset

      public void setBassDrumOffset(int offset)
    • getSnareOffset

      public int getSnareOffset()
    • setSnareOffset

      public void setSnareOffset(int offset)
    • getHiHatOffset

      public int getHiHatOffset()
    • setHiHatOffset

      public void setHiHatOffset(int offset)
    • getTomsOffset

      public int getTomsOffset()
    • setTomsOffset

      public void setTomsOffset(int offset)
    • getCrashOffset

      public int getCrashOffset()
    • setCrashOffset

      public void setCrashOffset(int offset)
    • getCymbalsOffset

      public int getCymbalsOffset()
    • setCymbalsOffset

      public void setCymbalsOffset(int offset)
    • getPercOffset

      public int getPercOffset()
    • setPercOffset

      public void setPercOffset(int offset)
    • transform

      public SizedPhrase transform(SizedPhrase inPhrase, SongPartContext context)
      Description copied from interface: PhraseTransform
      Transform inPhrase into another phrase.

      The optional context must match inPhrase beat range. Context can be used to retrieve additional information, e.g.:
      - the chord symbols used in the phrase
      - the target RhythmVoice (or RhythmVoiceDelegate) for the phrase, obtained via context.getMidiMix().getRhythmVoice(inPhrase.getChannel()).
      - the InstrumentMix used for the phrase, obtained via context.getMidiMix().getInstrumentMixFromChannel(inPhrase.getChannel()).

      Specified by:
      transform in interface PhraseTransform
      context - Can be null. An optional context to provide additional information about inPhrase.
      Returns:
      The new transformed phrase.
    • getFitScore

      public int getFitScore(SizedPhrase inPhrase, SongPartContext context)
      Description copied from interface: PhraseTransform
      Return a [0-100] value which indicates how much this transform is adapted for the specified parameters.

      A PhraseTransform which can not work without a context should return 0 if context is null.

      Specified by:
      getFitScore in interface PhraseTransform
      context - Can be null. An optional context to provide additional information about inPhrase.
      Returns:
      0 means this transform is not adapted at all, 100 means this transform is perfectly fit for this context.
      See Also:
    • getPropertiesDisplayString

      public String getPropertiesDisplayString()
      Get a string representing the property values in a user-oriented way.
      Returns:
      Can be an empty string
    • getProperties

      public PtProperties getProperties()
      Description copied from interface: PhraseTransform
      Get the PhraseTransform properties.
      Specified by:
      getProperties in interface PhraseTransform
      Returns:
      Can't be null (but can be empty)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getCopy

      public DrumsMixTransform getCopy()
      Description copied from interface: PhraseTransform
      Get a copy of this PhraseTransform instance.
      Specified by:
      getCopy in interface PhraseTransform
      Returns:
    • toString

      public String toString()
      Overrides:
      toString in class Object