Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - MOD2PSG2 Questions

Reply to topic
Author Message
  • Joined: 20 Dec 2004
  • Posts: 187
Reply with quote
MOD2PSG2 Questions
Post Posted: Wed Jun 18, 2008 3:55 am
Alright, I'll just ask these here:

1. Is Channel 3 the only available channel for drum type sounds? I assume yes, but just checking.

2. Are 'drum sounds' on this chip managed only through manipulation of the noise tones? If not, what are the others I can use? I'm pretty sure that's all there is, but again, just checking.

3. How can I add effects to my sounds such as vibrato and trilling? Is the latter possible? If so, how can I achieve this sound through the edit interface? I mess around with what's there a bit, but this doesn't seem to be possible.

4. When adding harmonics, I was going to take a huge chunk of music data from one channel and throw it in another, bringing it down an octave for effect. Is it possible to take this chunk, select it, and lower it all down by one octave? I tried this but it didn't work.

That's it, pretty easy to use overall, and as I said in my other post, it's pretty spot-on for the most part, messing with octaves can get sounds closer to what you want, but in general I haven't found much difficulty switching what I write on a piano to this thing.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14752
  • Location: London
Reply with quote
Post Posted: Wed Jun 18, 2008 8:20 am
Stan wrote
Is Channel 3 the only available channel for drum type sounds

It's the only channel for noise-type sounds, yes.

Stan wrote
Are 'drum sounds' on this chip managed only through manipulation of the noise tones?

The chip has no concept of "drum sounds" only "square waves and noise". Noise is one way of making drums, but you can combine some tones to make a different sound. A quickly decreasing tone, commonly used for "laser" sound effects in older games, combined with noise makes a pretty good 80s-style synth drum sound, for example - see The Flash. Examine VGMs for more inspiration or examine some of the example PSGMODs.

Stan wrote
How can I add effects to my sounds such as vibrato and trilling?

Look in readme.txt, sections "Effects" and "Commands".

Stan wrote
Is it possible to take this chunk, select it, and lower it all down by one octave?

Look in readme.txt, section "Changing existing notes, effects and commands".
  View user's profile Send private message Visit poster's website
  • Joined: 25 Jul 2007
  • Posts: 732
  • Location: Melbourne, Australia
Reply with quote
Post Posted: Wed Jun 18, 2008 8:28 am
I've always thought it a shame the PSG has no envelope, would have made almost any sound possible with not too much effort.
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14752
  • Location: London
Reply with quote
Post Posted: Wed Jun 18, 2008 8:47 am
Manual envelopes are what the Z80's for :) The PSG really is a bargain-basement sound chip, it has almost no features, so it's amazing how good it can sound.
  View user's profile Send private message Visit poster's website
  • Joined: 27 May 2008
  • Posts: 161
Reply with quote
Post Posted: Wed Jun 18, 2008 8:59 am
If only line IRQs had worked during vblank you would've been able to do arbitrary duty cycles, sample playback and all kinds of stuff at approx 16 kHz..
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14752
  • Location: London
Reply with quote
Post Posted: Wed Jun 18, 2008 10:29 am
You could use H-ints during the active display and then poll the scanline counter during the VBlank. It screws your ability to do anything in the VBlank, and some timing hacks might be needed to make things line up during the switch, but you'd at least get a few thousand CPU cycles left over to run the game. If you could break up some of the game logic into very small chunks that can run between scanline polls then you'd get a few thousand more.
  View user's profile Send private message Visit poster's website
  • Joined: 27 May 2008
  • Posts: 161
Reply with quote
Post Posted: Wed Jun 18, 2008 11:00 am
Yeah, I suppose. But it's not a very general solution to something that they should have incorporated into the hardware.
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14752
  • Location: London
Reply with quote
Post Posted: Wed Jun 18, 2008 11:11 am
"Should have"? H-ints were designed for raster effects, so there's no logical reason for having them outside the active display. If they'd wanted to have more options for audio they could have paid more than 2p and got a better sound chip, eg. one that supported sample playback or envelopes. A timer-controlled interrupt would do the job even better.
  View user's profile Send private message Visit poster's website
  • Joined: 27 May 2008
  • Posts: 161
Reply with quote
Post Posted: Wed Jun 18, 2008 11:20 am
I wasn't referring to line interrupts specifically in my last post, but to any form of high-frequency interrupts.
  View user's profile Send private message
  • Joined: 20 Dec 2004
  • Posts: 187
Reply with quote
Post Posted: Sat Jun 21, 2008 3:30 am
Maxim wrote

Look in readme.txt, sections "Effects" and "Commands".


This is not in my readme text file. It only talks about how to add this to your program (your music files).
  View user's profile Send private message Visit poster's website
  • Joined: 04 Nov 2004
  • Posts: 273
Reply with quote
Post Posted: Sat Jun 21, 2008 2:15 pm
Stan wrote
Alright, I'll just ask these here:
3. How can I add effects to my sounds such as vibrato and trilling? Is the latter possible? If so, how can I achieve this sound through the edit interface? I mess around with what's there a bit, but this doesn't seem to be possible.


Vibrato effects must be added manually (by adding notes in different frequencies), or you can use the built-in pulse vibrato effect, or the vibrato-effects for the instruments.

Trilling or arpegio effects are not yet possible, unless you do them manually.


Stan wrote
4. When adding harmonics, I was going to take a huge chunk of music data from one channel and throw it in another, bringing it down an octave for effect. Is it possible to take this chunk, select it, and lower it all down by one octave? I tried this but it didn't work.


The transposing (edit->transpose->...) is not applied to the music data in the clipboard (= what you've copied), but to what is currently selected in the editor. So to do what you've described, you would copy, then paste, then select and then transpose.
  View user's profile Send private message Visit poster's website
  • Joined: 20 Dec 2004
  • Posts: 187
Reply with quote
Post Posted: Sat Jun 21, 2008 2:41 pm
Thanks a lot. By the way, if you add effects like this, do they translate well to an actual ROM or are they technically beyond the actual capabilities of the sound chip?
  View user's profile Send private message Visit poster's website
  • Joined: 04 Nov 2004
  • Posts: 273
Reply with quote
Post Posted: Sat Jun 21, 2008 2:52 pm
Such effects have to be done manually on the Z80. The sound chip only supports the setting of a frequency and a volume. But don't worry, it's not going to be super slow.
  View user's profile Send private message Visit poster's website
  • Joined: 20 Dec 2004
  • Posts: 187
Reply with quote
Post Posted: Sat Jun 21, 2008 2:55 pm
Thanks, just curious because I don't want to write these songs I've been working on using sound effects that wouldn't even be supported on a real cartridge.
  View user's profile Send private message Visit poster's website
  • Joined: 04 Nov 2004
  • Posts: 273
Reply with quote
Post Posted: Sat Jun 21, 2008 3:16 pm
If you set the speed to 1.00 (= the fastest speed), then you can do everything the sound chip can do (at a speed of 1.00 ie. updating the sound once per frame). But it's more and harder work to edit a song at that speed.
  View user's profile Send private message Visit poster's website
  • Joined: 20 Dec 2004
  • Posts: 187
Reply with quote
Post Posted: Sat Jun 21, 2008 4:07 pm
But different speeds aren't against the abilities of the chip, correct? So if I write a song at a certain speed, it won't be something I couldn't burn onto a cartridge as part of game ROM correct? I wish actual coding was a lot more user friendly as this is. I've already put together some pretty good tunes, it's really a lot like a drum machine I used to program.
  View user's profile Send private message Visit poster's website
  • Joined: 27 May 2008
  • Posts: 161
Reply with quote
Post Posted: Sat Jun 21, 2008 4:37 pm
The music tempo doesn't really have anything to do with the PSG. It's just a matter or changing the rate at which the Z80 updates the PSG register values.
I haven't used MOD2PSG2, but I doubt he put any features in there that wouldn't work on an actual SMS, unless that is explicitly stated.
  View user's profile Send private message
  • Joined: 04 Nov 2004
  • Posts: 273
Reply with quote
Post Posted: Sat Jun 21, 2008 5:18 pm
There is the feature that you can half the sound chip's frequency (in the module settings). This is not possible on a real SMS. At the moment, there's only a little warning about that in the readme. It must be stated in the program, too.
  View user's profile Send private message Visit poster's website
  • Joined: 20 Dec 2004
  • Posts: 187
Reply with quote
Post Posted: Sat Jun 21, 2008 6:09 pm
Great stuff guys, thanks for the info.
  View user's profile Send private message Visit poster's website
  • Joined: 25 Jul 2007
  • Posts: 732
  • Location: Melbourne, Australia
Reply with quote
Post Posted: Sun Jun 29, 2008 4:02 am
Martin wrote
Vibrato effects must be added manually (by adding notes in different frequencies), or you can use the built-in pulse vibrato effect, or the vibrato-effects for the instruments.


I found the the vibrato effects confusing seeing as most songs don't use them and the feature is not native to the PSG. It also adds another layer to the complexity since the transparent nature of the effect makes it difficult to see what is really going on in affected parts.

For myself at least the depiction of the instrument vibrato is not as meaningful as it is intended because it produces complex waveforms that are not apparent without a proper waveform viewer.


Not so much related to MOD2PSG2, but I have been trying to setup a PSG-like square wave on my hardware synth but it doesn't sound quite the same. The real hardware sounds like it has a second detuned tone played in unison but all the documentation suggests it is just a pure square wave (electrical quirks aside).
  View user's profile Send private message
  • Joined: 27 May 2008
  • Posts: 161
Reply with quote
Post Posted: Sun Jun 29, 2008 6:48 am
The PSG doesn't support any kind of hardware effects, and produces sounds that are quite dull as is. So the trick is to manipulate the waveforms through software in ways that make them sound more interesting.
I don't see adding a vibrato as any stranger than e.g. a volume fade.
  View user's profile Send private message
  • Joined: 25 Jul 2007
  • Posts: 732
  • Location: Melbourne, Australia
Reply with quote
Post Posted: Sun Jun 29, 2008 7:27 am
Yes the PSG is dull on its own, but that's half the point :)
That hasn't stopped hundreds of titles sucessfully making cheerful little ditties despite limitations.

Having a vibrato is not at all unusual, its the implementation that is odd. While the resulting VGM would be representative of the final product, what you see in the editor is not. I am saying that having instrument level vibrato effect does not make sense to me because its effect can not be directly viewed via the pattern editor, so it is not clear what the final outcome may be just from observation alone.
  View user's profile Send private message
  • Joined: 25 Jul 2007
  • Posts: 732
  • Location: Melbourne, Australia
Reply with quote
Post Posted: Mon Jun 30, 2008 8:32 am
djbass wrote
Not so much related to MOD2PSG2, but I have been trying to setup a PSG-like square wave on my hardware synth but it doesn't sound quite the same. The real hardware sounds like it has a second detuned tone played in unison but all the documentation suggests it is just a pure square wave (electrical quirks aside).


As above.
  View user's profile Send private message
  • Joined: 25 Jul 2007
  • Posts: 732
  • Location: Melbourne, Australia
Reply with quote
Post Posted: Tue Jul 08, 2008 1:47 pm
More quirks. There are some features of Mod2PSG2 that don't make much sense from a musical rather than technical perspective.

The first is the apparent inclusion of the H note.. which aside from an obscure German musical scale isn't used in most musical notation.. I'm assuming it would normally represent the B note on a standard scale.

The other is the parameter to detune individual notes, normally something like that would be accomplished via an external effects chain.. as reproducing the effect in say in a live performance would be quite hard.
  View user's profile Send private message
  • Joined: 04 Nov 2004
  • Posts: 273
Reply with quote
Post Posted: Tue Jul 08, 2008 3:44 pm
I like the obscure German musical scales and the technical features.
  View user's profile Send private message Visit poster's website
  • Joined: 25 Jul 2007
  • Posts: 732
  • Location: Melbourne, Australia
Reply with quote
Post Posted: Wed Jul 09, 2008 4:36 am
Lol.. they are not totally bad things altogether, and they are there to be used, the problem is that for those of us that prefer not to use them we are not always given a choice.

Take for example I have been using the program to transcribe some VGMs, the problem is that in some songs for example it interprets certain notes as being H and does weird things with them like the afformentioned detuning etc which adds an extra level of difficulty in trying to transcribe the music.

All I am asking I geuss is maybe the abilty to toggle some of these features in the options on/off unless there is a specific technical limitation preventing this.
  View user's profile Send private message
  • Joined: 27 May 2008
  • Posts: 161
Reply with quote
Post Posted: Wed Jul 09, 2008 6:01 am
There's a vgm2mid program if all you want to do is transcribe songs.
  View user's profile Send private message
kami68k
  • Guest
Reply with quote
Post Posted: Sat Feb 14, 2009 11:23 pm
Just a Question, or two

1) I change the Speed of a Song in mod2psg2, lets say from 6.000 to 3.000. In_vgm won't care and always play it at the same speed, no matter what I select in mod2psg2. Is there a way to fix that?

