~ubuntu-branches/debian/stretch/bristol/stretch

« back to all changes in this revision

Viewing changes to bristol/arpeggiator.c

  • Committer: Package Import Robot
  • Author(s): Alessio Treglia
  • Date: 2011-11-14 06:15:01 UTC
  • mfrom: (1.2.6) (6.1.12 sid)
  • Revision ID: package-import@ubuntu.com-20111114061501-fralw11sxtl7n929
Tags: 0.60.9-1
* New upstream bugfix release.
* Depends on libjack-dev only.
* Refresh patches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
 
2
2
/*
3
3
 *  Diverse Bristol audio routines.
4
 
 *  Copyright (c) by Nick Copeland <nickycopeland@hotmail.com> 1996,2010
 
4
 *  Copyright (c) by Nick Copeland <nickycopeland@hotmail.com> 1996,2011
5
5
 *
6
6
 *
7
7
 *   This program is free software; you can redistribute it and/or modify
284
284
                         * from the GUI memories.
285
285
                         */
286
286
                        if (baudio->arpeggio.flags & BRISTOL_SEQ_LEARN) {
287
 
                                baudio->arpeggio.s.notes[baudio->arpeggio.s.max++].k = tval;
 
287
                                if (baudio->arpeggio.s.max == 0)
 
288
                                        baudio->arpeggio.s.dif = tval;
 
289
                                baudio->arpeggio.s.notes[baudio->arpeggio.s.max].k
 
290
                                        = tval - baudio->arpeggio.s.dif;
288
291
                                baudio->arpeggio.s.notes[baudio->arpeggio.s.max++].v = 120;
289
292
                                if (baudio->arpeggio.s.max > BRISTOL_SEQ_MAX)
290
293
                                        baudio->arpeggio.s.max = BRISTOL_SEQ_MAX;
 
294
//printf("insert %i\n", tval - baudio->arpeggio.s.dif);
291
295
                        }
292
296
                        break;
293
 
 
294
297
                case BRISTOL_CHORD_ENABLE:
295
298
                        /* on/off */
296
299
                        if (value != 0)
495
498
                }
496
499
                arpeggio->s.notes[arpeggio->s.max].k
497
500
                        = msg->params.key.key - arpeggio->s.dif;
 
501
//printf("live insert %i\n", arpeggio->s.notes[arpeggio->s.max].k);
498
502
                arpeggio->s.notes[arpeggio->s.max].v
499
503
                        = msg->params.key.velocity - arpeggio->s.vdif;
500
504
                if (++arpeggio->s.max >= BRISTOL_SEQ_MAX)