fbpx
Skip to main content

MIDI Forum

Master channel pitc...
 
Notifications
Clear all

Master channel pitch? (And other pitch issues)

17 Posts
5 Users
0 Reactions
5,528 Views
Jason
Posts: 424
Honorable Member
Topic starter
 

Is there some sort of master pitch for a channel that further pitch changes can be based off of? (In a MIDI file specifically)
Several of the songs in the current soundtrack I am converting have strange out-of-tune issues. There are pitch changes throughout the song on what I currently have mapped as Tuba, maybe meant to replicate vibrato or similar. Problem is, overall the entire Tuba section is flat (vs the various strings, which all sound correct). So I am looking for a way to maintain the current pitch variation values, but increase the overall pitch of the whole channel by maybe +50 or +100.

 
Posted : 15/08/2023 10:21 pm
Clemens Ladisch
Posts: 321
Reputable Member
 

In General MIDI, the only per-channel pitch controller is the Pitch Bend message.
In GM2/GS/XG, you could use the Scale/Octave Tuning Adjust message to shift all twelve semitones by the same amount.

 
Posted : 16/08/2023 10:40 am
Bavi_H
Posts: 266
Reputable Member
 

I think you'll have to adjust all of the tuba's pitch bends with something like Cakewalk's Process menu, "Find/Change" command or Sekaiju's Edit menu, "Modify Event's Value" command.

By the way, I'm curious why the spc2midi converter got the tuba's pitch wrong and I'm considering investigating futher. Could you tell me the song you are talking about that has the flat tuba in its MIDI file conversion?

If I find anything interesting to share, is there an SNES forum or other appropriate place you can suggest where we might possibly discuss more of the SNES side of the SPC to MIDI file conversion processes?

 
Posted : 16/08/2023 3:02 pm
Jason
Posts: 424
Honorable Member
Topic starter
 

I wish I had a more concrete answer, but it probably comes down to several factors: the very unfinished nature of the converter; the fact that there is no standard audio engine for the SNES (each game company made there own, or modified an existing one); and the SNES doesn't provide absolute pitch values, only relative values to what the audio sample is.

Two tracks in particular,
3 (4a) Time of the Falling Rain - all throughout
and
31 Credits (staff Roll) - this get rather cacophonous around the 3 minute mark
originals here:
https://www.zophar.net/music/nintendo-snes-spc/legend-of-zelda-the-a-link-to-the-past
Attached are the WIP versions of those two tracks. Both have been run through Anvil Studio already, so if you want to look at the raw output from spc2mid, I'll have to convert them again. It creates a type 0 file, mine are currently type 1.

As for an alternate forum for further SNES discussion, hmm. Don't really have an answer for that either 😉 I checked the game music forum at Zophar, but it doesn't seem like the right fit, nor does the other forum I know because it is strictly Castlevania related.

 
Posted : 16/08/2023 10:25 pm
Jason
Posts: 424
Honorable Member
Topic starter
 

I reconverted the two tracks (songs). Credits is missing the percussion track (snare drum) because that gets exported by itself and merged in after I fix some things up.
These two files are the raw conversion.

 
Posted : 16/08/2023 10:36 pm
Jason
Posts: 424
Honorable Member
Topic starter
 

I just looked over the event lists in Cakewalk, it has a good display for pitch wheel.

For "Time of the Falling Rain", what is happening is that the strings are all getting a pitch bend from 0 to +200 for their vibrato. For some reason, the first 7 seconds the tuba also get positive pitch wheel from 100 to 250, but after 7:06, each tuba channel gets a -100 and then all remaining pitch wheel values all go negative, so -150 to 0.

I'm guessing if I can add the correct amount to all of the values after 7:06, then everything will sound as it should.

As for why it would do this? Who knows :p

 
Posted : 18/08/2023 11:14 am
Jason
Posts: 424
Honorable Member
Topic starter
 

I was able to use the search/replace in Cakewalk, search each tuba track for "Pitch Wheel" from -150 to 0, and replace with pitch wheel from 100 to 250. Seems to have done the trick!

Credits will probably be more tricky.

Attached the modified version so you can hear the difference.

 
Posted : 18/08/2023 11:35 am
Jason
Posts: 424
Honorable Member
Topic starter
 

[quotePost id=19603]If I find anything interesting to share, is there an SNES forum or other appropriate place you can suggest where we might possibly discuss more of the SNES side of the SPC to MIDI file conversion processes?[/quotePost]
Perhaps the SNES section on
https://forums.nesdev.org/

They have a specific NES music section, but not a SNES music section. There's only "SNESDev" and "SNESdev Homebrew Projects".

All sorts of other dev info for the SNES can be found in their wiki
https://snes.nesdev.org/wiki/Main_Page

 
Posted : 18/08/2023 11:42 am
tariq
Posts: 2
New Member
 

