wavify 0.1.0 → 0.2.0

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.
Files changed (90) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +40 -1
  3. data/README.md +204 -22
  4. data/exe/wavify +6 -0
  5. data/lib/wavify/adapters.rb +81 -0
  6. data/lib/wavify/audio.rb +1066 -120
  7. data/lib/wavify/cli.rb +237 -0
  8. data/lib/wavify/codecs/aiff.rb +388 -87
  9. data/lib/wavify/codecs/base.rb +98 -5
  10. data/lib/wavify/codecs/flac.rb +660 -170
  11. data/lib/wavify/codecs/ogg_vorbis.rb +515 -155
  12. data/lib/wavify/codecs/raw.rb +235 -45
  13. data/lib/wavify/codecs/registry.rb +272 -10
  14. data/lib/wavify/codecs/wav.rb +453 -74
  15. data/lib/wavify/core/duration.rb +54 -2
  16. data/lib/wavify/core/format.rb +96 -11
  17. data/lib/wavify/core/sample_buffer.rb +648 -60
  18. data/lib/wavify/core/stream.rb +590 -34
  19. data/lib/wavify/dsl.rb +712 -100
  20. data/lib/wavify/dsp/automation.rb +109 -0
  21. data/lib/wavify/dsp/effects/auto_pan.rb +71 -0
  22. data/lib/wavify/dsp/effects/bitcrusher.rb +74 -0
  23. data/lib/wavify/dsp/effects/chorus.rb +15 -4
  24. data/lib/wavify/dsp/effects/compressor.rb +133 -23
  25. data/lib/wavify/dsp/effects/delay.rb +46 -1
  26. data/lib/wavify/dsp/effects/distortion.rb +3 -2
  27. data/lib/wavify/dsp/effects/effect_base.rb +69 -2
  28. data/lib/wavify/dsp/effects/effect_chain.rb +94 -0
  29. data/lib/wavify/dsp/effects/envelope_controlled_effect.rb +93 -0
  30. data/lib/wavify/dsp/effects/eq.rb +102 -0
  31. data/lib/wavify/dsp/effects/expander.rb +90 -0
  32. data/lib/wavify/dsp/effects/flanger.rb +112 -0
  33. data/lib/wavify/dsp/effects/limiter.rb +259 -0
  34. data/lib/wavify/dsp/effects/mastering_chain.rb +31 -0
  35. data/lib/wavify/dsp/effects/noise_gate.rb +72 -0
  36. data/lib/wavify/dsp/effects/phaser.rb +112 -0
  37. data/lib/wavify/dsp/effects/podcast_chain.rb +32 -0
  38. data/lib/wavify/dsp/effects/reverb.rb +100 -14
  39. data/lib/wavify/dsp/effects/soft_limiter.rb +55 -0
  40. data/lib/wavify/dsp/effects/stereo_widener.rb +73 -0
  41. data/lib/wavify/dsp/effects/tremolo.rb +66 -0
  42. data/lib/wavify/dsp/effects/vibrato.rb +102 -0
  43. data/lib/wavify/dsp/effects.rb +106 -0
  44. data/lib/wavify/dsp/envelope.rb +90 -19
  45. data/lib/wavify/dsp/filter.rb +149 -8
  46. data/lib/wavify/dsp/headroom.rb +57 -0
  47. data/lib/wavify/dsp/lfo.rb +65 -0
  48. data/lib/wavify/dsp/loudness_meter.rb +281 -0
  49. data/lib/wavify/dsp/oscillator.rb +261 -22
  50. data/lib/wavify/dsp/processor.rb +90 -0
  51. data/lib/wavify/errors.rb +2 -2
  52. data/lib/wavify/sequencer/engine.rb +405 -89
  53. data/lib/wavify/sequencer/note_sequence.rb +45 -7
  54. data/lib/wavify/sequencer/pattern.rb +121 -12
  55. data/lib/wavify/sequencer/track.rb +149 -10
  56. data/lib/wavify/version.rb +1 -1
  57. data/lib/wavify.rb +18 -0
  58. data/sig/audio.rbs +86 -0
  59. data/sig/codecs.rbs +77 -0
  60. data/sig/core.rbs +108 -0
  61. data/sig/dsl.rbs +32 -0
  62. data/sig/dsp.rbs +87 -0
  63. data/sig/effects.rbs +129 -0
  64. data/sig/public_api.yml +111 -0
  65. data/sig/sequencer.rbs +126 -0
  66. data/sig/stream.rbs +30 -0
  67. data/sig/wavify.rbs +24 -0
  68. metadata +44 -58
  69. data/.serena/.gitignore +0 -1
  70. data/.serena/memories/project_overview.md +0 -5
  71. data/.serena/memories/style_and_completion.md +0 -5
  72. data/.serena/memories/suggested_commands.md +0 -11
  73. data/.serena/project.yml +0 -126
  74. data/.simplecov +0 -18
  75. data/.yardopts +0 -4
  76. data/Rakefile +0 -190
  77. data/benchmarks/README.md +0 -46
  78. data/benchmarks/benchmark_helper.rb +0 -112
  79. data/benchmarks/dsp_effects_benchmark.rb +0 -46
  80. data/benchmarks/flac_benchmark.rb +0 -74
  81. data/benchmarks/streaming_memory_benchmark.rb +0 -94
  82. data/benchmarks/wav_io_benchmark.rb +0 -110
  83. data/examples/audio_processing.rb +0 -73
  84. data/examples/cinematic_transition.rb +0 -118
  85. data/examples/drum_machine.rb +0 -74
  86. data/examples/format_convert.rb +0 -81
  87. data/examples/hybrid_arrangement.rb +0 -165
  88. data/examples/streaming_master_chain.rb +0 -129
  89. data/examples/synth_pad.rb +0 -42
  90. data/tools/fixture_writer.rb +0 -85
