rubySC 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +68 -0
- data/lib/init.sc +46 -1
- data/lib/musique.rb +46 -0
- data/lib/rubySC.rb +68 -67
- data/lib/voix.rb +15 -6
- metadata +22 -21
- data/README.rdoc +0 -42
data/README.md
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
# rubySC
|
2
|
+
|
3
|
+
rubySC est une petite biliothèque qui complète à sa manière
|
4
|
+
[SCruby](https://github.com/maca/scruby) en offrant une interface avec
|
5
|
+
la bibliothèque JTLib de SuperCollider, cette dernière étant tournée
|
6
|
+
vers le live coding, et le scriptage de partition plus que la
|
7
|
+
recherche acoustique _per se_.
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
vous devez avoir installé supercollider. Pour l'instant, je n'ai testé
|
12
|
+
le programme que sur linux, et l'appel au programme est fait par une
|
13
|
+
bonne grosse commande 'system'
|
14
|
+
|
15
|
+
## Utilisation
|
16
|
+
|
17
|
+
* Un objet "SC" s'occupe de l'interface OSC avec superCollider.
|
18
|
+
|
19
|
+
`SC.demarrer`
|
20
|
+
|
21
|
+
* On ajoute des "voix", c'est-à-dire un mélange de 7 paramètres
|
22
|
+
|
23
|
+
* instrument : regardez les noms des synthdef dans "init.sc" (ils proviennent tous de recherches sur [SCcode](http://sccode.org/))
|
24
|
+
* dur : les rythmes de votre mélodie
|
25
|
+
* degree : les notes de votre mélodie
|
26
|
+
* amp : le volume de la mélodie
|
27
|
+
* octave : le registre dans lequel se situe votre voix
|
28
|
+
* root : le micro-registre, utilisé pour faire des marches par exemple
|
29
|
+
* scale : l'echelle utilisé pour votre mélodie
|
30
|
+
|
31
|
+
`SC.set paramètre(hash), :nomVoix (ou "nomVoix")`
|
32
|
+
plus précisément, avec "au clair de la lune" :
|
33
|
+
|
34
|
+
` SC.set ({ :degree => [0,0,0,1,2,1,0,2,1,1,0], :dur => [1, [1, 1, 1 , 1 ,2 ,2 ,1 ,1 ,1 ,1 ,4]]}) , :superius
|
35
|
+
SC.set ({ :degree => [[0, 2, 4], [0,3,5], [0,2,4], [1,3,4], [0,2,4], [1,3,4], [0,2,4]], :dur => [1, [2,2,2,2,2,2,4]])}, :basse`
|
36
|
+
|
37
|
+
On peut ensuite modifier ces voix
|
38
|
+
|
39
|
+
`SC.set ({ :amp => 0.2, :instrument => :wobble, :
|
40
|
+
|
41
|
+
* arrêter ou reprenez vos voix :
|
42
|
+
|
43
|
+
` mu.stop :voixUn, :voixDeux ## arrête deux voix
|
44
|
+
mu.play :voixUn ## reprend voixUn
|
45
|
+
mu.remove :all ## arrête tout et supprime les voix `
|
46
|
+
|
47
|
+
Les voix sont stockées dans 'listeVoix'
|
48
|
+
|
49
|
+
SC.listeVoix.inspect
|
50
|
+
|
51
|
+
* Deux modules stockent des fonctions plus intéressantes.
|
52
|
+
|
53
|
+
1. Partition, gère tout ce qui est transposition de masse
|
54
|
+
1. Marche, permet de transposer la mélodie d'une voix
|
55
|
+
`Marche.diatonique :nomVoix, intervalleDeMarche, nbRepetitions`
|
56
|
+
`Marche.diatonique :superius, 2, 2 ## deux marches par tierce ascendante`
|
57
|
+
|
58
|
+
* Vous pouvez essayer de rajouter des instruments dans "init.sc", ou
|
59
|
+
bien en apprenant SuperCollider, ou bien en cherchant par vous-mêmes
|
60
|
+
des plugins sur le net.
|
61
|
+
|
62
|
+
==
|
63
|
+
|
64
|
+
|
65
|
+
Copiez-le comme des gros gorets, qu'un truc un peu simple un jour
|
66
|
+
surgisse de ce monde de fous de MAOistes qui veulent détruire le monde
|
67
|
+
à force de complexitudinités...
|
68
|
+
|
data/lib/init.sc
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
//////////dictionnaire d'instruments
|
2
2
|
|
3
|
-
SynthDef(\sax, { |out, freq
|
3
|
+
SynthDef(\sax, { |out, freq, amp=0.1, gate=1|
|
4
4
|
var num = 16;
|
5
5
|
var harms = Array.series(num, 1, 1) * Array.exprand(num, 0.995, 1.001);
|
6
6
|
var snd = SinOsc.ar(freq * SinOsc.kr(Rand(2.0,5.0),0,Rand(0.001, 0.01),1) * harms, mul:Array.geom(num, 1, 0.63));
|
@@ -10,6 +10,51 @@ SynthDef(\sax, { |out, freq=440, amp=0.1, gate=1|
|
|
10
10
|
Out.ar(out, snd!2);
|
11
11
|
}).add;
|
12
12
|
|
13
|
+
SynthDef(\wobble, { arg out=0, amp=0.1, gate=1, pan=0, spread=0.8, freq, doneAction=2;
|
14
|
+
var sig, sig1, sig2, sig3;
|
15
|
+
sig1 = LFSaw.ar(freq * 1 + (0.04 * [1,-1]));
|
16
|
+
sig2 = LFSaw.ar(freq * 0.99 );
|
17
|
+
sig3 = LFSaw.ar(freq * 1 );
|
18
|
+
sig = sig1 + sig2 + sig3;
|
19
|
+
sig = (sig*50).tanh;
|
20
|
+
sig = sig * EnvGen.ar(\adsr.kr(Env.adsr(0.01,0.1,0.8,0.1)),gate,doneAction:doneAction);
|
21
|
+
sig = Splay.ar(sig, spread, amp, pan);
|
22
|
+
Out.ar(out, sig);
|
23
|
+
}).add;
|
24
|
+
|
25
|
+
SynthDef(\fatsaw,
|
26
|
+
{
|
27
|
+
arg freq=440, amp=0.3, fat=0.0033, ffreq=2000, atk=0.001, dec=0.3, sus=0.5, rls=0.1,gate=1;
|
28
|
+
|
29
|
+
var f1,f2,f3,f4,synth;
|
30
|
+
|
31
|
+
f1=freq-(freq*fat);
|
32
|
+
f2=freq-(freq*fat/2);
|
33
|
+
f3=freq+(freq*fat/2);
|
34
|
+
f4=freq+(freq*fat);
|
35
|
+
|
36
|
+
synth = LFSaw.ar([f1,f2,f3,f4],[0,0.001,0.002,0.004,0.008]);
|
37
|
+
synth = synth * EnvGen.kr(Env([0,1,sus,0],[atk,dec,rls],'lin',2),gate,doneAction:0);
|
38
|
+
synth=Splay.ar(synth,0.7);
|
39
|
+
synth=RLPF.ar(synth,ffreq*Linen.kr(gate,0.1,0.4,0.2,0),0.4);
|
40
|
+
Out.ar([0,1],synth*amp);
|
41
|
+
},[0.1,0.3,4,2]).add;
|
42
|
+
|
43
|
+
|
44
|
+
SynthDef("plucking", {arg amp = 0.1, freq = 440, decay = 5, coef = 0.1;
|
45
|
+
|
46
|
+
var env, snd;
|
47
|
+
env = EnvGen.kr(Env.linen(0, decay, 0), doneAction: 2);
|
48
|
+
snd = Pluck.ar(
|
49
|
+
in: WhiteNoise.ar(amp),
|
50
|
+
trig: Impulse.kr(0),
|
51
|
+
|
52
|
+
maxdelaytime: 0.1,
|
53
|
+
delaytime: freq.reciprocal,
|
54
|
+
decaytime: decay,
|
55
|
+
coef: coef);
|
56
|
+
Out.ar(0, [snd, snd]);
|
57
|
+
}).add;
|
13
58
|
|
14
59
|
///////// Ligne de fin pour mettre le bouzin en route
|
15
60
|
|
data/lib/musique.rb
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
load 'lib/circularList.rb'
|
3
|
+
#load 'superCollider.rb'
|
4
|
+
|
5
|
+
# fonctions de plus haut niveau
|
6
|
+
|
7
|
+
|
8
|
+
## module utiliser pour faire des choses au niveau de toutes les voix.
|
9
|
+
|
10
|
+
module Partition
|
11
|
+
|
12
|
+
def self.importer JSON
|
13
|
+
|
14
|
+
def self.echelle echelle
|
15
|
+
SC.listeVoix.each_key do |voix|
|
16
|
+
SC.set ({:scale => echelle}), voix
|
17
|
+
end
|
18
|
+
self.updateScore
|
19
|
+
end
|
20
|
+
|
21
|
+
|
22
|
+
def self.transpose intervalle
|
23
|
+
SC.listeVoix.each_key do |voix|
|
24
|
+
SC.set ({:root => intervalle}), voix
|
25
|
+
end
|
26
|
+
self.updateScore
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
30
|
+
|
31
|
+
## module pour gérer des marches.
|
32
|
+
|
33
|
+
|
34
|
+
module Marche
|
35
|
+
|
36
|
+
def self.diatonique voix, intervalle, nbFois
|
37
|
+
melodie=SC.listeVoix[voix.to_s].degree
|
38
|
+
tmp= Array.new(nbFois) do |x|
|
39
|
+
"Pseq(#{melodie.map { |note| note+intervalle*x }})"
|
40
|
+
end
|
41
|
+
tmp.delete("\"")
|
42
|
+
SC.set ({:degree => "[#{tmp.join ","}]"}), voix.to_s
|
43
|
+
end
|
44
|
+
|
45
|
+
end
|
46
|
+
|
data/lib/rubySC.rb
CHANGED
@@ -1,11 +1,15 @@
|
|
1
1
|
#! /usr/bin/ruby
|
2
2
|
# -*- coding: utf-8 -*-
|
3
3
|
|
4
|
+
load "#{File.join(File.dirname(__FILE__), "voix.rb")}"
|
5
|
+
load "#{File.join(File.dirname(__FILE__), "musique.rb")}"
|
6
|
+
|
7
|
+
require 'active_support'
|
4
8
|
require 'osc-ruby'
|
5
9
|
#require 'osc-ruby/em_server'
|
6
10
|
require 'singleton'
|
7
11
|
include ObjectSpace
|
8
|
-
|
12
|
+
|
9
13
|
|
10
14
|
|
11
15
|
## classe principale, singleton
|
@@ -15,21 +19,24 @@ load "#{File.join(File.dirname(__FILE__), "voix.rb")}"
|
|
15
19
|
# "d'ordre supérieur" qui permet de modifier plusieurs voix ensemble,
|
16
20
|
# et donc de créer de la logique musicale
|
17
21
|
|
18
|
-
class
|
22
|
+
class SC
|
19
23
|
|
20
|
-
|
24
|
+
cattr_reader :listeVoix
|
25
|
+
include Partition, Marche
|
21
26
|
|
22
27
|
# ouvre le contact avec SuperCollider
|
23
28
|
|
24
|
-
def
|
29
|
+
def self.demarrer
|
25
30
|
|
26
31
|
## démarre SuperCollider
|
32
|
+
#TODO : faire quelque chose d'un peu plus propre
|
27
33
|
|
28
34
|
unless p `ps -ef | grep "sclang" | grep -v "grep" | wc -l`.to_i > 0
|
29
35
|
system "sclang -u 57320 #{File.join(File.dirname(__FILE__), "init.sc")} &"
|
30
36
|
end
|
31
37
|
|
32
|
-
##
|
38
|
+
## TODO : En théorie, récupèrer l'adresse du port, surtout si une autre instance de
|
39
|
+
## SuperCollider existe...
|
33
40
|
|
34
41
|
# @server= OSC::EMServer.new 3333
|
35
42
|
# @server.add_method '/portSuperCollider' do |message|
|
@@ -39,115 +46,109 @@ class Musique
|
|
39
46
|
|
40
47
|
# variables et méthodes d'utilisation
|
41
48
|
|
42
|
-
|
49
|
+
@@listeVoix=Hash.new
|
43
50
|
define_finalizer(self, Proc.new {self.quit})
|
44
51
|
|
45
52
|
end
|
46
53
|
|
47
|
-
|
54
|
+
##TODO : trouver une manuère plus propre de quitter SuperCollider,
|
55
|
+
##Jack a toujours l'air de se vexer...
|
56
|
+
def self.quit
|
48
57
|
`killall scsynth sclang`
|
49
58
|
end
|
50
59
|
|
51
60
|
|
52
61
|
# fonction permettant de communiquer directement avec SuperCollider,
|
53
62
|
# ce qui permet pour qui connaît la syntaxe sclang de faire des
|
54
|
-
# ajustages directs
|
63
|
+
# ajustages directs. À ne pas utiliser normalement.
|
55
64
|
|
56
|
-
def send message
|
65
|
+
def self.send message
|
57
66
|
@postMan.send OSC::Message.new "/SC", message.to_s
|
58
67
|
end
|
59
68
|
|
60
|
-
|
61
|
-
|
62
|
-
|
69
|
+
## fonction semi-privée
|
70
|
+
|
71
|
+
def self.updateScore
|
72
|
+
@@listeVoix.each do |key, value|
|
63
73
|
value.instance_variables.each do |variable|
|
64
74
|
self.updater key, variable[1..-1], value.instance_variable_get(variable) unless value.instance_variable_get(variable).nil?
|
65
75
|
end
|
66
76
|
end
|
67
77
|
end
|
68
78
|
|
69
|
-
def updater voix, arg, value
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
self.send "Pbindef(\\#{voix}, \\#{arg}, #{value})"
|
82
|
-
end
|
79
|
+
def self.updater voix, arg, value
|
80
|
+
case arg
|
81
|
+
when "dur"
|
82
|
+
self.send "Pbindef (\\#{voix}, \\#{arg}, Pseq(#{value}.convertRhythm, inf))"
|
83
|
+
when "degree"
|
84
|
+
self.send "Pbindef(\\#{voix}, \\#{arg}, Pseq(#{value}, inf))"
|
85
|
+
when "scale"
|
86
|
+
self.send "Pbindef(\\#{voix}, \\#{arg}, Scale.#{value})"
|
87
|
+
when "instrument"
|
88
|
+
self.send "Pbindef(\\#{voix}, \\#{arg}, \\#{value})"
|
89
|
+
else
|
90
|
+
self.send "Pbindef(\\#{voix}, \\#{arg}, #{value.to_s})"
|
83
91
|
end
|
84
92
|
end
|
85
93
|
|
86
94
|
# fonctions principales
|
87
95
|
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
96
|
+
public
|
97
|
+
|
98
|
+
def self.set options={}, *voix
|
99
|
+
if voix.nil?
|
100
|
+
begin
|
101
|
+
raise ArgumentError
|
92
102
|
rescue
|
93
|
-
|
103
|
+
puts "vous devez donner un nom à votre (vos) voix"
|
94
104
|
end
|
95
|
-
elsif @listeVoix[voix.to_s].nil? then
|
96
|
-
@listeVoix[voix.to_s]=Voix.new options
|
97
|
-
else
|
98
|
-
@listeVoix[voix.to_s].set options
|
99
|
-
end
|
100
|
-
self.updateScore
|
101
|
-
self.play voix.to_s
|
102
|
-
end
|
103
|
-
|
104
|
-
def remove *args
|
105
|
-
if args[0]==:all then
|
106
|
-
args=@listeVoix.keys
|
107
105
|
end
|
108
|
-
|
109
|
-
|
106
|
+
voix.each do |voix|
|
107
|
+
p voix.to_s
|
108
|
+
if voix==:all then
|
109
|
+
begin
|
110
|
+
raise ArgumentError
|
111
|
+
rescue
|
112
|
+
puts " vous ne pouvez appeler une voix \"all\", renommez-la'"
|
113
|
+
end
|
114
|
+
elsif @@listeVoix[voix.to_s].nil? then
|
115
|
+
@@listeVoix[voix.to_s]=Voix.new options
|
116
|
+
else
|
117
|
+
@@listeVoix[voix.to_s].set options
|
118
|
+
end
|
119
|
+
self.updateScore
|
120
|
+
self.play voix.to_s
|
110
121
|
end
|
111
122
|
end
|
123
|
+
|
112
124
|
|
113
|
-
def play *args
|
125
|
+
def self.play *args
|
114
126
|
if args[0]==:all then
|
115
|
-
args
|
127
|
+
args=@@listeVoix.keys
|
116
128
|
end
|
117
129
|
args.each do |voix|
|
118
130
|
self.send "Pdef(\\#{voix.to_s}).play"
|
119
131
|
end
|
120
132
|
end
|
121
133
|
|
122
|
-
def stop *args
|
134
|
+
def self.stop *args
|
123
135
|
if args[0]==:all then
|
124
|
-
args
|
136
|
+
args=@@listeVoix.keys
|
125
137
|
end
|
126
138
|
args.each do |voix|
|
127
139
|
self.send "Pdef(\\#{voix}).stop"
|
128
140
|
end
|
129
141
|
end
|
130
|
-
|
131
|
-
### fonction Live Coding
|
132
|
-
|
133
|
-
def list
|
134
|
-
@listeVoix.each do |k, v|
|
135
|
-
puts "#{k} : #{v.inspect}"
|
136
|
-
end
|
137
|
-
end
|
138
142
|
|
139
143
|
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
144
|
+
def self.remove *args
|
145
|
+
if args[0]==:all then
|
146
|
+
args=@@listeVoix.keys
|
147
|
+
end
|
148
|
+
args.each do |voix|
|
149
|
+
self.stop voix
|
150
|
+
@@listeVoix.delete voix
|
145
151
|
end
|
146
|
-
self.updateScore
|
147
152
|
end
|
148
153
|
|
149
|
-
def grilleAccords
|
150
|
-
|
151
|
-
end
|
152
|
-
|
153
154
|
end
|
data/lib/voix.rb
CHANGED
@@ -1,26 +1,35 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
|
-
# sorte de classe privée
|
2
|
+
# sorte de classe privée pour garder en mémoire
|
3
3
|
# ce qui se passe dans les 'voix'...
|
4
4
|
|
5
5
|
class Voix
|
6
|
+
|
7
|
+
attr_reader :dur, :degree, :octave, :root, :scale, :amp, :instrument
|
6
8
|
|
7
9
|
def initialize options={}
|
8
10
|
|
11
|
+
@dur=options[:dur]
|
12
|
+
@degree=options[:degree]
|
13
|
+
@octave=options[:octave]
|
14
|
+
@root=options[:root]
|
15
|
+
|
9
16
|
if options[:scale].nil?
|
10
17
|
then @scale = "major"
|
11
18
|
else @scale=options[:scale]
|
12
19
|
end
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
@amp=options[:amp]
|
20
|
+
|
21
|
+
if options[:amp].nil?
|
22
|
+
then @amp = "Pwhite(0.2,0.5)"
|
23
|
+
else @amp=options[:amp]
|
24
|
+
end
|
25
|
+
|
17
26
|
if options[:instrument].nil?
|
18
27
|
then @instrument = "default"
|
19
28
|
else @instrument=options[:instrument].to_s
|
20
29
|
end
|
30
|
+
|
21
31
|
end
|
22
32
|
|
23
|
-
# permet de set plein d'options à la fois, ce qui est plutôt cool
|
24
33
|
def set options
|
25
34
|
options.each do |key, value|
|
26
35
|
if value.is_a? Symbol
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubySC
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,24 +9,8 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-01-
|
12
|
+
date: 2014-01-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
|
-
- !ruby/object:Gem::Dependency
|
15
|
-
name: osc-ruby
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
|
-
requirements:
|
19
|
-
- - ! '>='
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: '0'
|
22
|
-
type: :runtime
|
23
|
-
prerelease: false
|
24
|
-
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
|
-
requirements:
|
27
|
-
- - ! '>='
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: '0'
|
30
14
|
- !ruby/object:Gem::Dependency
|
31
15
|
name: shoulda
|
32
16
|
requirement: !ruby/object:Gem::Requirement
|
@@ -123,6 +107,22 @@ dependencies:
|
|
123
107
|
- - ! '>='
|
124
108
|
- !ruby/object:Gem::Version
|
125
109
|
version: '0'
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: active_support
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
114
|
+
requirements:
|
115
|
+
- - ! '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ! '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
126
126
|
description: Petite bibliotheque permettant une communication simple entre SuperCollider/JITlib
|
127
127
|
et Ruby. Se concentre avant tout sur les capacités logiques de création de mélodies
|
128
128
|
plus que sur la génération de son. Nécessite d'installer supercollider sur l'ordinateur
|
@@ -132,13 +132,14 @@ executables: []
|
|
132
132
|
extensions: []
|
133
133
|
extra_rdoc_files:
|
134
134
|
- LICENSE.txt
|
135
|
-
- README.
|
135
|
+
- README.md
|
136
136
|
files:
|
137
137
|
- lib/init.sc
|
138
|
+
- lib/musique.rb
|
138
139
|
- lib/rubySC.rb
|
139
140
|
- lib/voix.rb
|
140
141
|
- LICENSE.txt
|
141
|
-
- README.
|
142
|
+
- README.md
|
142
143
|
homepage: http://github.com/simdax/rubySC
|
143
144
|
licenses:
|
144
145
|
- MIT
|
@@ -154,7 +155,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
154
155
|
version: '0'
|
155
156
|
segments:
|
156
157
|
- 0
|
157
|
-
hash:
|
158
|
+
hash: -1688632819092793939
|
158
159
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
159
160
|
none: false
|
160
161
|
requirements:
|
data/README.rdoc
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
= rubySC
|
2
|
-
|
3
|
-
1. Créez une instance de Musique :
|
4
|
-
|
5
|
-
` mu=Musique.instance `
|
6
|
-
|
7
|
-
1. ajouter une nouvelle voix :
|
8
|
-
|
9
|
-
` mu.set :nomVoix (ou "nomVoix"), :param => valeur `
|
10
|
-
|
11
|
-
1. il y a 6 paramètres pouvant être réglés :
|
12
|
-
|
13
|
-
* instrument : pour l'instant, seulement deux ("sax" ou "default") !!
|
14
|
-
* dur : les rythmes de votre mélodie
|
15
|
-
* degree : les notes de votre mélodie
|
16
|
-
* amp : le volume de la mélodie
|
17
|
-
* octave : le registre dans lequel se situe votre voix
|
18
|
-
* scale : l'echelle utilisé pour votre mélodie
|
19
|
-
|
20
|
-
1. arrêter ou reprenez vos voix :
|
21
|
-
|
22
|
-
` mu.stop :voixUn, :voixDeux ## arrête deux voix
|
23
|
-
` mu.play :voixUn ## reprend voixUn
|
24
|
-
` mu.stop :all ## arrête tout
|
25
|
-
|
26
|
-
1. Des bêtes de méta-fonctions sont à prévoir.
|
27
|
-
|
28
|
-
== Contributing to rubySC
|
29
|
-
|
30
|
-
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
|
31
|
-
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
|
32
|
-
* Fork the project.
|
33
|
-
* Start a feature/bugfix branch.
|
34
|
-
* Commit and push until you are happy with your contribution.
|
35
|
-
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
36
|
-
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
37
|
-
|
38
|
-
== Copyright
|
39
|
-
|
40
|
-
Copyright (c) 2014 simdax. See LICENSE.txt for
|
41
|
-
further details.
|
42
|
-
|