VOGONS


First post, by Adriaan

User metadata
Rank Newbie
Rank
Newbie

Hi All,
I am new to this forum, mainly because the question I have just touches the things you discuss at this forum.
If the question I have doesn't fit this particular part of the forum, admins/moderators please place it in the right forum.
I am working on a module for my modular synthesizer ( not a commercial product) , the proof of concept of this module using a YMF262 OPL3 chip can be seen at https://youtu.be/-WvVVEAcwWw
The module works, but only at two operator mode, mainly because I can't find a four operand music instrument file and a description how this file is constructed ( which part of the file goes to which register to play a certain instrument)
To be clear: I am not looking for software, just the instrument file with the 128 general midi instruments, and if possible also the percussion instruments, with an explanation of the format similar to http://www.shikadi.net/moddingwiki/SBI_Format for the sbi format.
I have found several 4 op files in the Junglevision file format, and downloaded and ran the OPL3-bank editor while hoping to find a way to program my chip (a YMF262 OPL3)with a Junglevision file.

So, is there anybody here who could tell me how the Junglevision format is constructed?
I'm really stuck right now 😢
Ed

Last edited by Adriaan on 2017-10-06, 09:03. Edited 1 time in total.

Reply 1 of 15, by superfury

User metadata
Rank l33t
Rank
l33t

Can't you simply record something from games or software using OPL3 on Dosbox and record the DRO file, then play that one back(since it's a open format)? Afaik it should support the 4-OP modes(plain OPL3 music)? That would be an easy way to test the synth.

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows and PSP on itch.io

Reply 2 of 15, by Adriaan

User metadata
Rank Newbie
Rank
Newbie

I don't want to test the synth, I want to use it with midi like it does already, but with 4 op sounds (instead of the 2op mode it is using in the Youtube vid)
I would like to use the Junglevision 4op format to make sounds so all I need is the format explanation of the Junglevision file so I know which byte goes into which register of the YMF262.

Reply 3 of 15, by superfury

User metadata
Rank l33t
Rank
l33t

The format seems to be (partly) researched already, as far as I can find:
OPL2/OPL3 FM Bank Editor for Windows/Linux/MacOS X

Leads me to https://github.com/Wohlstand/OPL3BankEditor/b … junlevizion.cpp

Looking at the way the file is read(the LE function calls) seems to show the file format for those 'Junglevizion' files?

Look at the loadFile function, it shows the entire format, as it reads it from the .OP3 file into memory? It looks like it's mostly raw OPL3 data?

Looking at the data read from the file:

- It starts with a header containing information, in plain C/C++(assuming byte packed data), then all melodic instruments(increasing number), then all percusive instruments. Add start_melodic/start_percusive to the index relative to the first melodic/percusive instrument to get the instrument number.

static const char *jv_magic = "Junglevision Patch File\x1A\0\0\0\0\0\0\0\0"; //Magic identifier contents needs to match!

typedef struct JungleVizion_Header __attribute(packed) {
uint8_t magicnumber[32]; //Magic identifier
uint16_t count_melodic; //Needs to be <=128. Amount of melodic channels following this header.
uint16_t count_percusive; //Needs to be <=128. Amount of percussive channels following the melodic channels
uint16_t start_melodic; //How much to be added to the melodic bank number(MelodicInstrument numbers increasing from 0 after this header) to get the instrument number. Sum of this field and count_melodic cannot be >128.
uint16_t start_percusive; //How much to be added to the percusive bank number to get the instrument number. Sum of this field and count_percusive cannot be >128.
};

What follows is a list of instruments, with a total size of count_melodic+count_percussive, each record being 24 bytes:

typedef struct JungleVizion_GeneralOPInfo __attribute(packed) { //Assuming raw register values
byte AVEKVM; /AVE/KVM
byte KSLL; //KSL/L
byte AttackDecay; //Attack/Decay value
byte SustainRelease; //Sustain/Release value
byte WaveForm; //Selected waveform
};

typedef struct JungleVizion_MelodicInstrument __attribute(packed) {
byte en_4op; //1 when 4-op
byte percnotenum;
JungleVizion_GeneralOPInfo OP1; //First operator
byte FBConn12; //FB/Connection 1<->2
JungleVizion_GeneralOPInfo OP2; //Second operator
JungleVizion_GeneralOPInfo OP3; //Third operator
byte FBConn34; //FB/Connection 3<->4
JungleVizion_GeneralOPInfo OP4; //Fourth operator
};
Last edited by superfury on 2017-10-04, 12:09. Edited 1 time in total.

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows and PSP on itch.io

Reply 4 of 15, by Adriaan

User metadata
Rank Newbie
Rank
Newbie

Yes, I have seen the links you provide, and I also downloaded and ran the OPL3Bank Editor, I even tried to mail Vitaly Novichkov with the same question.
And maybe my question isn't clearly stated enough, due to English not being my native tongue.
What I am looking for is what I found and used and similar to the .sbi file format: There is a wiki page about the sbi file format which says that which byte should go to which register in a YMF262 to give a certain sound.
And this is what I am looking for: I would like to use a JungleVision file to fill the registers with the data from this file to play the sounds, much like the way the instruments sound when played with the OP3 bank editor.

