|
Last change
on this file since 8618599 was 7258c6a, checked in by Thomas Lopatic <thomas@…>, 8 years ago |
|
Use standard integer types.
|
-
Property mode
set to
100644
|
|
File size:
1.2 KB
|
| Line | |
|---|
| 1 | /*
|
|---|
| 2 | =============================================================================
|
|---|
| 3 | setv2gi.c -- MIDAS-VII -- set the voices to the instrument for a group
|
|---|
| 4 | Version 2 -- 1988-07-11 -- D.N. Lynx Crowe
|
|---|
| 5 | =============================================================================
|
|---|
| 6 | */
|
|---|
| 7 |
|
|---|
| 8 | #include "stddefs.h"
|
|---|
| 9 | #include "vsdd.h"
|
|---|
| 10 | #include "vsddsw.h"
|
|---|
| 11 | #include "graphdef.h"
|
|---|
| 12 |
|
|---|
| 13 | #include "midas.h"
|
|---|
| 14 | #include "instdsp.h"
|
|---|
| 15 |
|
|---|
| 16 | extern int16_t curinst;
|
|---|
| 17 | extern int16_t curvce;
|
|---|
| 18 |
|
|---|
| 19 | extern int16_t ins2grp[];
|
|---|
| 20 | extern int16_t s_inst[];
|
|---|
| 21 | extern int16_t vce2grp[];
|
|---|
| 22 |
|
|---|
| 23 | extern struct instdef vbufs[];
|
|---|
| 24 |
|
|---|
| 25 | /* |
|---|
| 26 |
|
|---|
| 27 | */
|
|---|
| 28 |
|
|---|
| 29 | /*
|
|---|
| 30 | =============================================================================
|
|---|
| 31 | setv2gi() -- set voices to the instrument for a group
|
|---|
| 32 | =============================================================================
|
|---|
| 33 | */
|
|---|
| 34 |
|
|---|
| 35 | void setv2gi(int16_t group)
|
|---|
| 36 | {
|
|---|
| 37 | register int16_t grp, vce, ins;
|
|---|
| 38 | register struct instdef *ip;
|
|---|
| 39 | register struct idfnhdr *fp;
|
|---|
| 40 |
|
|---|
| 41 | ins = ins2grp[group] & 0x00FF;
|
|---|
| 42 | grp = group + 1;
|
|---|
| 43 |
|
|---|
| 44 | for (vce = 0; vce < 12; vce++) {
|
|---|
| 45 |
|
|---|
| 46 | if (vce2grp[vce] EQ grp) { /* for each voice in the group */
|
|---|
| 47 |
|
|---|
| 48 | if (curvce EQ vce) {
|
|---|
| 49 |
|
|---|
| 50 | curinst = ins;
|
|---|
| 51 | s_inst[curvce] = ins;
|
|---|
| 52 | }
|
|---|
| 53 |
|
|---|
| 54 | execins(vce, ins, 1);
|
|---|
| 55 | }
|
|---|
| 56 | }
|
|---|
| 57 | }
|
|---|
| 58 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.