GENNY VST - V1.16 New Release Feb 2020

For anything related to sound (YM2612, PSG, Z80, PCM...)

Moderator: BigEvilCorporation

superjoebob
Very interested
Posts: 66
Joined: Fri Oct 15, 2010 7:06 am
Location: Vancouver, Canada
Contact:

GENNY VST - V1.16 New Release Feb 2020

Post by superjoebob » Wed Feb 22, 2012 7:14 am

Genny V1.16 Both Versions
https://www.wonthelp.info/genny_all_v116.zip
Genny V1.16 FL Version
https://www.wonthelp.info/genny_fl_v116.zip
Genny V1.16 VST Version
https://www.wonthelp.info/genny_vst_v116.zip

If you need support, or want the absolute latest version incase I forget to update this post, take a look at the GENNY forums:https://www.wonthelp.info/genny/viewforum.php?f=3

PDF Documentation:
https://www.wonthelp.info/genny_documentation.pdf

MEGA MIDI Firmware:
https://www.wonthelp.info/megamidi_firmware.zip


OLD beta versions for anyone who needs compatibility with old projects:
FL Studio: https://www.wonthelp.info/GENNY_betaFL_2.zip
VST: https://www.wonthelp.info/GENNY_beta_2.zip


After years of development, multiple versions, some extremely bad C++ code and a parade of heap corruption it's finally here: GENNY!

Image


So what?
Well, GENNY is a Virtual Instrument that emulates the Sega Genesis'/Megadrive's YM2612 and SN76489 chips. It allows you to create Sega Genesis style FM music in your favorite DAW, and it will allow you to use almost the full capabilities of the two chips.

