create wave data and play it live?

Get help with using AutoHotkey and its commands and hotkeys
User avatar
jeeswg
Posts: 6904
Joined: 19 Dec 2016, 01:58
Location: UK

create wave data and play it live?

05 Jul 2017, 19:18

I've created wave files in the past by drawing a wave in MS Paint, converting the image into a wave, and repeating the wave. But if possible I would like to just send wave data *somewhere* and have it play live, that way I could change the wave live. So I wondered if anyone knew a way to do this.

On a related note I might like to know the best current scripts for displaying changing wave/numerical data or for displaying separate png files in sequence as though they were an animated gif. Or perhaps even to record live from a microphone/webcam, and display the audio's wave. I.e. do you just keep creating images and setting the image on a Static control, or is there a better way.

Btw the way wave data works is just that the image of a wave is stored, so simply loads of numbers, that correspond to the wave height. A greater range of possible height values (greater precision), or more values per second equals better quality.

Thanks for reading.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
User avatar
jeeswg
Posts: 6904
Joined: 19 Dec 2016, 01:58
Location: UK

Re: create wave data and play it live?

27 Jul 2017, 19:09

[script to create wav data]
create wav files from scratch (draw a wav file) - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=6&t=34584

[play wave data from a file/from a variable]
Seamless Looping of Audio - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=5&t=680

Code: Select all

;SND_FILENAME := 0x20000 ;SND_NOWAIT := 0x2000 ;SND_LOOP := 0x8
;SND_MEMORY := 0x4 ;SND_NODEFAULT := 0x2 ;SND_ASYNC := 0x1
Loop, 3
	DllCall("winmm.dll\PlaySound" (A_IsUnicode?"W":"A"), Ptr,&vData, Ptr,0, UInt,0x2006)
I'm still curious as to what the best seismograph script written for AutoHotkey is (to display a wave as it plays). Or if there is some joint technique for playing, and displaying, a wave. Cheers.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA

Return to “Ask For Help”

Who is online

Users browsing this forum: boiler, Odlanir, pn4265 and 227 guests