aubio 0.3.3 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
- require "bundler/setup"
4
- require "aubio"
4
+ require 'bundler/setup'
5
+ require 'aubio'
5
6
 
6
7
  # You can add fixtures and/or initialization code here to make experimenting
7
8
  # with your gem easier. You can also use a different console, if you like.
@@ -10,5 +11,5 @@ require "aubio"
10
11
  # require "pry"
11
12
  # Pry.start
12
13
 
13
- require "irb"
14
+ require 'irb'
14
15
  IRB.start
@@ -1,11 +1,13 @@
1
- require_relative "aubio/version"
2
- require_relative "aubio/aubio-ffi"
3
- require_relative "aubio/onsets"
4
- require_relative "aubio/pitches"
5
- require_relative "aubio/beats"
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'aubio/version'
4
+ require_relative 'aubio/aubio-ffi'
5
+ require_relative 'aubio/onsets'
6
+ require_relative 'aubio/pitches'
7
+ require_relative 'aubio/beats'
6
8
 
7
9
  module Aubio
8
- class AubioException < Exception; end
10
+ class AubioException < RuntimeError; end
9
11
  class FileNotFound < AubioException; end
10
12
  class AlreadyClosed < AubioException; end
11
13
  class InvalidAudioInput < AubioException; end
@@ -14,7 +16,7 @@ module Aubio
14
16
  def initialize(path, params)
15
17
  raise FileNotFound unless File.file?(path)
16
18
 
17
- sample_rate = params[:sample_rate] || 44100
19
+ sample_rate = params[:sample_rate] || 44_100
18
20
  hop_size = params[:hop_size] || 512
19
21
 
20
22
  @is_closed = false
@@ -55,21 +57,21 @@ module Aubio
55
57
  # fill in the zero beat
56
58
  beats = beats.unshift(
57
59
  beats.first.merge({
58
- confidence: 1,
59
- s: 0.0,
60
- ms: 0.0,
61
- sample_no: 0,
62
- rel_start: 0.0
63
- })
60
+ confidence: 1,
61
+ s: 0.0,
62
+ ms: 0.0,
63
+ sample_no: 0,
64
+ rel_start: 0.0
65
+ })
64
66
  )
65
67
 
66
68
  # fetch the rel_end from the next beat
67
69
  # using 1.0 for the last beat
68
- beats = beats.each_cons(2).map {|a,b|
70
+ beats = beats.each_cons(2).map do |a, b|
69
71
  a.merge({
70
- rel_end: (b[:rel_start] || 1.0)
71
- })
72
- }
72
+ rel_end: (b[:rel_start] || 1.0)
73
+ })
74
+ end
73
75
 
74
76
  # set minimum inter-onset interval in seconds
75
77
  # allows for 4/4 at 400bpm (faster than most music)
@@ -77,9 +79,7 @@ module Aubio
77
79
  minioi = @params[:minioi] || 0.15
78
80
  filtered_beats = [beats.first]
79
81
  beats.each do |b|
80
- if (b[:s] - filtered_beats.last[:s]) > minioi
81
- filtered_beats << b
82
- end
82
+ filtered_beats << b if (b[:s] - filtered_beats.last[:s]) > minioi
83
83
  end
84
84
 
85
85
  # TODO: are there other smoothing methods that would be useful here?
@@ -89,39 +89,38 @@ module Aubio
89
89
  def bpm
90
90
  check_for_closed
91
91
 
92
- beat_locations = self.beats
93
- beat_periods = beat_locations.each_cons(2).map {|a,b| b[:s] - a[:s] }
92
+ beat_locations = beats
93
+ beat_periods = beat_locations.each_cons(2).map { |a, b| b[:s] - a[:s] }
94
94
 
95
95
  return 60.0 if beat_locations.length == 1
96
96
 
97
97
  # use interquartile median to discourage outliers
98
98
  s = beat_periods.length
99
- qrt_lower_idx = (s/4.0).floor
99
+ qrt_lower_idx = (s / 4.0).floor
100
100
  qrt_upper_idx = qrt_lower_idx * 3
101
101
  interquartile_beat_periods = beat_periods[qrt_lower_idx..qrt_upper_idx]
102
102
 
103
103
  # Calculate median
