AutoHotkey Community

It is currently May 26th, 2012, 4:21 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 66 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
 Post subject:
PostPosted: March 21st, 2009, 9:42 am 
Offline

Joined: February 19th, 2007, 9:03 am
Posts: 338
Location: Czech Republic
Can you please help with this?
Code:
Gui, 7:+owner1 
; Make the main window (Gui #1) the owner of the "about box" (Gui #2).
Gui +Disabled 
; Disable main window.
suspend
Gui, 7:-SysMenu
Loop %A_ScriptDir%\media\*.*
{
   mp3List .= A_LoopFilename . "|"
}
StringTrimRight mp3List, mp3List, 1
Gui 7:Add, Listbox, w200 h300 vhMedia, %mp3List%
Gui 7:Add, Button, w100 xm+50 g7Play Default, %play%
Gui, 7:Add, button, w4 gback, %back%
Gui, 7:Show, w850 h580 x50 y100,%fav%
return
7play:
   Gui, 7:Submit, NoHide
hMedia:=MCI_Stop(hMedia)
hMedia:=MCI_Close(hMedia)
hMedia:=MCI_Open(hMedia)
if Not hMedia
    {
    msgBox, 0, Error, Error opening media file %hmedia%
    return
    }

Open:=true
MCI_SetVolume(hMedia,curvolume) ;-- Sets the volume to max for the device
MCI_SetBass(hMedia,curbass) ;-- Sets the bass to max for the device
length:=MCI_Length(hMedia)
gosub, play
return

back:
7GuiClose:
7GuiEscape:
Gui, 1:-Disabled 
Gui Destroy 
suspend
Return

_________________
Thanks.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 21st, 2009, 10:05 am 
Offline

Joined: October 1st, 2005, 9:55 pm
Posts: 775
Location: Texas, USA
vlcek wrote:
Can you please help with this?

I'll PM you with a follow up.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 23rd, 2009, 9:07 am 
Offline

Joined: February 20th, 2007, 1:37 pm
Posts: 198
Location: D.C.
Hi, very interesting thread. Thanks for all your good work!

I just dl'd the lib and examples. Running MCI -- record example.ahk I get this error code -- same for MCI -- Standard Example.ahk too:

Quote:
---------------------------
MCI -- Record Example.ahk
---------------------------
Error at line 713 in #include file "D:\Documents and Settings\ribbet.1\Desktop\MCI.ahk".

Line Text: %s_Callback%
Error: Dynamic function calls are not supported.

The program will exit.
---------------------------
OK
---------------------------


Can you please enlighten me, anybody?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 23rd, 2009, 9:10 am 
Offline

Joined: January 18th, 2006, 7:39 am
Posts: 274
Location: Conway, Arkansas
ribbet.1 wrote:
Can you please enlighten me, anybody?

Update to the latest version of AutoHotkey.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 23rd, 2009, 2:20 pm 
Offline

Joined: February 20th, 2007, 1:37 pm
Posts: 198
Location: D.C.
Well I shall do that since 1.0.48 is now out it seems. But I had 1.0.47 already.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 23rd, 2009, 2:25 pm 
Offline

Joined: February 20th, 2007, 1:37 pm
Posts: 198
Location: D.C.
OK, now works! Thanks very much!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 3rd, 2009, 5:30 pm 
Offline

Joined: February 20th, 2007, 1:37 pm
Posts: 198
Location: D.C.
Is there an easy way to get these MCI functions to go to a specific time in a recording? If you can just point me in the right direction I'll see what I can do with it. -- Scratch that, I'll look it up at MSDN. But if anybody wants to share an example, that's OK! :-)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 4th, 2009, 3:13 am 
Offline

Joined: October 1st, 2005, 9:55 pm
Posts: 775
Location: Texas, USA
ribbet.1 wrote:
Is there an easy way to get these MCI functions to go to a specific time in a recording? If you can just point me in the right direction I'll see what I can do with it. -- Scratch that, I'll look it up at MSDN. But if anybody wants to share an example, that's OK! :-)

The "Record Example" script included the MCI package (see the 1st post for the link) includes examples of how to jump around in a recording. I hope this helps.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 4th, 2009, 3:41 am 
Offline

Joined: February 20th, 2007, 1:37 pm
Posts: 198
Location: D.C.
jballi wrote:
ribbet.1 wrote:
Is there an easy way to get these MCI functions to go to a specific time in a recording? If you can just point me in the right direction I'll see what I can do with it. -- Scratch that, I'll look it up at MSDN. But if anybody wants to share an example, that's OK! :-)

The "Record Example" script included the MCI package (see the 1st post for the link) includes examples of how to jump around in a recording. I hope this helps.


Thanks and I apologize for not having noticed this. I have only played around with it a couple of times.

I am looking to create a 4-track playback tool for transcription. Looking at MSDN, I see there is a "mixer" thing. If I were just making a script that used 4 instances of your MCI library simultaneously, would I need to incorporate some kind of virtual mixer, or would Windows automatically mix them? I want to keep this as simple as possible, at least for starters. That is to say, if each individual instance has its own volume level setting, would I really need to incorporate a mixer? I can figure it out faster if I don't need that.

Cheers, Ribbet


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 4th, 2009, 6:17 am 
Offline

Joined: October 1st, 2005, 9:55 pm
Posts: 775
Location: Texas, USA
ribbet.1 wrote:
I am looking to create a 4-track playback tool for transcription. Looking at MSDN, I see there is a "mixer" thing. If I were just making a script that used 4 instances of your MCI library simultaneously, would I need to incorporate some kind of virtual mixer, or would Windows automatically mix them? I want to keep this as simple as possible, at least for starters. That is to say, if each individual instance has its own volume level setting, would I really need to incorporate a mixer? I can figure it out faster if I don't need that.

This one is definitely out of my scope of knowledge...

I did a little research and found that the MCI protocol does support a "mixer" device but only if the sound card manufacturer supports it AND if they provide the device driver. But and however, I couldn't find any MCI commands or flags that support 4-channel recording. I admit, I didn't look that hard.

I thought about telling about opening 4 separate recording sessions using 4 unique values for the p_lpszDeviceID parameter but the more I thought about it, the more I was convinced that it wouldn't work. Of course you can record each channel one at a time but I wouldn't have a clue as to how to merge the information back together again.

I suspect that MCI library is probably not robust enough to solve your problem. I haven't looked but there are probably quite a few free or inexpensive tools out there that would be better suited to solve your problem.

I'm sorry I couldn't be more helpful. Good luck!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 4th, 2009, 7:55 am 
Offline

Joined: February 20th, 2007, 1:37 pm
Posts: 198
Location: D.C.
jballi wrote:

I'm sorry I couldn't be more helpful. Good luck!


You have been VERY helpful. Thanks for getting back to me!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 8th, 2009, 7:16 am 
Offline

Joined: February 19th, 2007, 9:03 am
Posts: 338
Location: Czech Republic
Good morning.
Can you help me with problem with playi file from the internet?
Code:
;Program pro přehrávání rádia Melody;
;Tento program je opensource, lze jej upravovat, ale za souhlasu autora, nebo generálního ředitele rádia Melody.;
setworkingdir %A_ScriptDir%
#include mci.ahk
iniread, w, opt.ini, main, w
iniread, x, opt.ini, main, x
iniread, y, opt.ini, main, y
iniread, h, opt.ini, main, h
gui,add,button,gplay,hrát
gui,add,button,gstop,stop
gui,show,%w% %h% %x% %y%,Radio_Melody_player
return
play:
        hMedia:=MCI_Open("http://sc1.ipip.cz:8000/")
        if not hMedia
{
            MsgBox 16, Chyba!, Nemohu se připojit k serveru`,` nebo přehrát soubor.
            return
}
else
gosub, start
return
start:
if Open
    {
    Status:=MCI_Status(hMedia)
    if Status=stopped
{
MCI_SetVolume(hMedia,curvolume) ;-- Sets the volume to max for the device
MCI_SetBass(hMedia,curbass) ;-- Sets the bass to max for the device
        MCI_Play(hMedia)
}
     else       
if Status=paused
{
MCI_SetVolume(hMedia,curvolume) ;-- Sets the volume to max for the device
MCI_SetBass(hMedia,curbass) ;-- Sets the bass to max for the device
            MCI_Resume(hMedia)
}
    }
return
stop:
        MCI_Stop(hMedia)
exitapp
return

msgbox16 is error, when player can't play file from this address.
Why this not function?

_________________
Thanks.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 8th, 2009, 8:26 am 
Offline

Joined: October 1st, 2005, 9:55 pm
Posts: 775
Location: Texas, USA
vlcek wrote:
Can you help me with problem with playi file from the internet?

Unfortunatelly, the MCI protocol doesn't support streaming audio. Although I haven't tried it myself (yet), the BASS library is supposed to be able to support streaming audio. You might want to take a look/see. Here's the link:
http://www.autohotkey.com/forum/viewtopic.php?t=37092

Good luck!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 20th, 2010, 5:16 am 
Offline
User avatar

Joined: October 31st, 2008, 9:39 am
Posts: 641
Location: France
Thanks for this library :)

The problem about codec has already been reported, yet there is a link:
http://www.autohotkey.com/forum/viewtopic.php?t=54682

If you don't want to use registry you can add TYPE MYTYPE at OPEN


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 14th, 2010, 11:44 am 
a simple example showing the input-level of the current recording device (e.g. the microphone or line-in):
Code:
hMedia:=MCI_Open("new","","type waveaudio")
l_CmdString:="status " . hMedia . " level"
OnExit, ExitSub
Progress, R0-128 B  ,Press Escape to Exit, Microphone Audio Level, Microphone Audio Level,
loop
{
error := MCI_SendString(l_CmdString,l_lpszReturnString)
Progress, %l_lpszReturnString%
}
Esc::ExitApp   
ExitSub:
MCI_Close(hMedia)
ExitApp

;#include MCI.ahk ; uncomment if MCI is not in your std-lib


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 66 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: G. Sperotto and 18 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group