Jump to content

CV to MIDI converter


smc

Recommended Posts

Hi All

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....

Can anybody shed some light to this subject!

Thank You

SMC

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...