104
104
  iqs = interquartile_beat_periods.length
105
105
 
106
- iq_median_beat_period = interquartile_beat_periods.sort[(iqs/2.0).floor() - 1]
106
+ iq_median_beat_period = interquartile_beat_periods.sort[(iqs / 2.0).floor - 1]
107
107
  60.0 / iq_median_beat_period
108
108
  end
109
109
 
110
110
  private
111
+
111
112
  def check_for_closed
112
113
  raise AlreadyClosed if @is_closed
113
114
  end
114
115
 
115
116
  def check_for_valid_audio_source(path)
116
- begin
117
- @source.read_pointer
118
- rescue FFI::NullPointerError
119
- raise InvalidAudioInput.new(%Q{
117
+ @source.read_pointer
118
+ rescue FFI::NullPointerError
119
+ raise InvalidAudioInput, %(
120
120
 
121
121
  Couldn't read file at #{path}
122
122
  Did you install aubio with libsndfile support?
123
- })
124
- end
123
+ )
125
124
  end
126
125
  end
127
126
  end
@@ -1,24 +1,25 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Generated by ffi_gen. Please do not change this file by hand.
2
4
 
3
5
  require 'ffi'
4
6
 
5
7
  module Aubio::Api
6
8
  extend FFI::Library
7
- lib_paths = Array(ENV["AUBIO_LIB"] || Dir["/{opt,usr}/{,local/}{lib,lib64,Cellar/aubio**,lib/arm-linux-gnueabihf}/libaubio.{*.dylib,so.*}"])
8
- fallback_names = %w(libaubio.4.2.2.dylib libaubio.so.1 aubio1.dll libaubio-5.dll)
9
+ lib_paths = Array(ENV['AUBIO_LIB'] || Dir['/{opt,usr}/{,local/}{lib,lib64,Cellar/aubio**,lib/arm-linux-gnueabihf}/libaubio.{*.dylib,so.*}'])
10
+ fallback_names = %w[libaubio.4.2.2.dylib libaubio.so.1 aubio1.dll libaubio-5.dll]
9
11
  ffi_lib(lib_paths + fallback_names)
10
12
 
11
13
  def self.attach_function(name, *_)