It's designed to essentially function as it's own music production DAW tailored to making music for Genesis hardware. You can add up to 16 different instruments within one instance of the plugin, each assigned to it's own MIDI channel and FM/Square channels on the chips. This way, you can create songs that stay within the original platform's limitations and that would actually play on the real hardware. In fact, you can even export VGM files for playing on actual hardware (Though they're a bit bulky right now)!

It supports importing various YM2612 instrument formats, and exports it's own special format that supports including drum samples. You can import micro tuning files too!
Image

AND, Probably the most exciting new thing, is that the VST now supports integration with Aiden Lawrence' MEGA MIDI hardware:
Image

Who did this?
Well, I did! But I couldn't have done it without help from some very kind, patient, and important people:


hiro-shi / Jarek Burczynski / Eke-Eke - Wrote Genesis Plus GX 2612 implementation which I use.
The Eighth Bit - Created The Ultimate Megadrive Soundfont, which I use a lot and which helped inspire this VST.
Sam - Created VOPM, an excellent YM2151 plugin that also helped inspire me.
Yamaha - For creating the YM chips and popularizing FM Synthesis in the first place. (shoutout to John Chowning)
spritesmind.net - An awesome Mega Drive / etc development forum filled with incredibly helpful people.
Tiido Priimägi - was very patient with my lack of knowledge and was my go-to guy for YM2612 questions.
Mixer P - For making Mixer's Mega Genesis Drum Pack which is just the best thing.

Shout out to Aly James for FMDrive, we happened to independently develop seperate YM2612 VST's at the same time.
He was kind enough to reach out to me, and he helped out with a number of chip related questions that helped me to finish GENNY.

Howard Drossin, John Baker, Tommy Tallarico, Matt Furniss, Masato Nakamura,
Masaru Setsumaru, Yuzo Koshiro, Jredd, Yuzo Koshiro, Yuzo Koshiro etc -
made awesome Genesis music, are awesome composers, and are all around major influences on my life.



Oh! Where can I get it?
Right here! There are two versions: VST and FL. Both are available in both x86 and x64 versions!
The VST version should work in pretty much any DAW, you need only drag it into your respective VST folders.
The FL version is only for use with FL Studio, but as the star of the show it supports Piano Roll note bending, and FL Studio Automation.

One more secret hint before we get to the download- the plugin actually supports Piano Roll Vibrato for both versions! Any notes placed in the C8(96) octave or higher will affect lower notes as Vibrato. The velocity of the special notes determines the depth of the Vibrato, and the pitch determines the multiplication factor (speed). Please try it!

Note that only 44100khz sample rate is supported at this time, other sample rates will detune the instrument so beware!


Finally, here are the files:

Genny V1.16 Both Versions
https://www.wonthelp.info/genny_all_v116.zip
Genny V1.16 FL Version
https://www.wonthelp.info/genny_fl_v116.zip
Genny V1.16 VST Version
https://www.wonthelp.info/genny_vst_v116.zip
Last edited by superjoebob on Sun Nov 27, 2022 5:31 pm, edited 32 times in total.
On a never ending quest to compose for the Genesis/Megadrive

Nemesis
Very interested
Posts: 791
Joined: Wed Nov 07, 2007 1:09 am
Location: Sydney, Australia

Post by Nemesis » Sat Feb 25, 2012 2:44 am

Wow, that's a really interesting project! If you've got specific questions about the implementation, I'm more than happy to help out whatever way I can. I'll definitely give this a try when it's up and running.

SmartOne
Very interested
Posts: 77
Joined: Sun Sep 21, 2008 5:18 am

Post by SmartOne » Wed Mar 07, 2012 4:41 pm

Genesis Plus GX (MAME) has the best YM2612.

superjoebob
Very interested
Posts: 66
Joined: Fri Oct 15, 2010 7:06 am
Location: Vancouver, Canada
Contact:

Post by superjoebob » Mon Mar 12, 2012 6:28 am

Been working hard on the VST today, finished implementing algorithm selection, channel enable/disable, and full operator parameter automation via midi! I've been trying to figure out how to do realtime operator changes while a note is playing though, and I can't seem to figure out how. Was hoping you could help me with this one Nemesis :D. Pretty much looking for the way to do note frequency bends, and operator bends if that's possible.

Smart One, thanks for the tip, I went and downloaded the Genesis Plus GX source and attempted to move all the static stuff in the 2612 implementation into a class (DLL's really don't like static memory space all that much, had to do the same for the Gens implementation). Managed to get it building but it appears to be malfunctioning. I'm using all the same functions I was using from the gens core to interact with the chip emulation, but the chip doesn't seem to be giving me anything but zeros in my sample buffer. I've set up the config and done all the initialization. You guys have any idea what I could be missing with this?
On a never ending quest to compose for the Genesis/Megadrive

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Mon Mar 12, 2012 2:40 pm

ADSR and some other settings take effect only on new note-on event
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

superjoebob
Very interested
Posts: 66
Joined: Fri Oct 15, 2010 7:06 am
Location: Vancouver, Canada
Contact:

Post by superjoebob » Thu Mar 15, 2012 8:01 pm

That's too bad, was looking forward to doing some cool operator slide effects ^^. Managed to figure out the note bending though, going to implement pitch slide as my next addition. For anyone who uses FL Studio I'm also thinking of doing a native VST to allow pitch bending using the piano roll.

More good news, I managed to get the Genesis Plus GX 2612 emulation working with the VST, and it sounds absolutely fantastic. Here's a sample of the new VST sound:
http://www.wonthelp.info/superjoebob/YM2612Test_New.mp3
On a never ending quest to compose for the Genesis/Megadrive

superjoebob
Very interested
Posts: 66
Joined: Fri Oct 15, 2010 7:06 am
Location: Vancouver, Canada
Contact:

Post by superjoebob » Sun Mar 18, 2012 1:08 am

Having some strange issues with the Plus GX implementation... For some reason the notes played with the Plus GX are off key compared to the notes played with Gens. I can mix the VST with other instruments if I'm using the Gens implementation, but if I'm using the GX one the notes will clash, even when I play a C5 on the GX beside a C5 on a piano.

Everything is the same except for the implementations of the emulators, is the GX just off key?

EDIT:
Could it be a clock issue? Strangely if I divide the clock(7670592) by 4 when I pass it into Gens, the notes I play are much much lower in pitch. But, when I divide the clock by 4 when I pass it into GX Plus, the output is exactly the same...

EDIT:
Whatever the hell "hq_fm" is in the GX Plus implementation setting it to 0 fixes the problem. Looks like it was defaulting the frequency to 53267hz with that on. Any idea why that would be? Feel like it sounds better with hq_fm on, its a shame it doesn't mesh with other instruments...
On a never ending quest to compose for the Genesis/Megadrive

Eke
Very interested
Posts: 884
Joined: Wed Feb 28, 2007 2:57 pm
Contact:

Post by Eke » Sun Mar 18, 2012 9:51 am

Hq FM emulates the chip at its original "samplerate", and with the MAME core, you will need to resample the output to your output samplerate using an external resampler (as opposed to GENS which uses linear interpolation and does this internally).

In genesis plus gx implementation, when hq fm option is set, clock and rate values passed to ym2612_init function are not used, the emulator renders one sample (through ym2612_update) each 144 emulated CPU cycles.
When it is off, clock and rate values are only used to compute a frequency ratio and adjust the chip inner emulation in regard to that: this can however make some frequency sound inaccurate so it's better to have it on.

You can have a look into Fir_resampler.c, audio.c and system.c for how the resampler is used.

superjoebob
Very interested
Posts: 66
Joined: Fri Oct 15, 2010 7:06 am
Location: Vancouver, Canada
Contact:

Post by superjoebob » Tue Mar 27, 2012 6:33 am

EDIT:
Nvm, just nailed it. :D
Seems to be working good now, time to move on from this road block!
Out of curiosity, does the audio get re-sampled or otherwise changed to be the correct pitch on real hardware? I just cant shake the feeling that it doesn't sound quite as good re-sampled as it did at 53267hz...

STUFF FROM BEFORE:
Makes sense, I can't seem to get it to work properly though. I've followed your implementation from Gens Plus, and even tried implementing a completely different resampler, but I think I'm missing some basic concepts to how re-sampling works. What I'm doing right now, is as follows:

A function gets called in the VST when it's ready to process audio. The function has an integer as a parameter which represents how many samples the VST is ready to receive, and a buffer of floats for me to fill with samples (-1.0 to 1.0). Here's what I'm doing:

I'm initializing Fir_Resampler with this:

Code: Select all

_resampler.Fir_Resampler_time_ratio( 53693175 / (double)44100 / (144.0 * 7.0), 0.995 );
and re-sampling like this:

Code: Select all

	
   float* out1 = outputs[0];
	float* out2 = outputs[1];

	VSTInterface* i = (VSTInterface*)editor;
	if( i != nullptr )
		i->Update(_channels);

	for(int j = 0; j < sampleFrames; j++ )
	{
		out1[j] = 0;
		out2[j] = 0;
	}

	int* buffer = _resampler.Fir_Resampler_buffer();
	int reqFrames = sampleFrames;
	int curFrame = 0;

	if( _leftoverSamples > 0 )
	{
		for( int i = 0; i < _leftoverSamples; i += 2 )
		{
			out1[curFrame] += (float)(_samples[_finishFrame + i] / (float)32767);
			out2[curFrame] += (float)(_samples[_finishFrame + i+1] / (float)32767);		
			curFrame++;
			reqFrames--;
		}
	}
	_finishFrame = 0;
	_leftoverSamples = 0;

	int avail = 0;	
	while( 1 )
	{
		avail = _resampler.Fir_Resampler_avail();
		if( (avail / 2) >= reqFrames )
			break;

		_resampler.Fir_Resampler_write( 2 );
		_hardware.Update( buffer, 1 );
		buffer = _resampler.Fir_Resampler_buffer();
	}
	_resampler.Fir_Resampler_read( _samples, avail );

	for( int i = 0; i < reqFrames * 2; i+=2 )
	{
		out1[curFrame] += (float)(_samples[i] / (float)32767);
		out2[curFrame] += (float)(_samples[i+1] / (float)32767);
		curFrame++;
		avail -= 2;
	}

	if( avail > 0 )
	{
		_finishFrame = curFrame * 2;
		_leftoverSamples = avail;
	}
I'm pretty much cycling through updates until I've generated enough samples to fill sampleFrames number of frames. I then resample the buffer, convert it into floats, and put it into the output buffers I'm given. If I have more frames than I need, I save them for next time. The output of this, is a very low pitched garbled sound with a slight hint of any sort of note. Am I missing something?
On a never ending quest to compose for the Genesis/Megadrive

Eke
Very interested
Posts: 884
Joined: Wed Feb 28, 2007 2:57 pm
Contact:

Post by Eke » Sat Apr 07, 2012 12:24 pm

superjoebob wrote:EDIT:
Nvm, just nailed it. :D
Seems to be working good now, time to move on from this road block!
Out of curiosity, does the audio get re-sampled or otherwise changed to be the correct pitch on real hardware? I just cant shake the feeling that it doesn't sound quite as good re-sampled as it did at 53267hz...
Off course, real hardware does not do such thing as resampling, FM chip outputs analog audio and the "sampling rate" is only the rate at which audio output is being updated FOR ALL 6 CHANNELS.

It has been verified that YM2612 will update a single channel output each 24 cycles of input clock, which make a sample rate of VCLK/(24*6) = approx. 53267hz on NTSC consoles.

Resampling is only needed in emulators because obviously your PC (or whatever) soundcard only supports a limited set of input samplerate...

superjoebob
Very interested
Posts: 66
Joined: Fri Oct 15, 2010 7:06 am
Location: Vancouver, Canada
Contact:

Post by superjoebob » Sun Apr 08, 2012 9:25 pm

I Figured I was being stupid ^^. Obviously a resample is gonna have to do then, still sounds pretty damn good compared to what I had. Thanks Eke!
On a never ending quest to compose for the Genesis/Megadrive

neologix
Very interested
Posts: 122
Joined: Mon May 07, 2007 5:19 pm
Location: New York, NY, USA
Contact:

Post by neologix » Thu Apr 26, 2012 3:56 am

hmm, somebody got to this before i could finish mine...

superjoebob
Very interested
Posts: 66
Joined: Fri Oct 15, 2010 7:06 am
Location: Vancouver, Canada
Contact:

Post by superjoebob » Tue Dec 11, 2012 5:41 am

Beta released! Check out the main post for more details you can get it at http://wonthelp.info/2612/ym2612-vst-release-v-0-9/
On a never ending quest to compose for the Genesis/Megadrive

powerofrecall
Very interested
Posts: 237
Joined: Fri Apr 17, 2009 7:35 pm
Location: USA

Post by powerofrecall » Tue Dec 11, 2012 9:40 pm

As someone who loves Genesis sound & uses VSTs often, will this eventually get an x64 version?

neologix
Very interested
Posts: 122
Joined: Mon May 07, 2007 5:19 pm
Location: New York, NY, USA
Contact:

Post by neologix » Tue Dec 11, 2012 11:08 pm

Will this also be open-source? I'd love to see what I could do differently to set my upcoming one apart from this one.

Post Reply