Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAC Sample and Expanded Ch. 3 Support? #34

Open
Esmerea opened this issue Mar 12, 2024 · 7 comments
Open

DAC Sample and Expanded Ch. 3 Support? #34

Esmerea opened this issue Mar 12, 2024 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@Esmerea
Copy link

Esmerea commented Mar 12, 2024

Hello! I just stumbled into this and it looks very promising for some of the music work I'd like to do.

Are there any plans for this software to support sample playback on FM channel 6 or the extended channel modes on 3?

Thank you!

@rhargreaves
Copy link
Owner

I am planning on implementing those, eventually! I haven't had a lot of time recently, but might have more time in the coming weeks. The 'extended ch 3 support' would most likely be the simpler feature to implement at this time (although no doubt would introduce some complexity to the codebase, so I would need to spend some time ensuring its clean)

DAC sample support would likely require some Z80 code, although a first attempt might be to lean on SGDK's PCM support as much as possible.

A question hanging over both of these features is how much compatibility with GenMDM's interface I would be considering. Generally, since that is the more popular solution, I try to keep this interface inline with it as much as possible, unless I have good reason to deviate.

Out of curiosity, does the music work you're looking to do require since GenMDM compatibility (for either Ch3 "special mode" or DAC)?

@KPY7030P
Copy link

KPY7030P commented May 4, 2024

@rhargreaves This is one of the best projects I've seen related to SEGA. I hope you won't abandon it or someone will support and develop it. I don't really understand such complex programming, otherwise I would have helped with this)

@2xAA
Copy link

2xAA commented Jun 23, 2024

Since DAC support was quite limited with GenMDM and custom samples are something people ask me about all the time with genMDM Editor, I’d love to see MDMI have better sample support than GenMDM ever did.

And personally, I’d love to use samples myself in my own music made with the Mega Drive.

@rhargreaves rhargreaves self-assigned this Jun 24, 2024
@rhargreaves
Copy link
Owner

Implemented limited support for Ch. 3 Special Mode in v1.16
More support is coming, including visual feedback and handling of MIDI Note On Velocity on channels 11-13.

@rhargreaves
Copy link
Owner

rhargreaves commented Jul 2, 2024

So I'm pretty much done with everything I wanted to implement for Ch 3. Special Mode support. I'm starting to think a bit more about DAC support.

My currently approach is to find an open source percussion set, and add a feature to use PCM percussion for General MIDI channel 10. I'll make use of SGDK's built-in ability to include the samples as compile-time resources. As for playback, I'll start with support for one voice at a time using SGDK's sound driver. We'll see how that goes. I'm not sure the timing resolution will be great - I have a feeling the SGDK driver updates on vertical blanking which would mean there could be a delay of up to 17-20ms before playback. It would be great also if we could mix 2 samples on the fly but that will be contingent on how the drivers otherwise perform.

Eventually I will look into ways of importing samples into the interface at runtime. I probably will not emulate the GenMDM API for this. It seems quite limited. Instead, I will opt for some mechanism to import sample data over SysEx. We'll see though!

@rhargreaves rhargreaves added the enhancement New feature or request label Jul 2, 2024
@KPY7030P
Copy link

KPY7030P commented Jul 4, 2024

do you think it is possible to send an audio signal in real time (even with a delay) in order to use the DAC as an audio gadget? for example, connect a microphone and shout "SEEEGAAA" ahahaha
I probably want a lot and fantasize a lot, but suddenly it's possible)

@rhargreaves
Copy link
Owner

@KPY7030P probably not using MIDI - there's too much complexity and overhead.

For fun, a while back I did write a proof of concept that allowed me to send PCM audio directly to the EverDrive X7 USB port and have the DAC play it in realtime:
https://github.com/rhargreaves/mega-drive-usb-link/blob/master/src/pcm.c

Anyway, I'm still experimenting with DAC support in the interface. Seems like there might be more Z80 bus/SGDK PCM driver hand-holding required which is making implementation non-trivial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants