VGMCK (v1.1)
MML compiler to VGM (hopefully eventually support all chips)
Technical discussion about the VGM format, and all the software you need to handle VGM files.
Moderator: Staff
- GTheGuardian Offline
- Posts: 84
- Joined: 2013-02-08, 2:40:33
Version 1.0 is now posted. It mostly corrects a few mistakes from version 0.9. No new chips yet.
Last edited by zzo38 on 2013-04-26, 21:52:39, edited 1 time in total.
Now that the forum is back, awesome this is still being worked on.
Also a test report:
---Volume macro on SN76496 seems to exhibit some really weird behaviour. Almost like a pitch macro but mixed in with volume macro.
---Sync issues associated with the chip
Also do you have an example of portamento in action? I can't quite work out how to use it.
Also a test report:
---Volume macro on SN76496 seems to exhibit some really weird behaviour. Almost like a pitch macro but mixed in with volume macro.
---Sync issues associated with the chip
Code: Select all
#EX-PSG ABC
@v0 = { 0 10 20 30 }
@v1 = { 30 25 20 20 8 0 }
ABC t130
A o1 v12 @v0 r1[l16 cdefgab>cdefgab>cd l8 gfef <bagf l16 edc<bagfedc<bagfed l8 ab>cdefga]4
B o1 v8 @v0 D2 r1 [l16 cdefgab>cdefgab>cd l8 gfef <bagf l16 edc<bagfedc<bagfed l8 ab>cdefga]4
C l16@q0@v1 o4 frrrfrrrfrrrfrrr [o0ccccbrrrccccbrrbccccbrrcccbrbbbb]8
Last edited by MaliceX on 2013-04-28, 13:27:23, edited 2 times in total.
-dj.tuBIG/MaliceX
That's because the volume for SN76496 is supposed to range only 0 to 15. You are using numbers out of range (it works fine if you use half of your numbers). Also, "v" and "@v" are mutually exclusive; it will only use the last one specified.MaliceX wrote:Now that the forum is back, awesome this is still being worked on.
Also a test report:
---Volume macro on SN76496 seems to exhibit some really weird behaviour. Almost like a pitch macro but mixed in with volume macro.
Code: Select all
#EX-PSG ABC @v0 = { 0 10 20 30 } @v1 = { 30 25 20 20 8 0 } ;....
Notice that when you compile it, the output is:
Code: Select all
| A | 1383943 | 0 |
| B | 1383943 | 0 |
| C | 1383936 | 0 |
I do not currently have an example of portamento.
Last edited by zzo38 on 2013-04-30, 9:32:07, edited 5 times in total.
Thanks. Re: the sync stuff, despite the sample size differences it's no issue after getting the volume macros sorted.
New bugs:
---Writing EN or ENOF in-line with the notes will cause compilation to fail. The above code works otherwise but should one add the toggles, it will fail.
---Panning envelopes do not seem to work as described on the documentation depending on the channel combination
---Setting #EX-PSG ABCD will crash the program, but adding E (despite being unused will work)
Also, how does one use the noise channel for this particular chip? Using G and H outputs silence.
Code: Select all
#EX-PSG ABCDE
@v0 = { 15 0 }
@v1 = { 15 13 10 8 4 1 }
@v2 = { 10 8 7 5 3 1 }
@v3 = { 15 3 }
@EN0 = {3 2 | 0 }
ABCDE t130
A o0 v12 @v1 K7 @EN0 P-1 r1[l16 cdefgab>cdefgab>cd l8 gfef <bagf l16 edc<bagfedc<b agfed l8 ab>cdefga]4
B o1 v8 @v2 D1 P1 r1 r16. [l16 cdefgab>cdefgab>cd l8 gfef <bagf l16 edc<bagfedc<bagfed l8 ab>cdefga]4
C l16@q1@v0 P-1 o4 frrrfrrrfrrrfrrr [o0ccccbrrrccccbrrbccccbrrcccbrbbbb]8
D o1 @v3 l16 r1 [c^^rccrc^^rrc<cfgf^^rffrg^^rrggfg>]8
---Writing EN or ENOF in-line with the notes will cause compilation to fail. The above code works otherwise but should one add the toggles, it will fail.
---Panning envelopes do not seem to work as described on the documentation depending on the channel combination
---Setting #EX-PSG ABCD will crash the program, but adding E (despite being unused will work)
Also, how does one use the noise channel for this particular chip? Using G and H outputs silence.
Last edited by MaliceX on 2013-05-04, 7:55:02, edited 5 times in total.
-dj.tuBIG/MaliceX
Thanks for notifying me about these bugs. I will fix them as soon as I can (the first one is already fixed; it will be available in the next release, coming soon). Can you please show me exactly what you are trying for the panning envelopes and for the noise, so that it may help me to fix it?MaliceX wrote:New bugs:
---Writing EN or ENOF in-line with the notes will cause compilation to fail. The above code works otherwise but should one add the toggles, it will fail.
---Panning envelopes do not seem to work as described on the documentation depending on the channel combination
---Setting #EX-PSG ABCD will crash the program, but adding E (despite being unused will work)
Also, how does one use the noise channel for this particular chip? Using G and H outputs silence.
However:
- Setting #EX-PSG ABCD will crash the program if you set ABCDE t130 for the notes (omitting the E in both places works fine); it will crash if you use a channel before it is declared. Perhaps I should make it display an error message instead.
- Noise works for me, although it doesn't seem to sound very good on this chip. (I have fixed the documentation relating to it, at least.) Adding some zeroes to the beginning of the volume envelope seems to improve the sound of the noise somewhat.
Last edited by zzo38 on 2013-05-04, 22:44:53, edited 4 times in total.
Thanks for this. EN and ENOF confirmed working here.
Regarding panning, here's a demonstration. (note, using P1, P-1 instead exhibits similar behaviour where channel C is silenced.)
Regarding panning, here's a demonstration. (note, using P1, P-1 instead exhibits similar behaviour where channel C is silenced.)
Code: Select all
#EX-PSG ABCD
@v0 = { 15 0 }
@v1 = { 15 13 10 8 4 1 }
@v2 = { 10 8 7 5 3 1 }
@v3 = { 15 3 }
@P0 = { [1 0 -1 0] }
@EN0 = {3 2 | 0 }
ABCD t130
A o0 v12 @v1 K7 @EN0 @P0 r1[l16 cdefgab>cdefgab>cd l8 gfef <bagf l16 edc<bagfedc<b agfed l8 ab>cdefga]4
B o1 v8 @v2 D1 @P0 r1 r16. [l16 cdefgab>cdefgab>cd l8 gfef <bagf l16 edc<bagfedc<bagfed l8 ab>cdefga]4
C l16@q1@v0 o4 frrrfrrrfrrrfrrr [o0ccccbrrrccccbrrbccccbrrcccbrbbbb]8
D o1 @v3 l16 r1 [c^^rccrc^^rrc<cfgf^^rffrg^^rrggfg>]8
-dj.tuBIG/MaliceX
OK so I worked out how to get multi-chip happening.
Found another bug:
---OPLL base pitch is out of tune (need to use K-3 but would probably still be out of tune with other chips)
Also given PSG noise channel can be played normally at low-res, would you have an example of how to control PSG Ch.3 to control PSG Noise pitch?
Found another bug:
---OPLL base pitch is out of tune (need to use K-3 but would probably still be out of tune with other chips)
Also given PSG noise channel can be played normally at low-res, would you have an example of how to control PSG Ch.3 to control PSG Noise pitch?
Code: Select all
#EX-OPLL ABFGH,C
@v0 = { 15 0 }
@v1 = { 15 13 10 8 4 1 }
@v2 = { 10 8 7 5 3 1 }
@v3 = { 15 3 }
@P0 = { [1 0 -1 0] }
@EN0 = {3 2 | 0 }
ABCFGH t130
;ABFGH K-3 ;fixes out of tune OPLL but why
A @8 v14 o3 l8 [efgrcr>cr<]16
B @8 v13 o3 l8 D-1 r64 [efgrcr>cr<]16
C @1 v15 o0 l8 [@0c@1c@2c@3c@4c@5c@6c@7c]16
F @10 v14 o3 l8 D-2 r64. [efgrcr>cr<]16
G @10 v13 o3 l8 D-3 r48 [efgrcr>cr<]16
H @10 v12 o3 l8 D-4 r48. [efgrcr>cr<]16
#EX-PSG D,E
DE t130 @/1,10,0 ;porta still not working
D @v1 o1 l8 [e/f/g/rcr>cr<]16
E @v1 o0 l8 [cdefgab>c<]16
Last edited by MaliceX on 2013-05-12, 10:14:21, edited 7 times in total.
-dj.tuBIG/MaliceX
Thank you for notifying me. What would be the correct clock divider to use for OPLL? This is probably what I did wrong.MaliceX wrote:Found another bug:
---OPLL base pitch is out of tune (need to use K-3 but would probably still be out of tune with other chips)
I think you can use note "g" on the noise channel and the other note on the third tone channel; this doesn't seem the best way and perhaps I should fix this.Also given PSG noise channel can be played normally at low-res, would you have an example of how to control PSG Ch.3 to control PSG Noise pitch?
I will also fix the portamento when I work on VGMCK next (at this time I am busy with other things, but will eventually do it (hopefully soon!); if a patch is submitted I may use that too).
Not sure if it's clock dividers or anything, cause it looks correct if not close to.
Also I'm not sure if you noticed but after looking at the MML of your cover in OPL3, the notes are 2 semitones higher than they should be.
To verify this:
Also I need to comment on the source code.
Right now, given the large amount of magic numbers (BAD), anemic comments and whatnot, this makes it very difficult to understand. I'm trying to find the part where notes are being processed to calculate note-on frequencies but lack of understanding the surrounding lines makes this too tedious to work with.
Also I'm not sure if you noticed but after looking at the MML of your cover in OPL3, the notes are 2 semitones higher than they should be.
To verify this:
Code: Select all
#EX-OPL3 ,AC
#EX-PCENGINE BD
@x0 = {
$10 $0A $E3 $13 $11
$00 $00 $E3 $13 $00
$11 $0A $E3 $13 $11
$01 $00 $E3 $13 $00
$21 ; (a:b)+(c:d)
}
ABCD t140
AC o2@0v63l16
AC K-2 ;needed to correct pitch
A P-1
C P1 D-1 r128
@W0 = { 0:15 15:0 }
BD o2@W0v63
D D-3
ABCD l16[ddrcdcd>drcd<cd<d32r32>a..]8
Right now, given the large amount of magic numbers (BAD), anemic comments and whatnot, this makes it very difficult to understand. I'm trying to find the part where notes are being processed to calculate note-on frequencies but lack of understanding the surrounding lines makes this too tedious to work with.
Last edited by MaliceX on 2013-07-13, 11:58:00, edited 3 times in total.
-dj.tuBIG/MaliceX
Another bug: Same patch, Same number of operators, different chip.
Aside channel-settings, why do these sound very different?
Aside channel-settings, why do these sound very different?
Code: Select all
#EX-OPL3 A
#EX-OPL2 C
@x0 = {
$1F $0A $E3 $13 $11
$00 $00 $E3 $13 $00
$1F $0A $E3 $13 $11
$01 $00 $E3 $13 $00
$21 ; (a:b)+(c:d)
}
@x1 = {
$41 $80 $81 $7A $00
$45 $00 $C1 $AF $00
$08;
}
@x2 = {
$21 $1D $B4 $5A $00
$45 $01 $C1 $AF $00
$14;
}
AC t110
AC o1@2v63l16
AC K-3 ;needed to correct pitch
A P-1
C P1 D-4 r128
AC l16[f8.f8.b8]8
-dj.tuBIG/MaliceX
- vampirefrog Offline
- Webmaster
- Posts: 1510
- Joined: 2014-01-28, 5:51:54
Hi. Nice project.
I'm trying to get the YM2413 to work, but it's difficult without any examples. could you please provide more examples, either in vgmck.doc, or in an examples/ folder? perhaps one example for each chip?
also, it might be a good idea to put the source file in a separate src/ folder.
I'm also getting this warning in vgmplay: Warning! Invalid EOF Offset 0x167! (should be: 0x163)
why don't you post your project on github, so we can contribute with pull requests?
I'm trying to get the YM2413 to work, but it's difficult without any examples. could you please provide more examples, either in vgmck.doc, or in an examples/ folder? perhaps one example for each chip?
also, it might be a good idea to put the source file in a separate src/ folder.
I'm also getting this warning in vgmplay: Warning! Invalid EOF Offset 0x167! (should be: 0x163)
why don't you post your project on github, so we can contribute with pull requests?