Class: DSP::Lpc::Model

Inherits:
Data
  • Object
show all
Defined in:
lib/dsprb/lpc.rb,
sig/dsprb.rbs

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#coefficientsObject (readonly)

Returns the value of attribute coefficients

Returns:

  • (Object)

    the current value of coefficients



60
61
62
# File 'lib/dsprb/lpc.rb', line 60

def coefficients
  @coefficients
end

#errorObject (readonly)

Returns the value of attribute error

Returns:

  • (Object)

    the current value of error



60
61
62
# File 'lib/dsprb/lpc.rb', line 60

def error
  @error
end

Class Method Details

.newModel

Parameters:

  • coefficients: (::Array[::Float])
  • error: (::Float)

Returns:



296
# File 'sig/dsprb.rbs', line 296

def self.new: (coefficients: ::Array[::Float], error: ::Float) -> Model

Instance Method Details

#envelope(points:) ⇒ ::Array[::Float]

Parameters:

  • points: (::Integer)

Returns:

  • (::Array[::Float])


63
# File 'lib/dsprb/lpc.rb', line 63

def envelope(points:) = Envelope.for(points: points, order: order).call(coefficients)

#order::Integer

Returns:

  • (::Integer)


61
# File 'lib/dsprb/lpc.rb', line 61

def order = coefficients.length - 1