How can I get all channels to actually produce any sound?

Started by Theultimate12, June 04, 2016, 15:12:01

Previous topic - Next topic

Theultimate12

I know that this is a pretty noobish question, but I am trying to make a MMX cover of Pokemon DPPt`s Gym Leader theme, but I cant really seem to get everything to work. So far, I have gotten all the samples I need and even a working MIDI, but I still cant do anything after that.

Also, how can a song be able to actually go through the SNES hardware? I was thinking of porting my songs to hacks like SMW, but I cant really seem to find a tutorial on how to make genuine SNES music, so that`s why I am asking. XD

Saga Musix

Quotebut I still cant do anything after that.
Maybe it's time to go through the beginner tutorial then.
Once you have passed that, feel free to ask specific questions. "I don't know what do it" is not a specific question.

QuoteAlso, how can a song be able to actually go through the SNES hardware?
You can create SPC files from modules using SNESMOD.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Theultimate12

Quote from: Saga Musix on June 04, 2016, 18:36:02
Quotebut I still cant do anything after that.
Maybe it's time to go through the beginner tutorial then.
Once you have passed that, feel free to ask specific questions. "I don't know what do it" is not a specific question.

QuoteAlso, how can a song be able to actually go through the SNES hardware?
You can create SPC files from modules using SNESMOD.

Well, I am planning on actually making my SNES styled music go through the hardware for hacks, but I cant really seem to find any tutorials that show how to do that, nor have I found how to do it in the OpenMPT tutorial. And yes, I have already downloaded SNESMOD. I might try and see if I can look at both tutorials on how to do it, but I dont really know if that will be enough, especially when I cant seem to find most of what to do on the SNESMOD tutorial on the OpenMPT tutorial. Sorry for bothering you, btw. XD

Saga Musix

QuoteWell, I am planning on actually making my SNES styled music go through the hardware for hacks
I cannot quite imagine what you could mean by this apart from creating an SPC file to play it right on the SNES, so I cannot help you here. OpenMPT is not an SNES-specific tool so there is no functionality here to help you to this done for you. OpenMPT can only help you with writing the actual piece of music, but adhering to the SNES limitations (e.g. maximum sample lengths, sample rate limits and the maximum of 8 channels) is up to you.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Theultimate12

Quote from: Saga Musix on June 04, 2016, 19:35:38
QuoteWell, I am planning on actually making my SNES styled music go through the hardware for hacks
I cannot quite imagine what you could mean by this apart from creating an SPC file to play it right on the SNES, so I cannot help you here. OpenMPT is not an SNES-specific tool so there is no functionality here to help you to this done for you. OpenMPT can only help you with writing the actual piece of music, but adhering to the SNES limitations (e.g. maximum sample lengths, sample rate limits and the maximum of 8 channels) is up to you.

Yeah, I think that I might try SNESGSS then, but the samples I got didnt really seem to work in there, so I might try and find working samples for it and look at a tutorial for that program instead. Thanks for helping me, though!

Brozilla

#5
If you wanna go deep then learning "MML" is the most accurate way to make SNES music. While SNESGSS is by no means a poor tracker it is incomplete AFAIK. IIRC no main volume adjustments or any options for the echo buffer, at the time when I used it [my] knowledge of the SNES weren't so hot and really wanted that echo buffer so decided against it. Whether your issues are trivial is beyond me but I'm assuming your knowledge of tracking is enough to get started so here are a few SNES things to keep in mind.

1.Sample length must be aligned by 16. Sample loop point must also be aligned by 16. There is no end loop, that is the sample will be played to the very end..
Example: Sample Length 224, loop start 192. If neither of these can divide into 16 then they may not loop properly.

2. Sample playback cannot exceed 128khz. I forgot why that is but if you have a 32khz sample you cap out at 3 octaves above. The lower pitch is not limited but you begin losing accuracy (dsp uses Fixed Point numbers)

