Class TickReceiver

The TickReceiver class allows a shimi IMetronome instance to be updated by ticks coming from a MIDI input, rather than it updating itself.

Hierarchy

  • TickReceiver

Implements

Constructors

Accessors

  • get isFinished(): boolean
  • Returns true if the Metronome has been instructed to stop everything by the finish() method.

    Returns boolean

  • get metronome(): IMetronome
  • The metronome which gets updated each cycle.

    Returns IMetronome

  • set metronome(value: IMetronome): void
  • Parameters

    Returns void

  • get midiIn(): IMidiIn
  • The MIDI In object which tick events are received from.

    Returns IMidiIn

  • set midiIn(value: IMidiIn): void
  • Parameters

    Returns void

  • get newTicksReceived(): number
  • Returns the number of ticks that have been received since the last update cycle.

    Returns number

  • get ref(): string
  • Provides a way of identifying TickReceivers so they can be easily retrieved later

    Returns string

  • set ref(value: string): void
  • Parameters

    • value: string

    Returns void

  • get ticksPerQuarterNote(): number
  • How many ticks occur per quarter note.

    Returns number

  • set ticksPerQuarterNote(value: number): void
  • Parameters

    • value: number

    Returns void

  • get typeName(): string
  • Returns the name of this type. This can be used rather than instanceof which is sometimes unreliable.

    Returns string

Methods

  • Calling this tells the TickReceiver to stop whatever it's doing and that it will no longer be used.

    Returns void

  • This method is intended to be called by a clock to provide regular updates. It should be called by consumers of the library.

    Returns

    Parameters

    • msDelta: number

      How many milliseconds have passed since the last update cycle.

    Returns void

  • Provides a way for setting the ref through a chained function call. For example:

    clock.addChild(new TickReceiver(midiInput, metronome, 24).withRef('tickReceiver'));
    

    Returns

    The calling object.

    Parameters

    • ref: string

      The ref to set on the object.

    Returns IClockChild

Generated using TypeDoc