knowledge-database (beta)

Current group: dbase.programming

midi files

midi files  
Charles
 Re: midi files  
Jean-Pierre Martel
 Re: midi files  
Charles
 Re: midi files  
Jean-Pierre Martel
From:Charles
Subject:midi files
Date:Tue, 18 Jan 2005 22:48:06 -0500
Can 2.5 call midi files?

Charles
From:Jean-Pierre Martel
Subject:Re: midi files
Date:Wed, 19 Jan 2005 11:31:12 -0500
In article , grahamcp@journey.com says...
> Can 2.5 call midi files?

Yes. Herunder is the code written by Romain Strieff

Jean-Pierre Martel, editor
The dBASE Developers Bulletin
Blue Star dBASE Plus Core Concepts Graduate

Play_midi("C:\My Documents\My Music\passport.mid")

Function Play_midi(cMIDIfile)
// Romain Strieff, 26 July 1999
#define SW_SHOWNORMAL 1
#define SW_SHOWMINIMIZED 2
#define SW_SHOWMAXIMIZED 3
#define SW_SHOWNOACTIVATE 4

#if __vdb__ >= 7
#define WINAPI_A "A"
#define WINAPI_SHELL "SHELL32"
#else
#define WINAPI_A ""
#define WINAPI_SHELL "SHELL"
#endif

if type("ShellExecute") #"FP"
extern cHandle ShellExecute(cHandle, cstring, cstring, cstring, ;
cstring, CINT) WINAPI_SHELL from "ShellExecute" + WINAPI_A
endif
local nHandle
private sd // macro needs private
sd = set("dire") // sometimes it _could_ change dirs, so prevent it
nHandle = ShellExecute(_app.framewin.hwnd, "open", cMIDIfile,;
null, null, SW_SHOWNORMAL)
/* or to play automatically
nHandle = ShellExecute(_app.framewin.hwnd, "play", cMIDIfile,;
null, null, SW_SHOWNORMAL)
*/
if sd # set("dire")
set dire to "&sd."
endif
return nHandle
From:Charles
Subject:Re: midi files
Date:Thu, 20 Jan 2005 00:43:32 -0500
I'll give it a try. Thanks.

Charles


Jean-Pierre Martel Wrote:

> In article , grahamcp@journey.com says...
> > Can 2.5 call midi files?
>
> Yes. Herunder is the code written by Romain Strieff
>
> Jean-Pierre Martel, editor
> The dBASE Developers Bulletin
> Blue Star dBASE Plus Core Concepts Graduate
>
> Play_midi("C:\My Documents\My Music\passport.mid")
>
> Function Play_midi(cMIDIfile)
> // Romain Strieff, 26 July 1999
> #define SW_SHOWNORMAL 1
> #define SW_SHOWMINIMIZED 2
> #define SW_SHOWMAXIMIZED 3
> #define SW_SHOWNOACTIVATE 4
>
> #if __vdb__ >= 7
> #define WINAPI_A "A"
> #define WINAPI_SHELL "SHELL32"
> #else
> #define WINAPI_A ""
> #define WINAPI_SHELL "SHELL"
> #endif
>
> if type("ShellExecute") #"FP"
> extern cHandle ShellExecute(cHandle, cstring, cstring, cstring, ;
> cstring, CINT) WINAPI_SHELL from "ShellExecute" + WINAPI_A
> endif
> local nHandle
> private sd // macro needs private
> sd = set("dire") // sometimes it _could_ change dirs, so prevent it
> nHandle = ShellExecute(_app.framewin.hwnd, "open", cMIDIfile,;
> null, null, SW_SHOWNORMAL)
> /* or to play automatically
> nHandle = ShellExecute(_app.framewin.hwnd, "play", cMIDIfile,;
> null, null, SW_SHOWNORMAL)
> */
> if sd # set("dire")
> set dire to "&sd."
> endif
> return nHandle
From:Jean-Pierre Martel
Subject:Re: midi files
Date:Thu, 20 Jan 2005 12:21:08 -0500
In article , grahamcp@journey.com says...
>
> I'll give it a try. Thanks.

You're welcome. Good luck.

Jean-Pierre Martel, editor
The dBASE Developers Bulletin
Blue Star dBASE Plus Core Concepts Graduate
   

Copyright © 2006 knowledge-database   -   All rights reserved