371
371
* Operate one hammond voice will function as the upper manual for a B3. If
372
* requested there may also be a second manual active, with limited
373
* functionality regarding percussives, etc.
372
* requested there may also be a second manual active, it will have limited
373
* functionality regarding percussives, etc. We should rewrite this, the voices
374
* should not actually produce any sound: they should build a gaintable for the
375
* harmonics that need to be tapped off the gearbox with offsets for new notes.
376
* Then we call therequiem() that will generate any wheels that have non-zero
377
* gain and mix them all down.
376
380
operateOneHammondVoice(audioMain *audiomain, Baudio *baudio,
402
406
audiomain->palette[(*baudio->sound[0]).index]->specs->io[2].buf = tmpbuf2;
404
408
(*baudio->sound[0]).operate(
405
(audiomain->palette)[5],
409
(audiomain->palette)[B_HAMMOND],
407
411
(*baudio->sound[0]).param,
408
412
voice->locals[voice->index][0]);
415
419
audiomain->palette[(*baudio->sound[1]).index]->specs->io[0].buf = tmpbuf1;
416
420
(*baudio->sound[1]).operate(
417
(audiomain->palette)[1],
421
(audiomain->palette)[B_ENV],
419
423
(*baudio->sound[1]).param,
420
424
voice->locals[voice->index][1]);
429
433
= baudio->leftbuf;
431
435
(*baudio->sound[2]).operate(
432
(audiomain->palette)[2],
436
(audiomain->palette)[B_DCA],
434
438
(*baudio->sound[2]).param,
435
439
voice->locals[voice->index][2]);
448
452
= baudio->leftbuf;
450
454
(*baudio->sound[2]).operate(
451
(audiomain->palette)[2],
455
(audiomain->palette)[B_DCA],
453
457
(*baudio->sound[2]).param,
454
458
voice->locals[voice->index][2]);
496
501
(*baudio->sound[3]).operate(
497
(audiomain->palette)[5],
502
(audiomain->palette)[B_HAMMOND],
499
504
(*baudio->sound[3]).param,
500
505
voice->locals[voice->index][3]);
514
519
(*baudio->sound[0]).operate(
515
(audiomain->palette)[5],
520
(audiomain->palette)[B_HAMMOND],
517
522
(*baudio->sound[0]).param,
518
523
voice->locals[voice->index][0]);
526
531
audiomain->palette[(*baudio->sound[1]).index]->specs->io[0].buf = tmpbuf1;
527
532
(*baudio->sound[1]).operate(
528
(audiomain->palette)[1],
533
(audiomain->palette)[B_ENV],
530
535
(*baudio->sound[1]).param,
531
536
voice->locals[voice->index][1]);
539
544
audiomain->palette[(*baudio->sound[2]).index]->specs->io[2].buf = tmpbuf4;
541
546
(*baudio->sound[2]).operate(
542
(audiomain->palette)[2],
547
(audiomain->palette)[B_DCA],
544
549
(*baudio->sound[2]).param,
545
550
voice->locals[voice->index][2]);
671
676
* Hammond oscillator
673
initSoundAlgo(5, 0, baudio, audiomain, baudio->sound);
678
initSoundAlgo(B_HAMMOND, 0, baudio, audiomain, baudio->sound);
675
680
* Envelope for note_on conditioning.
677
initSoundAlgo(1, 1, baudio, audiomain, baudio->sound);
682
initSoundAlgo(B_ENV, 1, baudio, audiomain, baudio->sound);
679
684
* this envelope needs an amp.
681
initSoundAlgo(2, 2, baudio, audiomain, baudio->sound);
686
initSoundAlgo(B_DCA, 2, baudio, audiomain, baudio->sound);
683
688
* Hammond oscillator
685
initSoundAlgo(5, 3, baudio, audiomain, baudio->sound);
690
initSoundAlgo(B_HAMMOND, 3, baudio, audiomain, baudio->sound);
687
692
baudio->param = hammondGlobalController;
688
693
baudio->destroy = destroyOneHammondB3Voice;