File: cec_midi.html

package info (click to toggle)
cecilia 2.0.5-2.2
  • links: PTS
  • area: main
  • in suites: squeeze, wheezy
  • size: 4,452 kB
  • ctags: 833
  • sloc: tcl: 9,786; sh: 1,097; makefile: 69; csh: 13
file content (123 lines) | stat: -rw-r--r-- 5,656 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<HTML>
<HEAD>
   <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
   <META NAME="GENERATOR" CONTENT="Mozilla/4.03 [en] (X11; I; IRIX 6.3 IP32) [Netscape]">
   <TITLE>CEC_midi</TITLE>
</HEAD>
<BODY>

<CENTER></CENTER>

<CENTER><IMG SRC="help.gif" ></CENTER>

<CENTER>
<H4>
<B><A HREF="index.html">HELP INDEX</A></B></H4></CENTER>

<CENTER>
<HR></CENTER>

<H4>
<U>NAME</U></H4>
<B>cmidi</B> - Creation of midi input control port.
<H4>
<U>SYNOPSIS</U></H4>

<PRE><B>cmidi</B> name ?options?</PRE>

<H4>
<U>OPTIONS</U></H4>
<TT><B>-label</B>&nbsp;&nbsp;&nbsp; <I>character string<BR>
</I></TT><I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</I>will replace the name label besides or underneath the slider.<I> ;default&nbsp;&nbsp;&nbsp;&nbsp;
none</I>

<P><TT><B>-event</B>&nbsp;&nbsp;&nbsp; <I>pbend | touch | veloc | notnum
|ctrl[1-127]</I></TT><I>&nbsp;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</I>determines the rtype of midi event that will control the parameter
<I>;default&nbsp;&nbsp;&nbsp;&nbsp; notnum</I>
<BR><BR>
<TT><B>-channel</B>&nbsp; <I>1 to 16<BR>
</I></TT><I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</I>the channel; number on which this event will arrive<BR>
<TT><B>-min</B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <I>int | float<BR>
</I></TT><I>&nbsp;&nbsp;</I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
determines the minimum value of the slider&nbsp;<I> ;default&nbsp;&nbsp;&nbsp;&nbsp;
0</I>
<BR><I>&nbsp;<BR>
</I><TT><B>-max</B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <I>int | float<BR>
</I></TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
determines the maximum value of the slider&nbsp;<I> ;default&nbsp;&nbsp;&nbsp;&nbsp;
127</I>

<P><TT><B>-init</B>&nbsp;&nbsp;&nbsp;&nbsp; <I>int | float between min
and max<BR>
</I></TT><I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</I>determines the initial value of the slider.<I>&nbsp; ;default&nbsp;&nbsp;&nbsp;&nbsp;
0 | -min</I>
<BR><I></I>&nbsp;
<H4>
<U>DESCRIPTION</U></H4>
The <B>cmidi</B> command creates an automatic Csound midi setup where the
value of a midi event is passed on to the orchestra via a global "gk[name]"
variable. The <B>cmidi</B> object varies from other Cecilia objects in
that it does not create an interface object except a "lag time" slider
that smoothes continuous midi input. The <B>cmidi</B> object is meant to
be used primarily as an interface to a JLCooper MidiFader unit but will
understand any kind of midi channel voice message. The values from the
midi events (0-127) will be scaled between <B>min</B> and <B>max </B>.

<P>When the orchestra and score are compiled, the <B>cmidi</B> object creates
its own instruments to preprocess midi information within Csound. This
is not normally seen by the user.

<P>Remember that a midi instrument must be launched with a midi note-on
message for it to transmit any data. Therefor, if a pitch bend message
is used to control a variable, the pitchbend data will be accepted <B>only</B>
if there is a currently active midi note. A good way to get around this
problem is to program the desired JLCooper fader to delivers midi note-on
messages. The user can then specify the velocity received as the data carrier.
This way, a note-on message will always be sent along with the desired
velocity data.

<P>A regular <B>cslider</B> is always produced along with a <B>cmidi</B>.
That slider is used to set a portamento or lag value for the midi data.
The portamento value is issued automatically at init time only.

<P>An option menu is also produced with the options: <B>practice, midi_record,
playback, load and save</B>. The user can record any midi event with <B>midi_record</B>
and replay them with <B>playback</B>. A given stream can be saved under
any name with <B>save</B> and recalled with <B>load</B>. <B>Practice</B>
allows to simply play the sliders without recording.

<P>&nbsp;<B>It is compulsory</B>, when using the <B>cmidi</B> object to
also declare a "total_time" <B>cslider</B>.&nbsp;<BR>
<BR>
<H4>
<U>EXAMPLE</U></H4>
The definition:
<PRE>&nbsp;<B>cmidi</B> pitch -ev veloc -ch 16&nbsp; -min 0 -max 45 -init 10</PRE>
sets up a midi input stream that communicates with the orchestra through
the global variable&nbsp; <I>"gkpitch"</I> along with a <I>portamento</I>
slider named <I>lag-pitch</I>. Data will be read from the velocity value
of any note-on message received on channel 16. The data will be scaled,
on a base of 0 to 127 to the a value between 0 and 45. The value of <I>gkpitch</I>
is initialized at 10.

<P>The definition:
<PRE>&nbsp;<B>cec_midi</B> amp -ev ctrl38 -ch 16 -min .5 -max 10 -init 10</PRE>
sets up a midi input stream named <I>"gkamp"</I> along with a <I>portamento</I>
slider named <I>lag-amp</I>. Data will be read from the value of controller
#38 received on channel 16. <B>No data will be received</B> if there is
no currently active note on channel 16. A midi keyboard or another computer
can be used to send midi note-on events just before the controller data
is needed.&nbsp;<BR>
<BR>
<BR>
<BR>
<HR>
<BR>Copyright 1996&nbsp; - 97
</BODY>
</HTML>