Debian Codegraph @

doc-en/source/src/api/Interface/cpoly.rst

raw
1 cpoly : creates two popup menus used as polyphony manager
2 =========================================================
3
4 Initline
5 ---------
6
7 .. code::
8
9 cpoly(name='poly', label='Polyphony', min=1, max=10, init=1, help='')
10
11 Description
12 ------------
13
14 cpoly is a widget conceived to help manage the voice polyphony of a
15 module. cpoly comes with a popup menu that allows the user to choose how
16 many instances (voices) of a process will be simultaneously playing. It
17 also provides another popup to choose the type of polyphony (phasing,
18 chorus, out-of-tune or one of the provided chords).
19
20 cpoly has two values that are passed to the processing module: the number
21 of voices and the voice spread. The number of voices can be collected
22 using `self.number_of_voices`. `self.polyphony_spread` gives access to
23 the transposition factors defined by the type of polyphony.
24
25 If a csampler is used, you don't need to take care of polyphony, it's
26 automatically handled inside the csampler. Without a csampler, user can
27 retrieve polyphony popups values with these builtin reserved
28 variables :
29
30 **self.number_of_voices**: int
31 Number of layers of polyphony
32 **self.polyphony_spread**: list of floats
33 Transposition factors as a list of floats
34 **self.polyphony_scaling**: float
35 An amplitude factor based on the number of voices
36
37 Notes
38 -------
39
40 The cpoly interface object and its associated variables can be used in
41 the dsp module any way one sees fit.
42
43 No more than one `cpoly` can be declared in a module.
44
45 Parameters
46 -----------
47
48 **name**: str
49 Name of the widget.
50 **label**: str
51 Label shown in the interface.
52 **min**: int
53 Minimum value for the number of layers slider.
54 **max**: int
55 Maximum value for the number of layers slider.
56 **init**: int
57 Initial value for the number of layers slider.
58 **help**: str
59 Help string shown in the cpoly tooltip.
60
61