Search Results

Search found 3 results on 1 pages for 'mrbuxley'.

Page 1/1 | 1 

  • c++ / c confusion

    - by mrbuxley
    Im trying to make a small app in c++ that saves midifiles with this library. http://musicnote.sourceforge.net/docs/html/index.html The sample code that is given on the homepage looks like this. #include "MusicNoteLib.h" void main() { MusicNoteLib::Player player; // Create the Player Object player.Play("C D E F G A B"); // Play the Music Notes on the default MIDI output port } This piece of code won't compile in Visual studio 2008, I get many errors like MusicNoteLib.h(22) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int I don't understand the error or where to start looking... There also was some dll files that can be used instead of this h file. #ifndef __MUSICNOTE_LIB_H__EBEE094C_FF6E_43a1_A6CE_D619564F9C6A__ #define __MUSICNOTE_LIB_H__EBEE094C_FF6E_43a1_A6CE_D619564F9C6A__ /** @file MusicNoteLib.h * \brief Main header file for accessing the MusicNote Library */ /// <Summary> /// This header file can be included directly in your project or through /// MusicNoteLib.h of the MusicNoteDll project. If included directly, this /// will be built directly as a satic library. If included through MusicNoteDll /// this will use dllImports through MUSICNOTELIB_API /// </Summary> #ifndef MUSICNOTELIB_API #define MUSICNOTELIB_API #endif // MUSICNOTELIB_API //#include "Player.h" namespace MusicNoteLib /// Music Programming Library { typedef void (__stdcall *LPFNTRACEPROC)(void* pUserData, const TCHAR* szTraceMsg); typedef void (__stdcall *LPFNERRORPROC)(void* pUserData, long lErrCode, const TCHAR* szErrorMsg, const TCHAR* szToken); extern "C" { MUSICNOTELIB_API typedef void MStringPlayer; MUSICNOTELIB_API void* GetCarnaticMusicNoteReader(); /// <Summary> /// Creates a MusicString Player object. /// </Summary> MUSICNOTELIB_API MStringPlayer* CreateMusicStringPlayer(); /// <Summary> /// Plays Music string notes on the default MIDI Output device with the default Timer Resolution. /// Use PlayMusicStringWithOpts() to use custom values. /// @param szMusicNotes the Music string to be played on the MIDI output device /// @return True if the notes were played successfully, False otherwise /// </Summary> MUSICNOTELIB_API bool PlayMusicString(const TCHAR* szMusicNotes); /// <Summary> /// Same as PlayMusicString() except that this method accepts Callbacks. /// The Trace and Error callbacks will be used during the Parse of the Music Notes. /// @param szMusicNotes the Music string to be played on the MIDI output device /// @param traceCallbackProc the Callback to used to report Trace messages /// @param errorCallbackProc the Callback to used to report Error messages /// @param pUserData any user supplied data that should be sent to the Callback /// @return True if the notes were played successfully, False otherwise /// </Summary> MUSICNOTELIB_API bool PlayMusicStringCB(const TCHAR* szMusicNotes, LPFNTRACEPROC traceCallbackProc, LPFNERRORPROC errorCallbackProc, void* pUserData); /// <Summary> /// Plays Music string notes on the given MIDI Output device using the given Timer Resolution. /// Use PlayMusicString() to use default values. /// @param szMusicNotes the Music notes to be played /// @param nMidiOutPortID the device ID of the MIDI output port to be used for the play /// @param nTimerResMS preferred MIDI timer resolution, in MilliSeconds /// @return True if Play was successful, False otherwise /// </Summary> MUSICNOTELIB_API bool PlayMusicStringWithOpts(const TCHAR* szMusicNotes, int nMidiOutPortID, unsigned int nTimerResMS); /// <Summary> /// Same as PlayMusicStringWithOpts() except that this method accepts Callbacks. /// The Trace and Error callbacks will be used during the Parse of the Music Notes. /// @param szMusicNotes the Music notes to be played /// @param nMidiOutPortID the device ID of the MIDI output port to be used for the play /// @param nTimerResMS preferred MIDI timer resolution, in MilliSeconds /// @param traceCallbackProc the Callback to used to report Trace messages /// @param errorCallbackProc the Callback to used to report Error messages /// @param pUserData any user supplied data that should be sent to the Callback /// @return True if Play was successful, False otherwise /// </Summary> MUSICNOTELIB_API bool PlayMusicStringWithOptsCB(const TCHAR* szMusicNotes, int nMidiOutPortID, unsigned int nTimerResMS, LPFNTRACEPROC traceCallbackProc, LPFNERRORPROC errorCallbackProc, void* pUserData); /// <Summary> /// Save the given MusicString content into a MIDI output file /// @param szMusicNotes Music Notes to be converted to MIDI output /// @param szOutputFilePath path of the MIDI output file /// @return True if the the content was saved successfully, False otherwise /// </Summary> MUSICNOTELIB_API bool SaveAsMidiFile(const TCHAR* szMusicNotes, const char* szOutputFilePath); //MUSICNOTELIB_API typedef void (*ParseErrorProc)(const MusicNoteLib::CParser*, MusicNoteLib::CParser::ErrorEventHandlerArgs* pEvArgs); //MUSICNOTELIB_API typedef void (*ParseTraceProc)(const MusicNoteLib::CParser*, MusicNoteLib::CParser::TraceEventHandlerArgs* pEvArgs); MUSICNOTELIB_API void Parse(const TCHAR* szNotes, LPFNTRACEPROC traceCallbackProc, void* pUserData); } // extern "C" } // namespace MusicNoteLib #endif // __MUSICNOTE_LIB_H__EBEE094C_FF6E_43a1_A6CE_D619564F9C6A__

    Read the article

  • WIN32 visual c++

    - by mrbuxley
    I would like to write a simple program in c++. After the program is done i would like to get my answers in form of a graph or picture that would give some certain information if i click on a certain area. i have only written console apllications in c++ before and don't really have a clue where to start with the graphic part of it all. Can I write the first part of the program in console mode and some how run it under the WIN32 later? for ex what will happen to the cout<<"foo"; commands? Is there a simpler approach to do some very basic graphic programming.

    Read the article

  • write a MIDI file in C++

    - by mrbuxley
    Hi I Have some problems finding the right information about this and would be glad if someone could point me in the right direction. How do you code a midifile? e.g. how can I write a snippet that plays a random tone for 1 second. Basically what I would need to get done is representing differnet midi melodys as vectors of some sort? How can I do this..

    Read the article

1