This file is indexed.

/usr/share/fweelin/coreinterface.xml is in freewheeling 0.6-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
<interface>
  <bindings>
  <!--

  This is the bindings part of the configuration file. Here you can 
  specify how FreeWheeling responds to the input commands you give it.

  -->

    <!-- Variables -->

    <!-- Note: You can't declare one variable with an initial value based on
               another variable. All init values must be scalar numbers. 

               So the following will not work:
               <declare var="VAR_my_variable" type="int" init="VAR_my_other+1"/> 
      -->

    <!-- Display IDs- so we can refer to displays for turning them on/off -->
    <declare var="DISPLAY_browser_patch" type="int" init="0"/>
    <declare var="DISPLAY_browser_loop" type="int" init="1"/>
    <declare var="DISPLAY_browser_scene" type="int" init="2"/>
    <declare var="VAR_max_browser" type="int" init="2"/>
    <declare var="VAR_cur_browser" type="int" init="0"/>

    <declare var="DISPLAY_loop_tray" type="int" init="10"/>
    <declare var="DISPLAY_scenes" type="int" init="2000"/>

    <!-- Show sync panel? -->
    <declare var="VAR_syncpanel_show" type="int" init="0"/>
    <declare var="VAR_numsync_per_pulse" type="int" init="1"/>
    <declare var="VAR_synctype" type="int" init="0"/>
    <declare var="VAR_midisync" type="int" init="0"/>

    <declare var="VAR_keyheld_up" type="char" init="0"/>
    <declare var="VAR_keyheld_down" type="char" init="0"/>
    <declare var="VAR_keyheld_shift" type="char" init="0"/>
    <declare var="VAR_keyheld_ctrl" type="char" init="0"/>
    <declare var="VAR_keyheld_alt" type="char" init="0"/>
    <declare var="VAR_keyheld_space" type="char" init="0"/>

    <declare var="VAR_switch_on" type="range" init="64>127"/>
    <declare var="VAR_switch_off" type="int" init="0"/>

    <declare var="VAR_overdubmode" type="char" init="0"/>
    <declare var="VAR_overdubfeedback" type="float" init="0.8"/>

    <!-- Range of audio inputs -->
    <declare var="VAR_inputs" type="range" init="1>4"/>
    <declare var="VAR_zero_keysym" type="int" init="48"/>
    <!-- Range of snapshots adjustable by keyboard -->
    <declare var="VAR_snaps" type="range" init="1>9"/>

    <declare var="VAR_switch_metronome" type="char" init="0"/>

    <declare var="VAR_cutmode" type="char" init="0"/>
    <declare var="VAR_shotmode" type="char" init="0"/>

    <declare var="VAR_xferloop" type="char" init="0"/>
    <declare var="VAR_xferidx" type="int" init="0"/>

    <!-- Development mode sets options that I use for development, testing, 
         and playing. I don't recommend you use it. -->
    <declare var="VAR_develmode" type="char" init="0"/>

    <declare var="VAR_auto_loop_save" type="char" init="0"/>

    <!-- HELP: Keys listed in [] are for laptop keyboard mode -->
    <!-- Laptop keyboard mode reorganizes keys for smaller keyboards that
         are missing some keys. -->
    <declare var="VAR_laptopkeymode" type="char" init="1"/>

    <declare var="VAR_videofullscreen" type="char" init="0"/>

    <declare var="VAR_showdebuginfo" type="char" init="0"/>
    <declare var="VAR_helppage" type="char" init="0"/>
    <declare var="VAR_showinterface" type="int" init="1"/>

    <declare var="VAR_loopid_default_range" type="range" init="600>1000"/>

    <!-- How fast do loop volumes slide (when active) -->
    <declare var="VAR_slide_speed" type="float" init="0.3"/>

    <!-- How much are loop amplitudes adjusted when operating on entire
         selections? -->
    <declare var="VAR_loopamp_adj" type="float" init="0.9"/>

    <declare var="VAR_channelrange" type="range" init="0>15"/>

    <!-- What to do on startup -->
    <binding input="start-freewheeling"
     output1="set-auto-loop-saving"
     parameters1="save=VAR_auto_loop_save"
     output2="set-default-loop-placement"
     parameters2="looprange=VAR_loopid_default_range"
     output3="video-switch-interface"
     parameters3="interfaceid=VAR_showinterface"/>

    <!-- Subroutine 100- Display browser with given ID -->
    <binding input="go-sub" conditions="sub=100"
     output1="video-show-display" parameters1="interfaceid=0 and
                                               displayid=VAR_cur_browser and
                                               show=0"
     output2="set-variable" parameters2="var=VAR_cur_browser and 
                                         value=param1"
     output3="video-show-display" parameters3="interfaceid=0 and
                                               displayid=VAR_cur_browser and
                                               show=1"/>

    <!-- HELP: Esc: Exit -->
    <binding input="key" conditions="key=escape and keydown=1"
     output="exit-freewheeling"/>

    <!-- HELP: / key: Toggle help -->
    <binding input="key" conditions="key=slash and keydown=1"
     output1="toggle-variable" parameters1="var=VAR_helppage and
                                            maxvalue=SYSTEM_num_help_pages"
     output2="video-show-help" parameters2="page=VAR_helppage"/>      

    <!-- HELP: [Shift + enter] KP enter: Toggle debug info -->
    <binding input="key" conditions="VAR_laptopkeymode=1 and
                                     VAR_keyheld_shift=1 and key=return and
                                     keydown=1"
     output1="toggle-variable" parameters1="var=VAR_showdebuginfo and 
                                            maxvalue=1"
     output2="show-debug-info" parameters2="show=VAR_showdebuginfo"/>      
    <binding input="key" conditions="key=enter and keydown=1"
     output1="toggle-variable" parameters1="var=VAR_showdebuginfo and 
                                            maxvalue=1"
     output2="show-debug-info" parameters2="show=VAR_showdebuginfo"/>      

    <!-- HELP: [F3] Pause: Toggle full screen -->
    <binding input="key" conditions="VAR_laptopkeymode=1 and 
                                     key=f3 and keydown=1"
     output1="toggle-variable" parameters1="var=VAR_videofullscreen and
                                            maxvalue=1"
     output2="video-full-screen" parameters2="fullscreen=VAR_videofullscreen"/>      
    <binding input="key" conditions="key=pause and keydown=1"
     output1="toggle-variable" parameters1="var=VAR_videofullscreen and
                                            maxvalue=1"
     output2="video-full-screen" parameters2="fullscreen=VAR_videofullscreen"/> 

    <!-- HELP: [F4] PrintScreen: Toggle record to disk -->
    <binding input="key" conditions="VAR_laptopkeymode=1 and 
                                     key=f4 and keydown=1"
     output="toggle-disk-output"/>
    <binding input="key" conditions="key=printscreen and keydown=1"
     output="toggle-disk-output"/>

    <!-- This binding toggles development mode. -->
    <binding input="key" conditions="VAR_keyheld_ctrl=1 and key=d and keydown=1"
     output="toggle-variable" parameters="var=VAR_develmode and maxvalue=1"/>

    <!-- This binding is for development and 
         starts disk output from a MIDI keyboard. -->
    <binding input="midikey" 
     conditions="notenum=47 and VAR_develmode=1 and keydown=1"
     output="toggle-disk-output"/>

    <!-- This binding (development) triggers a MIDI note from the QWERTY
         keyboard. -->
    <binding input="key" conditions="key=d and VAR_develmode=1"
     output="midikey" parameters="keydown=keydown and outport=1 and 
                                  midichannel=0 and 
                                  notenum=37 and velocity=127"/>

    <!-- Early bindings- LOOPS -->
    <binding input="key" conditions="VAR_keyheld_shift=1 and
                                     key=VAR_snaps+VAR_zero_keysym and
                                     keydown=1"
     output="create-snapshot" 
     parameters="snapid=key-VAR_zero_keysym-1+SYSTEM_snapshot_page_firstidx"/>
    <binding input="key" conditions="VAR_keyheld_ctrl=1 and
                                     key=VAR_snaps+VAR_zero_keysym and
                                     keydown=1"
     output="trigger-snapshot" 
     parameters="snapid=key-VAR_zero_keysym-1+SYSTEM_snapshot_page_firstidx"/>
    <binding input="key" conditions="VAR_keyheld_alt=1 and
                                     key=VAR_snaps+VAR_zero_keysym and
                                     keydown=1"
     output="rename-snapshot" 
     parameters="snapid=key-VAR_zero_keysym-1+SYSTEM_snapshot_page_firstidx"/>

    <binding input="key" conditions="VAR_keyheld_shift=1 and
                                     key=zero and
                                     keydown=1"
     output="create-snapshot" 
     parameters="snapid=9+SYSTEM_snapshot_page_firstidx"/>
    <binding input="key" conditions="VAR_keyheld_ctrl=1 and
                                     key=zero and
                                     keydown=1"
     output="trigger-snapshot" 
     parameters="snapid=9+SYSTEM_snapshot_page_firstidx"/>
    <binding input="key" conditions="VAR_keyheld_alt=1 and
                                     key=zero and
                                     keydown=1"
     output="rename-snapshot" 
     parameters="snapid=9+SYSTEM_snapshot_page_firstidx"/>

    <binding input="key" conditions="VAR_keyheld_ctrl=1 and key=comma and 
                                     keydown=1"
     output="video-show-snapshot-page" parameters="interfaceid=0 and
                                                   displayid=DISPLAY_scenes and
                                                   page=-1"/>
    <binding input="key" conditions="VAR_keyheld_ctrl=1 and key=period and 
                                     keydown=1"
     output="video-show-snapshot-page" parameters="interfaceid=0 and
                                                   displayid=DISPLAY_scenes and
                                                   page=1"/>

    <binding input="key" conditions="VAR_keyheld_shift=1 and key=comma and 
                                     keydown=1"
     output="video-show-snapshot-page" parameters="interfaceid=0 and
                                                   displayid=DISPLAY_scenes and
                                                   page=-1"/>
    <binding input="key" conditions="VAR_keyheld_shift=1 and key=period and 
                                     keydown=1"
     output="video-show-snapshot-page" parameters="interfaceid=0 and
                                                   displayid=DISPLAY_scenes and
                                                   page=1"/>

    <!-- HELP: -->
    <!-- HELP: __ LEVELS __ -->
    <!-- HELP: -->

    <!-- HELP: 1-4: Toggle inputs for recording -->
    <!-- HELP: up/down + 1-4: +/- input volumes -->

    <!-- DISABLED-
         HELP: 1-4: Select inputs for footpedal volume adjust (CC1) -->

    <!-- Slide -->
    <binding input="key" conditions="VAR_keyheld_up=1 and
                                     key=VAR_inputs+VAR_zero_keysym and
                                     keydown=1"
     output="slide-in-volume" parameters="input=key-VAR_zero_keysym and
                                          slide=VAR_slide_speed"/>
    <binding input="key" conditions="VAR_keyheld_down=1 and
                                     key=VAR_inputs+VAR_zero_keysym and 
                                     keydown=1"
     output="slide-in-volume" parameters="input=key-VAR_zero_keysym and
                                          slide=-VAR_slide_speed"/>

    <!-- Toggle -->
    <binding input="key" conditions="key=VAR_inputs+VAR_zero_keysym and
                                     keydown=1"
     output="toggle-input-record" parameters="input=key-VAR_zero_keysym"/>

    <!-- DISABLED- Footpedal adjust
         Sub 2: Footpedal adjust- param1 is parameter to adjust
         This sub is called whenever a parameter needs to be adjusted by the
         footpedal
    <binding input="go-sub" conditions="sub=2 and param1=VAR_inputs"
     output1="set-in-volume" parameters1="input=param1 and vol=param2"/>

         Here is the binding that calls sub 2:
    <binding input="midicontroller" 
     conditions="controlnum=VAR_footpedal_ctrl_num and VAR_footpedal_ignore=0"
     output="go-sub" parameters="sub=2 and
                                 param1=VAR_footpedal_mode and
                                 param2=controlval/127*VAR_footpedal_vol_max"/>

         And here are the input selectors for footpedal adjust:
    <binding input="key" conditions="key=VAR_inputs+VAR_zero_keysym and
                                     keydown=1"
     output1="set-variable" parameters1="var=VAR_footpedal_ignore and
                                         value=1"
     output2="set-variable" parameters2="var=VAR_footpedal_mode and
                                         value=key-VAR_zero_keysym"/>
    <binding input="key" conditions="key=VAR_inputs+VAR_zero_keysym and
                                     keydown=0"
     output="set-variable" parameters="var=VAR_footpedal_ignore and
                                       value=0"/>       
      -->

    <!-- HELP: Alt + \: Stop sliding loop volumes -->
    <binding input="key" 
     conditions="VAR_keyheld_alt=1 and key=backslash and keydown=1"
     output="slide-loop-amplifier-stop-all"/>

    <!-- HELP: [;'] Ins/Del/Bkspc: +/-/reset master in volume -->
    <binding input="key" conditions="VAR_laptopkeymode=1 and 
                                     key=semicolon and keydown=1" 
     output="slide-master-in-volume" parameters="slide=VAR_slide_speed"/>
    <binding input="key" conditions="VAR_laptopkeymode=1 and
                                     key=backquote and keydown=1" 
     output="slide-master-in-volume" parameters="slide=-VAR_slide_speed"/>
    <binding input="key" conditions="key=insert and keydown=1" 
     output="slide-master-in-volume" parameters="slide=VAR_slide_speed"/>
    <binding input="key" conditions="key=delete and keydown=1" 
     output="slide-master-in-volume" parameters="slide=-VAR_slide_speed"/>
    <binding input="key" conditions="key=backspace and keydown=1" 
     output="set-master-in-volume" parameters="vol=1.0"/>

    <!-- HELP: [[]] Home/End/Backslash: +/-/reset master out volume -->
    <binding input="key" conditions="VAR_laptopkeymode=1 and 
                                     key=squarebracketopen and keydown=1" 
     output="slide-master-out-volume" parameters="slide=VAR_slide_speed/2"/>
    <binding input="key" conditions="VAR_laptopkeymode=1 and 
                                     key=squarebracketclose and keydown=1" 
     output="slide-master-out-volume" parameters="slide=-VAR_slide_speed/2"/>

    <binding input="key" conditions="key=home and keydown=1" 
     output="slide-master-out-volume" parameters="slide=VAR_slide_speed/2"/>
    <binding input="key" conditions="key=end and keydown=1" 
     output="slide-master-out-volume" parameters="slide=-VAR_slide_speed/2"/>
    <binding input="key" conditions="key=backslash and keydown=1" 
     output="set-master-out-volume" parameters="vol=1.0"/>

    <!-- HELP: Arrow up/down + click: +/- loop volume -->
    <binding input="loop-clicked"
     conditions="VAR_keyheld_up=1 and button=1 and down=1"
     output="slide-loop-amplifier"
     parameters="loopid=loopid and
                 slide=VAR_slide_speed/2"/> 
    <binding input="loop-clicked"
     conditions="VAR_keyheld_down=1 and button=1 and down=1"
     output="slide-loop-amplifier"
     parameters="loopid=loopid and
                 slide=-VAR_slide_speed/2"/> 

    <!-- HELP: CTRL + Mousewheel: +/- volume of all selected loops -->
    <binding input="loop-clicked" 
     conditions="button=4 and VAR_keyheld_ctrl=1"
     output="adjust-selected-loops-amp"
     parameters="setid=0 and ampfactor=1.0/VAR_loopamp_adj"/>
    <binding input="loop-clicked" 
     conditions="button=5 and VAR_keyheld_ctrl=1"
     output="adjust-selected-loops-amp"
     parameters="setid=0 and ampfactor=VAR_loopamp_adj"/>

    <!-- HELP: Mousewheel on loops: +/- loop volume -->
    <binding input="loop-clicked" 
     conditions="button=4"
     output="adjust-loop-amplifier"
     parameters="loopid=loopid and ampfactor=1.0/VAR_loopamp_adj"/>
    <binding input="loop-clicked" 
     conditions="button=5"
     output="adjust-loop-amplifier"
     parameters="loopid=loopid and ampfactor=VAR_loopamp_adj"/>

    <!-- HELP: CTRL + up/down arrows: Adjust volume of all selected loops -->

    <!-- Renaming loops by clicking -->
    <binding input="loop-clicked" 
     conditions="VAR_keyheld_ctrl=1 and button=1 and down=1"
     output="rename-loop"
     parameters="loopid=loopid and in=in"/>

    <!-- Slide Loop Volumes -->
    <!-- HELP: up/down + trigger: +/- loop volume -->
    <!-- See definitions in different interfaces -->

    <!-- HELP: cut mode + trigger/click: Play loops with velocity sensitive volume -->
    <!-- Set Trigger Volume (play volume) for Loops -->
    <!-- See definitions in different interfaces -->
    <binding input="loop-clicked" 
     conditions="VAR_cutmode=1 and button=1"
     output="set-trigger-volume"
     parameters="loopid=loopid and vol=1.0*down"/>

    <!-- HELP: -->
    <!-- HELP: __ MIDI __ -->
    <!-- HELP: -->

    <!-- HELP: [,.] KP Ins/Del: Transpose MIDI output -->
    <binding input="key" conditions="VAR_laptopkeymode=1 and key=comma and 
                                     keydown=1"
     output="adjust-midi-transpose" parameters="adjust=-12"/>
    <binding input="key" conditions="VAR_laptopkeymode=1 and key=period and
                                     keydown=1"
     output="adjust-midi-transpose" parameters="adjust=12"/>

    <binding input="key" conditions="key=KP0 and keydown=1"
     output="adjust-midi-transpose" parameters="adjust=-12"/>
    <binding input="key" conditions="key=KPperiod and keydown=1"
     output="adjust-midi-transpose" parameters="adjust=12"/>

    <!-- HELP: 0/shift-0: Set/reset tuning from MIDI pitchbender -->
    <binding input="key" conditions="key=openparen and keydown=1"
     output="set-midi-tuning" parameters="tuning=0"/>
    <binding input="key" conditions="key=zero and keydown=1"
     output="set-midi-tuning" parameters="tuning=SYSTEM_cur_pitchbend"/>

    <!-- HELP: -->
    <!-- HELP: __ LOOPS __ -->
    <!-- HELP: -->

    <!-- HELP: shift + 1-9: Create snapshot #1-9 -->
    <!-- HELP: shift/ctrl + ,.: Select snapshot page -->

    <!-- HELP: shift + click on loop: Select loop -->
    <!-- HELP: right click on loop: Select loop -->
    <binding input="loop-clicked" 
     conditions="VAR_keyheld_shift=1 and button=1 and down=1"
     output="toggle-select-loop" parameters="setid=0 and loopid=loopid"/>
    <binding input="loop-clicked" 
     conditions="button=3 and down=1"
     output="toggle-select-loop" parameters="setid=0 and loopid=loopid"/>

    <!-- Erase Loops -->
    <!-- HELP: space + trigger/click: Erase loop -->
    <binding input="loop-clicked" 
     conditions="VAR_keyheld_space=1 and button=1 and down=1"
     output="erase-loop" parameters="loopid=loopid"/>

    <!-- Move Loops -->
    <binding input="loop-clicked" 
     conditions="VAR_xferloop=1 and button=1 and down=1"
     output1="move-loop"
     parameters1="oldloopid=VAR_xferidx and 
                  newloopid=loopid"
     output2="set-variable" parameters2="var=VAR_xferloop and value=0"/>

    <!-- HELP: overdub mode + trigger: Overdub into loop -->
    <!-- Overdub Loops -->
    <binding input="loop-clicked" 
     conditions="VAR_overdubmode=1 and button=1 and down=1"
     output="trigger-loop"
     parameters="overdub=1 and overdubfeedback=VAR_overdubfeedback and
                 loopid=loopid and vol=1.0"/>

    <!-- HELP: trigger/click: Toggle Record-Play-Off for loop -->
    <!-- Trigger Loops -->
    <binding input="loop-clicked" conditions="button=1 and down=1"
     output="trigger-loop"
     parameters="loopid=loopid and vol=1.0"/>

    <!-- HELP: Keypad asterisk: Select playing loops -->
    <!-- HELP: (shift) Keypad asterisk: Select idle loops -->
    <!-- HELP: (ctrl) Keypad asterisk: Invert selection of loops -->
    <!-- HELP: (alt) Keypad asterisk: Unselect all loops -->
    <binding input="key" 
     conditions="VAR_laptopkeymode=1 and VAR_keyheld_shift=1 and 
                 key=lessthan and keydown=1"
     output="select-only-playing-loops" parameters="setid=0 and playing=0"/>
    <binding input="key" 
     conditions="VAR_laptopkeymode=1 and VAR_keyheld_alt=1 and 
                 key=lessthan and keydown=1"
     output="select-all-loops" parameters="setid=0 and select=0"/>
    <binding input="key" 
     conditions="VAR_laptopkeymode=1 and VAR_keyheld_ctrl=1 and 
                 key=lessthan and keydown=1"
     output="invert-selection" parameters="setid=0"/>
    <binding input="key" 
     conditions="VAR_laptopkeymode=1 and key=lessthan and keydown=1"
     output="select-only-playing-loops" parameters="setid=0 and playing=1"/>

    <binding input="key" 
     conditions="VAR_keyheld_shift=1 and key=KPasterisk and keydown=1"
     output="select-only-playing-loops" parameters="setid=0 and playing=0"/>
    <binding input="key" 
     conditions="VAR_keyheld_alt=1 and key=KPasterisk and keydown=1"
     output="select-all-loops" parameters="setid=0 and select=0"/>
    <binding input="key" 
     conditions="VAR_keyheld_ctrl=1 and key=KPasterisk and keydown=1"
     output="invert-selection" parameters="setid=0"/>
    <binding input="key" 
     conditions="key=KPasterisk and keydown=1"
     output="select-only-playing-loops" parameters="setid=0 and playing=1"/>

    <!-- HELP: t: Trigger selected loops -->
    <binding input="key"
     conditions="key=t and keydown=1"
     output="trigger-selected-loops" parameters="setid=0 and vol=1.0 and
                                                 toggleloops=1"/>

    <!-- HELP: Tab: Switch interfaces on screen -->
    <binding input="key" conditions="key=tab and keydown=1"
     output1="toggle-variable" parameters1="var=VAR_showinterface and maxvalue=SYSTEM_num_switchable_interfaces and minvalue=1"
     output2="video-switch-interface" parameters2="interfaceid=VAR_showinterface"/>

    <!-- HELP: ctrl + click on loop: Rename loop -->
    <!-- See 'Renaming loops by clicking'- binding defined earlier for
         precedence -->

    <!-- HELP: u: Undo last loop record -->
    <binding input="key" 
     conditions="SYSTEM_loopid_lastrecord_0=VAR_loopid_footswitch and 
                 key=u and keydown=1" 
     output1="erase-loop" parameters1="loopid=SYSTEM_loopid_lastrecord_0"
     output2="set-variable" parameters2="var=VAR_xferloop and value=0"/>

    <!-- HELP: Shift-Space: Erase selected loops -->
    <binding input="key"
     conditions="VAR_keyheld_shift=1 and key=space and keydown=1"
     output="erase-selected-loops" parameters="setid=0"/>

    <!-- HELP: Alt-Space: Erase all loops -->
    <binding input="key"
     conditions="VAR_keyheld_alt=1 and key=space and keydown=1"
     output="erase-all-loops"/>

    <binding input="key" conditions="key=u and keydown=1" 
     output="erase-loop" parameters="loopid=SYSTEM_loopid_lastrecord_0"/>

    <!-- HELP: shift-`: Toggle loop overdub mode -->
    <binding input="key" 
     conditions="VAR_keyheld_shift=1 and key=tilde and keydown=1"
     output="toggle-variable" parameters="var=VAR_overdubmode and maxvalue=1"/>

    <!-- HELP: `: Toggle loop cut mode -->
    <binding input="key" conditions="key=tilde and keydown=1"
     output="toggle-variable" parameters="var=VAR_cutmode and maxvalue=1"/>
    <!-- HELP: z/x: Prev/Next page of loops on piano keyboard -->
    <!-- Defined in MIDI keyboard interface -->

    <!-- HELP: F9: Toggle loop auto-saving --> 
    <binding input="key" conditions="key=f9 and keydown=1"
     output1="toggle-variable" parameters1="var=VAR_auto_loop_save and
                                            maxvalue=1"
     output2="set-auto-loop-saving" parameters2="save=VAR_auto_loop_save"/>

    <!-- HELP: F8: Save last recorded loop --> 
    <binding input="key" conditions="key=f8 and keydown=1"
     output="save-loop" parameters="loopid=SYSTEM_loopid_lastrecord_0"/>

    <!-- HELP: shift + F7: Force save new scene of all loops -->
    <binding input="key" conditions="VAR_keyheld_shift=1 and key=f7 and
                                     keydown=1"
     output="save-new-scene"/>

    <!-- HELP: F7: Save current scene of all loops -->
    <binding input="key" conditions="key=f7 and keydown=1"
     output="save-current-scene"/>

    <!-- HELP: -->
    <!-- HELP: __ BROWSING __ -->
    <!-- HELP: -->

    <!-- HELP: left/right: Change patch bank -->
    <binding input="key" conditions="key=left and keydown=1"
     output="patchbrowser-move-to-bank" parameters="direction=-1"/>
    <binding input="key" conditions="key=right and keydown=1"
     output="patchbrowser-move-to-bank" parameters="direction=1"/>

    <!-- HELP: b: Switch browser- patch, loop, or scene -->
    <binding input="key" conditions="key=b and keydown=1"
     output1="video-show-display" parameters1="interfaceid=0 and
                                               displayid=VAR_cur_browser and
                                               show=0"
     output2="toggle-variable" parameters2="var=VAR_cur_browser and 
                                            maxvalue=VAR_max_browser"
     output3="video-show-display" parameters3="interfaceid=0 and
                                               displayid=VAR_cur_browser and
                                               show=1"/>

    <!-- HELP: (ctrl) Enter: Rename browser item -->
    <binding input="key"
     conditions="VAR_keyheld_ctrl=1 and key=return and keydown=1"
     output="browser-rename-item" parameters="browserid=VAR_cur_browser"/>

    <!-- HELP: Enter: Select browser item -->
    <!-- When selecting a loop in the loop browser, FW will load the loop-
         since we load onto the footswitch, set our state so that we can
         transfer the loop from the footswitch -->
    <binding input="key"
     conditions="VAR_cur_browser=DISPLAY_browser_loop and key=return and 
                 keydown=1"
     output1="set-variable" parameters1="var=VAR_xferloop and value=1"
     output2="set-variable" parameters2="var=VAR_xferidx and
                                         value=VAR_loopid_footswitch"
     output3="browser-select-item" parameters3="browserid=VAR_cur_browser"/>
    <binding input="key"
     conditions="key=return and keydown=1"
     output="browser-select-item" parameters="browserid=VAR_cur_browser"/>

    <!-- HELP: (shift) [+/-] KP +/-: (Jump)/change browser item -->
    <binding input="key"
     conditions="VAR_keyheld_shift=1 and VAR_laptopkeymode=1 and key=minus
                 and keydown=1"
     output="browser-move-to-item" parameters="browserid=VAR_cur_browser and
                                               adjust=0 and jumpadjust=-1"/>
    <binding input="key"
     conditions="VAR_keyheld_shift=1 and VAR_laptopkeymode=1 and key=equal 
                 and keydown=1"
     output="browser-move-to-item" parameters="browserid=VAR_cur_browser and
                                               adjust=0 and jumpadjust=1"/>
    <binding input="key"
     conditions="VAR_laptopkeymode=1 and key=minus and keydown=1"
     output="browser-move-to-item" parameters="browserid=VAR_cur_browser and
                                               adjust=-1 and jumpadjust=0"/>
    <binding input="key"
     conditions="VAR_laptopkeymode=1 and key=equal and keydown=1"
     output="browser-move-to-item" parameters="browserid=VAR_cur_browser and
                                               adjust=1 and jumpadjust=0"/>

    <binding input="key"
     conditions="VAR_keyheld_shift=1 and key=KPminus and keydown=1"
     output="browser-move-to-item" parameters="browserid=VAR_cur_browser and
                                               adjust=0 and jumpadjust=-1"/>
    <binding input="key"
     conditions="VAR_keyheld_shift=1 and key=KPplus and keydown=1"
     output="browser-move-to-item" parameters="browserid=VAR_cur_browser and
                                               adjust=0 and jumpadjust=1"/>
    <binding input="key"
     conditions="key=KPminus and keydown=1"
     output="browser-move-to-item" parameters="browserid=VAR_cur_browser and
                                               adjust=-1 and jumpadjust=0"/>
    <binding input="key"
     conditions="key=KPplus and keydown=1"
     output="browser-move-to-item" parameters="browserid=VAR_cur_browser and
                                               adjust=1 and jumpadjust=0"/> 

    <!-- HELP: -->
    <!-- HELP: __ TIMING __ -->
    <!-- HELP: -->

    <!-- HELP: Shift-F1: Toggle sync panel -->
    <binding input="key" conditions="VAR_keyheld_shift=1 and key=f1 and 
                                     keydown=1"
     output1="toggle-variable" parameters1="var=VAR_syncpanel_show and 
                                            maxvalue=1"
     output2="video-show-display" parameters2="displayid=1000 and
                                               show=VAR_syncpanel_show"
     output3="video-show-display" parameters3="displayid=1001 and
                                               show=VAR_syncpanel_show"
     output4="video-show-display" parameters4="displayid=1002 and
                                               show=VAR_syncpanel_show"
     output5="video-show-display" parameters5="displayid=1003 and
                                               show=VAR_syncpanel_show"
     output6="video-show-display" parameters6="displayid=1004 and
                                               show=VAR_syncpanel_show"/>

    <!-- HELP: (space) F1: (Delete)/create/select pulse -->
    <binding input="key" 
     conditions="VAR_keyheld_space=1 and key=f1 and keydown=1"
     output="delete-pulse" parameters="pulse=0"/>
    <binding input="key" conditions="key=f1 and keydown=1"
     output="select-pulse" parameters="pulse=0"/>

    <!-- HELP: Shift/Ctrl-S: Adjust transport sync timing -->
    <binding input="key"
     conditions="VAR_keyheld_shift=1 and key=s and keydown=1"
     output1="set-variable"
     parameters1="var=VAR_numsync_per_pulse and value=VAR_numsync_per_pulse+1"
     output2="set-sync-speed" parameters2="speed=VAR_numsync_per_pulse"/>
    <binding input="key"
     conditions="VAR_keyheld_ctrl=1 and key=s and keydown=1"
     output1="set-variable"
     parameters1="var=VAR_numsync_per_pulse and value=VAR_numsync_per_pulse-1"
     output2="set-sync-speed" parameters2="speed=VAR_numsync_per_pulse"/>

    <!-- HELP: Alt-S: Switch between bar and beat sync -->
    <binding input="key"
     conditions="VAR_keyheld_alt=1 and key=s and keydown=1"
     output1="toggle-variable"
     parameters1="var=VAR_synctype and maxvalue=1"
     output2="set-sync-type" parameters2="type=VAR_synctype"/>

    <!-- HELP: Shift-F2: Toggle MIDI sync transmit -->
    <binding input="key"
     conditions="VAR_keyheld_shift=1 and key=f2 and keydown=1"
     output1="toggle-variable"
     parameters1="var=VAR_midisync and maxvalue=1"
     output2="set-midi-sync" parameters2="midisync=VAR_midisync"/>

    <!-- HELP: F2: Tap pulse -->
    <binding input="key" conditions="key=f2 and keydown=1"
     output="tap-pulse" parameters="pulse=0 and newlen=1"/>
    <!--
    <binding input="midicontroller"
     conditions="controlnum=VAR_midi_footswitch and controlval=VAR_switch_on"
     output="tap-pulse" parameters="pulse=0 and newlen=1"/>
      -->

    <!-- HELP: [F5] F11: Toggle metronome -->
    <binding input="key" conditions="VAR_laptopkeymode=1 and key=f5 and 
                                     keydown=1"
     output1="toggle-variable" parameters1="var=VAR_switch_metronome and
                                            maxvalue=1"
     output2="switch-metronome" parameters2="pulse=0 and
                                             metronome=VAR_switch_metronome"/>

    <binding input="key" conditions="key=f11 and keydown=1"
     output1="toggle-variable" parameters1="var=VAR_switch_metronome and
                                            maxvalue=1"
     output2="switch-metronome" parameters2="pulse=0 and
                                             metronome=VAR_switch_metronome"/>

    <!-- HELP: [F6] F12: Select no pulse- free timing -->
    <binding input="key" conditions="VAR_laptopkeymode=1 and key=f6 and 
                                     keydown=1"
     output="select-pulse" parameters="pulse=-1"/>
    <binding input="key" conditions="key=f12 and keydown=1"
     output="select-pulse" parameters="pulse=-1"/>

    <!-- Update held keyboard states -->
    <!-- This should be done at the end in case any other bindings respond to
         these keys. -->
    <binding input="key" conditions="key=space"
     output="set-variable" parameters="var=VAR_keyheld_space and 
                                       value=keydown"/>

    <binding input="key" conditions="key=up and VAR_keyheld_ctrl=1"
     output1="set-variable" parameters1="var=VAR_keyheld_up and 
                                         value=keydown"
     output2="adjust-selected-loops-amp" 
     parameters2="setid=0 and ampfactor=1.0/VAR_loopamp_adj"/>
    <binding input="key" conditions="key=up"
     output="set-variable" parameters="var=VAR_keyheld_up and 
                                       value=keydown"/>

    <binding input="key" conditions="key=down and VAR_keyheld_ctrl=1"
     output1="set-variable" parameters1="var=VAR_keyheld_down and 
                                         value=keydown"
     output2="adjust-selected-loops-amp" 
     parameters2="setid=0 and ampfactor=VAR_loopamp_adj"/>
    <binding input="key" conditions="key=down"
     output="set-variable" parameters="var=VAR_keyheld_down and 
                                       value=keydown"/>

    <binding input="key" conditions="key=leftshift"
     output1="set-variable" parameters1="var=VAR_keyheld_shift and 
                                        value=keydown"
     output2="video-show-display" parameters2="interfaceid=0 and
                                               displayid=DISPLAY_scenes and
                                               show=keydown"/>
    <binding input="key" conditions="key=rightshift"
     output1="set-variable" parameters1="var=VAR_keyheld_shift and 
                                        value=keydown"
     output2="video-show-display" parameters2="interfaceid=0 and
                                               displayid=DISPLAY_scenes and
                                               show=keydown"/>

    <binding input="key" conditions="key=leftctrl"
     output1="set-variable" parameters1="var=VAR_keyheld_ctrl and 
                                         value=keydown"
     output2="video-show-display" parameters2="interfaceid=0 and
                                               displayid=DISPLAY_scenes and
                                               show=keydown"/>
    <binding input="key" conditions="key=rightctrl"
     output1="set-variable" parameters1="var=VAR_keyheld_ctrl and 
                                         value=keydown"
     output2="video-show-display" parameters2="interfaceid=0 and
                                               displayid=DISPLAY_scenes and
                                               show=keydown"/>

    <binding input="key" conditions="key=leftalt"
     output="set-variable" parameters="var=VAR_keyheld_alt and 
                                       value=keydown"/>
    <binding input="key" conditions="key=rightalt"
     output="set-variable" parameters="var=VAR_keyheld_alt and 
                                       value=keydown"/>
  </bindings>

  <graphics>
  <!-- You can also have FreeWheeling display system and user-defined variables
       such as midi transposition, or the last pressed midi key. This is done
       by defining 'display' sections: -->

    <display var="SYSTEM_midi_transpose" type="text" font="small"
     title="Xp " pos="0.0,0.9"/>
    <display var="SYSTEM_audio_cpu_load/100" type="bar" font="main"
     title="CPU" pos="0.05,0.8" 
     orientation="vertical" barscale="0.3" thickness="0.03"/>
    <display var="SYSTEM_master_in_volume" type="bar" font="main"
     title="IN" pos="0.245,0.8" 
     orientation="vertical" barscale="0.3" thickness="0.07" dbscale="1" marks="1"/>

    <display var="SYSTEM_in_1_volume" type="bar-switch" 
     switchvar="SYSTEM_in_1_record"
     orientation="vertical" pos="0.20,0.8" barscale="0.3" thickness="0.025" dbscale="1"/>
    <display var="SYSTEM_in_2_volume" type="bar-switch" 
     switchvar="SYSTEM_in_2_record"
     orientation="vertical" pos="0.23,0.8" barscale="0.3" thickness="0.025" dbscale="1"/>
    <display var="SYSTEM_in_3_volume" type="bar-switch" 
     switchvar="SYSTEM_in_3_record" 
     orientation="vertical" pos="0.26,0.8" barscale="0.3" thickness="0.025" dbscale="1"/>
    <display var="SYSTEM_in_4_volume" type="bar-switch" 
     switchvar="SYSTEM_in_4_record" 
     orientation="vertical" pos="0.29,0.8" barscale="0.3" thickness="0.025" dbscale="1"/>

    <display var="SYSTEM_in_1_peak" type="bar-switch"
     switchvar="SYSTEM_in_1_record"
     orientation="vertical" pos="0.20,0.8" barscale="0.3" thickness="0.015"
     color="2" calibrate="0.9" dbscale="1"/>
    <display var="SYSTEM_in_2_peak" type="bar-switch"
     switchvar="SYSTEM_in_2_record"
     orientation="vertical" pos="0.23,0.8" barscale="0.3" thickness="0.015"
     color="2" calibrate="0.9" dbscale="1"/>
    <display var="SYSTEM_in_3_peak" type="bar-switch"
     switchvar="SYSTEM_in_3_record"
     orientation="vertical" pos="0.26,0.8" barscale="0.3" thickness="0.015"
     color="2" calibrate="0.9" dbscale="1"/>
    <display var="SYSTEM_in_4_peak" type="bar-switch"
     switchvar="SYSTEM_in_4_record"
     orientation="vertical" pos="0.29,0.8" barscale="0.3" thickness="0.015"
     color="2" calibrate="0.9" dbscale="1"/>

    <display var="SYSTEM_master_out_volume" type="bar" font="main"
     title="OUT" pos="0.45,0.8" 
     orientation="vertical" barscale="0.3" thickness="0.03" dbscale="1" marks="1"/>
    <display var="SYSTEM_cur_limiter_gain" type="bar" font="main"
     title="LMT" pos="0.6,0.8" 
     orientation="vertical" barscale="0.3" thickness="0.03" dbscale="1" marks="1"/>

  <!-- Sync panel -->
    <display var="VAR_numsync_per_pulse" id="1000" type="text" font="small"
     title="sync " pos="0.0,0.87" show="0"/>
    <display var="VAR_synctype" id="1001" 
     type="text-switch" font="small" pos="0.1,0.87"
     text0="bars per pulse" text1="beats per pulse" show="0"/>
    <display var="SYSTEM_sync_active" id="1002" type="circle-switch" 
     font="small" title="Jack Sync"
     pos="0.5,0.87" size1="0.012" size0="0.01" flash="0" show="0"/>
    <display var="SYSTEM_sync_transmit" id="1003" type="circle-switch" 
     font="small" title="Jack Sync XMit"
     pos="0.66,0.87" size1="0.012" size0="0.01" flash="0" show="0"/>
    <display var="SYSTEM_midisync_transmit" id="1004" type="circle-switch"
     font="small" title="MIDI Sync Xmit"
     pos="0.66,0.84" size1="0.012" size0="0.01" flash="0" show="0"/>

    <display var="VAR_overdubfeedback" type="bar" font="main"
     title="FBK" pos="0.75,0.8" 
     orientation="vertical" barscale="0.3" thickness="0.03"/>
  
    <!--
    <display var="VAR_overdubfeedback" type="bar" font="small"
     title="FBK" pos="0.7,0.9" orientation="vertical" barscale="0.04"
     thickness="0.01"/>
     -->

    <display var="SYSTEM_num_recording_loops_in_map" type="circle-switch" 
     pos="0.95,0.815" size1="0.02" size0="0.01" flash="0"/>
    <display var="SYSTEM_fluidsynth_enabled" type="switch" font="small" 
     pos="0.895,0.64" title="SYNTH"/> 
    <display var="VAR_auto_loop_save" type="switch" font="small" pos="0.914,0.68" 
     title="SAVE"/> 
    <display var="VAR_xferloop" type="switch" font="small" pos="0.925,0.6" 
     title="X"/> 
    <display var="VAR_overdubmode" type="switch" font="small" pos="0.925,0.72" 
     title="DUB"/> 
    <display var="VAR_cutmode" type="switch" font="small" pos="0.925,0.76" 
     title="CUT"/> 

    <display interfaceid="0" id="DISPLAY_scenes" show="0"
     type="snapshots" font="small" pos="0.69,0.4" size="0.3,0.22" 
     title="SNAPS"/> 
  </graphics>
</interface>