data/sig/stream.rbs ADDED
@@ -0,0 +1,30 @@
1
+ module Wavify
2
+ module Core
3
+ class Stream
4
+ include Enumerable[SampleBuffer]
5
+
6
+ attr_reader chunk_size: Integer
7
+
8
+ def initialize: (String | IO source, codec: untyped, format: Format?, ?chunk_size: Integer, ?codec_read_options: Hash[Symbol, untyped]) -> void
9
+ def format: () -> Format
10
+ def pipe: (?untyped processor, ?name: String | Symbol?) ?{ (SampleBuffer) -> untyped } -> Stream
11
+ def map_chunks: (?name: String | Symbol?) { (SampleBuffer) -> untyped } -> Stream
12
+ def take_duration: (Numeric | Duration duration) -> Stream
13
+ def drop_duration: (Numeric | Duration duration) -> Stream
14
+ def meter: () { (Hash[Symbol, untyped]) -> void } -> Stream
15
+ def progress: (?total_frames: Integer?) { (Hash[Symbol, untyped]) -> void } -> Stream
16
+ def tee: (String | IO path_or_io, ?format: Format?, ?codec: Symbol | untyped, ?filename: String?, ?codec_options: Hash[Symbol, untyped]?) -> Stream
17
+ def to_audio: () -> Audio
18
+ def pipeline: () -> Array[untyped]
19
+ def pipeline_steps: () -> Array[Hash[Symbol, untyped]]
20
+ def latency: () -> Float
21
+ def lookahead: () -> Float
22
+ def dry_run: (?format: Format?) -> Hash[Symbol, untyped]
23
+ def each_chunk: () { (SampleBuffer) -> void } -> Stream
24
+ | () -> Enumerator[SampleBuffer, Stream]
25
+ def each: () { (SampleBuffer) -> void } -> Stream
26
+ | () -> Enumerator[SampleBuffer, Stream]
27
+ def write_to: (String | IO path_or_io, ?format: Format?, ?codec: Symbol | untyped, ?filename: String?, ?codec_options: Hash[Symbol, untyped]?, ?overwrite: bool) -> Stream
28
+ end
29
+ end
30
+ end
data/sig/wavify.rbs ADDED
@@ -0,0 +1,24 @@
1
+ module Wavify
2
+ VERSION: String
3
+
4
+ Effects: singleton(DSP::Effects)
5
+
6
+ def self.ms: (Numeric value) -> Core::Duration
7
+ def self.seconds: (Numeric value) -> Core::Duration
8
+ def self.build: (?String? output_path, ?format: Core::Format, ?tempo: Numeric, ?beats_per_bar: Integer, ?swing: Numeric, ?default_bars: Integer, ?random_seed: Integer) { () -> void } -> Audio
9
+
10
+ module Adapters
11
+ class AdapterSpec
12
+ attr_reader name: Symbol
13
+ attr_reader kind: Symbol
14
+ attr_reader gem_name: String
15
+ attr_reader require_path: String
16
+ attr_reader formats: Array[String]
17
+ attr_reader summary: String
18
+ end
19
+
20
+ def self.known: () -> Array[AdapterSpec]
21
+ def self.find: (String | Symbol name) -> AdapterSpec?
22
+ def self.load: (String | Symbol name) -> true
23
+ end
24
+ end
metadata CHANGED
@@ -1,76 +1,31 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wavify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yudai Takada
8
8
  bindir: exe
9
9
  cert_chain: []
10
10
  date: 1980-01-02 00:00:00.000000000 Z
