Class BeadsSequenceMapping

  • java.lang.Object
    • uk.ac.qmul.eecs.depic.daw.beads.sonification.BeadsSequenceMapping
  • All Implemented Interfaces:
    SequenceMapping
    Direct Known Subclasses:
    BeadsAutomationMapping, BeadsPeakLevelMapping


    public abstract class BeadsSequenceMapping
    extends java.lang.Object
    implements SequenceMapping
    An abstract implementation of sequence mapping. It takes care of the interface implementation using the beads library. Subclasses just need to implement the abstract protected methods to render the sequence with their own sound.
    • Field Detail

      • ac

        protected AudioContext ac
      • masterGain

        protected Gain masterGain
    • Constructor Detail

      • BeadsSequenceMapping

        public BeadsSequenceMapping()
      • BeadsSequenceMapping

        public BeadsSequenceMapping(AudioContext ac)
        Parameters:
        ac - an audio context. The audio context must be started outside this class
    • Method Detail

      • createRenderCurveUGen

        protected abstract PitchedUGen createRenderCurveUGen()
      • getRenderCurvePitchSpan

        protected abstract Range<java.lang.Float> getRenderCurvePitchSpan()
      • getZeroPlayer

        protected UGen getZeroPlayer()
      • renderCurve

        public void renderCurve(Sequence s,
                                float startTime)
        Description copied from interface: SequenceMapping
        Renders the whole curve, from start to end
        Specified by:
        renderCurve in interface SequenceMapping
        startTime - the time in millisecond the curve rendering has to start from, if -1 will immediately stop the rendering.
      • renderCurveAt

        public void renderCurveAt(Sequence sequence,
                                  float time,
                                  float duration)
        Description copied from interface: SequenceMapping
        Render a curve at precise time If sound is used for rendering, the sound lasts duration milliseconds and then fades out. If INF is passed as duration the sound will go on forever. Successive calls with INF as duration will have the effect of changing the sound in order to represent the curve at the new time passed as argument. Successive calls with duration different from DURATION_INF will carry on the sound for duration millisecond (and therefore setting duration to 0 will stop the sound).
        Specified by:
        renderCurveAt in interface SequenceMapping
        Parameters:
        sequence - the sequence to render
        time - the time at which the sequence has to be rendered
        duration - the duration of sound in millisecond. If (@code DURATION_INF) is used the sound will go on forever until it's stopped. To stop the sound use duration = -1;