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