Hundreds of features to explore
Games made in Construct
Your questions answered
Trusted by schools and universities worldwide
Free education resources to use in the classroom
Students do not need accounts with us
What we believe
We are in this together
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
is there any way of recording the sound during game play (just the sound) and saving it automatically........The only way i can do it at the moment, is to run and record with windows sound recorder at the same time......is there any way to automate this...or does anybody now a solution.........i know Construct is primarily used for creating games, but this function would be a god send.
You could do this with Python:
PyAudio:
http://people.csail.mit.edu/hubert/pyaudio/
import pyaudio import sys chunk = 1024 FORMAT = pyaudio.paInt16 CHANNELS = 1 RATE = 44100 RECORD_SECONDS = 5 p = pyaudio.PyAudio() stream = p.open(format = FORMAT, channels = CHANNELS, rate = RATE, input = True, output = True, frames_per_buffer = chunk) print "* recording" for i in range(0, 44100 / chunk * RECORD_SECONDS): data = stream.read(chunk) # check for silence here by comparing the level with 0 (or some threshold) for # the contents of data. # then write data or not to a file print "* done" stream.stop_stream() stream.close() p.terminate()[/code:38qshoqv] or Csounds w/ Python support: [url=http://www.csounds.com/journal/issue6/pythonOpcodes.html]http://www.csounds.com/journal/issue6/p ... codes.html[/url]
Develop games in your browser. Powerful, performant & highly capable.
You could do this with Python: PyAudio: http://people.csail.mit.edu/hubert/pyaudio/ import pyaudio import sys chunk = 1024 FORMAT = pyaudio.paInt16 CHANNELS = 1 RATE = 44100 RECORD_SECONDS = 5 p = pyaudio.PyAudio() stream = p.open(format = FORMAT, channels = CHANNELS, rate = RATE, input = True, output = True, frames_per_buffer = chunk) print "* recording" for i in range(0, 44100 / chunk * RECORD_SECONDS): data = stream.read(chunk) # check for silence here by comparing the level with 0 (or some threshold) for # the contents of data. # then write data or not to a file print "* done" stream.stop_stream() stream.close() p.terminate()[/code:2doapyaa] or Csounds w/ Python support: [url=http://www.csounds.com/journal/issue6/pythonOpcodes.html]http://www.csounds.com/journal/issue6/p ... codes.html[/url]
import pyaudio import sys chunk = 1024 FORMAT = pyaudio.paInt16 CHANNELS = 1 RATE = 44100 RECORD_SECONDS = 5 p = pyaudio.PyAudio() stream = p.open(format = FORMAT, channels = CHANNELS, rate = RATE, input = True, output = True, frames_per_buffer = chunk) print "* recording" for i in range(0, 44100 / chunk * RECORD_SECONDS): data = stream.read(chunk) # check for silence here by comparing the level with 0 (or some threshold) for # the contents of data. # then write data or not to a file print "* done" stream.stop_stream() stream.close() p.terminate()[/code:2doapyaa] or Csounds w/ Python support: [url=http://www.csounds.com/journal/issue6/pythonOpcodes.html]http://www.csounds.com/journal/issue6/p ... codes.html[/url]
You are a god
i have been looking for this solution for over a year!
Phython is something i am still struggling to understand?
If you get the time, will you post me a step by step on this(or a cap)
Thanks a lot scidave
chrisbrobs
Hi there scidave,
I'm not really familiar with the workings of python, could you please put this into a .cap?
Also, is it possible to use a 'save dialogue' to select where to save it to, either before or after it has recorded? and if so, how?