Tocando escalas musicais

Escalas
Podemos instruir o Sonic Pi a tocar escalas musicais inteiras ou escolher notas dentro de escalas específicas.

use_synth :dpulse
play_pattern_timed scale(:g1, :enigmatic, num_octaves: 5), 0.1, release: 0.2



use_bpm 96
64.times do
  use_synth :tb303
  play scale(:e0, :enigmatic, num_octaves: 1).choose,
    wave: 1, attack: 0.3, release: 0.4, amp: 1.6
  sleep 0.75
end



#scales: toca sequências de todas as escalas musicais
use_bpm 360
live_loop :playScales do
  myScale = (ring :diatonic, :ionian, :major, :dorian, :phrygian, :lydian, :mixolydian, :aeolian, :minor, :locrian, :hex_major6, :hex_dorian, :hex_phrygian, :hex_major7, :hex_sus, :hex_aeolian, :minor_pentatonic, :yu, :major_pentatonic, :gong, :egyptian, :shang, :jiao, :zhi, :ritusen, :whole_tone, :whole, :chromatic, :harmonic_minor, :melodic_minor_asc, :hungarian_minor, :octatonic, :messiaen1, :messiaen2, :messiaen3, :messiaen4, :messiaen5, :messiaen6, :messiaen7, :super_locrian, :hirajoshi, :kumoi, :neapolitan_major, :bartok, :bhairav, :locrian_major, :ahirbhairav, :enigmatic, :neapolitan_minor, :pelog, :augmented2, :scriabin, :harmonic_major, :melodic_minor_desc, :romanian_minor, :hindu, :iwato, :melodic_minor, :diminished2, :marva, :melodic_major, :indian, :spanish, :prometheus, :diminished, :todi, :leading_whole, :augmented, :purvi, :chinese, :lydian_minor).tick
  # ou myScale = scale_names.tick
  puts "scale: #{myScale}..."
  use_synth :piano
  play_pattern scale(:C3, myScale), amp: 5
  sleep 8
end

Mais informações sobre escalas musicais:
definição escalas >
lista de escalas >
lista de escalas e acordes >

play_pattern_timed scale(:c3, :major_pentatonic, num_octaves: 3), 0.125, release: 0.1