Re: play command and wav file

2020-12-19 Thread Klaus major-k via use-livecode
Hi listee,

> Am 19.12.2020 um 17:15 schrieb jbv via use-livecode 
> :
> 
> Hi list,
> Is there a way to play a wav file that is already loaded
> in memory as binary data ?

do you mean imported as audioclip?
If yes, just -> play ac "nameofclip.wav"

If not, please specify. :-)

> The doc only says that "play" takes a file name as parameter...
> 
> Thank you in advance.
> jbv

Best

Klaus

--
Klaus Major
https://www.major-k.de
kl...@major-k.de


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: play command and wav file

2020-12-19 Thread jbv via use-livecode

Martin, Richmond, thank you both for your answers.
My problem is that the data of the wav file is already
in memory, because I open the wav file, read it, store
it in a variable, and apply various processes to the content.
And finally what I want to do is play the wav data after
processing, without having to store it as a file and then
use "play".
Ideally it would be nice to be able to use a variable as
an audioclip...

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: play command and wav file

2020-12-19 Thread Martin Koob via use-livecode
Hi

You can use an audio clip.

First import the wave file as an audio clip into the stack.

Under File menu select “Import as Control…” 

then in the dropdown menu select “…audio file”

i.e. I imported a file called  “friday.wav”

This will create an audio clip in the binary stack.

It will have the same name as the wav file you imported.

Then when you need to play the clip use the following line of code: 
Play audioclip "friday.wav"

Martin



> On Dec 19, 2020, at 11:15 AM, jbv via use-livecode 
>  wrote:
> 
> Hi list,
> Is there a way to play a wav file that is already loaded
> in memory as binary data ?
> The doc only says that "play" takes a file name as parameter...
> 
> Thank you in advance.
> jbv
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: play command and wav file

2020-12-19 Thread Richmond via use-livecode
I'm not sure what you mean by 'binary data', but I set up a stack and 
imported a .wav file into it

which I named 'xxx.wav'. The stack contains a single button with the code:

on mouseUp
    play audioClip "xxx.wav"
end mouseUp

and it does exactly what I would expect it to do: plays the .wav file.

macOS 11.2 beta, Livecode 9.6.1

best, Richmond.

On 19.12.20 18:15, jbv via use-livecode wrote:

Hi list,
Is there a way to play a wav file that is already loaded
in memory as binary data ?
The doc only says that "play" takes a file name as parameter...

Thank you in advance.
jbv

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


play command and wav file

2020-12-19 Thread jbv via use-livecode

Hi list,
Is there a way to play a wav file that is already loaded
in memory as binary data ?
The doc only says that "play" takes a file name as parameter...

Thank you in advance.
jbv

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode