-
Notifications
You must be signed in to change notification settings - Fork 18
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
How to upload samples? #6
Comments
If I recall correctly you can send samples when the system is in any mode. As soon as the MIDI receiver handling code sees a sysex command followed by SYSEX_CMD_SAMPLE_LOAD (0x01) it will change the global UI state into a "transfer mode". In this mode the 16 upper button LEDs will light up like a progress bar. You can see in midi.c what is expected by this sysex command, but basically:
What I did to load new samples was to first convert the sample from the source format (wav, mp3, whatever) to 7-bit unsigned audio. This can be done with a variety of tools, I believe I used SoX for this (in Linux). This produces the |
Ah, okay. I will try it! Thanks for you help, and for the fuse settings too. I'm relativly new to programming microcontroller outside of arduino, so I really appriciated the support! |
Hi @KeenVox, Really late follow-up, but I recently started working some more on this project to try and finish most of the features. If you're still interested, I have now done some fixes to the code such that uploading and using samples is a bit more user friendly. I actually realized that the LED progress bar feature was actually never pushed to the git repository, but I have done that now. I have also added a tool for generating a sysex file with the correct format. To create a sysex file from the converted raw sample, run the gensysex program like this:
Where the index is which index you want the sample to have in the NESizer file system. Index 0 corresponds to MIDI note 60 (middle C). This is the note you will have to input on MIDI to trigger the sample on the DMC channel, or enter into the sequencer if making a pattern with DMC samples. When you send the sysex data from the file, the NESizer should give you a progress bar on the LEDs, and the two digit display should show 'rr' (for now). If you see this, you can be sure that the NESizer is actually receiving the data and is storing it in memory. If it does not start, I would try to format the sample file system first, which is done by going into the settings mode/page and then pressing the 7th button on the second row. |
Hell yes! I know what I'm doing this weekend :). I have been meaning to experiment with this to get some samples in, but have been super busy with work lately. I'm going to try it out with your script. Probably better to post this on another thread since unrelated to samples, but over the next month or so I will try to add some MIDI CC callbacks to modify some of the voice parameters like duty and the envelopes etc., to match the Famimimidi MIDI implementation. It takes me a while because I'm still learning C/C++. I'll finish the build guide from my notes first, like I said I'd do previously. It's about 40% done. |
That would be really great! I'd be happy to review a pull-request and get this in.
Really great work of you to make a build guide and updated BOM. I also would like to get the gerber files uploaded so people can order this without having the PCB tool. Don't know why I didn't do that already... |
Hi Johan,
very cool! Will definitly try everything out. Great to see you working on
this project again!
Am 6. Oktober 2023 18:15:43 schrieb Johan Fjeldtvedt
***@***.***>:
…
Hi @KeenVox,
Really late follow-up, but I recently started working some more on this
project to try and finish most of the features.
If you're still interested, I have now done some fixes to the code such
that uploading and using samples is a bit more user friendly. I actually
realized that the LED progress bar feature was actually never pushed to the
git repository, but I have done that now.
I have also added a tool for generating a sysex file with the correct format.
To use this tool, you can look at the script convert-sample.sh. To put it
short, convert the sample file to 16 kHz, 7-bit. unsigned raw format. SoX
is a good utility for this, the script shows how to do this conversion for
input files in wav format.To create a sysex file from the converted raw
sample, run the gensysex program like this:
./gensysex sample <index> <input raw sample file path> <sysex filename>
Where the index is which index you want the sample to have in the NESizer
file system. Index 0 corresponds to MIDI note 60 (middle C). This is the
note you will have to input on MIDI to trigger the sample on the DMC
channel, or enter into the sequencer if making a pattern with DMC samples.
When you send the sysex data from the file, the NESizer should give you a
progress bar on the LEDs, and the two digit display should show 'rr' (for
now). If you see this, you can be sure that the NESizer is actually
receiving the data and is storing it in memory. If it does not start, I
would try to format the sample file system first, which is done by going
into the settings mode/page and then pressing the 7th button on the second row.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Regarding another thread for this, please make one under Discussion (instead of Issues), I added that feature to the repository now :) |
I would also like to know how to upload samples to the NESizer. I converted my audio file to the proper format using sox, but I'm not sure what "run the gensysex program like this: ./gensysex sample " means in this context. The windows command line just errors out and double clicking the file sends me to VSC to edit it. |
The source for gensysex is in this repo under tools, and can be compiled with gcc or another c compiler (I used msvc). I'll upload my Windows-compiled gensysex.exe after work. I'm also working on a script to batch-upload sysex files to Nesizer using midiox, to load whole drum/sample kits at a time. |
here are the gensysex and deltacompress windows executables used to convert samples. you shouldn't need to do anything with dc. take a look at the .sh script in tools to see how the process is automated in linux. it shows the syntax for calling gensysex in a terminal. I have a .sh and .bat script for converting big batches of samples, but I have some tweaks to make before I upload them. I also have a little bit of experimenting to do regarding the indexing of samples (mapping to MIDI notes), which may lead to a wishlist item of my own. the task I'm having a little bit of trouble with is learning the COM scripting API for midi-ox. when I figure that out I'll upload the script for batch upload too. |
Hi,
I just wanted to ask, how to upload samples? I assume the samples have to be converted for sysex and then send while in sample select mode?
Thanks in advance!
Keen
The text was updated successfully, but these errors were encountered: