Espozo wrote:
bazz wrote:
Espozo wrote:
Wow, that's actually pretty awesome! So if I really wanted to (even though I'm not going to) I could probably nearly recreate all the instruments that play in the song while using a fraction of the space. The only thing is, It seems a bit more difficult to do this sort of thing when it comes to sound effects. Could you would use HDMA to constantly stream the sound effects, allowing more room for the actual song? I plan on using 6 channels for the actual song and 2 for sound effects, so could you have it to where an HDMA port works with one sound effect and the second for the other?
I wouldn't stream the sound effects, I would just load them into the SPC, and send a command to the SPC telling it to play that sound effect.
Well, I mean this wouldn't be the ideal thing to do, but if you have just about no space left for sound effects in ram, then you might have to.
I just think it's funny that you're learning about the non-traditional mechanics of SPC when you came here asking for an introduction, and for some reason the main topic has been streaming high quality audio or streaming BRR with HDMA and all this crap and it's like.. Is that seriously how you introduce someone to SPC audio hardware???
No!! It isn't!! We should be talking about the tradition of classic SPC music, which is not streaming, but tracking!!
Tracking is at the heart of SPC because it is sample-based.
1) Tracking -- you really ought to download a tracking application like Renoise, MilkyTracker, Schism Tracker ... these are the kind of sequencing tools people use to make sample-based music. If you actually learn how to do some basic tracking (Renoise has EXCELLENT tutorials -- google "renoise tutorial", here is a great example, the first tutorial to Renoise! :
http://files.renoise.com/videos/Renoise ... rt%201.mp4 -- you might feel like you're learning Renoise but you actually learning also the fundamentals of every Tracker software
Understanding tracking is going to help you understand the fundamentals of how most games use the SPC -- and you will be able to
visually see how most events will be parsed by an SPC driver. for basic level, we can say by rhythmically playing samples back at certain pitches and certain volumes.
Not only does SPC play the samples, it can shape them too. The most fundamental way to do this is by the ADSR envelope. Go, learn about it! There is also echo, pitch modulation, and noise, but these should be considered bonus topics until you understand the basics of tracking.
The SPC DSP has hardware ADSR envelope implementation, unlike most tracking software which define a software implementation. There is also a gain mode which has other ADSR qualities, or can be used in defining your own custom ADSR envelopes, I want you to know that but it's not something you should focus on.
Tracking then gets deep in-depth with "effects commands".. But I'm not going into that, I'm trying to lay a map for you. With the notion of SPC, we can consider effects commands as a way of modifying the DSP registers in interesting ways while the song is playing, for instance vibrato, which would alter the sample's pitch at specified rates, rates which may be associated mathematically with the BPM of the song.
-------
2) SPC and Tracking
How does the SPC rhythmically play music??? The answer is timers! The SPC has 3 of them!! You can do whatever with them --You set SPC to go off at a certain rate in time and you can base quarter notes 8th notes etc. from the timer.
But yeah!! once you have a timer firing, you can then play certain samples rhythmicaly!! That's it basically!
The rest is just special limitations of SPC700, and other Super Nintendo specifics.. but that's the nature of tracking and roughly how SPC correlates.
3) Choosing what song to play, or what SFX to play -- How does that work?
To do this, a protocol must be established, and the SPC must parse the SNES IO registers in the SPC loop, it checks for certain commands and command parameters on the SPC IO ports that you define.. when the SNES writes the trigger values and parameters, the SPC can react accordingly, ie "ie command:play SFX, parameter:#2" ..
4) Getting data to SPC from SNES
There is a communications protocol .. bla bla [I'm getting tired]
4) Putting it all together!!!
Not many people have put all of this together .. I am working on SNES Tracker which will do all of the above eventually.. Also there is pre-existing solutions like SNESMod and SNESGSS. But to actually put it all together, you will need ALOT.. and this is why for the most part people have relied on non-native solutions like SNESMOD -- which translates something originally not purposed for SNES into something that may work on SNES -- the downside of these solutions is that you can't hear immediately how they will sound on the SNES, for instance, especially if they use the SNES DSP-only effects like Pmod or echo.. -- SNESGSS is the closest it's gotten as far as "native" level released software goes... SNESGSS, along with SNES Tracker, uses an SPC emulator inside it so that the user can actually hear and interface with the "real" thing as he develops the music.
If you want to experiment doing things manually.. here's what you would do :
1) Use Bregalads BRR Tools and convert some small WAV file to BRR
2) Write an SPC program
. a barebones SPC program to play a sample. To do this, you need to decide a start address for the SPC program in SPC memory. let's say $200, then write a SPC program in something like TASM or wla-spc700 that inits the SPC and plays a sample.. primarily you must set FLG register, main / voice volume registers, voice ADSR/gain (use direct gain it's easiest), and set the DIR address, and create DIR entries.. I'll write a tutorial on this.. maybe.. maybe not..
You must have wondered what is DIR?? hehe
. include the SPC program and BRR sample in a SNES program that uploads to the SPC -- you need to learn how to communicate and send the data to SPC, but it is essentially just "send this many bytes from some place in SNES memory to some place in SPC memory, and maybe do that again from/to other places, and then start executing SPC from some SPC Address" .. that's it.