Skip to content

Commit

Permalink
Merge pull request #601 from ethancrawford/proofreading-2
Browse files Browse the repository at this point in the history
Various spelling corrections, grammar improvements, and whitespace fixes
  • Loading branch information
samaaron committed Jul 30, 2015
2 parents a9e4ece + 3b27224 commit fd67fc1
Show file tree
Hide file tree
Showing 5 changed files with 117 additions and 118 deletions.
14 changes: 7 additions & 7 deletions app/server/sonicpi/lib/sonicpi/mods/sound.rb
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def use_sample_bpm(sample_name, *args)
doc name: :use_sample_bpm,
introduced: Version.new(2,1,0),
summary: "Sample-duration-based bpm modification",
doc: "Modify bpm so that sleeping for 1 will sleep for the duration of the sample.",
doc: "Modify bpm so that sleeping for 1 will sleep for the duration of the sample.",
args: [[:string_or_number, :sample_name_or_duration]],
opts: {:num_beats => "The number of beats within the sample. By default this is 1."},
accepts_block: false,
Expand Down Expand Up @@ -862,7 +862,7 @@ def synth(synth_name, *args)
doc name: :synth,
introduced: Version.new(2,0,0),
summary: "Trigger specific synth",
doc: "Trigger specified synth with given arguments. Bypasses current synth value, yet still honours synth defaults. ",
doc: "Trigger specified synth with given arguments. Bypasses current synth value, yet still honours synth defaults.",
args: [[:synth_name, :symbol]],
opts: {},
accepts_block: false,
Expand Down Expand Up @@ -1123,7 +1123,7 @@ def with_merged_synth_defaults(*args, &block)
end
doc name: :with_merged_synth_defaults,
introduced: Version.new(2,0,0),
summary: "Block-level merge synth defaults ",
summary: "Block-level merge synth defaults",
doc: "Specify synth arg values to be used by any following call to play within the specified `do`/`end` block. Merges the specified values with any previous defaults, rather than replacing them. After the `do`/`end` block has completed, previous defaults (if any) are restored.",
args: [],
opts: {},
Expand Down Expand Up @@ -1527,7 +1527,7 @@ def with_fx(fx_name, *args, &block)
summary: "Use Studio FX",
doc: "This applies the named effect (FX) to everything within a given `do`/`end` block. Effects may take extra parameters to modify their behaviour. See FX help for parameter details.
For advanced control, it is also possible to modify the parameters of an effect within the body of the block. If you define the block with a single argument, the argument becomes a reference to the current effect and can be used to control its parameters (see examples).",
For advanced control, it is also possible to modify the parameters of an effect within the body of the block. If you define the block with a single argument, the argument becomes a reference to the current effect and can be used to control its parameters (see examples).",
args: [[:fx_name, :symbol]],
opts: {reps: "Number of times to repeat the block in an iteration.",
kill_delay: "Amount of time to wait after all synths triggered by the block have completed before stopping and freeing the effect synthesiser." },
Expand Down Expand Up @@ -2463,12 +2463,12 @@ def chord_degree(degree, tonic, scale=:major, number_of_notes=4, *opts)
doc name: :chord_degree,
introduced: Version.new(2,1,0),
summary: "Construct chords based on scale degrees",
doc: "A helper method that returns a list of midi note numbers when given a degree (a symbol `:i`, `:ii`, `:iii`, `:iv`, `:v`, `:vi`, `:vii` or a number `1`-`7`), tonic, scale and number of notes",
doc: "A helper method that returns a ring of midi note numbers when given a degree (a symbol `:i`, `:ii`, `:iii`, `:iv`, `:v`, `:vi`, `:vii` or a number `1`-`7`), tonic, scale and number of notes",
args: [[:degree, :symbol_or_number], [:tonic, :symbol], [:scale, :symbol], [:number_of_notes, :number]],
opts: nil,
accepts_block: false,
examples: ["
puts chord_degree(:i, :A3, :major) # returns a list of midi notes - [69 73 76 80]
puts chord_degree(:i, :A3, :major) # returns a ring of midi notes - (ring 57, 61, 64, 68)
",
"play chord_degree(:i, :A3, :major)"
]
Expand Down Expand Up @@ -2845,7 +2845,7 @@ def sample_groups

def load_synthdefs(path=synthdef_path)
path = File.expand_path(path)
raise "No directory exists called #{path.inspect} " unless File.exists? path
raise "No directory exists called #{path.inspect}" unless File.exists? path
@mod_sound_studio.load_synthdefs(path)
__info "Loaded synthdefs in path #{path}"
end
Expand Down
12 changes: 6 additions & 6 deletions app/server/sonicpi/lib/sonicpi/spiderapi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ def line(start, finish, *args)
num_slices = args_h[:steps] || 4
inclusive = args_h[:inclusive]

raise "Num slices param for fn linear should be a positive none-negative whole number" unless num_slices > 0
raise "Num slices param for fn linear should be a positive non-zero whole number" unless num_slices > 0

if inclusive
step_size = (start - finish).abs.to_f / (num_slices - 1)
Expand Down Expand Up @@ -784,7 +784,7 @@ def live_loop(name=nil, *args, &block)


def at(times=0, params=nil, &block)
raise "after must be called with a do/end block" unless block
raise "at must be called with a do/end block" unless block
had_params = params
times = [times] if times.is_a? Numeric
# When no params are specified, pass the times through as params
Expand Down Expand Up @@ -853,12 +853,12 @@ def at(times=0, params=nil, &block)
end
",
"
at [0, 0.5, 2] do |t, idx| #If you the block with 2 args, and no param list to at, it will pass through both the time and the index
at [0, 0.5, 2] do |t, idx| #If you specify the block with 2 args, and no param list to at, it will pass through both the time and the index
puts [t, idx] #=> prints out [0, 0], [0.5, 1], then [2, 2]
end
",
"
at [0, 0.5, 2], [:a, :b] do |t, b, idx| #If specify the block with 3 args, it will pass through the time, the param and the index
at [0, 0.5, 2], [:a, :b] do |t, b, idx| #If you specify the block with 3 args, it will pass through the time, the param and the index
puts [t, b, idx] #=> prints out [0, :a, 0], [0.5, :b, 1], then [2, :a, 2]
end
"
Expand Down Expand Up @@ -965,7 +965,7 @@ def defonce(name, *opts, &block)
opts: {:override => "If set to true, re-definitions are allowed and this acts like define"},
accepts_block: true,
requires_block: true,
doc: "Allows you to assign the result of some code to a name with the property that the code will only execute once therefore stopping re-definitions. This is useful for defining values that you use in your compositions but you don't want to reset every time you press run. You may force the block to execute again regardless of whether or not it has executed once already by using the override option (see examples).",
doc: "Allows you to assign the result of some code to a name, with the property that the code will only execute once - therefore stopping re-definitions. This is useful for defining values that you use in your compositions but you don't want to reset every time you press run. You may force the block to execute again regardless of whether or not it has executed once already by using the override option (see examples).",
examples: ["
defonce :foo do # Define a new function called foo
Expand All @@ -980,7 +980,7 @@ def defonce(name, *opts, &block)
puts foo # The run sleeps for a beat and prints \"hello\" before returning 10
# Try it again:
puts foo # This time the run doesn't sleep or print anything out. However, 10 is still returned.
puts foo # This time the run doesn't sleep or print anything out. However, 10 is still returned.
Expand Down
Loading

0 comments on commit fd67fc1

Please sign in to comment.