2) I export a song to .vgm and play it using in_vgm.dll. Sometimes, when starting the song or when it loops, some channels just play on the left or the right side. Why is that and can I fix this?

I'm using the latest version of in_vgm.dll and probably not the latest version of MOD2PSG2, if something like this got fixed in a recent version I might have missed this. m(_ _)m

thanks,
kami68k

a .vgm:
vrc7.de/kami68k/music/kmi-gradius1.vgm
 
  • Joined: 04 Nov 2004
  • Posts: 273
Reply with quote
Post Posted: Sat Feb 14, 2009 11:34 pm
Where's the SetSpeed command? It should be at the beginning of the module or the speed should be set in the "initial speed" field in the module settings.
Edit: The speed field on the main window is "only" the current temporary playing speed. Changing it doesn't have any effect on exported VGMs.

Because of the left/right problem - Are you using stereo effects? They aren't correctly exported into VGMs in the latest version.
  View user's profile Send private message Visit poster's website
kami68k
  • Guest
Reply with quote
Post Posted: Sun Feb 15, 2009 12:13 am
oh its Initial Speed, you are right, that works fine. thanks

I did change the speed where you also adjust Line Speed, Octave and Volume. That obviously was wrong. :P

I'm not using any stereo effects. It's just that sometimes a channel is panned to one side without any reason. Sometimes after I start the song, sometimes after a loop. Always randomly with the same .vgm.
 
  • Joined: 04 Nov 2004
  • Posts: 273
