Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
sound:psg:mml:squirrel:manual [2020/11/29 11:26] – Initial Save Before I lose my progress arkhan | sound:psg:mml:squirrel:manual [2020/11/30 05:38] (current) – [HOW TO USE SQUIRREL [H2U]] arkhan | ||
---|---|---|---|
Line 51: | Line 51: | ||
We're not savages. | We're not savages. | ||
+ | |||
+ | |||
+ | {{ : | ||
+ | |||
+ | ---- | ||
=====CHANGENOTES===== | =====CHANGENOTES===== | ||
Line 69: | Line 74: | ||
====[2/15 & 5/22]==== | ====[2/15 & 5/22]==== | ||
- | * Fixed an error in the explanation of volume command. | + | |
- | ranging from 0-31, AND panning. | + | |
- | the V in .channel 0 is global for the entire sound circuit. | + | * The V in .channel 0 is global for the entire sound circuit. |
- | is local to that channel. | + | |
- | + | | |
- | Also, I typoed the value of the volume. | + | |
- | + | ||
- | Slight oversight there. | + | |
- | mentioned! | + | |
====[5/ | ====[5/ | ||
- | * Added new files to the contents of Squirrel section. Namely, it is all stuff you don't need | + | * Added new files to the contents of Squirrel section. Namely, it is all stuff you don't need to touch or worry about. |
- | to touch or worry about. | + | |
* Turns out you can't do individual channel tempos like originally thought. | * Turns out you can't do individual channel tempos like originally thought. | ||
- | |||
* I read something wrong. | * I read something wrong. | ||
| | ||
| | ||
- | + | ---- | |
- | + | =====SQUIRREL STUFF===== | |
- | | + | |
- | =====TABLE OF CONTENTS===== | + | |
- | + | ||
- | - What is Squirrel? | + | |
- | - Contents | + | |
- | - How To Use | + | |
- | - Example in detail | + | |
- | - Macros/ | + | |
- | - Waves & Envelopes | + | |
- | - Drums [DRM] | + | |
- | - COMMAND REFERENCE | + | |
- | - Preset Reference | + | |
- | - Sound effects! | + | |
- | - Other Stuff | + | |
- | + | ||
- | If you are wondering, yes I put some nerdy D&D references in the " | + | |
====WHAT IS SQUIRREL? [WIS]==== | ====WHAT IS SQUIRREL? [WIS]==== | ||
Line 116: | Line 98: | ||
If you do use this in a game ever, all we ask is that you credit us for it, AND SPREAD THE WORD | If you do use this in a game ever, all we ask is that you credit us for it, AND SPREAD THE WORD | ||
- | .......and send me half the money! | + | .......and send me half the money! |
- | + | ---- | |
- | + | ====CONTENTS OF SQUIRREL [CON]==== | |
- | ====CONTENTS OF SQUIRREL [CON]==== | + | < |
mml2pce.exe: | mml2pce.exe: | ||
squirrel.c: | squirrel.c: | ||
Line 149: | Line 131: | ||
You can also ignore psg_bios.asm, | You can also ignore psg_bios.asm, | ||
+ | </ | ||
* note you really only need to worry about the executable, and squirrel.c | * note you really only need to worry about the executable, and squirrel.c | ||
+ | ---- | ||
====HOW TO USE SQUIRREL [H2U]==== | ====HOW TO USE SQUIRREL [H2U]==== | ||
First, some information regarding WSG. or PSG. Whatever you want to call it. I call it God's gift to chiptunes. | First, some information regarding WSG. or PSG. Whatever you want to call it. I call it God's gift to chiptunes. | ||
- | *It has SIX channels numbered 1 thru 6. (or 0-5, depending who you ask or what you read!) | + | |
- | + | * Channels 5 and 6 (the last two), may be set to white noise mode, thus generating white noise, aka drums, with the proper enveloping. | |
- | *Channels 5 and 6 (the last two), may be set to white noise mode, thus generating white noise, aka drums, with the proper enveloping. | + | * Each channel has a left and right panning volume. |
- | + | ||
- | *Each channel has a left and right panning volume. | + | |
- | **MML EXPLANATION OMITTED AS IT APPEARS IN THE WIKI ALREADY** | + | __****MML EXPLANATION OMITTED AS IT APPEARS IN THE WIKI ALREADY****__ |
There are some more commands usable in Squirrel. | There are some more commands usable in Squirrel. | ||
Line 176: | Line 157: | ||
The test file (squirrel.c) also is setup to play test sound effects. | The test file (squirrel.c) also is setup to play test sound effects. | ||
+ | < | ||
Button I: Plays subtrack 1 | Button I: Plays subtrack 1 | ||
Button II: Plays subtrack 2 | Button II: Plays subtrack 2 | ||
+ | </ | ||
You may be confused beyond all belief right now. (What is a subtrack!? | You may be confused beyond all belief right now. (What is a subtrack!? | ||
Line 199: | Line 182: | ||
WORK. | WORK. | ||
- | Usage: | + | '' |
- | mml2pce input_file | + | mml2pce input_file'' |
If there is a problem, It will tell you! | If there is a problem, It will tell you! | ||
Line 211: | Line 194: | ||
Step 3: | Step 3: | ||
======= | ======= | ||
- | The compiler (assuming all went well), will spit out an .ASM file or 2, depending how long your song | + | The compiler (assuming all went well), will spit out an .ASM file or 2, depending how long your song turned out. It will also have a snginit.c. |
- | turned out. It will also have a snginit.c. | + | From here you are able to use the squirrel.c program and play the song! You need not actually open the .asm or snginit.c files. |
- | and play the song! You need not actually open the .asm or snginit.c files. | + | |
- | fully functional automagically. | + | |
- | made in the same directory as your .mml file. | + | |
+ | Leave all the hard stuff up to Squirrel! | ||
+ | |||
+ | The ASM files will be made in the same directory as your .mml file. | ||
+ | |||
+ | < | ||
---------------- | ---------------- | ||
Compile it with: | Compile it with: | ||
Line 223: | Line 208: | ||
OR | OR | ||
huc squirrel.c | huc squirrel.c | ||
+ | </ | ||
You'll get an .iso or a .pce! run it in an emulator and rejoice at your glorious music. | You'll get an .iso or a .pce! run it in an emulator and rejoice at your glorious music. | ||
- | A make file (make.bat) is included. | + | A make file (make.bat) is included. |
- | to change which file it will build. | + | |
- | Thats it! No fiddling with ASM, or having to program anything. | + | Thats it! No fiddling with ASM, or having to program anything. |
- | programmers! | + | ---- |
- | + | ====EXAMPLE [EXP]==== | |
- | ====EXAMPLE 4) [EXP]==== | + | **NOTE: I CUT MOST OF THE SONG OUT, AS IT IS IRRELEVANT TO THE EXPLANATION!!!!!** |
- | #################################################################################################### | + | |
- | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ | + | |
- | || || | + | |
- | || EXAMPLE SONG EXAMINED IN DETAIL, COMPLETE WITH EXPLANATION OF SQUIRREL SPECIFIC COMMANDS! | + | |
- | || || | + | |
- | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ | + | |
- | NOTE: I CUT MOST OF THE SONG OUT, AS IT IS IRRELEVANT TO THE EXPLANATION!!!!! | + | |
First, the Squirrel Specific Commands that will appear here. (See the full table at the end of the | First, the Squirrel Specific Commands that will appear here. (See the full table at the end of the | ||
doc for EVERYTHING in one quick reference location!) | doc for EVERYTHING in one quick reference location!) | ||
- | '' | + | < |
---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ||
NAME| Description | NAME| Description | ||
Line 253: | Line 231: | ||
P | Channel Panning | P | Channel Panning | ||
---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ||
- | '' | + | </ |
--Please reference the included file (/ | --Please reference the included file (/ | ||
- | **You use .TRACK to section off each individual song. The name following it is up to you. | + | You use .TRACK to section off each individual song. The name following it is up to you. You can have more than one .TRACK in a file. |
- | You can have more than one .TRACK in a file. Insanity' | + | |
+ | Insanity' | ||
Each one is played in code with psgPlay(track# | Each one is played in code with psgPlay(track# | ||
Line 264: | Line 243: | ||
'' | '' | ||
- | **Next, you define each .CHANNEL' | + | Next, you define each .CHANNEL' |
- | global, entire song specific stuff. | + | |
- | over-ridden by anything a specific channel does (Such as change it's tempo). | + | Macros get defined in channel 0 also. You will get to learn about macros in a little bit. |
- | channel 0 also. You will get to learn about macros in a little bit. | + | |
- | Also note, the volume that is set in channel 0 is the global volume for the ENTIRE sound circuit. | + | Also note, the volume that is set in channel 0 is the global volume for the ENTIRE sound circuit. You can give each channel its own volume, and panning along with this. |
- | You can give each channel its own volume, and panning along with this. | + | |
Think of it like this, a stereo mixer board: | Think of it like this, a stereo mixer board: | ||
Line 278: | Line 255: | ||
Channel 1 thru 6: CHANNEL VOLUME (V) and PANNING (P#,#) | Channel 1 thru 6: CHANNEL VOLUME (V) and PANNING (P#,#) | ||
- | imagine the volume command being a knob, and you have one for each channel, and then you have one | + | imagine the volume command being a knob, and you have one for each channel, and then you have one more, a very large one, which then increases the entire thing in unison. :) |
- | more, a very large one, which then increases the entire thing in unison. :) | + | |
- | Channels 1 through 6 are your actual song channels. | + | Channels 1 through 6 are your actual song channels. |
- | would like. | + | |
< | < | ||
Line 326: | Line 301: | ||
That is what macro and repeats are for!!!!! | That is what macro and repeats are for!!!!! | ||
- | + | ---- | |
====MACROS AND LOOPS! [MAC]==== | ====MACROS AND LOOPS! [MAC]==== | ||
Macro: Basically, mapping a shorter name to a longer input sequence. | Macro: Basically, mapping a shorter name to a longer input sequence. | ||
Line 360: | Line 334: | ||
...And again, you define macros in .CHANNEL 0, after any initial paramters are set up. | ...And again, you define macros in .CHANNEL 0, after any initial paramters are set up. | ||
- | ~~~~~~~~ | + | '' |
example: | example: | ||
- | ~~~~~~~~ | + | ~~~~~~~~'' |
< | < | ||
Line 381: | Line 355: | ||
That's it. Oh man. It doesn' | That's it. Oh man. It doesn' | ||
- | ~~~~~~~~ | + | '' |
example: | example: | ||
- | ~~~~~~~~ | + | ~~~~~~~~'' |
- | '' | + | < |
+ | .CHANNEL 1 bassline | ||
P15,15 @01 @E01 | P15,15 @01 @E01 | ||
- | (bass)'' | + | (bass) |
+ | </ | ||
There you go. it will play your bass macro one time on that channel. | There you go. it will play your bass macro one time on that channel. | ||
Line 399: | Line 375: | ||
[# MMLSTRING] or [# | [# MMLSTRING] or [# | ||
- | ~~~~~~~~ | + | '' |
example: | example: | ||
- | ~~~~~~~~ | + | ~~~~~~~~'' |
+ | < | ||
.CHANNEL 1 bassline | .CHANNEL 1 bassline | ||
P15,15 @01 @E01 | P15,15 @01 @E01 | ||
[58(bass)] | [58(bass)] | ||
+ | </ | ||
BAM! That bassline will play a whopping 58 times, with that one little bit of typing. | BAM! That bassline will play a whopping 58 times, with that one little bit of typing. | ||
Line 412: | Line 390: | ||
So you see, you can use macros and loops together to organize your songs in a very nice, orderly, | So you see, you can use macros and loops together to organize your songs in a very nice, orderly, | ||
easy to use manner. | easy to use manner. | ||
- | + | ---- | |
====Waves and Envelopes [WAV]==== | ====Waves and Envelopes [WAV]==== | ||
Waves and Envelopes! | Waves and Envelopes! | ||
Line 435: | Line 412: | ||
Example: | Example: | ||
~~~~~~~~ | ~~~~~~~~ | ||
- | + | < | |
- | '' | + | .WAVE 45 Chirp |
0x10, 0x1E, 0x1A, 0x14, 0x1A, 0x1E, 0x16, 0x10 | 0x10, 0x1E, 0x1A, 0x14, 0x1A, 0x1E, 0x16, 0x10 | ||
0x1A, 0x1F, 0x1C, 0x12, 0x16, 0x18, 0x10, 0x06 | 0x1A, 0x1F, 0x1C, 0x12, 0x16, 0x18, 0x10, 0x06 | ||
0x12, 0x1C, 0x10, 0x0C, 0x0E, 0x10, 0x06, 0x02 | 0x12, 0x1C, 0x10, 0x0C, 0x0E, 0x10, 0x06, 0x02 | ||
- | 0x08, 0x12, 0x0C, 0x04, 0x08, 0x0E, 0x08, 0x04 '' | + | 0x08, 0x12, 0x0C, 0x04, 0x08, 0x0E, 0x08, 0x04 |
+ | </ | ||
| | ||
You may then use @45 to select this wave with your song. | You may then use @45 to select this wave with your song. | ||
Line 502: | Line 480: | ||
these ADSR envelopes to their fullest potential! | these ADSR envelopes to their fullest potential! | ||
| | ||
- | ~~~~~~~~ | + | '' |
Example: | Example: | ||
- | ~~~~~~~~ | + | ~~~~~~~~'' |
.adsr 16 sample | .adsr 16 sample | ||
r 32 L 31744 d 200 L 16384 d 20 | r 32 L 31744 d 200 L 16384 d 20 | ||
Line 512: | Line 490: | ||
(positive r, negative d, positive d, negative r), you should come out OK. | (positive r, negative d, positive d, negative r), you should come out OK. | ||
- | I have experimented with the adsr envelopes quite a bit, but if anyone finds them to be functioning | + | I have experimented with the adsr envelopes quite a bit, but if anyone finds them to be functioning differently than what has been described here, please feel free to inform me asap. I will be more than happy to update this explanation. |
- | differently than what has been described here, please feel free to inform me asap. I will be more | + | |
- | than happy to update this explanation. It is probably the strangest part of the entire Squirrel | + | It is probably the strangest part of the entire Squirrel system. |
- | system. | + | |
| | ||
---------------- | ---------------- | ||
Pitch Envelopes: | Pitch Envelopes: | ||
---------------- | ---------------- | ||
- | Pitch envelopes are to change the pitch of the notes. | + | Pitch envelopes are to change the pitch of the notes. |
- | a ton of other strange things. | + | |
- | There is not much to it. You simply string together step-changing values similar to how you would | + | There is not much to it. You simply string together step-changing values similar to how you would detune with the command @D. Values range from -127 to 128 |
- | detune with the command @D. Values range from -127 to 128 | + | |
- | ~~~~~~~~ | + | '' |
Example: | Example: | ||
- | ~~~~~~~~ | + | ~~~~~~~~'' |
'' | '' | ||
.Pitch 0 sample | .Pitch 0 sample | ||
0, 1, 4, 6, 8, 12, 16 | 0, 1, 4, 6, 8, 12, 16 | ||
'' | '' | ||
- | | ||
- | | ||
--------------------- | --------------------- | ||
Modulation Envelopes: | Modulation Envelopes: | ||
Line 542: | Line 515: | ||
need to. You just may not get as good of a result without it. | need to. You just may not get as good of a result without it. | ||
- | ~~~~~~~~ | + | '' |
Example: | Example: | ||
- | ~~~~~~~~ | + | ~~~~~~~~'' |
+ | < | ||
.Envelope | .Envelope | ||
.Mod 0 sample | .Mod 0 sample | ||
0, | 0, | ||
- | | + | </ |
Modulation envelope values range from -127 to 127. | Modulation envelope values range from -127 to 127. | ||
NOTE: This envelope can also be used to make race-car noises. | NOTE: This envelope can also be used to make race-car noises. | ||
- | start experimenting! | + | start experimenting! |
- | + | ---- | |
====PERCUSSION [DRM]==== | ====PERCUSSION [DRM]==== | ||
What song is complete without drums? | What song is complete without drums? | ||
Line 564: | Line 537: | ||
It is best to show with an example. | It is best to show with an example. | ||
- | '' | + | < |
+ | .Perc 0 | ||
| | ||
C#: E01 W00 P15, | C#: E01 W00 P15, | ||
Line 576: | Line 550: | ||
| | ||
A#: E17 W45 P15,15 T940 T103 N31 N27 N29 N26 | A#: E17 W45 P15,15 T940 T103 N31 N27 N29 N26 | ||
- | | + | |
- | | + | </ |
Explanation of commands: | Explanation of commands: | ||
Line 590: | Line 565: | ||
Note though, that this panning value changes the panning of that channel. | Note though, that this panning value changes the panning of that channel. | ||
whatever it was before the panning change. | whatever it was before the panning change. | ||
- | |||
T: Sound interval number. | T: Sound interval number. | ||
Line 606: | Line 580: | ||
@M1 enters a channel into percussion mode. | @M1 enters a channel into percussion mode. | ||
+ | ---- | ||
====COMMAND REFERENCE [CMD]==== | ====COMMAND REFERENCE [CMD]==== | ||
Line 673: | Line 647: | ||
If any of these are unclear, please feel free to email aetherbyte@gmail.com to ask for clarification | If any of these are unclear, please feel free to email aetherbyte@gmail.com to ask for clarification | ||
- | + | ---- | |
====WAVE AND ENVELOPE REFERENCE [WAV]==== | ====WAVE AND ENVELOPE REFERENCE [WAV]==== | ||
Line 752: | Line 725: | ||
15: interesting tremolo with soft tone and some sustain/ | 15: interesting tremolo with soft tone and some sustain/ | ||
</ | </ | ||
- | + | ---- | |
- | + | ||
- | + | ||
====SOUND EFFECTS [SFX]==== | ====SOUND EFFECTS [SFX]==== | ||
Sound Effects | Sound Effects | ||
Line 771: | Line 741: | ||
All you need to do to create a subtrack is the following: | All you need to do to create a subtrack is the following: | ||
- | '' | + | < |
+ | .SUBTRACK | ||
.channel | .channel | ||
V31 O1 @M0 P15,15 L16 @16 | V31 O1 @M0 P15,15 L16 @16 | ||
.channel 6 | .channel 6 | ||
c | c | ||
- | '' | + | </ |
Note, this is basically a brand new song. You setup channel 0 as mentioned previously, and then setup any channels you want THIS sound effect to play on. | Note, this is basically a brand new song. You setup channel 0 as mentioned previously, and then setup any channels you want THIS sound effect to play on. | ||
Line 794: | Line 765: | ||
...and an awesome song! | ...and an awesome song! | ||
- | + | ---- | |
====OTHER STUFF [OST]==== | ====OTHER STUFF [OST]==== | ||
You can include files within files using Squirrel. | You can include files within files using Squirrel. | ||
Line 815: | Line 785: | ||
We will be more than happy to explain. | We will be more than happy to explain. | ||
+ | ---- | ||
Well, there you have it! Squirrel! | Well, there you have it! Squirrel! | ||
Line 835: | Line 805: | ||
--Arkhan | --Arkhan | ||
+ | {{ : |