Filename
fat4.txt
File size
4.28 KiB
Downloads
42 downloads
File comment
This is a 4op instruments file
File license
Fair use/fair dealing exception

http://www.shikadi.net/moddingwiki/SBI_Format this is a similar recipe for a 2op .sbi file format.

Reply 5 of 15, by superfury

User metadata
Rank l33t
Rank
l33t

Well, those structures I've given in my previous post are pretty obvious: The JungleVizion_GeneralOPInfo fields go directly into their respective OPL registers(Waveform register, Attack/Decay register, Sustain/Release register, KSL register ( Looking at http://www.shikadi.net/moddingwiki/OPL_chip for the respective registers ). The Attack/Decay/Sustain/Release nibbles are the nibbles of those registers. The two FBConn values go into the feedback registers(various), the KSL value goes into registers 40-55h. That much is easily deduced from the bytes given ( http://www.shikadi.net/moddingwiki/OPL_chip#D … .2C_base.2B3.29 )

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows and PSP on itch.io

Reply 6 of 15, by Adriaan

User metadata
Rank Newbie
Rank
Newbie

Thank you, I’ll do my best to understand the code you are referring to.
I can get my modules programmed, but reading and understanding someone elses code is a different bisquit 🤣
edit: especially your last post seemed to be extremely helpful.
Now I have a text-file with the hex numbers for the registers, I just have to figure out the order in which they are stored in the file, but with the aid of the OPL3 editor that shouldn't be to hard!
So again: thank you!

Filename
fat4.txt
File size
12.9 KiB
Downloads
32 downloads
File comment
hex values to put into registers of the YMF262
File license
Fair use/fair dealing exception

Reply 7 of 15, by Stretch

User metadata
Rank Member
Rank
Member

There's also an old OSS page showing SBI and some info on 4 op.

FM SYNTHESIZER INTERFACE

Win10 - AMD Ryzen 9 3900 - 16 GB - GeForce RTX 2060S - Sound BlasterX AE5-Plus
Win98SE - ASRock 775i65G R3.0 - Celeron 2.2 GHz - 2 GB - GeForce FX5700 - Audigy 2 ZS
Win98SE - Via Apollo Pro Mobo - Pentium II 233 - 256 MB - Voodoo 3 1000 - Yamaha YMF724

Reply 11 of 15, by Adriaan

User metadata
Rank Newbie
Rank
Newbie

After placing that demo on Youtube, I got the next message:

Your video "OPL3 instruments on a diy synthesizer, YMF262 controlled by an Arduino", may have content that is owned or licensed by ACUM_CS, but it’s still available on YouTube! In some cases, ads may appear next to it.

If this is your performance of a 3rd party song then you can still make money from this video. Click here to change your monetization settings.

Now, I have made the module myself and the played music is from J.S.Bach, so that is in the public domain.
What this company ACUM=CS is trying to do is, because my youtube acount is suitable to make money with (which I don’t do), that if I don’t dispute this claim from ACUM=CS they will get part of the money that I would earn with that demo.
So I filed a complain, and now wait what will happen....

Reply 12 of 15, by Adriaan

User metadata
Rank Newbie
Rank
Newbie

Made a new version with a bluepill STM32F103C
Wasn't possible without the help from this forum, so thank you!

https://youtu.be/BU9uqEE7WdY

Reply 13 of 15, by cyclone3d

User metadata
Rank l33t++
Rank
l33t++

That's pretty awesome!

Do you have any idea how high pitched some of those sounds are? My Sennheiser HD630VB kinda make my ears hurt with the pitch being so high on some of those notes. The high frequency response is the only downside of having a set of cans that can go from 10Hz-42Khz.

Is there anything that would help you advance your design more? I hope to soon be able to non-destructively scan the manual for version 1 of the Sound Blaster Developer Kit.

I have already uploaded the disks here:
Creative Sound Blaster SDK for playing CMF-files with SBFMDRV.COM

Yamaha YMF modified setupds and drivers
Yamaha XG resource repository - updated November 27, 2018
Yamaha YMF7x4 Guide
AW744L II - YMF744 - AOpen Cobra Sound Card - Install SB-Link Header

Reply 14 of 15, by Adriaan

User metadata
Rank Newbie
Rank
Newbie

Thank you for your kind offer!
And sorry for the high pitched notes, I have tinnitus so it's not effecting me 😉
The first demo I filmed I used a three ops version and not really polyphonic, but the latest version is 4 ops, 6 voice polyphonic.
Took a lot of figuring out and also a lot of help from people all over the world, but eventually it sounds awesome (to my ears 😉 )
The only way to advance this design more is to use another chip. I bought an YMF704C-S and am searching the net for people who have an application with this chip online.
So if you could help me with that? (or another reader maybe?) that would be great!
What I'm looking for is a way to use the midi input of this chip.

edit: I see you have an article about YMF7X4 under your text, I will sure look into that!