11
- dependencies:
12
- - !ruby/object:Gem::Dependency
13
- name: ogg-ruby
14
- requirement: !ruby/object:Gem::Requirement
15
- requirements:
16
- - - ">="
17
- - !ruby/object:Gem::Version
18
- version: '0.1'
19
- type: :runtime
20
- prerelease: false
21
- version_requirements: !ruby/object:Gem::Requirement
22
- requirements:
23
- - - ">="
24
- - !ruby/object:Gem::Version
25
- version: '0.1'
26
- - !ruby/object:Gem::Dependency
27
- name: vorbis
28
- requirement: !ruby/object:Gem::Requirement
29
- requirements:
30
- - - ">="
31
- - !ruby/object:Gem::Version
32
- version: '0.1'
33
- type: :runtime
34
- prerelease: false
35
- version_requirements: !ruby/object:Gem::Requirement
36
- requirements:
37
- - - ">="
38
- - !ruby/object:Gem::Version
39
- version: '0.1'
40
- description: Wavify provides core audio buffer primitives, codecs, and DSP-oriented
41
- high-level APIs.
11
+ dependencies: []
12
+ description: Wavify provides ergonomic Ruby APIs for audio buffers, codec I/O, streaming
13
+ pipelines, DSP effects, and a small sequencing DSL.
42
14
  email:
43
15
  - t.yudai92@gmail.com
44
- executables: []
16
+ executables:
17
+ - wavify
45
18
  extensions: []
46
19
  extra_rdoc_files: []
47
20
  files:
48
- - ".serena/.gitignore"
49
- - ".serena/memories/project_overview.md"
50
- - ".serena/memories/style_and_completion.md"
51
- - ".serena/memories/suggested_commands.md"
52
- - ".serena/project.yml"
53
- - ".simplecov"
54
- - ".yardopts"
55
21
  - CHANGELOG.md
56
22
  - LICENSE
57
23
  - README.md
58
- - Rakefile
59
- - benchmarks/README.md
60
- - benchmarks/benchmark_helper.rb
61
- - benchmarks/dsp_effects_benchmark.rb
62
- - benchmarks/flac_benchmark.rb
63
- - benchmarks/streaming_memory_benchmark.rb
64
- - benchmarks/wav_io_benchmark.rb
65
- - examples/audio_processing.rb
66
- - examples/cinematic_transition.rb
67
- - examples/drum_machine.rb
68
- - examples/format_convert.rb
69
- - examples/hybrid_arrangement.rb
70
- - examples/streaming_master_chain.rb
71
- - examples/synth_pad.rb
24
+ - exe/wavify
72
25
  - lib/wavify.rb
26
+ - lib/wavify/adapters.rb
73
27
  - lib/wavify/audio.rb
28
+ - lib/wavify/cli.rb
74
29
  - lib/wavify/codecs/aiff.rb
75
30
  - lib/wavify/codecs/base.rb
76
31
  - lib/wavify/codecs/flac.rb
@@ -83,16 +38,37 @@ files:
83
38
  - lib/wavify/core/sample_buffer.rb
84
39
  - lib/wavify/core/stream.rb
85
40
  - lib/wavify/dsl.rb
41
+ - lib/wavify/dsp/automation.rb
86
42
  - lib/wavify/dsp/effects.rb
43
+ - lib/wavify/dsp/effects/auto_pan.rb
44
+ - lib/wavify/dsp/effects/bitcrusher.rb
87
45
  - lib/wavify/dsp/effects/chorus.rb
88
46
  - lib/wavify/dsp/effects/compressor.rb
89
47
  - lib/wavify/dsp/effects/delay.rb
90
48
  - lib/wavify/dsp/effects/distortion.rb
91
49
  - lib/wavify/dsp/effects/effect_base.rb
50
+ - lib/wavify/dsp/effects/effect_chain.rb
51
+ - lib/wavify/dsp/effects/envelope_controlled_effect.rb
52
+ - lib/wavify/dsp/effects/eq.rb
53
+ - lib/wavify/dsp/effects/expander.rb
54
+ - lib/wavify/dsp/effects/flanger.rb
55
+ - lib/wavify/dsp/effects/limiter.rb
56
+ - lib/wavify/dsp/effects/mastering_chain.rb
57
+ - lib/wavify/dsp/effects/noise_gate.rb
58
+ - lib/wavify/dsp/effects/phaser.rb
59
+ - lib/wavify/dsp/effects/podcast_chain.rb
92
60
  - lib/wavify/dsp/effects/reverb.rb
61
+ - lib/wavify/dsp/effects/soft_limiter.rb
62
+ - lib/wavify/dsp/effects/stereo_widener.rb
63
+ - lib/wavify/dsp/effects/tremolo.rb
64
+ - lib/wavify/dsp/effects/vibrato.rb
93
65
  - lib/wavify/dsp/envelope.rb
