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
68 69 70 71 72 73 |
# File 'lib/rubySC/musique.rb', line 68 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
49 50 51 52 53 54 55 56 |
# File 'lib/rubySC/musique.rb', line 49 def self.importerJSON nomFichierJSON, jouerBool=false data = JSON.load File.open(nomFichierJSON) data.each do |k, v| SC.set jouerBool, v, k end end |