Skip to content

Replace rand_type with use_random_source in lang reference entry for the latter #3426

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app/server/ruby/lib/sonicpi/lang/core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3669,11 +3669,11 @@ def use_random_source(noise_type, &block)

You can see the 'buckets' that the numbers between 0 and 1 fall into with the following code:

rand_type :white
use_random_source :white
puts 10000.times.collect { rand.round(1) }.tally.sort
rand_type :pink
use_random_source :pink
puts 10000.times.collect { rand.round(1) }.tally.sort
rand_type :perlin
use_random_source :perlin
puts 10000.times.collect { rand.round(1) }.tally.sort

",
Expand Down
Loading