94
66
  - lib/wavify/dsp/filter.rb
67
+ - lib/wavify/dsp/headroom.rb
68
+ - lib/wavify/dsp/lfo.rb
69
+ - lib/wavify/dsp/loudness_meter.rb
95
70
  - lib/wavify/dsp/oscillator.rb
71
+ - lib/wavify/dsp/processor.rb
96
72
  - lib/wavify/errors.rb
97
73
  - lib/wavify/sequencer.rb
98
74
  - lib/wavify/sequencer/engine.rb
@@ -100,15 +76,25 @@ files:
100
76
  - lib/wavify/sequencer/pattern.rb
101
77
  - lib/wavify/sequencer/track.rb
102
78
  - lib/wavify/version.rb
103
- - tools/fixture_writer.rb
79
+ - sig/audio.rbs
80
+ - sig/codecs.rbs
81
+ - sig/core.rbs
82
+ - sig/dsl.rbs
83
+ - sig/dsp.rbs
84
+ - sig/effects.rbs
85
+ - sig/public_api.yml
86
+ - sig/sequencer.rbs
87
+ - sig/stream.rbs
88
+ - sig/wavify.rbs
104
89
  homepage: https://github.com/ydah/wavify
105
90
  licenses:
106
91
  - MIT
107
92
  metadata:
108
93
  allowed_push_host: https://rubygems.org
109
94
  homepage_uri: https://github.com/ydah/wavify
110
- source_code_uri: https://github.com/ydah/wavify/tree/main
111
- changelog_uri: https://github.com/ydah/wavify/blob/main/CHANGELOG.md
95
+ source_code_uri: https://github.com/ydah/wavify/tree/v0.2.0
96
+ changelog_uri: https://github.com/ydah/wavify/blob/v0.2.0/CHANGELOG.md
97
+ rubygems_mfa_required: 'true'
112
98
  rdoc_options: []
113
99
  require_paths:
114
100
  - lib
@@ -125,5 +111,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
111
  requirements: []
126
112
  rubygems_version: 4.0.6
127
113
  specification_version: 4
128
- summary: Pure Ruby audio processing toolkit with chainable API.
114
+ summary: Pure Ruby audio processing toolkit with immutable transforms.
129
115
  test_files: []
