Sha256: c18ff4857105d5939eaecba63f077323cce73b878e73c8d4a6cb0fd1868411d2

Contents?: true

Size: 892 Bytes

Versions: 4

Compression:

Stored size: 892 Bytes

Contents

class Xi::MIDI::Stream
  module VolcaBeats
    CC = {
      lKick: 40,
      lSnare: 41,
      lLoTom: 42,
      lHiTom: 43,
      lClHat: 44,
      lOpHat: 45,
      lClap: 46,
      lClaves: 47,
      lAgogo: 48,
      lCrash: 49,
      sClap: 50,
      sClaves: 51,
      sAgogo: 52,
      sCrash: 53,
      stutterTime: 54,
      stutterDepth: 55,
      tomDecay: 56,
      clHatDecay: 57,
      opHatDecay: 58,
      hatGrain: 59,
    }

    DRUMS = {
      bd: 36,
      sn: 38,
      lt: 43,
      ht: 50,
      ch: 42,
      oh: 46,
      cp: 39,
      cl: 75,
      ag: 67,
      cr: 49,
    }

    def cc_parameters
      CC
    end

    def transform_state
      super

      if !changed_param?(:midinote) && changed_param?(:drum)
        @state[:midinote] = Array(@state[:drum]).map { |n| DRUMS[n.to_sym] }.compact
        @changed_params << :midinote
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
xi-midi-0.2.0 lib/xi/midi/stream/volca_beats.rb
xi-midi-0.1.6 lib/xi/midi/stream/volca_beats.rb
xi-midi-0.1.5 lib/xi/midi/stream/volca_beats.rb
xi-midi-0.1.4 lib/xi/midi/stream/volca_beats.rb