Reply with quote
Post Posted: Sun Feb 15, 2009 12:40 am
Hmm, can I hear that in the VGM you posted?
  View user's profile Send private message Visit poster's website
  • Joined: 01 Feb 2004
  • Posts: 1464
  • Location: Sunny ol Tamworth, New England NSW AU
Reply with quote
Post Posted: Sun Feb 15, 2009 2:23 pm
kami68k wrote
I'm not using any stereo effects. It's just that sometimes a channel is panned to one side without any reason. Sometimes after I start the song, sometimes after a loop. Always randomly with the same .vgm.


Open up in_vgm's preferences, and go to the PSG tab and make sure random panning IS NOT turned on, thats probably what is happening :)

Thanks,
Scott
  View user's profile Send private message Visit poster's website
kami68k
  • Guest
Reply with quote
Post Posted: Wed Feb 25, 2009 4:35 am
thanks Jacko, works fine :)
 
  • Joined: 31 Oct 2007
  • Posts: 853
  • Location: Estonia, Rapla city
Reply with quote
Post Posted: Wed Mar 11, 2009 11:05 pm
I jsut wanted to say that when you have KernelEx installed on 98SE, latest MOD2PSG2 starts running fine. Only thing is that sound seems like its 22KHz...
  View user's profile Send private message Visit poster's website
UNKNOWN
  • Guest
Reply with quote
About
Post Posted: Fri May 29, 2009 11:08 am
.gg, .vgm and .kss with SN76489
but .gg and .kss with GG stereo
.vgm without GG stereo

Can convert .psgmod to .gg?
Can convert .psgmod to .kss?
 
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14752
  • Location: London
Reply with quote
Post Posted: Fri May 29, 2009 11:41 am
VGM files can contain GG stereo.

You can convert PSGMOD to KSS or GG but you need to generate the code to do so.

For the KSS, you would probably need to make a player stub that indexed the necessary data, and then build the MOD2PSG2 code before hooking it up into the format. It could all be done automatically but it'd be a bit of work.

To generate a GG (or SMS) ROM you'd probably want to make some kid of interactive menu, unless you were aiming for single-track files. This would be more work again on top of what the KSS would need.

Alternatively, you can export to VGM, and use a VGM player stub. Maybe you could even hack a KSS out of it, I don't know how well KSS supports paging.
  View user's profile Send private message Visit poster's website
mic
  • Guest
Reply with quote
Post Posted: Fri May 29, 2009 12:13 pm
From the VGM specification:

Quote
0x4f dd : Game Gear PSG stereo, write dd to port 0x06
 
boh
  • Guest
Reply with quote
KSS header
Post Posted: Fri May 29, 2009 3:27 pm
KSS header:
; header of KSS file

code
org   $0000   ; it's anywhere ok because this is only header.

db   "KSCC"   ; Magic string
dw   $00A0   ; Load address
dw   $203D   ; Data length
dw   $00A0   ; Driver initialize function
dw   $00B0   ; Play address.
db   $00   ; No. of bank
db   $00   ; extra
db   $00   ; reserved
db   $06   ; Extra chips

dw   52725,0   ; Offset to the end of file.
dw   0,0   ; reserved(must be 0).
dw   49414   ; number of the first song.
dw   0   ; number of the last song.
db   $00   ; PSG/SNG volume
db   $00   ; SCC volume
db   $00   ; MSX-MUSIC/FM-UNIT volume
db   $00   ; MSX-AUDIO volume
 
Reply to topic



Back to the top of this page

Back to SMS Power!