3. Samples are always compressed and stored into a BRR format in ARAM. 9/32 compression ratio. The smallest block of BRR is 16 samples which is why yours (as mentioned above) should adhere to 16 sample boundaries for predictable results (space-wise it's more efficient.)

*4. Maximum of 8 voices.

5. Instruments may either user ADSR or GAIN (custom envelopes.) It's good practice to always define an instrument envelope no matter how generic.

6. All samples must fit within 64kb of ARAM. By N-SPC specs 16kb is reserved for other things such as sequence data so chop that into 48kb max.

7. Each 16ms of delay by the echo buffer costs 2kb of ram. Max echo delay is 240 or 30kb. IIRC 2kb is automatically used if echo buffer is defined.

8. FIR filter only affects echo buffer output. 8-Taps.

9. Feedback is also an echo buffer attribute. values range from -128 -> 127.

10. Main Volume L, R and Echo Volume L, R also ranges from -128 -> 127. That is a negative volume will indeed inverse the waveform (Dolby Surround IIRC.)

That's the most I can come up with the top of my head. Obviously if I didn't use OpenMPT I wouldn't be here  ;D but most of those should be enough to get you started. Fitting your samples into ARAM is probably the most difficult..... for me anyways since my echo buffer is typically around 128ms, so for the price of more "pleasant" reverb my samples often lack some clarity presented in official titles.

*Through echo buffer exploits it's been said you can achieve 32 channels. This is probably 16 "true" channels and those delayed to make 32 "effective" channels but doing so would require you to write your own sound engine in ASM which is probably not what you're looking for.
___________________________________________________________________________________________________________
I use SNESMOD, link posted by Saga Musix. If we're using a MIDI you'd naturally import the song as such. Only issue is you end up with a bunch of extra channels so first and foremost you're gonna need to condense them into 8. Usually it'll fit (extremely song dependent, but in your case it should) as the extra channels are usually overflow and "echo." You can cut down on the work by opening and even editing the midi directly. Once you clean up & condense channels you will deal with the instruments. By default they all have envelopes and most of them are multi-sampled, therefore you're going to need to edit the note entries so that they're bound to one sample. Once the instruments are taken care of everything else should be straight forward.
44.1 vs. 48khz sampling rate

FreezeFlame(Alchemy)

QuoteFitting your samples into ARAM is probably the most difficult..... for me anyways since my echo buffer is typically around 128ms, so for the price of more "pleasant" reverb my samples often lack some clarity presented in official titles.
Or he might try to downsample the instruments that have low harmonics (Flutes come in mind), and make all the others either 16384Hz or 32768Hz (works best with drums).
Blue Flames of the Night.

Was known as Alchemy before(with an Dialga picture).

Brozilla

Quote from: FreezeFlame(Alchemy) on June 07, 2016, 21:56:36
Or he might try to downsample the instruments that have low harmonics (Flutes come in mind), and make all the others either 16384Hz or 32768Hz (works best with drums).

The thing is I'm ASSUMING ultimate12 is using MMX samples which should be already compressed. A 128ms echo buffer is 16kb which could fit 4 14kb samples... delays above 192ms is pretty godly if you're trying to simulate a ice cave. But again the OP shouldn't have problems loading them into aram unless they're using over 10 different samples which is still doable.
44.1 vs. 48khz sampling rate

Theultimate12

#8
Quote from: Enumeratingw7 on June 06, 2016, 04:41:54
If you wanna go deep then learning "MML" is the most accurate way to make SNES music. While SNESGSS is by no means a poor tracker it is incomplete AFAIK. IIRC no main volume adjustments or any options for the echo buffer, at the time when I used it [my] knowledge of the SNES weren't so hot and really wanted that echo buffer so decided against it. Whether your issues are trivial is beyond me but I'm assuming your knowledge of tracking is enough to get started so here are a few SNES things to keep in mind.

1.Sample length must be aligned by 16. Sample loop point must also be aligned by 16. There is no end loop, that is the sample will be played to the very end..
Example: Sample Length 224, loop start 192. If neither of these can divide into 16 then they may not loop properly.

2. Sample playback cannot exceed 128khz. I forgot why that is but if you have a 32khz sample you cap out at 3 octaves above. The lower pitch is not limited but you begin losing accuracy (dsp uses Fixed Point numbers)

3. Samples are always compressed and stored into a BRR format in ARAM. 9/32 compression ratio. The smallest block of BRR is 16 samples which is why yours (as mentioned above) should adhere to 16 sample boundaries for predictable results (space-wise it's more efficient.)

*4. Maximum of 8 voices.

5. Instruments may either user ADSR or GAIN (custom envelopes.) It's good practice to always define an instrument envelope no matter how generic.

6. All samples must fit within 64kb of ARAM. By N-SPC specs 16kb is reserved for other things such as sequence data so chop that into 48kb max.

7. Each 16ms of delay by the echo buffer costs 2kb of ram. Max echo delay is 240 or 30kb. IIRC 2kb is automatically used if echo buffer is defined.

8. FIR filter only affects echo buffer output. 8-Taps.

9. Feedback is also an echo buffer attribute. values range from -128 -> 127.

10. Main Volume L, R and Echo Volume L, R also ranges from -128 -> 127. That is a negative volume will indeed inverse the waveform (Dolby Surround IIRC.)

That's the most I can come up with the top of my head. Obviously if I didn't use OpenMPT I wouldn't be here  ;D but most of those should be enough to get you started. Fitting your samples into ARAM is probably the most difficult..... for me anyways since my echo buffer is typically around 128ms, so for the price of more "pleasant" reverb my samples often lack some clarity presented in official titles.

*Through echo buffer exploits it's been said you can achieve 32 channels. This is probably 16 "true" channels and those delayed to make 32 "effective" channels but doing so would require you to write your own sound engine in ASM which is probably not what you're looking for.
___________________________________________________________________________________________________________
I use SNESMOD, link posted by Saga Musix. If we're using a MIDI you'd naturally import the song as such. Only issue is you end up with a bunch of extra channels so first and foremost you're gonna need to condense them into 8. Usually it'll fit (extremely song dependent, but in your case it should) as the extra channels are usually overflow and "echo." You can cut down on the work by opening and even editing the midi directly. Once you clean up & condense channels you will deal with the instruments. By default they all have envelopes and most of them are multi-sampled, therefore you're going to need to edit the note entries so that they're bound to one sample. Once the instruments are taken care of everything else should be straight forward.

Yeah, sorry about not replying earlier, I JUST saw your post on my video. But yeah, the one thing that I hate about SNESGSS is that it has no echo or reverb, which might make songs not sound as great. I think I am gonna try and look at the OpenMPT tutorial, along with what you said here so I can see what I am doing wrong. Again, thanks so much for helping me guys! XD

EDIT: Also, one thing: I have been trying to set the configurations to what you said, but I am not really finding any tutorials who says on how to even find how to set them up. Is there a part on the OpenMPT that says where can you change these? Tbh, this was the one reason I didnt really like OpenMPT and had to give up after one week of trying to even start the actual song. XD

Saga Musix

QuoteEDIT: Also, one thing: I have been trying to set the configurations to what you said, but I am not really finding any tutorials who says on how to even find how to set them up. Is there a part on the OpenMPT that says where can you change these?
Most of the mentioned things are purely informational and cannot be configured in OpenMPT.
The only things that you can directly influence from that list are:
1. The sample lengths and loop starts must be divisible by 16: You can edit samples in the sample editor.
2. Samples with a high sampling rate should be resampled to something less than 32 KHz, which can also be achieved using the resampler tool from the sample editor.
4. Changing the number of pattern channels to 8 can be done through the Song Properties.
5. Just be sure you are in instrument mode and enable some kind of volume envelope.
Everything else is just manually keeping track that you are staying within the limits of the system.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Brozilla

#10
Quote from: Theultimate12 on June 09, 2016, 13:32:29
Yeah, sorry about not replying earlier, I JUST saw your post on my video. But yeah, the one thing that I hate about SNESGSS is that it has no echo or reverb, which might make songs not sound as great. I think I am gonna try and look at the OpenMPT tutorial, along with what you said here so I can see what I am doing wrong. Again, thanks so much for helping me guys! XD

EDIT: Also, one thing: I have been trying to set the configurations to what you said, but I am not really finding any tutorials who says on how to even find how to set them up. Is there a part on the OpenMPT that says where can you change these? Tbh, this was the one reason I didnt really like OpenMPT and had to give up after one week of trying to even start the actual song. XD

OpenMPT by its nature is not a SNES Tracker. The most accurate way to do things is through MML (scripting language) and at smwcentral there are tools to ease into it. However at the time it was too difficult (not that I can read mml well) so we're gonna scratch that.

Generating an SPC is done by a program called "xm2snes" or "SNESMOD." xm2snes does not provide options for echo buffer so in that case it isn't really better than SNESGSS. SNESMOD does and it's in the link provided by SagaX, author by Mukunda. Get a hold of the program first which is most important. Once you do that it'll be smooth sailing. The Author put in a readme "snesmod_music" and it'll tell you how to setup stuff such as echo buffer.

This is a basic "starter pack" example: https://onedrive.live.com/redir?resid=5A3B4F072C63425D!241&authkey=!AMtmoCFIUwqS8ls&ithint=folder%2cit
[I should not be redistributing the MIDI of someone else so forgive me.]
Contains 2 .it files. An .it that is derived from the midi and an original track (albeit old.) They both illustrate things slightly different because SNESMOD ALSO HAS PROBLEMS. It doesn't properly implement "KEY OFF" so you have to manually note cut/note fade or else you risk some noise which you will get from the Eterna Forest. The Waterworld file is an example of how to better emulate the key off which requires increasing the precision of the track.

With the files use SNESMOD (drag 'em to smconv) to make an SPC. There is a bug in that it creates a 74kb file, this should be 64/65kb instead. Opening them should let you see a little how to enable the echo buffer which is also on the readme. In OpenMPT there is a comments section, the semicolon is to help reader and is not part of the setup.

[[SNESMOD]]
EDL 9
EFB 80
EVOL 64 -64
EFIR 70 16 2 0 3 2 0 1
EON 1 2 3 4 5 6 7 8
______________
[[SNESMOD]]
Echo Delay Line. Multiply this number by 16 to find the ms of delay. 16x9 = 144 thus 144ms of delay. 32ms is more common with 48ms (EDL 3) being average.
Echo Feedback. The output loops in a feedback buffer continuously to simulate more echos. Feedback will cover up the audio without the FIR filter at higher levels.
Echo Volume. Unaltered, echo is just a delay. Naturally the higher the volume the louder your delay. First number is LEFT channel, 2nd RIGHT channel. Negative value inverse waveform.
FIR coefficients. This is tricky and you should read about it. However it may act as a lowpass, highpass, or any kind of filter but it's only applied to the echo buffer. Normally you can get away without using it 127 0 0 0 0 0 0 0 but in order for more realistic reverberation it's gonna be required.
Echo Channel toggle. Enables Echo on respective channels, you can toggle them on/off mid song but I prefer to always leave it enabled. Your SFX should echo in a reverberant environment.
44.1 vs. 48khz sampling rate

Theultimate12

Quote from: Enumeratingw7 on June 09, 2016, 22:13:24
Quote from: Theultimate12 on June 09, 2016, 13:32:29
Yeah, sorry about not replying earlier, I JUST saw your post on my video. But yeah, the one thing that I hate about SNESGSS is that it has no echo or reverb, which might make songs not sound as great. I think I am gonna try and look at the OpenMPT tutorial, along with what you said here so I can see what I am doing wrong. Again, thanks so much for helping me guys! XD

EDIT: Also, one thing: I have been trying to set the configurations to what you said, but I am not really finding any tutorials who says on how to even find how to set them up. Is there a part on the OpenMPT that says where can you change these? Tbh, this was the one reason I didnt really like OpenMPT and had to give up after one week of trying to even start the actual song. XD

OpenMPT by its nature is not a SNES Tracker. The most accurate way to do things is through MML (scripting language) and at smwcentral there are tools to ease into it. However at the time it was too difficult (not that I can read mml well) so we're gonna scratch that.

Generating an SPC is done by a program called "xm2snes" or "SNESMOD." xm2snes does not provide options for echo buffer so in that case it isn't really better than SNESGSS. SNESMOD does and it's in the link provided by SagaX, author by Mukunda. Get a hold of the program first which is most important. Once you do that it'll be smooth sailing. The Author put in a readme "snesmod_music" and it'll tell you how to setup stuff such as echo buffer.

This is a basic "starter pack" example: https://onedrive.live.com/redir?resid=5A3B4F072C63425D!241&authkey=!AMtmoCFIUwqS8ls&ithint=folder%2cit
[I should not be redistributing the MIDI of someone else so forgive me.]
Contains 2 .it files. An .it that is derived from the midi and an original track (albeit old.) They both illustrate things slightly different because SNESMOD ALSO HAS PROBLEMS. It doesn't properly implement "KEY OFF" so you have to manually note cut/note fade or else you risk some noise which you will get from the Eterna Forest. The Waterworld file is an example of how to better emulate the key off which requires increasing the precision of the track.

With the files use SNESMOD (drag 'em to smconv) to make an SPC. There is a bug in that it creates a 74kb file, this should be 64/65kb instead. Opening them should let you see a little how to enable the echo buffer which is also on the readme. In OpenMPT there is a comments section, the semicolon is to help reader and is not part of the setup.

[[SNESMOD]]
EDL 9
EFB 80
EVOL 64 -64
EFIR 70 16 2 0 3 2 0 1
EON 1 2 3 4 5 6 7 8
______________
[[SNESMOD]]
Echo Delay Line. Multiply this number by 16 to find the ms of delay. 16x9 = 144 thus 144ms of delay. 32ms is more common with 48ms (EDL 3) being average.
Echo Feedback. The output loops in a feedback buffer continuously to simulate more echos. Feedback will cover up the audio without the FIR filter at higher levels.
Echo Volume. Unaltered, echo is just a delay. Naturally the higher the volume the louder your delay. First number is LEFT channel, 2nd RIGHT channel. Negative value inverse waveform.
FIR coefficients. This is tricky and you should read about it. However it may act as a lowpass, highpass, or any kind of filter but it's only applied to the echo buffer. Normally you can get away without using it 127 0 0 0 0 0 0 0 but in order for more realistic reverberation it's gonna be required.
Echo Channel toggle. Enables Echo on respective channels, you can toggle them on/off mid song but I prefer to always leave it enabled. Your SFX should echo in a reverberant environment.

Hmm, so I can use the IT files as reference, right? Well, I think I got most of what I need to do now. But yeah, thanks for all the help! You are actually helping me tons on making these remixes, and I really appreciate it. If I can ever make the song I am intended to do now (which is basically Bass`s theme from Megaman 7), I will definitely credit you. XD

Brozilla

Quote from: Theultimate12 on June 09, 2016, 22:30:29
Hmm, so I can use the IT files as reference, right? Well, I think I got most of what I need to do now. But yeah, thanks for all the help! You are actually helping me tons on making these remixes, and I really appreciate it. If I can ever make the song I am intended to do now (which is basically Bass`s theme from Megaman 7), I will definitely credit you. XD
Essentially yes. While you can use whatever midi (if even then) you want I included the Eterna Forest because by default when you open a MIDI you end up with over 8 channels. SNESMOD will crash if you use more than 8 channels so you have to combine them, which is shown in the .it file. The other one, like mentioned before, is emulating "Key Off" which is required to eliminate clicking that may occur. And no you do not need to credit me, stuff like this is pretty niche so we gotta cling together ;)
44.1 vs. 48khz sampling rate

Theultimate12

Quote from: Enumeratingw7 on June 09, 2016, 22:46:09
Quote from: Theultimate12 on June 09, 2016, 22:30:29
Hmm, so I can use the IT files as reference, right? Well, I think I got most of what I need to do now. But yeah, thanks for all the help! You are actually helping me tons on making these remixes, and I really appreciate it. If I can ever make the song I am intended to do now (which is basically Bass`s theme from Megaman 7), I will definitely credit you. XD
Essentially yes. While you can use whatever midi (if even then) you want I included the Eterna Forest because by default when you open a MIDI you end up with over 8 channels. SNESMOD will crash if you use more than 8 channels so you have to combine them, which is shown in the .it file. The other one, like mentioned before, is emulating "Key Off" which is required to eliminate clicking that may occur. And no you do not need to credit me, stuff like this is pretty niche so we gotta cling together ;)

All right. So, I have already done everything that I could to make the song work on a actual SNES (along with getting a working MIDI file for the song), and now I am starting the remix. One thing that I had a lot of problems with SNESGSS was how off-tune the instruments were, and it still seems to be like that in OpenMPT. My question is: what can I do to make the instruments actually sound like the actual song? I know it isnt the MIDI anymore because the MIDI I have is way more faithful to the actual song than the other MIDI files I have gotten (though I have some doubts, so...), and i dont think pitchbending (Portamento) is any good. So, well... I am asking this here. XD

Saga Musix

My best guess would be that your melodic samples don't have loop lengths that are divisible by 16, so the tool probably adjusts the loop length, but by changing the loop length of a sample with a very short loop, you also change the loop's pitch. So make sure that all loop lengths are divisible by 16, and then manually adjust the frequency of the sample until it's correct again (or try using the auto-tuner by clicking on the tuning fork icon).
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.