Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Midi API, please help

Midi API, please help

Scheduled Pinned Locked Moved C / C++ / MFC
c++jsonhelp
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    bob_000
    wrote on last edited by
    #1

    :confused::confused: Hi, I am building a wind synth that uses the API midi functions of a soundcard. m_Note2 is an int value according to the keys pressed and m_PBAD_2 is an int value ranging from 0-127 according to the airflow thru the synth, updated according to the timer set at 250 millisec. When I blow into the synth a note is played every 25sec but does not stop, because the m_note in stopnote() outdated. I have no idea what to add to the playnote() function. Any suggestions appreciated, my knowledge of VC++ is very limited. Cheers, Rob robert.harrington2@mail.dcu.ie void CAD_mouthDlg::PlayNote() { UpdateData(TRUE); MidiOutMessage (hMidiOut, 0x00, 0x90, m_Note2,m_PBAD_2) ; } void CAD_mouthDlg::StopNote() { if(m_Key_Press == FALSE) { MidiOutMessage (hMidiOut, 0x00, 0x90, m_Note2,0) ; } else { } } void CAD_mouthDlg::OnTimer(UINT nIDEvent) { CAD_mouthDlg::read_analog(); CAD_mouthDlg::SetPortChigh(); CAD_mouthDlg::OnButtonReadPort(); CAD_mouthDlg::PlayNote(); CAD_mouthDlg::StopNote(); CDialog::OnTimer(nIDEvent); }

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups