I'm trying to build such a simple player that carries a wav generator, the Recording command generates a signal at a certain frequency and stores it in the wav format, then the task of playing this file with the Play command.
It seems to build these procedures in successive cycles, when pressing the v.u. buttons there is an initialization of commands (record, stop and reproduction, a pause, stop.
What is here on the charts is both separate unmanaged vi. Record.vi continuously writes a signal and saves it as an acceptable option for me, incl. and a white signal) to the root folder c: \ signal executes as. Accordingly, Play starts and reads.
Help please solve this problem. Those examples that are in: labview: examples \ Graphics and Sound \ *. * Were useful, but do not give an answer.
Solved! Go to Solution.
Thanks for attaching the VIs. The pictures are much less helpful, unless you want us to spend the time (a) guessing which version of LabVIEW you are using, (b) guessing at how you set up the Express VIs, (c) not being able to run your code unless we waste our time reproducing your Block Diagram, but (d) fortunately not having to guess at "hidden code" because you have no Case Statements shown.
You want to do one of two things -- Record or Play. You could have a Record button that Records as long as it is True, a Play button that Plays as long as it is True, and a Stop button that ends the program. You'd need to think about how the Record and Play buttons work -- you wouldn't want to push them both on at the same time. However, you could have logic that if you were recording and pushed Play, that would act as though you turned Record off and turned Play on.
Look at your Record and Play routines. Note that they consist of some initialization and then a loop. You might look up State Machines (or look for LabVIEW examples of Simple State Machines), which might be one way of handling this issue (your States might be Initialize Recording, Record, Stop Recording, Initialize Play, Play, Stop Play, Exit).
Thank you for message. I specify that I'm working in version 14.
The procedure is as follows:
there is a recording button that, when pressed, starts a continuous recording of the generated signals, including a white signal, when pressed again, the recording is stopped and stored in the * .wav file. There is also a play button that, when pressed, allows you to listen to a saved file, the pause button pauses playback, the second press continues reading. The sub-stop button stops playback.
During all these procedures, the main application with the generator and its control functions works and stops when the stop button is pressed.