Dual-YM2612 hardware synthesizer

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

Moderator: BigEvilCorporation

r57shell
Very interested
Posts: 478
Joined: Sun Dec 23, 2012 1:30 pm
Location: Russia
Contact:

Post by r57shell » Tue Apr 08, 2014 1:40 pm

foobat wrote:No matter how hard I tried, it was utterly impossible to get it to play r57shell's Ocean Melody without frequent slowdown though.
It's not my melody... It's marcb0t's Ocean Melody. Fix it.

Actually there are same troubles with VGM player for MD, but there are VGM players for MD.

I can give you some idea how to implement VGM with such precision. I don't familiar with hardware... but I think you can make some hardware "buffer". Cyclical buffer of YM2612 writes. So your microcontroller will write all reg writes in buffer, and buffer will write in YM2612 in correct timing. All you have to do is to check position in buffer, and fill it when it's needed.
Image

Aly James
Very interested
Posts: 74
Joined: Sun Mar 31, 2013 11:34 pm
Location: FRANCE
Contact:

Post by Aly James » Thu Apr 10, 2014 2:08 am

Sounds like an interesting idea :)
Btw can you test this song on your actual Hardware?
https://soundcloud.com/alyjameslab/intr ... -megadrive
This is an idea made with FMDrive + SPSG VSTs converted to VGM.
Here on soundcloud this is the actual recording of the Megadrive with
the VGMPLAY player. The VGM player plays it a little slower..
There is a link for the vgm in the track description so it will be interesting to compare the recordings :)

++

foobat
Very interested
Posts: 92
Joined: Fri Sep 14, 2012 1:06 pm

Post by foobat » Thu Apr 10, 2014 5:24 am

sure! I kind of halfassed the recording with a usb capture thing, but it shouldn't matter much since the thing is still just on a breadboard anyway.

Took a picture too ;)

saved it as a huge flac file so it sounds as close as possible to the original output

http://7355608.net/alyrecording.jpg
http://7355608.net/alyrecording.flac

foobat
Very interested
Posts: 92
Joined: Fri Sep 14, 2012 1:06 pm

Post by foobat » Thu Apr 10, 2014 5:34 am

Not sure why one of the drum samples didn't make it. Hmm. Might have overflowed the sram

Aly James
Very interested
Posts: 74
Joined: Sun Mar 31, 2013 11:34 pm
Location: FRANCE
Contact:

Post by Aly James » Mon Apr 14, 2014 8:57 pm

Nice thx!
In fact All the PCM is not played, the hihat is FM :)
There is other unused samples embedded in the VGM data maybe that is why :)

foobat
Very interested
Posts: 92
Joined: Fri Sep 14, 2012 1:06 pm

Post by foobat » Tue Apr 15, 2014 3:13 am

Aah, ok. That's interesting. I'll figure that out later and get it to work.

I got the first run of boards in today and started assembling them! I'm still waiting for some parts to come in from Digikey so I can't do anything big yet. But I did power up the Teensy and make sure there are no shorts on the board! The blinkenlights work wonderfully.

Image
Image

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) » Tue Apr 15, 2014 5:04 am

Naiss 8)
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

Aly James
Very interested
Posts: 74
Joined: Sun Mar 31, 2013 11:34 pm
Location: FRANCE
Contact:

Post by Aly James » Tue Apr 15, 2014 5:22 am

Yummmm can't wait to mess with one of this baby :D

btw: I will comment a bit the PSG code b4 sending it to you ASAP (currently busy with some funky good oooold schematics & EPROM binaries loading for my LINN LM-1 Drum VST..)

foobat
Very interested
Posts: 92
Joined: Fri Sep 14, 2012 1:06 pm

Post by foobat » Tue Apr 15, 2014 5:28 am

Cool! No rush. I'm deep into doing a Monome-like sequencer too so my plate is full enough for the next couple weeks ;)

Aly James
Very interested
Posts: 74
Joined: Sun Mar 31, 2013 11:34 pm
Location: FRANCE
Contact:

Post by Aly James » Tue Apr 15, 2014 5:40 am

ahaha busy creative life is the key!
:lol:

Gigasoft
Very interested
Posts: 95
Joined: Fri Jan 01, 2010 2:24 am

Post by Gigasoft » Tue Apr 15, 2014 9:37 am

