home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mega A/V
/
mega_av.zip
/
mega_av
/
SOUNDUTL
/
COMPOSP.ZIP
/
COMPOSP.DOC
next >
Wrap
Text File
|
1991-12-11
|
11KB
|
223 lines
Ok, i wrote this program for my SBPro, but since it was so little trouble,
i also put in adlib support... shit... this is some of my worst code... guess
thats cuz i did it while i was sick...
Run the program with a filename, the filename must not have an extension.
When you save your file with F10, it is given the extention ".667". In this
program all values are in hex.
Keys:
Anywhere:
ALT-X ... exit program
+, - ... increase, decrease octave
*, / ... increase, decrease tempo
<, > ... increase, decrease current voice
0 ... shuddap
F5 ... play song
F6 ... play pattern
F7 ... play from current order
F10 ... save song
ALT-N ... clear song
Z,S,X,D,C,V,G,B,H,N,J,M, ... play the notes C,C#,D,ect...
Q,2,W,3,E,R,5,T,6,Y,7,U using the instrument and voice
selected (2 octaves here)
(keys F5-F10, and ALT-N do not work in the Load Instrument menu)
Order Edit:
, , , , PgUp, PgDn, Home, End, ... move cursor
Tab, S.Tab
. ... clear 1 order
Ins, Del ... insert, delete order
Enter, Space ... edit order number
F1 ... goto pattern edit
F2 ... goto instrument edit
F8 ... clear whole order
Instrument Edit:
, , PgUp, PgDn, Home, End ... move cursor
Ins, Del ... insert, delete instrument
Enter ... edit instrument
Backspace ... load an instrument
Space ... edit instrument name
F1 ... goto pattern edit
F3 ... goto order edit
F4 ... save instrument
F8 ... clear all instruments
Editing Instrument:
, , Tab, S.Tab ... move cursor
Space ... edit instrument name
F1 ... goto pattern edit
F2, ESC, Enter ... return to instrument edit
F3 ... goto order edit
F4 ... save instrument
F8 ... clear this instrument
Load Instrument:
, , , , Tab, S.Tab ... move cursor
Z,S,X,D,C,V,G,B,H,N,J,M, ... play instrument the cursor is on
Q,2,W,3,E,R,5,T,6,Y,7,U
ESC ... return to instrument menu
Space, Enter ... load instrument
Pattern Edit:
, , , , Tab, S.Tab ... move cursor
Z,S,X,D,C,V,G,B,H,N,J,M, ... enter notes
Q,2,W,3,E,R,5,T,6,Y,7,U
PgUp, PgDn ... next, previous pattern
. ... clear note
[ ... enter new instrument
] ... enter new volume
{ ... clear instrument
} ... clear volume
; ... set pattern break
' ... set pattern jump
Ins, Del ... insert, delete track
ALT-B ... mark beginning of block
ALT-E ... mark end of block
ALT-L ... mark entire channel
ALT-C ... copy block
ALT-Z ... clear block
ALT-O ... overwrite block
ALT-U ... unmark block
ALT-Q ... block up an octave
ALT-A ... block down an octave
ALT-W ... block up a halftone
ALT-S ... block down a halftone
F2 ... goto instrument edit
F3 ... goto order edit
F8 ... clear whole pattern
Values in the instrument window:
There are two sets of the same factors for the two operators that make up
a voice, the first is the Modulator, the second is the Carrier.
The modulator modulates the output of the carrier in FM synthesis, the
voice will be in FM mode if the "C" bit is set to 0, if it is set to 1
the outputs of the two operators will instead be added together to form
the output of 2 non-FM voices rather than 1 FM.
AR DR SL RR ML KS TL WS AVEK
│ │ │ │ │ │ │ │ │││└─Envelope scaling for operator
│ │ │ │ │ │ │ │ │││ (the higher the note the quicker it plays)
│ │ │ │ │ │ │ │ ││└─Sustain Sound, if this bit is set then the note
│ │ │ │ │ │ │ │ ││ will remain on at a level determined by "SL"
│ │ │ │ │ │ │ │ ││ until another note on the voice is played
│ │ │ │ │ │ │ │ │└─Volume vibrato (self explanatory)
│ │ │ │ │ │ │ │ └─Amplitude vibrato (self explanatory)
│ │ │ │ │ │ │ └─Wave select for operator, wave types are: 0-sine,
│ │ │ │ │ │ │ 1-half sine, 2-abs. sine, 3-pulse sine
│ │ │ │ │ │ └─Total level, volume control for operator, 0 is highest
│ │ │ │ │ │
│ │ │ │ │ └─Key scale level, (the higher the note the quieter): 0-no KSL
│ │ │ │ │ 1-KSL of 3 dB/oct, 2-KSL of 1.5 dB/oct, 3-KSL of 6 dB/oct
│ │ │ │ └─Frequency multiplier, output frequency of operator will be
│ │ │ │ multiplied by this
│ │ │ └─Release rate, after a note reaches its sustain level, it will
│ │ │ then diminish to nothingness at a speed determined by this
│ │ └─Sustain level (0-max, F-none): After a note reaches its max, it will
│ │ diminish to this level, and if the "E" bit is set it will remain
│ │ at this level until another note is played on the channel
│ └─Decay rate, this determines how fast a note goes from its max to the
│ sustain level
└─Attack rate, determines how fast a note reaches its max after being activated
FB C
│ └─Connection: 0-FM synthesis, 1-Additive synthesis
│
└─Feedback: in FM the modulators output is multipliued by this and then
sent to its own input
Dont expext to understand any of this, the best way to learn how each parameter
affects the sound is to experiment, begin with something like these values
AR DR SL RR ML KS TL WS AVEK AR DR SL RR ML KS TL WS AVEK FB C
0F 02 0F 01 01 00 00 00 0000 0F 02 0F 01 01 00 00 00 0000 00 0
and experiment...
Pattern Edit:
███ 0108C 2 ···C 2C 1···A 3······C 2······························ 00 ·· ·· ··
███ ······· ······C 1···B 3······C 1······························ 01 ·· ·· ··
███ ······· ······C 1·····················D 4····················· 02 ·· ·· ··
J03 04··C 3 ···C 3C 1············································· 01 ·· ·· ··
│██ │·0CD#2 ···D#2C 1···A 3······C 2······························ │· ·· ·· ··
│ │ │ │ │ │ │
│ │ │ │ │ └ Full 18 channel pattern, this Order in which patterns
│ │ │ │ │ doesnt show instruments and volumes will be played
│ │ │ │ │ you have to see those one channel
│ │ │ │ │ at a time, on the SBPro the tracks
│ │ │ │ │ are left, right, left, right, ect...
│ │ │ │ │ on the Adlib or SB, only every second
│ │ │ │ │ track is played, but you can still enter
│ │ │ │ │ all notes.
│ │ │ │ │
│ │ │ │ └ Note and octave
│ │ │ │
│ │ │ └ New volume (0 highest - 3f lowest)
│ │ │
│ │ └ New instrument for channel
│ │
│ └ Info bar
│
└ Jump command, jumps from current pattern to the # order.
could also be "-B-" command, which just breaks out of the
current pattern.
Status Bar:
Tempo: The tempo of the music, lower is faster
Octave: The octave the lower keyboard keys will currently play in, the
upper keyboard keys will play one octave above that. If youre
entering notes into a pattern they will be of these octaves.
Voice: The channel you are currently editin or playing on, on the adlib
only the even channels will produce sounds, although you will still
be able to enter notes in the patterns on the odd channels.
Pattern: The pattern you are currently editing.
Order: Your location in the order of the song, pressing F7 will cause the
music to start playing from this order.
Size: The size of the actual music data, excluding some misc things, just
keep this number below F400, if you exceed this number, any changes
you make to the patterns will not be stored. This number only changes
when you change to another patter cuz when you do that the pattern
you were working on is packed to memory and the size is recalculated.
COMPOSP.DAT is the instrument bank file for this composer. Upon running
this program, it will chek if this file exists in the directory the
composer is located in (it may be different from the directory youre
running it from). If it does, it will load it, if it doesnt, it will create
it and put in 1 instrument. This file can hold up to 1666 different istruments
each defined by a unique 8-character name. At full size, this file will be no
more than 31656 bytes. But you will probably never even fill it up half-way...
Try to make it a habit of entering the instrument number at the beginning
of a pattern for each channel that is going to play, if you dont, then that
channel will not be played back correctly with F6... (sorry, but i didnt feel
like putting in any back-trace-into-the-compressed-patterns-logic in at this
point in spacetime) and remember that whatever instrument was set for a
channel at the end of a pattern will remain into the next pattern and will be
used in that pattern unless another instrument for that channel is set.