Silent Debuggers Is A WIP

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
sound:psg:mml:squirrel:manual [2020/11/29 11:33] – [CONTENTS OF SQUIRREL [CON]] arkhansound: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.
 +
 +
 +{{ :sound:psg:mml:squirrel:squirrelly.gif?nolink |}}
 +
 +----
  
 =====CHANGENOTES===== =====CHANGENOTES=====
Line 81: Line 86:
   large values, it was being truncated by the compiler anyways, so it shouldn't ruin any of your   large values, it was being truncated by the compiler anyways, so it shouldn't ruin any of your
   current drum sounds.  Just know that 4095 is the limit!   current drum sounds.  Just know that 4095 is the limit!
-  +---- 
-                  +=====SQUIRREL STUFF=====
-                           +
-=====TABLE OF CONTENTS===== +
- +
-  - What is Squirrel?  [WIS] +
-  - Contents           [CON]       +
-  - How To Use         [H2U] +
-  - Example in detail  [EXP] +
-  - Macros/Loops       [MAC]    vs    [PC]     <<< lol +
-  - Waves & Envelopes  [WAV] +
-  - Drums              [DRM] +
-  - COMMAND REFERENCE  [CMD] +
-  - Preset Reference   [PRE] +
-  - Sound effects!     [SFX] +
-  - Other Stuff        [OST] +
- +
-If you are wondering, yes I put some nerdy D&D references in the "search" functions.  TSR 4 LIFE+
  
 ====WHAT IS SQUIRREL? [WIS]====  ====WHAT IS SQUIRREL? [WIS]====
Line 109: 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!  maybe? +.......and send me half the money!  maybe?     
-         +----
 ====CONTENTS OF SQUIRREL [CON]====     ====CONTENTS OF SQUIRREL [CON]====    
 <code>    <code>   
Line 146: Line 134:
   
 * 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.  I've also called it "the chirpy thing" and "the chirpinator".   First, some information regarding WSG. or PSG.  Whatever you want to call it.  I call it God's gift to chiptunes.  I've also called it "the chirpy thing" and "the chirpinator".  
  
-*It has SIX channels numbered 1 thru 6. (or 0-5, depending who you ask or what you read!) +  * 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.  This is awesome.  It is one of the key reasons the PCE has such great music!  Stereo panning!
- +
-*Each channel has a left and right panning volume.  This is awesome.  It is one of the key reasons the PCE has such great music!  Stereo panning!+
  
-**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.  These will be explained shortly, with an accompanying example.  A full table reference is available at the end of this document for your viewing pleasure... There are some more commands usable in Squirrel.  These will be explained shortly, with an accompanying example.  A full table reference is available at the end of this document for your viewing pleasure...
Line 171: 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.
  
 +<code>
 Button I:  Plays subtrack 1 Button I:  Plays subtrack 1
 Button II: Plays subtrack 2 Button II: Plays subtrack 2
 +</code>
  
 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 194: Line 182:
 WORK. WORK.
  
-Usage: +''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 206: 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 +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.  They are generated and fully functional automagically.  
-and play the song!  You need not actually open the .asm or snginit.c files.  They are generated and +
-fully functional automagically.  Leave all the hard stuff up to Squirrel!  The ASM files will be  +
-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.
 +
 +<code>
 ---------------- ----------------
 Compile it with: Compile it with:
Line 218: Line 208:
 OR OR
 huc squirrel.c       (for HuCard projects) huc squirrel.c       (for HuCard projects)
 +</code>
  
 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.  It runs on Windows environments.  You can edit it with Notepad  +A make file (make.bat) is included.  It runs on Windows environments.  You can edit it with Notepad to change which file it will build.  
-to change which file it will build.  +
  
-Thats it!  No fiddling with ASM, or having to program anything.  This is designed for musicians, not +Thats it!  No fiddling with ASM, or having to program anything.  This is designed for musicians, not programmers!  If you are both, well then lucky you! ^_^ 
-programmers!  If you are both, well then lucky you! ^_^ +---- 
-  +====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!)
  
-''+<code>
 ---------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------
 NAME| Description           | SYNTAX NAME| Description           | SYNTAX
Line 248: Line 231:
 P   | Channel Panning       | P#,# where L,R volume are defined (0-15) P   | Channel Panning       | P#,# where L,R volume are defined (0-15)
 ---------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------
-''+</code>
  
 --Please reference the included file (/mmlsongs/Cathedral.mml) where needed! --Please reference the included file (/mmlsongs/Cathedral.mml) where needed!
  
-**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's soundtrack is all in one single file.+ 
 +Insanity's soundtrack is all in one single file.
  
 Each one is played in code with psgPlay(track#). Each one is played in code with psgPlay(track#).
Line 259: Line 243:
 ''.TRACK  Cathedral'' ''.TRACK  Cathedral''
  
-**Next, you define each .CHANNEL's data.  Channel 0 is your setup channel where you can define +Next, you define each .CHANNEL's data.  Channel 0 is your setup channel where you can define global, entire song specific stuff.  Anything in Channel 0 will effect the ENTIRE song, but is over-ridden by anything a specific channel does (Such as change it's tempo).  
-global, entire song specific stuff.  Anything in Channel 0 will effect the ENTIRE song, but is  +
-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.+
  
-Also note, the volume that is set in channel 0 is the global volume for the ENTIRE sound circuit. +Macros get defined in channel 0 also.  You will get to learn about macros in a little bit. 
-You can give each channel its own volume, and panning along with this.+ 
 +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.
  
 Think of it like this, a stereo mixer board: Think of it like this, a stereo mixer board:
Line 273: 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.  Define them as shown, and give a name if you +Channels 1 through 6 are your actual song channels.  Define them as shown, and give a name if you would like.  
-would like.  +
  
 <code> <code>
Line 321: 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 355: 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:
-~~~~~~~~+~~~~~~~~''
  
 <code> <code>
Line 376: Line 355:
 That's it.  Oh man.  It doesn't get much easier. That's it.  Oh man.  It doesn't get much easier.
  
-~~~~~~~~+''~~~~~~~~
 example: example:
-~~~~~~~~ +~~~~~~~~'' 
-''.CHANNEL 1 bassline+<code> 
 +.CHANNEL 1 bassline
 P15,15 @01 @E01 P15,15 @01 @E01
-(bass)''+(bass) 
 +</code>
  
 There you go.  it will play your bass macro one time on that channel.  Woo! There you go.  it will play your bass macro one time on that channel.  Woo!
Line 394: Line 375:
 [# MMLSTRING] or [#(MACRONAME)] [# MMLSTRING] or [#(MACRONAME)]
  
-~~~~~~~~+''~~~~~~~~
 example: example:
-~~~~~~~~+~~~~~~~~'' 
 +<code>
 .CHANNEL 1 bassline .CHANNEL 1 bassline
 P15,15 @01 @E01 P15,15 @01 @E01
 [58(bass)] [58(bass)]
 +</code>
  
 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 407: 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 430: Line 412:
 Example: Example:
 ~~~~~~~~ ~~~~~~~~
- +<code> 
-''.WAVE 45 Chirp+.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 
 +</code>
              
 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 497: 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 507: 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.  This is good for slide effects.  Along with +Pitch envelopes are to change the pitch of the notes.  This is good for slide effects.  Along with a ton of other strange things.
-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:
-~~~~~~~~+~~~~~~~~''
 ''.Envelope ''.Envelope
  .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 537: 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:
-~~~~~~~~+~~~~~~~~'' 
 +<code>
 .Envelope .Envelope
  .Mod 0 sample  .Mod 0 sample
  0,0,1,1,2,2,3,3,2,2,1,1,0,0,-1,-1,-2,-2,-3,-3,-2,-2,-1,-1  0,0,1,1,2,2,3,3,2,2,1,1,0,0,-1,-1,-2,-2,-3,-3,-2,-2,-1,-1
-      +</code>
 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.  You will notice this as soon as you  NOTE: This envelope can also be used to make race-car noises.  You will notice this as soon as you 
-start experimenting!   +start experimenting!        
-          +----
 ====PERCUSSION [DRM]==== ====PERCUSSION [DRM]====
 What song is complete without drums?  You may define and tweak drums using the white noise/tone What song is complete without drums?  You may define and tweak drums using the white noise/tone
Line 559: Line 537:
 It is best to show with an example.  This will define 12 drums, 9 of which all sound identical. It is best to show with an example.  This will define 12 drums, 9 of which all sound identical.
  
-''.Perc 0 +<code> 
 +.Perc 0 
        C:  E01 W00 P13,13 T4095 T4095 T3000                 C:  E01 W00 P13,13 T4095 T4095 T3000         
        C#: E01 W00 P15,15  T200  T400  T800 N15 N20 T1000 T750 N15 N20 T1000 T2000 T3000 T4095 N9 N15          C#: E01 W00 P15,15  T200  T400  T800 N15 N20 T1000 T750 N15 N20 T1000 T2000 T3000 T4095 N9 N15  
Line 571: Line 550:
        A:  E17 W45 P15,15 T940  T103      N31 N27 N29 N26        A:  E17 W45 P15,15 T940  T103      N31 N27 N29 N26
        A#: E17 W45 P15,15 T940  T103      N31 N27 N29 N26        A#: E17 W45 P15,15 T940  T103      N31 N27 N29 N26
-       B:  E17 W45 P15,15 T940  T103      N31 N27 N29 N26'' +       B:  E17 W45 P15,15 T940  T103      N31 N27 N29 N26 
-       +</code> 
 Explanation of commands: Explanation of commands:
  
Line 585: Line 565:
 Note though, that this panning value changes the panning of that channel.  It will not reset it to Note though, that this panning value changes the panning of that channel.  It will not reset it to
 whatever it was before the panning change. whatever it was before the panning change.
- 
  
 T: Sound interval number.  Experiment with this value.  It is the tonal frequency for the drum sound low numbers are high pitched and big numbers are lowpitched.  String them together for more thicker drums.  A bunch of large #'d T's with no noise can produce some nice kicks. T: Sound interval number.  Experiment with this value.  It is the tonal frequency for the drum sound low numbers are high pitched and big numbers are lowpitched.  String them together for more thicker drums.  A bunch of large #'d T's with no noise can produce some nice kicks.
Line 601: Line 580:
  
 @M1 enters a channel into percussion mode.  @M1 enters a channel into percussion mode. 
 +----
 ====COMMAND REFERENCE [CMD]==== ====COMMAND REFERENCE [CMD]====
  
Line 668: 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 747: Line 725:
 15: interesting tremolo with soft tone and some sustain/release.   15: interesting tremolo with soft tone and some sustain/release.  
 </code> </code>
- +----
- +
- +
 ====SOUND EFFECTS [SFX]==== ====SOUND EFFECTS [SFX]====
 Sound Effects Sound Effects
Line 766: 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  1   Beep+<code> 
 +.SUBTRACK  1   Beep
 .channel      .channel     
 V31 O1 @M0 P15,15 L16 @16  V31 O1 @M0 P15,15 L16 @16 
 .channel 6 .channel 6
 c c
-''+</code>
  
 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 789: Line 765:
  
 ...and an awesome song! ...and an awesome song!
- +----
 ====OTHER STUFF [OST]==== ====OTHER STUFF [OST]====
 You can include files within files using Squirrel.  This is great for keeping soundeffects in a separate file, and your main music in another. You can include files within files using Squirrel.  This is great for keeping soundeffects in a separate file, and your main music in another.
Line 810: Line 785:
 We will be more than happy to explain. We will be more than happy to explain.
  
 +----
  
 Well, there you have it!  Squirrel!   I hope this is not too overwhelming, and I hope everyone is  Well, there you have it!  Squirrel!   I hope this is not too overwhelming, and I hope everyone is 
Line 830: Line 805:
 --Arkhan --Arkhan
  
 +{{ :sound:psg:mml:squirrel:lolsquirrel.gif?nolink |}}
Print/export
QR Code
QR Code sound:psg:mml:squirrel:manual (generated for current page)