merged with 1697 revision of trunk (which is post-rc1 but pre-rc2
[ardour.git] / manual / xml / bcf2000.xml
1 <?xml version="1.0" standalone="no"?>
2
3 <!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
4
5 ]>
6
7 <section id="sn-bcf2000">
8   <title>Using a BCF2000</title>
9   <para>
10     This will walk you through the process of configuring and using a
11     <ulink url="http://www.behringer.com/BCF2000/index.cfm">Behringer
12     BCF2000 MIDI control surface</ulink> , or BCF, with Ardour. This should
13     also work with the
14     <ulink url="http://www.behringer.com/BCR2000/index.cfm">BCR2000</ulink>,
15     but has not been tested.
16   </para>
17
18   <section id="bcf2000-connecting-device">
19     <title>Connecting Device</title>
20     <para>
21       It's assumed that your USB ports are functional under Linux. The
22       easiest way to tell if you've got a functional link is to simply
23       connect the BCF2000 to your computer with a USB cable, connect the
24       power, and turn it on. You should see the USB MODE light come on in
25       the upper right corner of the BCF. If that's not on, you'll need to
26       figure out how to make your <ulink url="http://www.linux-usb.org/">USB
27       port work under Linux.</ulink>
28     </para>
29
30     <para>
31       If the USB MODE light is on, doublecheck that Linux knows of the
32       device.
33     </para>
34 <screen>
35 xtc:~% aconnect -o
36 client 64: 'M Audio Delta 1010 MIDI - Rawmidi 0' [type=kernel]
37    0 'M Audio Delta 1010 MIDI'
38 client 72: 'BCF2000 - Rawmidi 1' [type=kernel]
39    0 'BCF2000 MIDI 1  '
40 </screen>
41   </section>
42
43   <section id="updating-firmware">
44     <title> Firmware Updating (v1.07) </title>
45     <para>
46       The first thing you're likely to have to do is update the firmware in
47       the unit. This is a relatively painless process.
48     </para>
49     <orderedlist>
50       <listitem>
51         <para>
52           Download the firmware from Behringers
53           <ulink url="http://www.behringer.com/05_support/bc_download/bc_downloads.cfm">downloads
54           page</ulink>. There will be a
55           <ulink url="http://www.behringer.com/BCF2000/bcf2000_107.zip">zip
56           file</ulink> available which should be downloaded. (This example
57           uses version 1.07 of the firmware, the latest available at the
58           time of this writing. There may be a newer version available now.)
59         </para>
60       </listitem>
61       <listitem>
62         <para>
63           Unzip the file you downloaded. You'll typically extract 2 files, a
64           PDF file with release notes and an SYX file, which is the firmware
65           update.
66         </para>
67       </listitem>
68       <listitem>
69         <para>
70           Find the system device of the BCF
71         </para>
72 <screen>
73 xtc:~% cat /proc/asound/cards
74 0 [M1010          ]: ICE1712 - M Audio Delta 1010
75                      M Audio Delta 1010 at 0xdf80, irq 
76 2 [BCF2000        ]: USB-Audio - BCF2000
77                      BEHRINGER BCF2000 at usb-00:1d.1-2, full speed
78 </screen>
79       </listitem>
80     </orderedlist>
81     <para>
82       In this case there are 2 devices. The number at the left indicates the
83       card number. The BCF is almost certain, then, to use the device
84       <filename>/dev/snd/midiCnD0</filename> where <emphasis>n</emphasis> is
85       the card number, in this case, 2.
86     </para>
87
88     <para>
89       Write the firmware to the BCF with the command
90     </para>
91 <screen>
92 cat bcf2000_1-07.syx > /dev/snd/midiC2D0        
93 </screen>
94     <important>
95       <para>
96         Make sure you use the actual device you determined in the previous
97         step
98       </para>
99     </important>
100
101     <para>
102       The BCF display will show a whirling figure-8 animation and count up
103       to 18. Once the whirling stops, you should turn off the BCF, count to
104       5, then turn it on again. You should then see the version number of
105       the upgraded firmware displayed for a few seconds as the BCF starts.
106     </para>
107   </section>
108
109   <section id="bcf2000-connecting-to-ardour">
110     <title> Connecting to Ardour </title>
111     <para>
112       After starting Ardour, it's important to connect the MIDI device ports
113       of Ardour and the BCF together so that they will communicate with each
114       other. There are a few ways to do this.
115     </para>
116
117     <section id="bcf2000-connecting-with-qjackctl">
118       <title> With qjackctl </title>
119       <para>
120         If you use the program <application>qjackctl</application> to
121         control JACK, there's an easy way to connect Ardour to the BCF. Run
122         qjackctl, and click on the <guibutton>Connect</guibutton> button in
123         the main qjackctl window. This will bring up the Connection window.
124         You should see at least 2 items listed, the BCF and Ardour:
125       </para>
126       <mediaobject>
127         <imageobject>
128           <imagedata fileref="images/con1.jpg"/>
129         </imageobject>
130       </mediaobject>
131       <para>
132         Connect the BCF output to the Ardour input, and vice versa:
133       </para>
134       <mediaobject>
135         <imageobject>
136           <imagedata fileref="images/con2.jpg"/>
137         </imageobject>
138       </mediaobject>
139       <section id="bcf2000-automating-qjackctl-connection">
140         <title> Automating the qjackctl connection </title>
141         <para>
142           You can set qjackctl to automatically make the MIDI connections
143           (and others) by using the Patchbay feature in qjackctl. Start
144           qjackctl and Ardour, and make the MIDI connections as shown above.
145           Click on the <guibutton>Patchbay</guibutton> button, then click on
146           <guibutton>New</guibutton>. Qjackctl will ask if you want to
147           create a patchbay definition as a snapshot of all actual client
148           connections. Clicking on <guibutton>Yes</guibutton> will bring in
149           a set of all ports available.
150         </para>
151         <mediaobject>
152           <imageobject>
153             <imagedata fileref="images/qjpatch.jpg"/>
154           </imageobject>
155         </mediaobject>
156         <para>
157           Make sure you've got both connections as described above, and
158           click <guibutton>Save...</guibutton> and choose a filename. Once
159           this is saved, you can close the patchbay.
160         </para>
161
162         <para>
163           Next, click on the qjackctl <guibutton>Setup</guibutton> button,
164           then click on the <guibutton>Options</guibutton> tab.
165         </para>
166         <mediaobject>
167           <imageobject>
168             <imagedata fileref="images/qjopts.jpg"/>
169           </imageobject>
170         </mediaobject>
171         <para>
172           Click on <guibutton>Activate patchbay persistence</guibutton> and
173           use the filename you used to save the patchbay above. The patchbay
174           connections will now be made after qjackctl starts up the clients.
175         </para>
176       </section>
177     </section>
178
179     <section id="bcf2000-connecting-from-command-line">
180       <title> From the command line </title>
181       <para>
182         The command <command>aconnect</command>, which is the ALSA sequencer
183         connection manager, can do the job of connecting the BCF to Ardour.
184         First find the numbers of the MIDI device ports for the two:
185       </para>
186 <screen>
187 xtc:~% aconnect -o
188 client 64: 'M Audio Delta 1010 MIDI - Rawmidi 0' [type=kernel]
189     0 'M Audio Delta 1010 MIDI'
190 client 80: 'BCF2000 - Rawmidi 2' [type=kernel]
191     0 'BCF2000 MIDI 1  '
192 client 129: 'ardour' [type=user]
193     0 'seq             '
194 </screen>
195       <para>
196         Here, the BCF is 80, and Ardour is 129. The proper connections can
197         be made between the two with two commands:
198       </para>
199 <screen>
200 xtc:~% aconnect 80:0 129:0
201 xtc:~% aconnect 129:0 80:0
202 </screen>
203     </section>
204
205     <section id="bcf2000-automatic-midi-connection">
206       <title> Automating the MIDI connection from the command line </title>
207       <para>
208         It's sometimes handy to start Ardour from the command line. I found
209         it irritating to have Ardour come up, and then have to manually make
210         the connections for the BCF. This was quickly solved by the
211         following script, which starts Ardour, finds the proper MIDI device
212         ports, and connects them:
213       </para>
214 <screen>
215 #!/bin/ksh
216 # /usr/local/bin/start_ardour.sh
217 #
218 # April 17, 2005 - Joe Hartley (jh@brainiac.com)
219 # A quick script to start Ardour and then make the MIDI connections between
220 # the BCF2000 and Ardour.
221
222 # start Ardour and give it a little time before setting the MIDI connections
223 nohup /usr/bin/ardour &amp;
224 sleep 3
225   
226 # Set the IDs - note that they'll both end with a colon
227 BCF_ID=$(aconnect -o | grep BCF2000 | grep client | awk '{print $2}')
228 ARD_ID=$(aconnect -o | grep ardour | awk '{print $2}')
229   
230 aconnect "$BCF_ID"0 "$ARD_ID"0
231 aconnect "$ARD_ID"0 "$BCF_ID"0 
232 </screen>
233       <para>
234         As an alternative to the patchbay in qjackctl, you could have it run
235         this script to start Ardour and make the MIDI connections. Click the
236         <guibutton>Setup</guibutton> button and choose the
237         <guibutton>Options</guibutton> tab. Enable the <guibutton>Execute
238         script after Startup</guibutton> option, and change the line to call
239         the <filename>start_ardour.sh</filename> script. In this example, I
240         change directories to the drive I record to so new sessions will
241         open there by default before I run the script.
242       </para>
243       <mediaobject>
244         <imageobject>
245           <imagedata fileref="qjopt.jpg"/>
246         </imageobject>
247       </mediaobject>
248     </section>
249   </section>
250
251   <section id="bcf2000-programming">
252     <title> Programming the BCF2000 for effective use </title>
253     <para>
254       One problem that I ran into with the BCF2000 was that none of the
255       factory presets really did what I needed to control Ardour. I had a
256       modest set of things I wanted to use the BCF to control for a track:
257     </para>
258
259     <itemizedlist>
260       <listitem>
261         <para>
262           Volume
263         </para>
264       </listitem>
265
266       <listitem>
267         <para>
268           Panning
269         </para>
270       </listitem>
271
272       <listitem>
273         <para>
274           Mute, solo and rec-enable
275         </para>
276       </listitem>
277
278       <listitem>
279         <para>
280           Transport (play, stop, ffwd, rewind)
281         </para>
282       </listitem>
283     </itemizedlist>
284
285     <para>
286       Preset 2 (P2), the Simple Mixer, was almost there, but I could not map
287       the mute, solo and rec-enable controls in Ardour to a pushbutton on
288       the BCF. This was because in P2, the buttons sent a Program Change
289       signal, but Ardour expects a Control Change signal. This required
290       re-programming the BCF a bit. Here's a list of the controls and what I
291       mapped them to send:
292     </para>
293
294     <itemizedlist>
295       <listitem>
296         <para>
297           Rotary knobs 1 through 8, when pressed: CC33 through CC40
298         </para>
299       </listitem>
300
301       <listitem>
302         <para>
303           First row of buttons: CC65 through CC72
304         </para>
305       </listitem>
306
307       <listitem>
308         <para>
309           second row of buttons: CC73 through CC80
310         </para>
311       </listitem>
312     </itemizedlist>
313
314     <para>
315       Here's a quick walkthrough to program the controls on the BCF. First
316       we'll do the rotary knobs:
317     </para>
318     <orderedlist>
319       <listitem>
320         <para>
321           Hold down the EDIT button and press the rotary control. The
322           display will show b1.
323         </para>
324       </listitem>
325       <listitem>
326         <para>
327           Turn the rotary control labeled "TYPE" until the display reads
328           "CC".
329         </para>
330       </listitem>
331       <listitem>
332         <para>
333           Turn the rotary control labeled "PAR" until the display reads
334           "33".
335         </para>
336       </listitem>
337       <listitem>
338         <para>
339           Turn the rotary control labeled "MODE" until the display reads "t
340           on".
341         </para>
342       </listitem>
343       <listitem>
344         <para>
345           Press the EXIT button.
346         </para>
347       </listitem>
348     </orderedlist>
349     <para>
350       Continue to program the other rotary controls in the same way,
351       incrementing the value set by the "PAR" control by 1 each time. This
352       will set the CC parameter for the second knob to 34, the third knob to
353       35, and so on.
354     </para>
355
356     <para>
357       The steps are the same for the two rows of pushbuttons under the
358       rotary knobs. The CC values for the first row of buttons run from 65
359       to 72, and from 73 to 80 for the second row.
360     </para>
361
362     <para>
363       Finally, you need to store these changes so that they'll be kept even
364       when the BCF has its power cycled.
365       <orderedlist>
366         <listitem>
367           <para>
368             Press the STORE button. Its LED will start to flash.
369           </para>
370         </listitem>
371         <listitem>
372           <para>
373             Select a different preset number if you wish with the left and
374             right PRESET buttons.
375           </para>
376         </listitem>
377         <listitem>
378           <para>
379             Press STORE again to write the settings to an empty preset. If
380             you want to overwrite an existing preset, press STORE twice. You
381             can cancel the store at any time by pressing EXIT.
382           </para>
383         </listitem>
384       </orderedlist>
385     </para>
386
387     <para>
388       Your BCF2000 is now ready to control Ardour!
389     </para>
390
391     <section id="bcf2000-preconfigured-preset-file">
392       <title> Preconfigured Preset File </title>
393       <para>
394         Here is a <ulink url="http://zappa.brainiac.com/preset1.syx">saved
395         preset file</ulink>, which has the definitions described above. You
396         can use <command>amidi</command> to load this into the BCF as
397         <xref linkend="bcf2000-loading-a-preset"/>.
398       </para>
399     </section>
400   </section>
401
402   <section id="bcf2000-mapping-ardour-controls">
403     <title> Mapping Ardour controls to the BCF2000 </title>
404     <para>
405       The final step to control surface Nirvana is to map the controls in
406       Ardour to the knobs, buttons and faders on the BCF.
407     </para>
408
409     <para>
410       Before you can map things properly, you'll need to set the MIDI
411       options within Ardour. In the Editor window of Ardour, choose
412       <menuchoice> <guimenu>Windows</guimenu> <guisubmenu>Options
413       Editor</guisubmenu> </menuchoice>. Make sure the seq device is online,
414       and make sure <guibutton>MTC</guibutton>, <guibutton>MMC</guibutton>
415       and <guibutton>MIDI Parameter Control</guibutton> is set for the seq
416       device. Also make sure that the 4 boxes below are checked:
417     </para>
418
419     <itemizedlist>
420       <listitem>
421         <para>
422           <guibutton>MMC control</guibutton>
423         </para>
424       </listitem>
425
426       <listitem>
427         <para>
428           <guibutton>MIDI parameter control</guibutton>
429         </para>
430       </listitem>
431
432       <listitem>
433         <para>
434           <guibutton>Send MMC</guibutton>
435         </para>
436       </listitem>
437
438       <listitem>
439         <para>
440           <guibutton>Send MIDI parameter feedback</guibutton>
441         </para>
442       </listitem>
443     </itemizedlist>
444     <mediaobject>
445       <imageobject>
446         <imagedata fileref="images/midiopts.jpg"/>
447       </imageobject>
448     </mediaobject>
449     <para>
450       Now you're ready to do the actual mapping. This is a pretty simple
451       process, all controlled with a <keycombo><keycap>Ctrl</keycap>
452       <mousebutton>Button2</mousebutton> </keycombo> click. This will pop up
453       a little window which says <guilabel>operate MIDI controller
454       now</guilabel>. Simply press the BCF button (or move the slider) that
455       you want to have control the Ardour function.
456     </para>
457
458     <section id="bcf2000-example">
459       <title>Example</title>
460       <para>
461         We want to map the Master fader in Ardour to the first slider on the
462         BCF. Hold down the <keycap>Ctrl</keycap> key on your keyboard, and
463         click with <mousebutton>Button2</mousebutton> on the Master fader in
464         Ardour. You should see the <guilabel>operate MIDI controller
465         now</guilabel>. Move the first slider on the BCF up or down a bit.
466         The window should disappear, and you should see the master fader
467         move up and down as you move the slider on the BCF. If that works,
468         move the fader in Ardour with your mouse. You should see the slider
469         on the BCF move up and down in tandem with the Master fader!
470       </para>
471
472       <para>
473         If the "operate MIDI controller now" window does not go away, there
474         is no connection between Ardour and the BCF. Make sure you've
475         properly connected the two as outlined in the Connecting to Ardour
476         section.
477       </para>
478     </section>
479
480     <section id="bcf2000-transport-controls">
481       <title> Transport Controls </title>
482       <para>
483         The 4 buttons in the lower right corner are already mapped in Preset
484         2 to the MMC transport controls Home (or rewind to the beginning of
485         the session), Fast Forward, Stop and Play, as shown here.
486       </para>
487       <mediaobject>
488         <imageobject>
489           <imagedata fileref="images/transctls.jpg"/>
490         </imageobject>
491       </mediaobject>
492     </section>
493   </section>
494
495   <section id="bcf2000-saving-and-loading-presets">
496     <title> Saving and Loading Presets </title>
497     <para>
498       After beating my head against a wall trying to get various programs
499       that handle SysEx messages to do what I wanted, I realized that once
500       again, the simplest way for me to do this the first time through is
501       from the command line. <glossterm linkend="gt-alsa">ALSA</glossterm>
502       provides the perfect tool for saving and loading files:
503       <command>amidi</command>
504     </para>
505
506     <para>
507       First, use <command>amidi</command> to list the available ports:
508     </para>
509 <screen>
510 xtc:~% amidi -l
511 Device    Name
512 hw:0,0    M Audio Delta 1010 MIDI
513 hw:2,0,0  BCF2000 MIDI 1
514 </screen>
515     <para>
516       There's the BCF, at port hw:2 (we can ignore everything after the
517       first number after the colon). We'll tell amidi to use this port with
518       the -p option
519     </para>
520
521     <section id="bcf2000-saving-a-preset">
522       <title> Saving a Preset </title>
523       <para>
524         There's 2 parts to saving a preset: telling the BCF to send the
525         data, and telling the computer to accept it.
526       </para>
527
528       <section id="bcf2000-recieving-the-data">
529         <title> Receiving the Data </title>
530         <para>
531           Run <command>amidi</command>, using the <option>-p</option> option
532           to specify the port, and the <option>-r</option> option to receive
533           the date into.
534         </para>
535 <screen>
536 xtc:~% amidi -p hw:2 -r preset1.syx
537 </screen>
538         <para>
539           The system will collect data from the MIDI port now until it's
540           told to stop with a
541           <keycombo><keycap>Ctrl</keycap><keycap>C</keycap> </keycombo> so
542           it's time to send some data.
543         </para>
544       </section>
545
546       <section id="bcf2000-sending-the-data">
547         <title> Sending the Data </title>
548         <para>
549           To send the MIDI data for the current preset to the computer, hold
550           down the Edit key on the BCF and press the Store button. They
551           should both stay lit and the display should read
552 <screen>
553         EG
554 </screen>
555           . This is the Global Edit mode.
556         </para>
557
558         <para>
559           You can choose whether to send the current preset's data or the
560           data for all 32 presets by turning the Mode knob, #6, and
561           selecting either
562 <screen>
563         All
564 </screen>
565           or
566 <screen>
567         SnGl
568 </screen>
569           . When ready to send the data, press knob 6. The display on the
570           BCF will circle around while it's sending data, and return to
571 <screen>
572         EG
573 </screen>
574           when complete. At this point,
575           <keycombo><keycap>Ctrl</keycap><keycap>C</keycap> </keycombo> out
576           of amidi. You'll see a report on the amount of data read:
577         </para>
578 <screen>
579 xtc:~% amidi -p hw:2 -r preset1.syx
580 13169 bytes read
581  
582 xtc:~% ls -l preset1.syx 
583 -rw-r--r--    1 jh       jh          13169 May  1 22:14 preset1.syx
584 </screen>
585         <para>
586           The data for the preset is now saved in the file
587           <filename>preset1.syx</filename>. Press Exit on the BCF to exit
588           the Global Edit mode.
589         </para>
590       </section>
591     </section>
592
593     <section id="bcf2000-loading-a-preset">
594       <title> Loading a Preset </title>
595       <para>
596         Loading a .syx file, such as the one saved above, is very simple.
597         First, select the preset on the BCF to choose the preset to
598         overwrite. Then call <command>amidi</command> using the
599         <option>-s</option> option instead of <option>-r</option> to send a
600         file.
601       </para>
602 <screen>
603 xtc:~% amidi -p hw:2 -s preset1.syx
604 </screen>
605       <para>
606         There will be a quick left-to-right flash of the encoder LEDs along
607         the top of the BCF, followed by the display circling around until
608         the data is loaded. It will then display the preset number again.
609       </para>
610
611       <para>
612         The preset is now loaded with the settings from the file. They are
613         only active as long as the preset is not changed. If you go to
614         another preset and back to the one you loaded, all the changes will
615         have disappeared. To save the settings,
616       </para>
617       <orderedlist>
618         <listitem>
619           <para>
620             Press the STORE button. Its LED will start to flash.
621           </para>
622         </listitem>
623         <listitem>
624           <para>
625             Select a different preset number if you wish with the left and
626             right PRESET buttons.
627           </para>
628         </listitem>
629         <listitem>
630           <para>
631             Press STORE again to write the settings to an empty preset. If
632             you want to overwrite an existing preset, press STORE twice. You
633             can cancel the store at any time by pressing EXIT.
634           </para>
635         </listitem>
636       </orderedlist>
637     </section>
638   </section>
639
640   <section id="bcf2000-bcedit">
641     <title> Using BCEdit </title>
642     <para>
643       The tool provided by Behringer to manage presets and other things on
644       the BCF is the Java program
645       <ulink url="http://www.behringer.com/05_support/bc_download/bc_downloads.cfm">BCEdit</ulink>.
646       This program will start up under Linux provided the correct version of
647       Java is used. I've found that
648       <ulink url="http://java.sun.com/j2se/1.5.0/download.jsp">JRE 5.0
649       Update 2</ulink> starts up correctly, but earlier versions of 5.0 will
650       not.
651       <ulink url="http://behringer-en.custhelp.com/cgi-bin/behringer_en.cfg/php/enduser/std_alp.php?sm=2">The
652       Behringer support page</ulink> says that the "editor software was
653       originally developed under J2SE-1_4_2_05". I tested it with
654       J2RE1.4.2_08 and BCEdit started, but was unable to see the BCF when
655       the "Scan" button was pressed. Running under JRE_1.5.0_02, pressing
656       the "Scan" button found the BCF, and I was able to load presets from
657       the BCF to BCEdit, but when I simply renamed the preset and tried to
658       write it back to the BCF, I got a Timeout Error while sending "$rev
659       F1" in the application.
660     </para>
661
662     <para>
663       At this point, I don't consider <application>BCEdit</application> to
664       be fully usable under Linux yet.
665     </para>
666   </section>
667 <!--
668         <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 
669                 href="Some_Subsection.xml" />
670         -->
671 </section>