The range of the master pitch is 24 semitones meaning it can shift the pitch up by 12 semitones or down by 12 semitones.

 
Posted : 22/08/2023 5:36 am
Jason
Posts: 424
Honorable Member
Topic starter
 

What is the command to adjust the pitch bend range? Sort of related to my original question. I am currently applying a pitch bend of -8192 to the pitch bends that were present in the converted file so I can lower a percussion instrument's pitch. It is the only percussion instrument in this particular file. Currently, -8192 is giving me the default of -12 semitones. I'd like to test out -24 semitones (-2 octaves) to see if the sound better matches what is present in the game, but -16384 is not within the default range.
I read that it might be a NPRN setting, of which I currently know next to nothing about. I would need to be able to (probably in Sekaiju?) manually add the command in to the file.

 
Posted : 27/08/2023 11:53 am
Bavi_H
Posts: 266
Reputable Member
 

[quotePost id=19761]What is the command to adjust the pitch bend range?[/quotePost]
You can change the pitch bend range with Registered Parameter Number (RPN) 0. See the previous thread change pitchbend range.

Be aware that on some devices (such as some Casio keyboards) the maximum pitch bend range you can set is +/- 12 semitones. If you set something larger in your MIDI file, it won't work correctly on these devices.

 
Posted : 27/08/2023 1:52 pm
Jason
Posts: 424
Honorable Member
Topic starter
 

Thanks, and the extra tips about Cakewalk in the other thread will also help, because it will be messing my stuff up later on anyway 😀

 
Posted : 27/08/2023 3:17 pm
Jason
Posts: 424
Honorable Member
Topic starter
 

[quotePost id=19603]By the way, I'm curious why the spc2midi converter got the tuba's pitch wrong and I'm considering investigating futher. Could you tell me the song you are talking about that has the flat tuba in its MIDI file conversion?[/quotePost]

Apparently something in the sound engine for this game is messing with the converter (as in, the converter doesn't handle it properly). Several tracks have instruments incorrectly set to a volume of 0 (which I have experienced in some of the other soundtracks I completed previously). I also have several instance of pitch bend going wrong (like the tuba in the file from this post) and in one case, horribly wrong.

I traced that particular issue to the pitch bend by disabling it while running the converter, and it go rid of the mysterious "bonks" that were happening on what should have been a long sustained-and-pitch-bent note. With the pitch bend checkbox enabled, for some reason the single note is getting chopped in to several smaller (incorrect) notes, some of which have incredibly large (relatively speaking) pitch bends applied to them which do not match with the behaviour of any of the other notes immediately before or after the offending sections. I'm now trying to weed these out of my WIP file so it doesn't sound dumb :p

I've attached the two versions, both just using piano. "yes" version with pitch bend, "no" version without (including the test-midi-files output of each).

When I first started seriously working on my project, I wanted to write my own converter, but I soon found it would be too complicated for my uninformed brain. But at least I can eventually work around issues like these 😉

 
Posted : 27/08/2023 3:31 pm
Jason
Posts: 424
Honorable Member
Topic starter
 

I had to manually trace and correct/delete the pitch bend issues in this track.

I loaded Cakewalk to get a good view of the pitch wheel events that were happening, then I put it in to an Excel doc to try to decipher what was happening. I visually searched through the same track/instrument to find the same amount of pitch bend cycles. Most were 6 bends per cycle, in this case I needed 8. There was one other spot that had 8, so I marked down those values, and then put what was currently in the file, and tried to see if there was a nice formula that would fix them all.

Unfortunately, no, there was not**. So I had to do a find/replace for each pitch bend value individually. The 0 / 8100 values and -100 / -4900 values occurred on the same ticks, so they needed to be merged. I replaced the 8100 and -4900, as those were least likely to cause an erroneous replacement elsewhere. I then manually deleted the 0 and -100 values along with false notes that were added at these locations, and finally copied the length from the next real note and applied it to the formerly messed up note.

Now you can hear that it is correct for the first 3 loops. I need 2 full loops plus a 10 second fade in my final MIDI files, so the rest of it being messed up is not an issue.

Whoosh. Something new with every soundtrack!

**EDIT: oops, I did the difference math backwards. Most of the values are off by 4750, so I could have added 4750 to balance most out, but the 0 / 8100 values and -100 / -4900 values are still outside of that

 
Posted : 31/08/2023 2:54 pm
Jason
Posts: 424
Honorable Member
Topic starter
 

For the end credits song, all "Strings" were off by +250 pitch wheel. Made for some very "These kids need to rehearse more" listening. 😀 Sounds much better after find/replace 0 to 250 with -250 to 0. It was tricky getting Cakewalk to select just the strings without affecting the instruments around them. Fortunately very few instrument changes in the file, so I only messed up a handful of values that I easily fixed.

 
Posted : 04/09/2023 3:58 pm
Page 1 / 2
Share: