Out of all the MIDI projects presented here, which project should I select to modify the code so that I can produce a CV to midi converter. That is, if I play notes on a vintage keyboard (using a resistor divided network).a voltage is produced & is then fed into an A/D converter. By further processing, the result I expect is MIDI data equivalent to the notes played on the keyboard with Note ON, Note off, etc…
the best would be to connect four DINx4 directly to key’s contacts and remove the resistors ; why ? for polyphony !
then use ain64_dout128_din128 default app
/////////////////////////////////////////////////////////////////////////////
// This function is called by MIOS when an button has been toggled
// pin_value is 1 when button released, and 0 when button pressed
/////////////////////////////////////////////////////////////////////////////
void DIN_NotifyToggle(unsigned char pin, unsigned char pin_value) __wparam
{
// a button has been pressed, send Note at channel 1
MIOS_MIDI_BeginStream();
MIOS_MIDI_TxBufferPut(0x90); // Note at channel 1
MIOS_MIDI_TxBufferPut(pin + [size="4"]OCTAVE[/size]); // pin number corresponds to note number
MIOS_MIDI_TxBufferPut(pin_value ? 0x00 : 0x7f); // buttons are high-active
MIOS_MIDI_EndStream();
// notify display handler in DISPLAY_Tick() that DIN value has changed
last_din_pin = pin;
app_flags.DISPLAY_UPDATE_REQ = 1;
}
where OCTAVE is the transpose trick on a smaller than 128 keyboard
Great, there are certainly good suggestions. I can’t wait to start tinkering around with your ideas and eventually implement something that justify my needs.