My suggestions:
- Do not map MIDI channel numbers to FM channels. Any FM channel is as good as any other, and it's up to the synth to make good use of them all. If I press 12 keys on my keyboard I just want to hear 12 notes sounding.
- Use two YM2612s rather than two slightly dissimilar chips.
- You may want to have an optional setting that reserves channel 3, or both channels 3 and 9, so that they will not be used for a non-special instrument if there is another free voice.
- From what I can tell, this barely looks like MIDI at all. Implement standard basic functionality such as velocity, pitch bend, PB range, volume, pan, expression, modulation, sustain pedal, using standard controller numbers. Don't force composers to have to refer to a chart to determine which operators need to have their Total Level changed. That's the synth's job.
- You may also want to implement some of the less commonly supported ones such as portamento, sostenuto pedal, vibrato rate, vibrato depth, vibrato delay, attack time, release time.
- Don't use the GenMDM controller numbers, as they conflict with expected behaviour. Usually, CC 1 is modulation depth, not LFO speed. I don't know what Pitch Bend Amount 0-17 is supposed to be and how it differs from standard pitch bend. The test register hardly deserves a bunch of controller numbers, especially ones that are in common use such as 93 (chorus depth).
- Having program changes map to General MIDI instruments might be cool, depending on what you intend to use it for.

Aly James
Very interested
Posts: 74
Joined: Sun Mar 31, 2013 11:34 pm
Location: FRANCE
Contact:

Post by Aly James » Tue Apr 15, 2014 10:08 am

Its cool that you point this out, as it reveals that ones might needs or prefers different settings to suit a particular work-flow.

The easiest thing to do is a .c file with the MIDI mapping per register.
This way anyone will be able to customize the CC list for his personal needs :) and upload the code.

For those who might no be able to program, some different versions of the code could be provided (Standard MIDI, etc...)

Example of the FMDrive /GenMDM MIDI CC# implementation which works with the MIDI2VGM conversion tool for that particular CC#
http://www.alyjameslab.com/tempdata/YM2 ... CC_MAP.txt


The 2X YM2612 set should be suited for 12 voices polyphony if needed but the advantage of a socket to put a YM3438 in the second slot will not disturb this functionality.

You can still have MIDI channels mapped per FM channels and maintain polyphonic features.
Say your keyboard is outputting on MIDI Channel 1 for example, the code, when in polyphonic mode, could simply increment the channel by 1 for the next note and so on in a loop, this because when you hit a 3 notes chord at the same time, the MIDI notes are still output sequentially :)

I wrote a VST tool for that purpose, you play polyphonic chords and it outputs each note to a different MIDI channel for mono synth compatibility.

foobat
Very interested
Posts: 92
Joined: Fri Sep 14, 2012 1:06 pm

Post by foobat » Tue Apr 15, 2014 10:23 am

@gigasoft: 12-tone polyphony is a goal of this project. It's probably the default mode that you'll use when playing over MIDI, although the option to switch to one MIDI channel per channel will be selectable. This is fairly easy to do and in fact there is already code that does it. The workflow I've been using, since most features are not implemented, is that I use Channel 1 to select an instrument and then send a MIDI CC command that copies the contents of channel 1 into the 11 remaining channels.

Some funky things will need to be done with channel 3 special modes.

Pitch Bend and some basic controls are actually supported already, albeit poorly.

I am definitely going to put priority on making it support the GenMDM specification since it will be the most functional in the least amount of time if we can control it via FMDrive. I'll keep the source completely available unless a good reason arises not to, so there's no reason you can't alter CCs.

I'm very excited but not *too* excited, since it's not like I'll be selling these or anything. They're a little expensive. It'll be all open hardware though so you can build your own if you want, or maybe we can work something out.

I'll build one for Aly though ;)

Aly James
Very interested
Posts: 74
Joined: Sun Mar 31, 2013 11:34 pm
Location: FRANCE
Contact:

Post by Aly James » Tue Apr 15, 2014 10:29 am

Consider that I will support the parts cost anyway ;)

foobat
Very interested
Posts: 92
Joined: Fri Sep 14, 2012 1:06 pm

Post by foobat » Fri Apr 18, 2014 5:02 am

First prototype assembled and fully functional!

YouTube: https://www.youtube.com/watch?v=sqC9TVTOV_M
Image

Post Reply