'[b]SPC'[/b] is the '[b]SNES/Super Famicom'[/b] sound format, named after its soundchip SPC700. The chip is capable of '[b]8 channels of sampled sound'[/b], a built-in '[b]echo system'[/b] with up to 224ms of delay, a FIR filter with 8 coefficients, a 32KHz noise clock, Pitch Modulation and ADSR envelopes, all with a 32KHz playback rate. An interesting quirk about the SPC700 is that it has a 64KB Audio RAM (ARAM) limit*, which will need to house everything, including your sound engine, sequence data, samples and echo delay. The SNES echo delay increments in jumps of 16ms, with the maximum being at 224ms (0x0F). Every jump subtracts 0x800 bytes (2KB) from the ARAM. This means that 0x0F delay will eat up 30KB, which is almost half of the ARAM. * 64KB is the limit for .spc; ROM file options .smc/.sfc can be larger because the song data will be offloaded to the ROM. '[#[I have never done this format] OK. If you have either '[b]1) a tracker that can produce .it or .xm'[/b]; or '[b]2) a DAW with VST and MIDI support'[/b], you can do this format comfortably. Less comfortable options (MML & standalone trackers) are listed in "Tools for creation" below as well. '[b]1)'[/b] You want to make an 8-channel .it or .xm file, which will be converted to .spc to submit for this format. In the "Tools for creation" list below, grab either SNESMOD (.it '[b]only'[/b]) or XMSNES (.xm '[b]only'[/b]). Both tools contain their own text documentation about what you can and cannot do - naturally there is not a full implementation of every effect in either module format. Notably, echo settings are done using song comments. '[o][Note: SNESMOD is more up-to-date than XMSNES if you are on the fence.]'[/o] '[b]2)'[/b] You want to grab the C700 VST from the "Tools for creation" list below. It's a VST designed to emulate the SNES's soundchip, and it just so happens to be able to "record" to .spc or .smc - perfect for BotB! Our very own '[l[https://battleofthebits.com/barracks/Profile/doctorn0gloff/[doctorn0gloff] has written an INCREDIBLE article on how to set up and use C700 to create authentic chiptune files: '[[C700 VST]. Sort of in parallel to what's written in this article, '[l[https://docs.google.com/document/d/1b__EpCPVwg3E5-4ahFODHJIB5DD3wCSsoJcEB_pajjw/edit?usp=sharing[here is a comprehensive, more in-depth guide] to making hardware authentic SNES chiptune files using C700 and SNESMOD, as well as a section on SNES samples. '[#[SNES crash course] This format uses samples, so the easiest way to get started with SNES is to use existing SNES samples; you can use your own, but there are quirks to its compression that may cause you hangups, so '[[spc (format)#Ripping samples from .spc files[read more about ripping samples below] if you want that. You can find the samples from many different SNES games in the bitpacks of the YEA VIDEOGAME remix OHB series (listed near the bottom of '[l[https://battleofthebits.com/lyceum/View/XHB+series/[this page]); you can also use '[l[https://cdn.discordapp.com/attachments/239107754575265803/802311561267249182/split700n.zip[split700n] to rip samples from .spc files yourself. The biggest thing that throws people is the 64KB data limit, which includes sound driver info, samples AND song data. '[b]If your .spc file seems to hang at a certain point, it probably ran out of memory.'[/b] This is especially common with '[b]C700 .spc output'[/b] as it is '[o]recording'[/o] rather than '[o]rendering'[/o]; every change in pitch/volume/panning data that takes up space (which adds up QUICK). Regardless of the tool it is a good idea to check your work fairly often, so you're not stuck submitting late to fix issues! If you're using C700, you have access to '[b].smc export'[/b] too, which can help make up for its data hogging because you are '[b]no longer restricted to 64KB'[/b]. Song data is offloaded to the ROM, so you can actually nearly fill C700 up to 64KB with just your chosen samples + delay settings if you export to .smc instead of .spc. '[b]If you're using SNESMOD, make sure you're using Instrument mode for your samples!'[/b] The converter will not work without Instruments; don't leave blank ones either, as they can cause problems. You may experience "pops" or "clicks" in your song too: most of the time this can be mitigated by cutting off a note 1 tick before a new note would trigger. (For example, use an "SC3" command the row before a new note, if you are working at speed 4.) At faster speed values, some pops may be caused by volume or panning shifts. Please refer to the included documentation and optimization .txt files included with SNESMOD for more info! You DO have access to the following features, which are covered further below: * ADSR envelopes * panning, vibrato, porta, the usual suspects * built-in echo delay which can range from 16ms to 240ms; however each increment of 16ms consumes an additional 2KB of your available 64KB * noise channel (not a very powerful one though) * weird FM ("Pitch Modulation") using one sample to frequency modulate another (chaotic high level feature) '[#[Features of the SPC700] '[t[b3]Samples'[/t] Samples on the SNES need to have their loop points in multiples of 16, where the loop end is also the end of the sample (so you can't have tails left after your loops). The SNES also has a built-in Gauss filter which can not be turned off. This filter is in place to keep the highs and lows of samples in control, so plan around that. '[t[b3]Noise'[/t] The noise clock has 32 set values for you to pick from, with the highest speed being 32KHz. Unlike the NES, it has no periodic noise, only white noise. It is also really loud, so keep it in control as best as you can. '[t[b3]Pitch Modulation'[/t] Do you like weird FM? Pitch Modulation is an interesting feature on the SNES. It can take whatever is on the first channel and blend it into the next one, and mixes it together based on pitch and ADSR/GAIN envelope. It can only act as a "2-op" modulator, since the effects of the first combination do not carry on to a third channel with it enabled. Virtually anything can be mixed with anything, but oftentimes it produces distortion or awfully detuned combinations. '[t[b3]Envelopes'[/t] There's two types of envelopes on the SNES: ADSR and GAIN, where GAIN has 5 different sub-types that allow for manual envelope writing. ADSR has one strange quirk, because the Sustain doesn't actually sustain unless the Release is set to be zero, otherwise it will just go straight into release. the format for ADSR is Attack (0x00-0x0F), Decay (0x00-0x07), Sustain (0x00-0x07) and Release (0x00-0x1F). As for GAIN, you get five different types as mentioned earlier: Direct (0x00-0x7F), Decay (0x80-0x9F), Exponential Decay (0xA0-0xBF), Increase (0xC0-0xDF) and Bent Line Increase (0xE0-0xFF). Direct will immediately set the envelope to the given value and sustains on that. Normal and Exponential Decay need to be triggered in the middle of your note, or else the note will not sound at all. Normal and Bent Line Increase can be used at any point, and it's noteworthy that ADSR and GAIN can work together. '[t[b3]Additional Info'[/t] A few final quirks and limits to note about the SNES: * Pitch stops at 0x3FFF, and then wraps around. * Sample rates are relative to the maximum pitch rate, so choose the base pitch of your sample wisely. * Volume ranges are 0x00-0x7F and 0xFF-0x80, the latter is for surround sound on all volume controls. * Echo and Master volume are relative to each other. Hard to explain, just mess around with it! '[#[Ripping samples from .spc files] Wanna rip samples from SNES games (or any .spc file) yourself? Look no further. You can download the soundtracks from old games at either of these locations: '[l[https://www.zophar.net/music/nintendo-snes-spc[Zophar's Domain SPC Archive] - contains .spc and .mp3 soundtracks of everything you could ask for '[l[http://snesmusic.org/v2/[SNESMusic Archive] - another thorough SPC collection with other SNES resources Alternatively you could rip samples from '[l[https://battleofthebits.com/browser/Format/spc[BotB entries] or use '[l[https://musical-artifacts.com/artifacts/2044[Lil'Sness], an original sample pack and General MIDI-compatible soundfont containing over 160 samples. To rip samples from .spc files we'll be using '[l[https://cdn.discordapp.com/attachments/239107754575265803/802311561267249182/split700n.zip[split700n]. Put whatever .spc files you want to rip into /bin/ and run extract.bat. If you're ripping a whole soundtrack you will end up with several hundred (or more) files! You can use '[l[https://www.mindgems.com/products/Fast-Duplicate-File-Finder/Fast-Duplicate-File-Finder-Download.htm[Fast Duplicate File Finder] or the duplicate finder tool in '[l[https://www.ccleaner.com/download[CCleaner] to clean up the many useless copies of samples. Some SNES OSTs used the same batch of samples for every song; those are the easy ones. Many, however, used some fancy "dynamic allocation" to call up different samples per track. Sifting through them may take a little time. Now you have a whole bunch of numbered .brr sample files. You can listen to 'em with '[l[https://www.smwcentral.net/?p=section&a=details&id=7009[BRRPlay]; crucially OpenMPT can also import .brr samples natively. Using either OpenMPT or the included "brr2wav.exe" in split700n, you can turn those .brr files into .wav files suitable for any sampler. This text's author has found brr2wav to be finicky about proper loop points at times, but on the other hand, occasionally OpenMPT fails to properly handle a batch of .brr's, instead loading up a bunch of noise (Plok is one example of a game that does this; not sure why). Both are useful! OpenMPT can tune samples as well, so you can easily prepare a whole game's worth of samples for, say, a weekly remix OHB series using split700n and OpenMPT. Helpful Tip: If you want to give readable names to your samples and you're using OpenMPT to get them ready, make sure you're using the Name field and, when you save your samples, change the output filename to %sample_name%.wav instead of %sample_filename%. Filename would a) truncate fairly quickly and b) end up saving as "brass.brr.wav" (for example). Weird stuff to keep in mind: * For reasons beyond this author's paygrade, lots of times you will end up with samples that are truncated versions of other samples. For example you might have a snare, and also a snare that's missing a bunch of data at the beginning but is otherwise the same sample. You might even have a lot of these files. Just delete 'em. If you find a sample that looks or sounds like it's just the tail of something else, it is almost certainly this weird thing. * Most games will have a handful of very short and fairly nonsensical waveforms amongst their samples. Not certain what they are but they may be used as envelopes somewhere. Usually these differ from games having simple waveforms as actual samples since those are specific shapes. Real samples also will have active loop points, whereas these do not. You can delete them comfortably or keep them if you like how they sound looped. Nothing wrong with it really. '[#[Restrictions on submit] Your submission should take one of two forms, both of which should be playable on hardware or in an emulator: 1) .spc (SNES chiptune song file) 2) .smc/.sfc file (SNES ROM) - no copyrighted content of course, and anything containing visuals should be judged solely on the music '[#[Tools for creation] * '[l[https://drive.google.com/file/d/17P4thxLaZPnT7VsFkXMbOsqeIPwA6TXV/view?usp=sharing[SNESMOD] - .it to .spc conversion tool originally by mukunda and further developed by '[l[https://battleofthebits.com/barracks/Profile/AugustusBlkheart/[Augustus Blackheart] and '[l[https://battleofthebits.com/barracks/Profile/KungFuFurby/[KungFuFurby]. Contains ample documentation on features + how to use. Original SNESMOD can still be found '[l[http://snes.mukunda.com/[here]. * '[l[https://cdn.discordapp.com/attachments/592900670391189528/844218502168313856/XMSNES-x64.zip[XMSNES] - .xm to .spc conversion tool by mukunda (with instructions). '[l[https://github.com/argarak/xmsnes-bin[Alternative link] * '[l[http://picopicose.com/software.html[C700 VST] - VST by '[l[https://battleofthebits.com/barracks/Profile/osoumen/[osoumen] which emulates the SPC700 soundchip. Can create .spc and .smc files! Check the article on C700 to get it set up to use for chiptune output: '[[C700 VST] > '[l[https://drive.google.com/file/d/1iRs3ZIZ3e_tuu5cE6BWjfYx71TDWX6Bz/view[C700 Microtunable] - '[l[https://battleofthebits.com/barracks/Profile/doctorn0gloff/[doctorn0gloff]'s fork of C700 VST which can utilize Scala tuning files. ('[l[https://drive.google.com/file/d/1uU6jdC-182HEpV1o_ENwJ2N8zpYQVRfX/view?usp=sharing[source]) * '[l[http://www.smwcentral.net/?p=section&a=details&id=11664[AddMusicK] - MML-based Super Mario World music editor made by Kipernal. Supports BRR, echo, gain and ADSR envelopes. > '[l[https://github.com/KungFuFurby/AddMusicKFF[AddMusicKFF] - '[l[https://battleofthebits.com/barracks/Profile/KungFuFurby/[KungFuFurby]'s newer fork of AddMusicK. * '[l[https://shiru.untergrund.net/software.shtml[SNES Game Sound System] - AKA SNESGSS, a standalone tracker by Shiru. * '[l[https://github.com/bazzinotti/snestracker[SNESTracker] - still in development '[#[Tools for playback] * '[l[https://dgrfactory.jp/spcplay/index.html#spcplay[SNES SPC700 Player] - AKA SPCPlay; considered the best tool for SPC playback. Recently updated (as of 2023-12-03)! * '[l[https://www.foobar2000.org/components/view/foo_gep[(fb2k) Game Emu Player] - AKA foo_gep, a component for the foobar2000 media player that plays many game sound formats including .spc. * '[l[https://github.com/bsnes-emu/bsnes[bsnes] - SNES emulator (for .smc/.sfc submissions) * '[l[https://www.zophar.net/snes/snes9x.html[Snes9x] - SNES emulator (for .smc/.sfc submissions) * '[l[https://www.plogue.com/products/chipsynth-sfc.html[chipsynth SFC] - [paid] VST by Plogue which contains a player for .spc files, though it cannot create them. For playback on actual hardware, the '[l[https://sd2snes.de/blog/[sd2snes] firmware can play .spc files from its menu. '[#[See also] - '[l[https://docs.google.com/document/d/1b__EpCPVwg3E5-4ahFODHJIB5DD3wCSsoJcEB_pajjw/edit?usp=sharing[SNES Chiptune Guide] - covers the musical features of the soundchip and how to achieve them with C700 VST or SNESMOD converter, as well as info about SNES samples + a repository of ripped samples from games (from the YEA VIDEOGAME OHB series) - '[[Program+for+the+SNES+APU] - Lyceum article proposing assembly source code example to operate the SNES APU