synth_blocks 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,17 @@
1
+ module SynthBlocks
2
+ # Some simple utils
3
+ module Utils
4
+ # a simple bitreducer using rounding
5
+ # bits is the number of bits you want to reduce to
6
+ def bitreduce(input, bits=8)
7
+ (input * bits.to_f).round.to_f / bits.to_f
8
+ end
9
+
10
+ # waveshaper, source http://www.musicdsp.org/en/latest/Effects/41-waveshaper.html
11
+ # a can go from 1 to ... oo
12
+ # the higher a the stronger is the distortion
13
+ def simple_waveshaper(input, a)
14
+ input * (input.abs + a) / (input ** 2 + (a - 1) * input.abs + 1)
15
+ end
16
+ end
17
+ end
metadata ADDED
@@ -0,0 +1,113 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: synth_blocks
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Jan Krutisch
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2020-07-04 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: minitest
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '5.14'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '5.14'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '13.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '13.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: wavefile
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.1'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.1'
55
+ description: A collection of building blocks for making music in pure ruby
56
+ email: jan@krutisch.de
57
+ executables: []
58
+ extensions: []
59
+ extra_rdoc_files: []
60
+ files:
61
+ - LICENSE
62
+ - README.md
63
+ - lib/synth_blocks.rb
64
+ - lib/synth_blocks/core/moog_filter.rb
65
+ - lib/synth_blocks/core/one_pole_lowpass.rb
66
+ - lib/synth_blocks/core/oscillator.rb
67
+ - lib/synth_blocks/core/sound.rb
68
+ - lib/synth_blocks/core/state_variable_filter.rb
69
+ - lib/synth_blocks/core/wave_writer.rb
70
+ - lib/synth_blocks/drum/hihat.rb
71
+ - lib/synth_blocks/drum/kick_drum.rb
72
+ - lib/synth_blocks/drum/snare_drum.rb
73
+ - lib/synth_blocks/drum/tuned_drum.rb
74
+ - lib/synth_blocks/fx/chorus.rb
75
+ - lib/synth_blocks/fx/compressor.rb
76
+ - lib/synth_blocks/fx/delay.rb
77
+ - lib/synth_blocks/fx/eq.rb
78
+ - lib/synth_blocks/fx/g_verb.rb
79
+ - lib/synth_blocks/fx/limiter.rb
80
+ - lib/synth_blocks/fx/waveshaper.rb
81
+ - lib/synth_blocks/mixer/mixer_channel.rb
82
+ - lib/synth_blocks/mixer/send_channel.rb
83
+ - lib/synth_blocks/mod/adsr.rb
84
+ - lib/synth_blocks/mod/envelope.rb
85
+ - lib/synth_blocks/sequencer/sequencer_dsl.rb
86
+ - lib/synth_blocks/synth/monosynth.rb
87
+ - lib/synth_blocks/synth/polysynth.rb
88
+ - lib/synth_blocks/utils.rb
89
+ homepage: https://rubysynth.fun
90
+ licenses:
91
+ - AGPL-3.0-only
92
+ metadata:
93
+ source_code_uri: https://github.com/halfbyte/synth_blocks
94
+ post_install_message:
95
+ rdoc_options: []
96
+ require_paths:
97
+ - lib
98
+ required_ruby_version: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: '0'
103
+ required_rubygems_version: !ruby/object:Gem::Requirement
104
+ requirements:
105
+ - - ">="
106
+ - !ruby/object:Gem::Version
107
+ version: '0'
108
+ requirements: []
109
+ rubygems_version: 3.1.2
110
+ signing_key:
111
+ specification_version: 4
112
+ summary: Building blocks for making music in pure ruby
113
+ test_files: []