# Play all SonicPi included samples # Get the list of all available sample categories sample_categories = sample_groups # Iterate through each category sample_categories.each do |category| # Get the list of samples in the category samples = sample_names category # Iterate through each sample in the category samples.each do |sample_name| # Use a comment to indicate the current sample puts "Playing Sample: #{sample_name}" # Play the sample sample sample_name # Sleep for clarity between samples sleep 4 end end