12
- begin; super; rescue FFI::NotFoundError => e
13
- (class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
14
- end
14
+ super; rescue FFI::NotFoundError => e
15
+ (class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
15
16
  end
16
17
 
17
18
  HAVE_AUBIO_DOUBLE = 0
18
19
 
19
- AUBIO_SMPL_FMT = "%f"
20
+ AUBIO_SMPL_FMT = '%f'
20
21
 
21
- AUBIO_LSMP_FMT = "%lf"
22
+ AUBIO_LSMP_FMT = '%lf'
22
23
 
23
24
  # (Not documented)
24
25
  #
@@ -414,7 +415,7 @@ module Aubio::Api
414
415
  # @param [Integer] length
415
416
  # @return [FmatT]
416
417
  # @scope class
417
- attach_function :new_fmat, :new_fmat, [:uint, :uint], FmatT
418
+ attach_function :new_fmat, :new_fmat, %i[uint uint], FmatT
418
419
 
419
420
  # (Not documented)
420
421
  #
@@ -548,7 +549,7 @@ module Aubio::Api
548
549
  # @param [Integer] size
549
550
  # @return [FvecT]
550
551
  # @scope class
551
- attach_function :new_aubio_window, :new_aubio_window, [:string, :uint], FvecT
552
+ attach_function :new_aubio_window, :new_aubio_window, %i[string uint], FvecT
552
553
 
553
554
  # (Not documented)
554
555
  #
@@ -575,7 +576,7 @@ module Aubio::Api
575
576
  # @param [Float] fftsize
576
577
  # @return [Float]
577
578
  # @scope class
578
- attach_function :aubio_bintomidi, :aubio_bintomidi, [:float, :float, :float], :float
579
+ attach_function :aubio_bintomidi, :aubio_bintomidi, %i[float float float], :float
579
580
 
580
581
  # (Not documented)
581
582
  #
@@ -585,7 +586,7 @@ module Aubio::Api
585
586
  # @param [Float] fftsize
586
587
  # @return [Float]
587
588
  # @scope class
588
- attach_function :aubio_miditobin, :aubio_miditobin, [:float, :float, :float], :float
589
+ attach_function :aubio_miditobin, :aubio_miditobin, %i[float float float], :float
589
590
 
590
591
  # (Not documented)
591
592
  #
@@ -595,7 +596,7 @@ module Aubio::Api
595
596
  # @param [Float] fftsize
596
597
  # @return [Float]
597
598
  # @scope class
598
- attach_function :aubio_bintofreq, :aubio_bintofreq, [:float, :float, :float], :float
599
+ attach_function :aubio_bintofreq, :aubio_bintofreq, %i[float float float], :float
599
600
 
600
601
  # (Not documented)
601
602
  #
@@ -605,7 +606,7 @@ module Aubio::Api
605
606
  # @param [Float] fftsize
606
607
  # @return [Float]
607
608
  # @scope class
608
- attach_function :aubio_freqtobin, :aubio_freqtobin, [:float, :float, :float], :float
609
+ attach_function :aubio_freqtobin, :aubio_freqtobin, %i[float float float], :float
609
610
 
610
611
  # (Not documented)
611
612
  #
@@ -773,7 +774,7 @@ module Aubio::Api
773
774
  # @param [Integer] type
774
775
  # @return [AubioResamplerT]
775
776
  # @scope class
776
- attach_function :new_aubio_resampler, :new_aubio_resampler, [:float, :uint], AubioResamplerT
777
+ attach_function :new_aubio_resampler, :new_aubio_resampler, %i[float uint], AubioResamplerT
777
778
 
778
779
  # (Not documented)
779
780
  #
@@ -915,7 +916,7 @@ module Aubio::Api
915
916
  # @param [Float] a2
916
917
  # @return [AubioFilterT]
917
918
  # @scope class
918
- attach_function :new_aubio_filter_biquad, :new_aubio_filter_biquad, [:double, :double, :double, :double, :double], AubioFilterT
919
+ attach_function :new_aubio_filter_biquad, :new_aubio_filter_biquad, %i[double double double double double], AubioFilterT
919
920
 
920
921
  # (Not documented)
921
922
  #
@@ -1078,7 +1079,7 @@ module Aubio::Api
1078
1079
  # @param [Integer] hop_s
1079
1080
  # @return [AubioPvocT]
1080
1081
  # @scope class
1081
- attach_function :new_aubio_pvoc, :new_aubio_pvoc, [:uint, :uint], AubioPvocT
1082
+ attach_function :new_aubio_pvoc, :new_aubio_pvoc, %i[uint uint], AubioPvocT
1082
1083
 
1083
1084
  # (Not documented)
1084
1085
  #
@@ -1136,7 +1137,7 @@ module Aubio::Api
1136
1137
  # @param [Integer] win_s
1137
1138
  # @return [AubioFilterbankT]
1138
1139
  # @scope class
1139
- attach_function :new_aubio_filterbank, :new_aubio_filterbank, [:uint, :uint], AubioFilterbankT
1140
+ attach_function :new_aubio_filterbank, :new_aubio_filterbank, %i[uint uint], AubioFilterbankT
1140
1141
 
1141
1142
  # (Not documented)
1142
1143
  #
@@ -1206,7 +1207,7 @@ module Aubio::Api
1206
1207
  # @param [Integer] samplerate
1207
1208
  # @return [AubioMfccT]
1208
1209
  # @scope class
1209
- attach_function :new_aubio_mfcc, :new_aubio_mfcc, [:uint, :uint, :uint, :uint], AubioMfccT
1210
+ attach_function :new_aubio_mfcc, :new_aubio_mfcc, %i[uint uint uint uint], AubioMfccT
1210
1211
 
1211
1212
  # (Not documented)
1212
1213
  #
@@ -1248,7 +1249,7 @@ module Aubio::Api
1248
1249
  # @param [Integer] buf_size
1249
1250
  # @return [AubioSpecdescT]
1250
1251
  # @scope class
1251
- attach_function :new_aubio_specdesc, :new_aubio_specdesc, [:string, :uint], AubioSpecdescT
1252
+ attach_function :new_aubio_specdesc, :new_aubio_specdesc, %i[string uint], AubioSpecdescT
1252
1253
 
1253
1254
  # (Not documented)
1254
1255
  #
@@ -1270,7 +1271,7 @@ module Aubio::Api
1270
1271
  # @param [Integer] hop_size
1271
1272
  # @return [AubioTssT]
1272
1273
  # @scope class
1273
- attach_function :new_aubio_tss, :new_aubio_tss, [:uint, :uint], AubioTssT
1274
+ attach_function :new_aubio_tss, :new_aubio_tss, %i[uint uint], AubioTssT
1274
1275
 
1275
1276
  # (Not documented)
1276
1277
  #
@@ -1367,7 +1368,7 @@ module Aubio::Api
1367
1368
  # @param [Integer] samplerate
1368
1369
  # @return [AubioPitchT]
1369
1370
  # @scope class
1370
- attach_function :new_aubio_pitch, :new_aubio_pitch, [:string, :uint, :uint, :uint], AubioPitchT
1371
+ attach_function :new_aubio_pitch, :new_aubio_pitch, %i[string uint uint uint], AubioPitchT
1371
1372
 
1372
1373
  # (Not documented)
1373
1374
  #
@@ -1417,7 +1418,7 @@ module Aubio::Api
1417
1418
  # @param [Integer] samplerate
1418
1419
  # @return [AubioOnsetT]
1419
1420
  # @scope class
1420
- attach_function :new_aubio_onset, :new_aubio_onset, [:string, :uint, :uint, :uint], AubioOnsetT
1421
+ attach_function :new_aubio_onset, :new_aubio_onset, %i[string uint uint uint], AubioOnsetT
1421
1422
 
1422
1423
  # (Not documented)
1423
1424
  #
@@ -1627,7 +1628,7 @@ module Aubio::Api
1627
1628
  # @param [Integer] samplerate
1628
1629
  # @return [AubioTempoT]
1629
1630
  # @scope class
1630
- attach_function :new_aubio_tempo, :new_aubio_tempo, [:string, :uint, :uint, :uint], AubioTempoT
1631
+ attach_function :new_aubio_tempo, :new_aubio_tempo, %i[string uint uint uint], AubioTempoT
1631
1632
 
1632
1633
  # (Not documented)
1633
1634
  #
@@ -1827,7 +1828,7 @@ module Aubio::Api
1827
1828
  # @param [Integer] samplerate
1828
1829
  # @return [AubioNotesT]
1829
1830
  # @scope class
1830
- attach_function :new_aubio_notes, :new_aubio_notes, [:string, :uint, :uint, :uint], AubioNotesT
1831
+ attach_function :new_aubio_notes, :new_aubio_notes, %i[string uint uint uint], AubioNotesT
1831
1832
 
1832
1833
  # (Not documented)
1833
1834
  #
@@ -1894,7 +1895,7 @@ module Aubio::Api
1894
1895
  # @param [Integer] hop_size
1895
1896
  # @return [AubioSourceT]
1896
1897
  # @scope class
1897
- attach_function :new_aubio_source, :new_aubio_source, [:string, :uint, :uint], AubioSourceT
1898
+ attach_function :new_aubio_source, :new_aubio_source, %i[string uint uint], AubioSourceT
1898
1899
 
1899
1900
  # (Not documented)
1900
1901
  #
@@ -1977,7 +1978,7 @@ module Aubio::Api
1977
1978
  # @param [Integer] samplerate
1978
1979
  # @return [AubioSinkT]
1979
1980
  # @scope class
1980
- attach_function :new_aubio_sink, :new_aubio_sink, [:string, :uint], AubioSinkT
1981
+ attach_function :new_aubio_sink, :new_aubio_sink, %i[string uint], AubioSinkT
1981
1982
 
1982
1983
  # (Not documented)
1983
1984
  #
@@ -2061,7 +2062,7 @@ module Aubio::Api
2061
2062
  # @param [Integer] hop_size
2062
2063
  # @return [AubioSamplerT]
2063
2064
  # @scope class
2064
- attach_function :new_aubio_sampler, :new_aubio_sampler, [:uint, :uint], AubioSamplerT
2065
+ attach_function :new_aubio_sampler, :new_aubio_sampler, %i[uint uint], AubioSamplerT
2065
2066
 
2066
2067
  # (Not documented)
2067
2068
  #
@@ -2145,7 +2146,7 @@ module Aubio::Api
2145
2146
  # @param [Integer] hop_size
2146
2147
  # @return [AubioWavetableT]
2147
2148
  # @scope class
2148
- attach_function :new_aubio_wavetable, :new_aubio_wavetable, [:uint, :uint], AubioWavetableT
2149
+ attach_function :new_aubio_wavetable, :new_aubio_wavetable, %i[uint uint], AubioWavetableT
2149
2150
 
2150
2151
  # (Not documented)
2151
2152
  #
@@ -2264,7 +2265,7 @@ module Aubio::Api
2264
2265
  # @param [Integer] steps
2265
2266
  # @return [AubioParameterT]
2266
2267
  # @scope class
2267
- attach_function :new_aubio_parameter, :new_aubio_parameter, [:float, :float, :uint], AubioParameterT
2268
+ attach_function :new_aubio_parameter, :new_aubio_parameter, %i[float float uint], AubioParameterT
2268
2269
 
2269
2270
  # (Not documented)
2270
2271
  #
@@ -2399,7 +2400,7 @@ module Aubio::Api
2399
2400
  # @param [FFI::Pointer(*Void)] data
2400
2401
  # @return [Integer]
2401
2402
  # @scope class
2402
- callback :aubio_log_function_t, [:int, :string, :pointer], :int
2403
+ callback :aubio_log_function_t, %i[int string pointer], :int
2403
2404
 
2404
2405
  # (Not documented)
2405
2406
  #
@@ -2408,7 +2409,7 @@ module Aubio::Api
2408
2409
  # @param [FFI::Pointer(*Void)] data
2409
2410
  # @return [nil]
2410
2411
  # @scope class
2411
- attach_function :aubio_log_set_function, :aubio_log_set_function, [:aubio_log_function_t, :pointer], :void
2412
+ attach_function :aubio_log_set_function, :aubio_log_set_function, %i[aubio_log_function_t pointer], :void
2412
2413
 
2413
2414
  # (Not documented)
2414
2415
  #
@@ -2418,7 +2419,7 @@ module Aubio::Api
2418
2419
  # @param [FFI::Pointer(*Void)] data
2419
2420
  # @return [Proc(_callback_aubio_log_function_t_)]
2420
2421
  # @scope class
2421
- attach_function :aubio_log_set_level_function, :aubio_log_set_level_function, [:int, :aubio_log_function_t, :pointer], :aubio_log_function_t
2422
+ attach_function :aubio_log_set_level_function, :aubio_log_set_level_function, %i[int aubio_log_function_t pointer], :aubio_log_function_t
2422
2423
 
2423
2424
  # (Not documented)
2424
2425
  #
@@ -2441,7 +2442,7 @@ module Aubio::Api
2441
2442
  # @param [Integer] blocksize
2442
2443
  # @return [AubioAudioUnitT]
2443
2444
  # @scope class
2444
- attach_function :new_aubio_audio_unit, :new_aubio_audio_unit, [:uint, :uint, :uint, :uint], AubioAudioUnitT
2445
+ attach_function :new_aubio_audio_unit, :new_aubio_audio_unit, %i[uint uint uint uint], AubioAudioUnitT
2445
2446
 
2446
2447
  # (Not documented)
2447
2448
  #
@@ -2541,7 +2542,7 @@ module Aubio::Api
2541
2542
  # @param [Integer] samplerate
2542
2543
  # @return [Integer]
2543
2544
  # @scope class
2544
- attach_function :aubio_io_validate_samplerate, :aubio_io_validate_samplerate, [:string, :string, :uint], :uint
2545
+ attach_function :aubio_io_validate_samplerate, :aubio_io_validate_samplerate, %i[string string uint], :uint
2545
2546
 
2546
2547
  # (Not documented)
2547
2548
  #
@@ -2551,7 +2552,7 @@ module Aubio::Api
2551
2552
  # @param [Integer] channels
2552
2553
  # @return [Integer]
2553
2554
  # @scope class
2554
- attach_function :aubio_io_validate_channels, :aubio_io_validate_channels, [:string, :string, :uint], :uint
2555
+ attach_function :aubio_io_validate_channels, :aubio_io_validate_channels, %i[string string uint], :uint
2555
2556
 
2556
2557
  # (Not documented)
2557
2558
  class AubioSinkAppleAudioT < FFI::Struct
@@ -2565,7 +2566,7 @@ module Aubio::Api
2565
2566
  # @param [Integer] samplerate
2566
2567
  # @return [AubioSinkAppleAudioT]
2567
2568
  # @scope class
2568
- attach_function :new_aubio_sink_apple_audio, :new_aubio_sink_apple_audio, [:string, :uint], AubioSinkAppleAudioT
2569
+ attach_function :new_aubio_sink_apple_audio, :new_aubio_sink_apple_audio, %i[string uint], AubioSinkAppleAudioT
2569
2570
 
2570
2571
  # (Not documented)
2571
2572
  #
@@ -2649,7 +2650,7 @@ module Aubio::Api
2649
2650
  # @param [Integer] samplerate
2650
2651
  # @return [AubioSinkSndfileT]
2651
2652
  # @scope class
2652
- attach_function :new_aubio_sink_sndfile, :new_aubio_sink_sndfile, [:string, :uint], AubioSinkSndfileT
2653
+ attach_function :new_aubio_sink_sndfile, :new_aubio_sink_sndfile, %i[string uint], AubioSinkSndfileT
2653
2654
 
2654
2655
  # (Not documented)
2655
2656
  #
@@ -2733,7 +2734,7 @@ module Aubio::Api
2733
2734
  # @param [Integer] samplerate
2734
2735
  # @return [AubioSinkWavwriteT]
2735
2736
  # @scope class
2736
- attach_function :new_aubio_sink_wavwrite, :new_aubio_sink_wavwrite, [:string, :uint], AubioSinkWavwriteT
2737
+ attach_function :new_aubio_sink_wavwrite, :new_aubio_sink_wavwrite, %i[string uint], AubioSinkWavwriteT
2737
2738
 
2738
2739
  # (Not documented)
2739
2740
  #
@@ -2818,7 +2819,7 @@ module Aubio::Api
2818
2819
  # @param [Integer] hop_size
2819
2820
  # @return [AubioSourceAppleAudioT]
2820
2821
  # @scope class
2821
- attach_function :new_aubio_source_apple_audio, :new_aubio_source_apple_audio, [:string, :uint, :uint], AubioSourceAppleAudioT
2822
+ attach_function :new_aubio_source_apple_audio, :new_aubio_source_apple_audio, %i[string uint uint], AubioSourceAppleAudioT
2822
2823
 
2823
2824
  # (Not documented)
2824
2825
  #
@@ -2902,7 +2903,7 @@ module Aubio::Api
2902
2903
  # @param [Integer] hop_size
2903
2904
  # @return [AubioSourceAvcodecT]
2904
2905
  # @scope class
2905
- attach_function :new_aubio_source_avcodec, :new_aubio_source_avcodec, [:string, :uint, :uint], AubioSourceAvcodecT
2906
+ attach_function :new_aubio_source_avcodec, :new_aubio_source_avcodec, %i[string uint uint], AubioSourceAvcodecT
2906
2907
 
2907
2908
  # (Not documented)
2908
2909
  #
@@ -2986,7 +2987,7 @@ module Aubio::Api
2986
2987
  # @param [Integer] hop_size
2987
2988
  # @return [AubioSourceSndfileT]
2988
2989
  # @scope class
2989
- attach_function :new_aubio_source_sndfile, :new_aubio_source_sndfile, [:string, :uint, :uint], AubioSourceSndfileT
2990
+ attach_function :new_aubio_source_sndfile, :new_aubio_source_sndfile, %i[string uint uint], AubioSourceSndfileT
2990
2991
 
2991
2992
  # (Not documented)
2992
2993
  #
@@ -3070,7 +3071,7 @@ module Aubio::Api
3070
3071
  # @param [Integer] hop_size
3071
3072
  # @return [AubioSourceWavreadT]
3072
3073
  # @scope class
3073
- attach_function :new_aubio_source_wavread, :new_aubio_source_wavread, [:string, :uint, :uint], AubioSourceWavreadT
3074
+ attach_function :new_aubio_source_wavread, :new_aubio_source_wavread, %i[string uint uint], AubioSourceWavreadT
3074
3075
 
3075
3076
  # (Not documented)
3076
3077
  #
@@ -3306,7 +3307,7 @@ module Aubio::Api
3306
3307
  # @param [Float] pf
3307
3308
  # @return [Float]
3308
3309
  # @scope class
3309
- attach_function :aubio_quadfrac, :aubio_quadfrac, [:float, :float, :float, :float], :float
3310
+ attach_function :aubio_quadfrac, :aubio_quadfrac, %i[float float float float], :float
3310
3311
 
3311
3312
  # (Not documented)
3312
3313
  #
@@ -3419,7 +3420,7 @@ module Aubio::Api
3419
3420
  # @param [Integer] hop_size
3420
3421
  # @return [AubioPitchfcombT]
3421
3422
  # @scope class
3422
- attach_function :new_aubio_pitchfcomb, :new_aubio_pitchfcomb, [:uint, :uint], AubioPitchfcombT
3423
+ attach_function :new_aubio_pitchfcomb, :new_aubio_pitchfcomb, %i[uint uint], AubioPitchfcombT
3423
3424
 
3424
3425
  # (Not documented)
3425
3426
  #
@@ -3451,7 +3452,7 @@ module Aubio::Api
3451
3452
  # @param [Integer] hop_size
3452
3453
  # @return [AubioPitchmcombT]
3453
3454
  # @scope class
3454
- attach_function :new_aubio_pitchmcomb, :new_aubio_pitchmcomb, [:uint, :uint], AubioPitchmcombT
3455
+ attach_function :new_aubio_pitchmcomb, :new_aubio_pitchmcomb, %i[uint uint], AubioPitchmcombT
3455
3456
 
3456
3457
  # (Not documented)
3457
3458
  #
@@ -3626,7 +3627,7 @@ module Aubio::Api
3626
3627
  # @param [Integer] buf_size
3627
3628
  # @return [AubioPitchyinfftT]
3628
3629
  # @scope class
3629
- attach_function :new_aubio_pitchyinfft, :new_aubio_pitchyinfft, [:uint, :uint], AubioPitchyinfftT
3630
+ attach_function :new_aubio_pitchyinfft, :new_aubio_pitchyinfft, %i[uint uint], AubioPitchyinfftT
3630
3631
 
3631
3632
  # (Not documented)
3632
3633
  #
@@ -3674,7 +3675,7 @@ module Aubio::Api
3674
3675
  # @param [Integer] samplerate
3675
3676
  # @return [AubioBeattrackingT]
3676
3677
  # @scope class
3677
- attach_function :new_aubio_beattracking, :new_aubio_beattracking, [:uint, :uint, :uint], AubioBeattrackingT
3678
+ attach_function :new_aubio_beattracking, :new_aubio_beattracking, %i[uint uint uint], AubioBeattrackingT
3678
3679
 
3679
3680
  # (Not documented)
3680
3681
  #
@@ -3739,7 +3740,7 @@ module Aubio::Api
3739
3740
  # @param [Integer] nelems
3740
3741
  # @return [AubioHistT]
3741
3742
  # @scope class
3742
- attach_function :new_aubio_hist, :new_aubio_hist, [:float, :float, :uint], AubioHistT
3743
+ attach_function :new_aubio_hist, :new_aubio_hist, %i[float float uint], AubioHistT
3743
3744
 
3744
3745
  # (Not documented)
3745
3746
  #
@@ -3806,7 +3807,7 @@ module Aubio::Api
3806
3807
  # @param [Float] ihig higher value of output function
3807
3808
  # @return [AubioScaleT]
3808
3809
  # @scope class
3809
- attach_function :new_aubio_scale, :new_aubio_scale, [:float, :float, :float, :float], AubioScaleT
3810
+ attach_function :new_aubio_scale, :new_aubio_scale, %i[float float float float], AubioScaleT
3810
3811
 
3811
3812
  # delete a scale object
3812
3813
  #
@@ -3836,5 +3837,4 @@ module Aubio::Api
3836
3837
  # @return [Integer]
3837
3838
  # @scope class
3838
3839
  attach_function :aubio_scale_set_limits, :aubio_scale_set_limits, [AubioScaleT, :float, :float, :float, :float], :uint
3839
-
3840
3840
  end