data/.serena/.gitignore DELETED
@@ -1 +0,0 @@
1
- /cache
@@ -1,5 +0,0 @@
1
- # Wavify project overview
2
- - Purpose: Pure Ruby audio processing gem with immutable, chainable audio transforms and codec support.
3
- - Tech stack: Ruby (>=3.1), Bundler, RSpec, Rake, RuboCop, YARD/RBS (`sig/`).
4
- - Current codec status of interest: OGG Vorbis supports container/header parsing and metadata; audio decode is under implementation with preflight scaffolding.
5
- - Structure: `lib/` implementation, `spec/` tests, `examples/`, `benchmarks/`, `bin/`, `tools/`, `sig/`.
@@ -1,5 +0,0 @@
1
- # Style and completion guidance
2
- - Ruby codebase uses frozen string literal comments and idiomatic snake_case naming.
3
- - Prefer small incremental changes with tests (RSpec) and keep public behavior stable unless task says otherwise.
4
- - For codec work, add focused fixtures/spec regressions for parsing and decode preflight behavior.
5
- - Task completion checks: run relevant specs first (target file), then broader `bundle exec rspec` if changes touch shared paths; ensure git worktree is clean except intended changes.
@@ -1,11 +0,0 @@
1
- # Suggested commands (Darwin shell)
2
- - `git status --short`
3
- - `git log --oneline -10`
4
- - `bundle exec rspec`
5
- - `bundle exec rspec spec/codecs/ogg_vorbis_spec.rb`
6
- - `bundle exec rubocop`
7
- - `bundle exec rake spec:coverage COVERAGE_MINIMUM=90`
8
- - `bundle exec rake docs:examples`
9
- - `bundle exec rake docs:yard`
10
- - `bundle exec rake docs:check YARD_MINIMUM=85`
11
- - `rake bench:flac` / `rake bench:all`
data/.serena/project.yml DELETED
@@ -1,126 +0,0 @@
1
- # the name by which the project can be referenced within Serena
2
- project_name: "wavify"
3
-
4
-
5
- # list of languages for which language servers are started; choose from:
6
- # al bash clojure cpp csharp
7
- # csharp_omnisharp dart elixir elm erlang
8
- # fortran fsharp go groovy haskell
9
- # java julia kotlin lua markdown
10
- # matlab nix pascal perl php
11
- # php_phpactor powershell python python_jedi r
12
- # rego ruby ruby_solargraph rust scala
13
- # swift terraform toml typescript typescript_vts
14
- # vue yaml zig
15
- # (This list may be outdated. For the current list, see values of Language enum here:
16
- # https://github.com/oraios/serena/blob/main/src/solidlsp/ls_config.py
17
- # For some languages, there are alternative language servers, e.g. csharp_omnisharp, ruby_solargraph.)
18
- # Note:
19
- # - For C, use cpp
20
- # - For JavaScript, use typescript
21
- # - For Free Pascal/Lazarus, use pascal
22
- # Special requirements:
23
- # Some languages require additional setup/installations.
24
- # See here for details: https://oraios.github.io/serena/01-about/020_programming-languages.html#language-servers
25
- # When using multiple languages, the first language server that supports a given file will be used for that file.
26
- # The first language is the default language and the respective language server will be used as a fallback.
27
- # Note that when using the JetBrains backend, language servers are not used and this list is correspondingly ignored.
28
- languages:
29
- - ruby
30
-
31
- # the encoding used by text files in the project
32
- # For a list of possible encodings, see https://docs.python.org/3.11/library/codecs.html#standard-encodings
33
- encoding: "utf-8"
34
-
35
- # whether to use project's .gitignore files to ignore files
36
- ignore_all_files_in_gitignore: true
37
-
38
- # list of additional paths to ignore in this project.
39
- # Same syntax as gitignore, so you can use * and **.
40
- # Note: global ignored_paths from serena_config.yml are also applied additively.
41
- ignored_paths: []
42
-
43
- # whether the project is in read-only mode
44
- # If set to true, all editing tools will be disabled and attempts to use them will result in an error
45
- # Added on 2025-04-18
46
- read_only: false
47
-
48
- # list of tool names to exclude. We recommend not excluding any tools, see the readme for more details.
49
- # Below is the complete list of tools for convenience.
50
- # To make sure you have the latest list of tools, and to view their descriptions,
51
- # execute `uv run scripts/print_tool_overview.py`.
52
- #
53
- # * `activate_project`: Activates a project by name.
54
- # * `check_onboarding_performed`: Checks whether project onboarding was already performed.
55
- # * `create_text_file`: Creates/overwrites a file in the project directory.
56
- # * `delete_lines`: Deletes a range of lines within a file.
57
- # * `delete_memory`: Deletes a memory from Serena's project-specific memory store.
58
- # * `execute_shell_command`: Executes a shell command.
59
- # * `find_referencing_code_snippets`: Finds code snippets in which the symbol at the given location is referenced.
60
- # * `find_referencing_symbols`: Finds symbols that reference the symbol at the given location (optionally filtered by type).
61
- # * `find_symbol`: Performs a global (or local) search for symbols with/containing a given name/substring (optionally filtered by type).
62
- # * `get_current_config`: Prints the current configuration of the agent, including the active and available projects, tools, contexts, and modes.
63
- # * `get_symbols_overview`: Gets an overview of the top-level symbols defined in a given file.
64
- # * `initial_instructions`: Gets the initial instructions for the current project.
65
- # Should only be used in settings where the system prompt cannot be set,
66
- # e.g. in clients you have no control over, like Claude Desktop.
67
- # * `insert_after_symbol`: Inserts content after the end of the definition of a given symbol.
68
- # * `insert_at_line`: Inserts content at a given line in a file.
69
- # * `insert_before_symbol`: Inserts content before the beginning of the definition of a given symbol.
70
- # * `list_dir`: Lists files and directories in the given directory (optionally with recursion).
71
- # * `list_memories`: Lists memories in Serena's project-specific memory store.
72
- # * `onboarding`: Performs onboarding (identifying the project structure and essential tasks, e.g. for testing or building).
73
- # * `prepare_for_new_conversation`: Provides instructions for preparing for a new conversation (in order to continue with the necessary context).
74
- # * `read_file`: Reads a file within the project directory.
75
- # * `read_memory`: Reads the memory with the given name from Serena's project-specific memory store.
76
- # * `remove_project`: Removes a project from the Serena configuration.
77
- # * `replace_lines`: Replaces a range of lines within a file with new content.
78
- # * `replace_symbol_body`: Replaces the full definition of a symbol.
79
- # * `restart_language_server`: Restarts the language server, may be necessary when edits not through Serena happen.
80
- # * `search_for_pattern`: Performs a search for a pattern in the project.
81
- # * `summarize_changes`: Provides instructions for summarizing the changes made to the codebase.
82
- # * `switch_modes`: Activates modes by providing a list of their names
83
- # * `think_about_collected_information`: Thinking tool for pondering the completeness of collected information.
84
- # * `think_about_task_adherence`: Thinking tool for determining whether the agent is still on track with the current task.
85
- # * `think_about_whether_you_are_done`: Thinking tool for determining whether the task is truly completed.
86
- # * `write_memory`: Writes a named memory (for future reference) to Serena's project-specific memory store.
87
- excluded_tools: []
88
-
89
- # list of tools to include that would otherwise be disabled (particularly optional tools that are disabled by default)
90
- included_optional_tools: []
91
-
92
- # fixed set of tools to use as the base tool set (if non-empty), replacing Serena's default set of tools.
93
- # This cannot be combined with non-empty excluded_tools or included_optional_tools.
94
- fixed_tools: []
95
-
96
- # list of mode names to that are always to be included in the set of active modes
97
- # The full set of modes to be activated is base_modes + default_modes.
98
- # If the setting is undefined, the base_modes from the global configuration (serena_config.yml) apply.
99
- # Otherwise, this setting overrides the global configuration.
100
- # Set this to [] to disable base modes for this project.
101
- # Set this to a list of mode names to always include the respective modes for this project.
102
- base_modes:
103
-
104
- # list of mode names that are to be activated by default.
105
- # The full set of modes to be activated is base_modes + default_modes.
106
- # If the setting is undefined, the default_modes from the global configuration (serena_config.yml) apply.
107
- # Otherwise, this overrides the setting from the global configuration (serena_config.yml).
108
- # This setting can, in turn, be overridden by CLI parameters (--mode).
109
- default_modes:
110
-
111
- # initial prompt for the project. It will always be given to the LLM upon activating the project
112
- # (contrary to the memories, which are loaded on demand).
113
- initial_prompt: ""
114
-
115
- # time budget (seconds) per tool call for the retrieval of additional symbol information
116
- # such as docstrings or parameter information.
117
- # This overrides the corresponding setting in the global configuration; see the documentation there.
118
- # If null or missing, use the setting from the global configuration.
119
- symbol_info_budget:
120
-
121
- # The language backend to use for this project.
122
- # If not set, the global setting from serena_config.yml is used.
123
- # Valid values: LSP, JetBrains
124
- # Note: the backend is fixed at startup. If a project with a different backend
125
- # is activated post-init, an error will be returned.
126
- language_backend:
data/.simplecov DELETED
@@ -1,18 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- SimpleCov.configure do
4
- enable_coverage :branch if ENV["SIMPLECOV_BRANCH"] == "1"
5
-
6
- add_filter "/spec/"
7
- add_filter "/examples/"
8
- add_filter "/benchmarks/"
9
- add_filter "/tmp/"
10
-
11
- add_group "Core", "lib/wavify/core"
12
- add_group "Codecs", "lib/wavify/codecs"
13
- add_group "DSP", "lib/wavify/dsp"
14
- add_group "Sequencer", "lib/wavify/sequencer"
15
-
16
- minimum = ENV.fetch("COVERAGE_MINIMUM", nil)
17
- minimum_coverage(minimum.to_i) if minimum && !minimum.empty?
18
- end
data/.yardopts DELETED
@@ -1,4 +0,0 @@
1
- --readme README.md
2
- --markup markdown
3
- --output-dir doc
4
- lib/**/*.rb
data/Rakefile DELETED
@@ -1,190 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "bundler/gem_tasks"
4
- require "rspec/core/rake_task"
5
- require "rbconfig"
6
-
7
- RSpec::Core::RakeTask.new(:spec)
8
-
9
- namespace :spec do
10
- desc "Generate audio fixtures from YAML definitions"
11
- task :create_fixtures do
12
- ruby = RbConfig.ruby
13
- success = system(ruby, File.expand_path("tools/fixture_writer.rb", __dir__))
14
- abort("fixture generation failed") unless success
15
- end
16
-
17
- desc "Run specs with SimpleCov coverage (set COVERAGE_MINIMUM=90 to enforce target)"
18
- task :coverage do
19
- ruby = RbConfig.ruby
20
- env = { "COVERAGE" => "1" }
21
- env["COVERAGE_MINIMUM"] = ENV["COVERAGE_MINIMUM"] if ENV["COVERAGE_MINIMUM"]
22
- env["SIMPLECOV_BRANCH"] = ENV["SIMPLECOV_BRANCH"] if ENV["SIMPLECOV_BRANCH"]
23
-
24
- success = system(env, ruby, "-S", "bundle", "exec", "rspec")
25
- abort("coverage run failed") unless success
26
- end
27
- end
28
-
29
- task default: :spec
30
-
31
- namespace :bench do
32
- def run_benchmark_script(path)
33
- ruby = RbConfig.ruby
34
- success = system(ruby, File.expand_path(path, __dir__))
35
- abort("benchmark failed: #{path}") unless success
36
- end
37
-
38
- desc "Run WAV I/O benchmark"
39
- task :wav_io do
40
- run_benchmark_script("benchmarks/wav_io_benchmark.rb")
41
- end
42
-
43
- desc "Run DSP effects benchmark"
44
- task :dsp do
45
- run_benchmark_script("benchmarks/dsp_effects_benchmark.rb")
46
- end
47
-
48
- desc "Run FLAC encode/decode benchmark"
49
- task :flac do
50
- run_benchmark_script("benchmarks/flac_benchmark.rb")
51
- end
52
-
53
- desc "Run streaming memory benchmark"
54
- task :stream do
55
- run_benchmark_script("benchmarks/streaming_memory_benchmark.rb")
56
- end
57
-
58
- desc "Run all benchmarks"
59
- task all: %i[wav_io dsp flac stream]
60
- end
61
-
62
- namespace :docs do
63
- def example_scripts
64
- %w[
65
- examples/format_convert.rb
66
- examples/drum_machine.rb
67
- examples/synth_pad.rb
68
- examples/audio_processing.rb
69
- examples/hybrid_arrangement.rb
70
- examples/streaming_master_chain.rb
71
- examples/cinematic_transition.rb
72
- ].freeze
73
- end
74
-
75
- def run_ruby_script(path)
76
- ruby = RbConfig.ruby
77
- success = system(ruby, File.expand_path(path, __dir__))
78
- abort("script failed: #{path}") unless success
79
- end
80
-
81
- desc "Generate YARD docs into doc/"
82
- task :yard do
83
- ruby = RbConfig.ruby
84
- success = system(ruby, "-S", "bundle", "exec", "yard", "doc")
85
- abort("yard doc failed") unless success
86
- end
87
-
88
- desc "Print YARD documentation coverage stats"
89
- task :stats do
90
- ruby = RbConfig.ruby
91
- success = system(ruby, "-S", "bundle", "exec", "yard", "stats")
92
- abort("yard stats failed") unless success
93
- end
94
-
95
- desc "Enforce minimum YARD documentation percentage (YARD_MINIMUM, default: 85)"
96
- task :check do
97
- ruby = RbConfig.ruby
98
- minimum = ENV.fetch("YARD_MINIMUM", "85").to_f
99
- output = IO.popen([ruby, "-S", "bundle", "exec", "yard", "stats"], chdir: __dir__, err: %i[child out], &:read)
100
- puts output
101
-
102
- match = output.match(/([0-9]+\.[0-9]+)% documented/)
103
- abort("yard stats output did not include documentation percentage") unless match
104
-
105
- percent = match[1].to_f
106
- abort("documentation coverage #{percent}% is below minimum #{minimum}%") if percent < minimum
107
-
108
- puts "docs check ok: #{percent}% >= #{minimum}%"
109
- end
110
-
111
- desc "Smoke-run all example scripts (self-contained demo mode)"
112
- task :examples do
113
- example_scripts.each do |script|
114
- puts "== running #{script}"
115
- run_ruby_script(script)
116
- end
117
- end
118
-
119
- desc "Run docs-related checks and generators"
120
- task all: %i[examples yard check]
121
- end
122
-
123
- namespace :release do
124
- def load_release_spec!
125
- spec = Gem::Specification.load(File.expand_path("wavify.gemspec", __dir__))
126
- abort("failed to load wavify.gemspec") unless spec
127
-
128
- spec
129
- end
130
-
131
- def assert_release_check!(condition, message)
132
- return if condition
133
-
134
- abort("release check failed: #{message}")
135
- end
136
-
137
- desc "Validate gemspec metadata and packaged file list"
138
- task :check_gemspec do
139
- spec = load_release_spec!
140
-
141
- assert_release_check!(!spec.name.to_s.strip.empty?, "gemspec.name is empty")
142
- assert_release_check!(!spec.version.to_s.strip.empty?, "gemspec.version is empty")
143
- assert_release_check!(!spec.summary.to_s.strip.empty?, "gemspec.summary is empty")
144
- assert_release_check!(!spec.description.to_s.strip.empty?, "gemspec.description is empty")
145
- assert_release_check!(!spec.homepage.to_s.strip.empty?, "gemspec.homepage is empty")
146
- assert_release_check!(!spec.license.to_s.strip.empty?, "gemspec.license is empty")
147
- assert_release_check!(!spec.required_ruby_version.to_s.strip.empty?, "gemspec.required_ruby_version is empty")
148
-
149
- required_metadata_keys = %w[allowed_push_host homepage_uri source_code_uri changelog_uri]
150
- missing_metadata = required_metadata_keys.select { |key| spec.metadata[key].to_s.strip == "" }
151
- assert_release_check!(missing_metadata.empty?, "missing gemspec metadata keys: #{missing_metadata.join(', ')}")
152
-
153
- files = spec.files || []
154
- assert_release_check!(files.include?("lib/wavify.rb"), "gemspec.files does not include lib/wavify.rb")
155
- assert_release_check!(files.include?("README.md"), "gemspec.files does not include README.md")
156
- assert_release_check!(files.any? { |f| ["LICENSE", "LICENSE.txt"].include?(f) }, "gemspec.files does not include license file")
157
- assert_release_check!(files.none? { |f| f.start_with?(".idea/") }, ".idea files should not be packaged")
158
-
159
- puts "release check ok: gemspec metadata and package file list"
160
- puts " name: #{spec.name}"
161
- puts " version: #{spec.version}"
162
- puts " packaged files: #{files.length}"
163
- end
164
-
165
- desc "Validate CHANGELOG structure and unreleased section"
166
- task :check_changelog do
167
- changelog_path = File.expand_path("CHANGELOG.md", __dir__)
168
- assert_release_check!(File.file?(changelog_path), "CHANGELOG.md is missing")
169
-
170
- changelog = File.read(changelog_path)
171
- assert_release_check!(changelog.include?("## [Unreleased]"), "CHANGELOG.md must include an [Unreleased] section")
172
- assert_release_check!(changelog.include?("Keep a Changelog"), "CHANGELOG.md should mention Keep a Changelog format")
173
- has_standard_subsection = changelog.match?(/^### (Added|Changed|Fixed|Removed|Security)$/)
174
- assert_release_check!(
175
- has_standard_subsection,
176
- "CHANGELOG.md should include at least one subsection heading"
177
- )
178
-
179
- puts "release check ok: CHANGELOG.md structure"
180
- end
181
-
182
- desc "Build gem package locally (same artifact as release flow)"
183
- task :build_package do
184
- Rake::Task["build"].reenable
185
- Rake::Task["build"].invoke
186
- end
187
-
188
- desc "Run release readiness checks (changelog, gemspec, gem build)"
189
- task check: %i[check_changelog check_gemspec build_package]
190
- end
data/benchmarks/README.md DELETED
@@ -1,46 +0,0 @@
1
- # Benchmarks
2
-
3
- This directory contains lightweight benchmark scripts for Wavify's core workflows.
4
-
5
- Implemented targets (incremental Phase 6 work):
6
-
7
- - `wav_io_benchmark.rb` - WAV read/write and streaming pipeline throughput
8
- - `dsp_effects_benchmark.rb` - DSP effects processing cost
9
- - `flac_benchmark.rb` - FLAC encode/decode and streaming throughput
10
- - `streaming_memory_benchmark.rb` - streaming pipeline memory behavior (sampled RSS)
11
-
12
- ## Usage
13
-
14
- Run directly:
15
-
16
- ```bash
17
- ruby benchmarks/wav_io_benchmark.rb
18
- ruby benchmarks/dsp_effects_benchmark.rb
19
- ruby benchmarks/flac_benchmark.rb
20
- ruby benchmarks/streaming_memory_benchmark.rb
21
- ```
22
-
23
- Or via rake tasks:
24
-
25
- ```bash
26
- rake bench:wav_io
27
- rake bench:dsp
28
- rake bench:flac
29
- rake bench:stream
30
- rake bench:all
31
- ```
32
-
33
- ## Environment Variables
34
-
35
- - `KEEP_BENCH_FILES=1` keeps generated files in `tmp/benchmarks/`
36
- - `WAV_IO_ITERATIONS`, `WAV_IO_DURATION`, `WAV_IO_CHUNK`
37
- - `DSP_BENCH_ITERATIONS`, `DSP_BENCH_DURATION`
38
- - `FLAC_BENCH_ITERATIONS`, `FLAC_BENCH_DURATION`, `FLAC_BENCH_CHUNK`
39
- - `STREAM_BENCH_DURATION`, `STREAM_BENCH_CHUNK`
40
-
41
- ## Notes
42
-
43
- - OGG Vorbis audio decode is still incomplete, so it is not benchmarked yet.
44
- - `flac_benchmark.rb` measures the current pure Ruby FLAC implementation (verbatim/fixed subframe selection).
45
- - `streaming_memory_benchmark.rb` reports sampled RSS (`ps`) as an approximation, not a strict peak profiler.
46
- - `wav_io_benchmark.rb` optionally compares WAV read/write throughput with the `wavefile` gem when it is installed (`gem install wavefile`).