Jaffe- / NESizer2

A synthesizer based on the 2A03 (NES APU)
99 stars 18 forks source link

Midi CC integration #15

Open circuitcreature opened 7 months ago

circuitcreature commented 7 months ago

I already have this implemented on a branch and need to run a few more tests on it before I make a PR. Just creating an issue so that it can be tracked for any bugs.

beau-seidon commented 7 months ago

This is very exciting. I was actually going to start work on implementing midi cc this week, but you beat me to it. I was going to try to stick closely to the implementation of the Famimimidi, but I do understand that the two devices work differently.

I installed your updated firmware last night to try it, and had some fun fiddling with cc params while the sequencer was playing.

I did find that when I sent cc messages with no midi channels assigned to the voices (all default of 0), my Nesizer freaked out and eventually locked up and became unresponsive until a reboot. I was able to reproduce the problem, and the solution was the assignment of midi channels to the voices.

circuitcreature commented 7 months ago

Ha, I was going to match the MidiNes, but ended up trying to match the midi cc defaults. I was thinking about creating a map with some different options to match other like Famimimidi and MidiNes.

I was able to crash mine as well, but wasn't sure if it was my controller. I'll get an update pushed soon.

jeff464 commented 3 weeks ago

Looking at this thread - is CC integration now available on the main NESizer build, or is it only just available in the forked build as of now? I'm curious because I have a Famimimidi and this functionality would go very well with my current MIDI templates.

Also, since you're familiar with the Famimimidi - are you able to decipher any of the MIDI commands/instructions regarding macros/patch storage? I was never able to figure this out. Way over my head!

circuitcreature commented 3 weeks ago

@jeff464 CC integration is only on the forked branch right now. My last commit is untested but should work fine. Im only familiar with Famimimidi's documentation on it's midi protocol, but the more I dug into it, the more it matched the standard midi maps for CC, so I started to just map CC to those standards. Actually if you test this branch and have any pointers to have it work more closely to the Famimimidi, feel free to commit updates. I'm hoping to have my Nesizer working in a few weeks and I can test and make any code improvements.

beau-seidon commented 3 weeks ago

Looking at this thread - is CC integration now available on the main NESizer build, or is it only just available in the forked build as of now? I'm curious because I have a Famimimidi and this functionality would go very well with my current MIDI templates.

Also, since you're familiar with the Famimimidi - are you able to decipher any of the MIDI commands/instructions regarding macros/patch storage? I was never able to figure this out. Way over my head!

I finally got my hands on a Famimimidi a few weeks ago, and have been playing with it a lot!

Aside: I actually found the NESizer project in my search for a Famimimidi alternative, because hekekekun quit making them so Catskull couldn't get them anymore and there have been none available on eBay or Reverb etc. for a long time. I still like the NESizer better, but there are some things it needs, such as short period noise (will post about this specifically in a discussion thread soon).

Some time in the near future I'll be testing the fork with CC implementation more and see how it compares fo Fmm

No idea how to do macro/patch storage on Fmm yet. I'll look into it.

jeff464 commented 2 weeks ago

@circuitcreature - I'd love to test this (actually, I'd prefer to). However, I spent over 48 hours last week trying to figure out why my Win machine doesn't properly compile the NESizer code as a .hex file. I never figured it out, and it's something I'll eventually troubleshoot next week or so. If you were able to upload a compiled .hex, it would speed things up a bit. I'll throw it on the 328 and test as soon as my unit is fully built over the next day or two.

jeff464 commented 2 weeks ago

@beau-seidon - Yeah, I feel the pain. I've been an early adopter of the MIDINES (back when the carts still had the white paper labels) and have been following all of the different NES MIDI carts pop up and immediately disappear over the years. I found myself in Japan back in 2019 and purchased a few different MIDI carts from hekekekun directly, but despite this, I've been meaning to build the NESizer for what seems like ten years now. I'm glad to FINALLY jump in. :)

As far as the macro/patch storage goes, I attached an English translated manual. Looking at this again, it seems the user macro stuff is at CC45-CC59. Also, there a section about sysex setting user wavetable data for the sample channel. I don't suppose anyone knows anything about that either? I tried to wrap my mind around it all a few times, but never really got anywhere. :( Famimimidi_implement_chart_v10_NES.pdf

beau-seidon commented 2 weeks ago

@circuitcreature - I'd love to test this (actually, I'd prefer to). However, I spent over 48 hours last week trying to figure out why my Win machine doesn't properly compile the NESizer code as a .hex file. I never figured it out, and it's something I'll eventually troubleshoot next week or so. If you were able to upload a compiled .hex, it would speed things up a bit. I'll throw it on the 328 and test as soon as my unit is fully built over the next day or two.

I had issues compiling using avr-gcc on Windows, but it worked perfectly on Linux. Have you tried WSL? My recommendation is to use VSCode with the PlatformIO extension. That's how I do it now and it works great. Way easier than compiling via CLI. Also @Jaffe- released the latest build in .hex format a few days ago, so you could also just download that and load it with avrdude.

EDIT: I just realized you meant your own fork. I can clone yours and update it to make it PlatformIO compatible if you want.

EDIT2: If you don't want to use PIO, I can use my Linux machine to build you a .hex and upload it. OR you could just make an Ubuntu live disk with persistence and install avr-gcc and avrdude, and/or the ArduinoIDE. That way you can compile your own using Linux, without having to dual boot, if WSL doesn't work out.

jeff464 commented 2 weeks ago

@beau-seidon Heh, yeah I reached out to Jaffe a few days ago when I was in the thick of troubleshooting avr-gcc. I requested a .hex compile, and he very kindly obliged. I apologize for any confusion - I personally don't have a fork of NESizer. In my previous message above, I was referring to a .hex compile of the NESizer version with MIDI CC enabled since (as far as I know) the official one doesn't have the CCs enabled.

I remember Jaffe mentioning the PlatformIO extension. That was next on my list to try. If that doesn't work, I'll likely openly beg for assistance here in the future. ;)

beau-seidon commented 2 weeks ago

oops, I must have misread something, I'm at work, but will reread again later and fix my stupid.

EDIT: Yes I definitely misread. I thought you were circuitcreature having compiling issues, but it was just the tag. See post below for their .hex with midi cc support. Also, I just opened a pull request on @circuitcreature 's fork to add PlatformIO support, from the latest master branch. Now y'all can clone either repo, open in VSCode with PIO, update programmer settings to match your own, and click upload to compile/load to the mcu on any OS.

circuitcreature commented 2 weeks ago

@jeff464 I love my MidiNes. Grabbed one before Wayfar stopped responding to requests. This project spoke to me when i saw that you could upload samples to it.

I uploaded a release.CC support

I haven't setup PlatformIO to compile this version, but it should have compiled just fine. I 100% recommend trying PIO out, it was the only way I could compile on my Win machine and it compiled perfect on my Mac even when the CLI was giving me grief.

jeff464 commented 2 weeks ago

@beau-seidon - No worries at all. Thanks for the info!