{"id":7554533,"url":"https://github.com/nathancassano/snesgss","last_synced_at":"2025-05-15T12:30:36.667Z","repository":{"id":29656668,"uuid":"33198489","full_name":"nathancassano/snesgss","owner":"nathancassano","description":"SNES GSS (Game Sound System)","archived":false,"fork":false,"pushed_at":"2024-03-10T09:22:17.000Z","size":19442,"stargazers_count":108,"open_issues_count":12,"forks_count":13,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-11-19T12:48:42.850Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nathancassano.png","metadata":{"files":{"readme":"readme.txt","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-03-31T17:06:25.000Z","updated_at":"2024-11-09T02:57:52.000Z","dependencies_parsed_at":"2024-11-19T12:39:03.944Z","dependency_job_id":"8a5bfd82-0896-49fb-b6c6-c7c09e027581","html_url":"https://github.com/nathancassano/snesgss","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nathancassano%2Fsnesgss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nathancassano%2Fsnesgss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nathancassano%2Fsnesgss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nathancassano%2Fsnesgss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nathancassano","download_url":"https://codeload.github.com/nathancassano/snesgss/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254340837,"owners_count":22054930,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-04-08T01:26:40.050Z","updated_at":"2025-05-15T12:30:36.651Z","avatar_url":"https://github.com/nathancassano.png","language":"C++","funding_links":[],"categories":["[↑](#table-of-contents) Music"],"sub_categories":["Trackers"],"readme":"SNES Game Sound System (or Solution)\r\n\r\nv1.42 20.02.17 - Instrument selection in the main menu\r\nv1.41 25.05.14 - MIDI input device can be changed in the config file\r\nv1.4  24.05.14 - paste over; shifting markers and labels in multichannel\r\n                 Expand/Shrink; MIDI input support\r\nv1.31 03.04.14 - song duration estimate, displayed in the window header\r\nv1.3  02.04.14 - Output monitor and built-in tuner; minor fixes\r\nv1.23 01.04.14 - SPC700 driver fix to remove noise burst on initialize\r\n\t\t\t\t heard on the real HW and latest snes9x versions\r\nv1.22 30.03.14 - sections list for easier navigation\r\nv1.21 06.03.14 - volume scale dialog, minor fixes and improvements\r\nv1.2  26.12.14 - volume column added, Vxx effect removed; Mxy renamed to\r\n                 Vxy, old modules will be converted automatically;\r\n\t\t\t\t panning support; optional sample loop unrolling for\r\n\t\t\t\t better quality\r\nv1.11 24.12.14 - FamiTracker text import feature\r\nv1.1  07.09.14 - improvements to the order-less design\r\nv1.02 25.08.14 - minor fixes, SPC700 driver improvements\r\nv1.01 18.08.14 - important bug fixes, more features, transpose dialog\r\nv1.0  15.08.14 - first release version, with all planned features\r\n      22.07.14 - development of the new system has started\r\n        ~06.11 - the old system, including spcbank, xm2data, and SPC700\r\n\t\t         code; the new system is based on its parts.\r\n\r\n\r\n\r\nThe sole purpose of this software is to make music and sound effects for\r\nSNES homebrew games. It is not meant to be a stand-alone music authoring\r\nsoftware in any way.\r\n\r\n\r\n\r\nThe editor works in semi-interactive mode. This means that the result of\r\nany changes (even mute controls) will only be heard after restarting the\r\nsong, you can't hear the changes immediately. It is supposed that during\r\nediting the song is mostly played using the Enter key (play from current\r\nposition).\r\n\r\nThe system architecture uses a single sample bank for every song and\r\nsound effect in a game. The sound driver along with sample bank is fully\r\nloaded at start up. Sound effects created as shorter songs (marked as\r\nsound effect), they also loaded along with the driver. Larger songs are\r\nloaded on a one-by-one basis. It is kind of MIDI concept, music files\r\nonly contain notes and commands, while sound bank contains the actual\r\nsounds used by the music files.\r\n\r\nIt is supposed that WAV samples are resampled and looped in an external\r\naudio editor, Wavosaur or similar. The samples should be 16 bit mono,\r\nsampled at 8000, 16000, or 32000 Hz (the latter is preferable), with\r\nmelodic content preferably tuned to B (of any octave) +21 cent. In other\r\nwords, change pitch of a C-tuned sample 79 cents down. The reason behind\r\nthis is the BRR encoding that works with 16 sample blocks, with this\r\ntuning a simple waveform will be a multiple of 16, improving looping\r\nquality. Pitch table is calculated to map the B +21 sampled instrument\r\nto actual C note on the C key, producing the standard tuning. To play\r\na sample close to its original sample rate, use B key.\r\n\r\nThe editor could be invoked as a command line application to perform\r\nproject file to set of resulting files conversion. Use snesgss.exe\r\nfilename.gsm -e [optional export path]\r\n\r\nThe MIDI import supports both format 0 and 1. It expects that notes are\r\nplaced in channels 1-8 (or 1-6 plus drum channel), and there is no more\r\nthan 1 note in a channel at a time. It imports notes only, with\r\ninstrument assigned by the channel number. If the drum channel is\r\npresent, it gets imported into SNES channels 7-8, channel 7 is used for\r\nhats, and channel 8 for kick, snare, and toms. Instrument numbers\r\nassigned to different drums are 10 for kick, 11 for snare, 12 for toms,\r\n13 for hats.\r\n\r\n\r\n\r\nGeneral\r\n\r\nF1 \t\t\t\tSong editor\r\nF2\t\t\t\tSong list editor\r\nF3 \t\t\t\tInstrument editor\r\nF4              Info\r\n\r\nSong editor\r\n\r\nUp,Down\t\t\tMove the cursor one row up/down\r\nPgUp,PgDown\t\tMove the cursor one page up/down, the page size is set in the config file\r\n\r\nLeft,Right\t\tMove the cursor between columns\r\nTab,Shift+Tab \tMove the cursor between the same columns of the channels\r\n\r\nNumbers\t\t\tEnter a number value (speed, instrument number, effect value)\r\nNote keys\t\tEnter a note in the song editor, or play a note in the instrument editor\r\n\r\nDelete\t\t\tDelete a note, a number, or selection without shifting other notes\r\nBackspace\t\tDelete a note field, shifting everything below and moving the cursor up\r\nInsert\t\t\tInsert a blank note field, shifting everything below down\r\n\r\nCtrl+F\t\t\tFind section, shows list of all named and unnamed sections of the song\r\nCtrl+G\t\t\tEdit current row number, to navigate through the song faster\r\n                Pressing Enter returns the cursor back to the position where it was originally\r\n\r\nCtrl+1..8\t\tToggle channel mute\r\nCtrl+0\t\t\tToggle solo mode for current channel\r\n\r\n[ ]             Change auto step, 0 to 16\r\n\r\nNumpad / * \t\tChange octave, 1 to 8\r\nNumpad 1..8\t\tSet octave\r\n\r\nF5\t\t\t\tPlay song from beginning\r\nF7\t\t\t\tPlay song from current row\r\nF8\t\t\t\tStop playing\r\nEnter\t\t\tHold down to play from current row\r\n\r\nSpace\t\t\tSet section break on current row\r\nHome\t\t\tGo to previous section\r\nEnd\t\t\t\tGo to next section\r\n`               Enter section name, only used for easier navigation (see Ctrl+F)\r\n\r\nCtrl+[ ]\t\tChange measure, each song has its own measure\r\n\r\nCtrl+Home\t\tSet loop position (the row that will be played after loop)\r\nCtrl+End\t\tSet song length (the last actual row)\r\n\r\nCtrl+Z\t\t\tUndo last change in the song text, one step\r\n\r\nShift+Cursor\tSet block selection for block functions\r\n\r\nCtrl+A\t\t\tSelect all channels, all fields. First key press\r\n                selects current section (if any), next key\r\n\t\t\t\tpress selects the whole song length\r\nCtrl+L\t\t\tSelect current channel, all fields, section or whole song\r\n\r\nCtrl+X\t\t\tCut selection\r\nShift+X\t\t\tCur selection and shift the rows below up\r\nCtrl+C\t\t\tCopy selection\r\nCtrl+V\t\t\tPaste selection\r\nShift+V\t\t\tPaste selection and shift existing rows down\r\nCtrl+B\t\t\tPaste selection over existing content\r\n\r\nCtrl+F1\t\t\tTranspose selection semitone down\r\nCtrl+F2\t\t\tTranspose selection semitone up\r\nCtrl+F3\t\t\tTranspose selection octave down\r\nCtrl+F4\t\t\tTranspose selection octave up\r\n\r\nCtrl+E\t\t\tExpand selection\r\nCtrl+S\t\t\tShrink selection\r\n\r\nNumpad + -\t\tSwitch between sub songs\r\n\r\n\r\nClicking on the pattern header changes the channel mute setting.\r\nLeft click toggles the mute for a channel, right click toggles the solo mode for a channel.\r\n\r\nClick left mouse button and move the mouse while holding the button to make a block selection.\r\n\r\nDouble click on a channel selects a section in that channel; if the Shift key is down, it\r\nselects the whole song length.\r\n\r\n\r\n\r\nRow fields\r\n\r\nRRRR SS [CH1..CH8]\r\n\r\nRRRR is the row number\r\nSS   is speed, could be set per row, 1 to 99 (fastest to slowest, default is 20).\r\nCH1..CH8 are note fields, see below\r\n\r\n\r\n\r\nNote fields\r\n\r\nC#3iiVVEvv\r\n\r\nC  is note (# sharp)\r\nii is the instrument number, 1..99\r\nVV is the volume, 0..99 (lowest to highest)\r\nE  is the effect name\r\nvv is the effect value, only editable if the effect is specified\r\n\r\n\r\n\r\nEffects\r\n\r\nAll effect values are decimal, in 0..99 range.\r\n\r\nAll effects applied to the channel continuously. To turn off an effect other than the pan,\r\nuse it with 00 as value\r\n\r\nTxx is (de)Tune, sets constant pitch offset that is applied to all following notes\r\nUxx is Slide Up, 0 is none, 1 is slowest, 99 is fastest\r\nDxx is Slide Down\r\nPxx is Portamento, 0 is note, 1 is slowest, 99 is fastest; has priority over the Slide\r\n       P99 is legato mode, pitch changes instantly, like on a new note, but without key on\r\nSxx is Pan, 0 is the leftmost, 50 is the center, 99 is the rightmost positions\r\nVxy is Vibrato, x is speed (1 slowest, 9 fastest), y is depth (1 min, 9 max)\r\nR.. is Repeat, it repeats previous section in current channel, from beginning of the section\r\n\r\n\r\n\r\nNote keys\r\n\r\n1 or A is the rest note\r\n\r\nCurrent octave\r\n\r\n S D   G H J   L :\r\nZ X C V B N M \u003c \u003e ?\r\n\r\nNext octave\r\n\r\n 2 3  5 6 7  8 9\r\nQ W E R T Y U I O P\r\n\r\n\r\n\r\nExport and use\r\n\r\nWhen all music and sound effects created, the project can be exported\r\n(File\u003eExport) for further use in a SNES program. The editor exports\r\na number of files:\r\n\r\nspc700.bin -  contains compiled SPC700 driver code, samples, sound effects\r\n              data. This means you don't need to use a SPC700 assembler.\r\n\r\nmusic_N.bin - contains music data. Each sub song that is not marked as a\r\n              sound effect will be exported into separate file. This allows\r\n\t\t\t  to save room for more sample data, while music data is only\r\n\t\t\t  loaded when needed.\r\n\r\nsounds.asm  - contains incbin's in the WLA DX format, considering LoROM\r\n              configuration.\r\n\r\nsounds.h    - contains automatically generated aliases for every sub song\r\n              and sound effect, as well as sub song names.\r\n\r\nThe latter two files aren't necessary, they meant to be used in a specific\r\nSNES dev environment. The interfacing part of the environment is provided\r\nalong with the editor in the /snes/ directory, it consist of two files,\r\nsneslib.asm and sneslib.h. There are 65816 assembly functions to load the\r\nSPC700 driver and communicate with it, as well as C interface to these\r\nfunctions.\r\n\r\nYou can either adapt provided code for your purposes, or create a new one,\r\nusing the code as a guide. spc700.bin loading and starting address is\r\n$0200. When the driver is loaded, communication is done through APU ports\r\nusing the communication routines (see snes/sneslib.asm:542 and beyond).\r\nDriver loading code is in snes/sneslib.h:774. 'Play a sound effect'\r\nfunction is in sneslib.asm:842, it also uses spc_command_asm routine\r\n(uniform for most commands), which is in sneslib.asm:658.\r\n\r\nThe spc700.asm file in the /snes/ directory is only provided for reference,\r\nin case you're interested in internals of the driver. It does not need to\r\nbe compiled or otherwise used in a SNES program.\r\n\r\nTake a note that, unlike the editor or exported SPC file, driver starts in\r\nmono mode, for compatibility reasons, as many old TV sets does not have\r\nstereo, and some part of the sound would be missing. To get stereo output,\r\nthe stereo enable command must be sent first.\r\n\r\n\r\n\r\nMusic data format\r\n\r\nHeader:\r\n\r\n+0 1 how many channels in the song\r\n+1 2 absolute address of the first channel\r\n+3 2 absolute address of the second channel (if exists)\r\n...\r\n\r\nChannel:\r\n\r\nSeries of bytes interpreted as follows:\r\n\r\n  0..148       short delay\r\n149..244       note in semitones (C-1..B-8)\r\n     245       keyoff\r\n     246,L,H   long delay, followed with two bytes of the delay duration, up to 65535\r\n247..253       song effects:\r\n     247,V     volume, byte of the volume is 0..127\r\n\t 248,P     pan, byte of the pan is 0..255 (128 is center)\r\n     249,D     detune, byte of the detune\r\n     250,S     slide up or down, byte of the slide is signed -99..99\r\n     251,P     portamento, byte of the slide is 0..99\r\n     252,M     vibrato, byte of the vibrato parameters (high nibble is depth 0..9, low nibble is speed 0..9)\r\n     253,L,H,C reference, next three bytes are reference absolute address and reference length (0..255 bytes)\r\n     254,I     instrument change, followed with byte of the instrument number 0..99\r\n     255,L,H   loop, followed with two bytes of absolute address of the loop point\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnathancassano%2Fsnesgss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnathancassano%2Fsnesgss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnathancassano%2Fsnesgss/lists"}