Module: Partition
- Defined in:
- lib/rubySC/musique.rb
Overview
module utiliser pour faire des choses au niveau de toutes les voix.
Class Method Summary collapse
- .echelle(echelle) ⇒ Object
-
.importerJSON(nomFichierJSON, jouerBool = false) ⇒ Object
importation par JSON la structure attendue est la suivante: section (une par fichier) —– voix —– paramDeVoix.
- .importerYAML(nomFichierYAML, jouerBool = false) ⇒ Object
- .transpose(intervalle) ⇒ Object
Class Method Details
.echelle(echelle) ⇒ Object
80 81 82 83 84 85 |
# File 'lib/rubySC/musique.rb', line 80 def self.echelle echelle SC.listeVoix.each_key do |voix| SC.set true, ({"scale" => echelle}), voix end SC.updateScore end |
.importerJSON(nomFichierJSON, jouerBool = false) ⇒ Object
importation par JSON la structure attendue est la suivante: section (une par fichier)
----- voix
----- paramDeVoix
61 62 63 64 65 66 67 68 |
# File 'lib/rubySC/musique.rb', line 61 def self.importerJSON nomFichierJSON, jouerBool=false data = JSON.load File.open(nomFichierJSON) data.each do |k, v| SC.set jouerBool, v, k end end |