MIDI Files
There are various ways to create MIDI files. One easy way to make simple ones is Song Maker from the Chrome Music Lab. It provides various ways to enter notes, including clicking on the sequencer grid to set notes. You can also play what you've entered. When you're satisfied you can save the MIDI file to your local drive.
Once you have some MIDI files, rename them something recognizable and put them onto your NeoTrellis. With your computer, plug the NeoTrellis in via a USB A to microB cable. In your file explorer/finder, you should see a new flash drive appear named CIRCUITPY. Create a new subdirectory on CIRCUITPY named midi and copy your MIDI files into the midi directory on your NeoTrellis CIRCUITPY drive. They'll be available in alphabetical order for selection so prefixing with two digit numbers gives you control of the ordering.
Samples
The code uses samples for each note. That means that for each instrument, you want to have available, you need to set up samples of it. There are various places to find instrument samples that can be used. Basegorllia.com has an extensive selection of free samples. The samples included here are taken from the 900+ Classic Synths Samples package.
When you find one (or several) instruments you like, you will need to convert them to a form usable on the NeoTrellis. The samples used in this project are mono (not stereo) WAV files with a sample rate of 16000, at 16 bits per sample PCM. There's a guide on converting sound files.
All sample related files are stored in the samples directory on the CIRCUITPY drive. There is a file for each instrument that maps MIDI key codes to sample files. For organizational purposes, it's handy to put each set of samples in its own directory. For example, there is a set of samples from an Arp Odyssey synthesizer stored in the directory samples/Arp, with an associated file samples/arp.txt. See the above image for an example. This file must be named in all lowercase; this is a convention enforced by the code. This file is shown below.
36,Arp/Arp_C2.WAV 38,Arp/Arp_D2.WAV 40,Arp/Arp_E2.WAV 41,Arp/Arp_F2.WAV 43,Arp/Arp_G2.WAV 45,Arp/Arp_A2.WAV 47,Arp/Arp_B2.WAV 48,Arp/Arp_C3.WAV 50,Arp/Arp_D3.WAV 52,Arp/Arp_E3.WAV 53,Arp/Arp_F3.WAV 55,Arp/Arp_G3.WAV 57,Arp/Arp_A3.WAV 59,Arp/Arp_B3.WAV 60,Arp/Arp_C4.WAV 62,Arp/Arp_D4.WAV 64,Arp/Arp_E4.WAV 65,Arp/Arp_F4.WAV 67,Arp/Arp_G4.WAV 69,Arp/Arp_A4.WAV 71,Arp/Arp_B4.WAV 72,Arp/Arp_C5.WAV 74,Arp/Arp_D5.WAV 76,Arp/Arp_E5.WAV 77,Arp/Arp_F5.WAV 79,Arp/Arp_G5.WAV 81,Arp/Arp_A5.WAV 83,Arp/Arp_B5.WAV 84,Arp/Arp_C6.WAV
Example samples and midi directories can be downloaded with the following link.
Text editor powered by tinymce.