How to record sound into array using DAQ ?
Hi to everyone
Im last year student , im using LABVIEW for the first time.
i have an myDAQ , i need to record audio go through the analog ports/AUDIO INPUT of the myDAQ, into array, for later singal proccesing.
its for my final project.
First, Learn to use LabVIEW with myDAQ is a series of videos. To quote the Introduction,
The Learn to LabVIEW with MyDAQ provides fundamental LabVIEW knowledge for a great out of the box experience with your MyDAQ. Each unit provides a set of videos to allow you to learn at your own pace and review material an unlimited number of times. As well, most videos are accompanied by minor exercises which will help drive home important topics and challenge you along the way.
View the videos, do the exercises, and I suspect many of your questions will be answered. If you write some LabVIEW code and have a problem, come back, show us your code, and explain the problem.
Bob Schor
Similar Messages
-
I'm trying to record sound into Imovie using an Mbox.
I've selected it in the system prefs and also in Imovie, but I'm still getting sound thru the built in microphone. Any suggestions?
ask the users in the iMovie forum: https://discussions.apple.com/community/ilife/imovie. good luck
-
How To Record Sound Using Applet
How To Record Sound Using JApplet
Hallo there,
I am intrested on the same topic but I am not so good to modify the sound sdk demo. Is there anyone willing to share some code?
Thanks
Matteo -
How to get the record set into array?
Hi,
I want to get the record set into array in the procedure and do the processing of the array later in procedure.
below is the stored procedure i am working on:
procedure bulk_delete_group(p_group_id in Array_GroupListID) as
begin
for i in p_group_id.first..p_group_id.last loop
--Here I have to get the list of user id before deleting group
SELECT user_id into *<SOME ARRAY>* FROM group_members WHERE group_id = p_group_id(i);
DELETE group WHERE group_id = p_group_id(i);
--Process the user id array after group deletion..
end loop;
end bulk_delete_group;
Thanks in advance
AdityaSomething like this ->
satyaki>
satyaki>select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
PL/SQL Release 10.2.0.3.0 - Production
CORE 10.2.0.3.0 Production
TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production
Elapsed: 00:00:00.20
satyaki>
satyaki>
satyaki>select * from emp;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
9999 SATYAKI SLS 7698 02-NOV-08 55000 3455 10
7777 SOURAV SLS 14-SEP-08 45000 3400 10
7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30
7566 JONES MANAGER 7839 02-APR-81 2975 20
7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30
7698 BLAKE MANAGER 7839 01-MAY-81 2850 30
7782 CLARK MANAGER 7839 09-JUN-81 4450 10
7788 SCOTT ANALYST 7566 19-APR-87 3000 20
7839 KING PRESIDENT 17-NOV-81 7000 10
7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30
7876 ADAMS CLERK 7788 23-MAY-87 1100 20
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7900 JAMES CLERK 7698 03-DEC-81 950 30
7902 FORD ANALYST 7566 03-DEC-81 3000 20
13 rows selected.
Elapsed: 00:00:02.37
satyaki>
satyaki>create type np is table of number;
2 /
Type created.
Elapsed: 00:00:03.32
satyaki>
satyaki>Create or Replace Procedure myProc(myArray np)
2 is
3 i number(10);
4 rec emp%rowtype;
5 Begin
6 for i in 1..myArray.count
7 loop
8 select *
9 into rec
10 from emp
11 where empno = myArray(i);
12
13 dbms_output.put_line('Employee No:'||rec.empno||' Name:'||rec.ename);
14 end loop;
15 End myProc;
16 /
Procedure created.
Elapsed: 00:00:00.88
satyaki>
satyaki>
satyaki>declare
2 v np:=np(9999,7777);
3 begin
4 myProc(v);
5 end;
6 /
Employee No:9999 Name:SATYAKI
Employee No:7777 Name:SOURAV
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.30
satyaki>Regards.
Satyaki De. -
How to record sound with Java Sound?
I just want to record a clip of sound and save it to a WAV file. I exhausted the web but didn't find a tutorial. Would someone be kind enough to give me a tutorial or a sample code? The simpler the better. Thanks.
Here's the code I used to record and play sound. Hope the length do not confound you.
import javax.sound.sampled.*;
import java.io.*;
// The audio format you want to record/play
AudioFormat.Encoding encoding = AudioFormat.Encoding.PCM_SIGNED;
int sampleRate = 44100;
byte sampleSizeInBits = 16;
int channels = 2;
int frameSize = 4;
int frameRate = 44100;
boolean bigEndian = false;
int bytesPerSecond = frameSize * frameRate;
AudioFormat format = new AudioFormat(encoding, sampleRate, sampleSizeInBits, channels, frameSize, frameRate, bigEndian);
//TO RECORD:
//Get the line for recording
try {
targetLine = AudioSystem.getTargetDataLine(format);
catch (LineUnavailableException e) {
showMessage("Unable to get a recording line");
// The formula might be a bit hard :)
float timeQuantum = 0.1F;
int bufferQuantum = frameSize * (int)(frameRate * timeQuantum);
float maxTime = 10F;
int maxQuantums = (int)(maxTime / timeQuantum);
int bufferCapacity = bufferQuantum * maxQuantums;
byte[] buffer = new byte[bufferCapacity]; // the array to hold the recorded sound
int bufferLength = 0;
//The following has to repeated every time you record a new piece of sound
targetLine.open(format);
targetLine.start();
AudioInputStream in = new AudioInputStream(targetLine);
bufferLength = 0;
for (int i = 0; i < maxQuantums; i++) { //record up to bufferQuantum * maxQuantums bytes
int len = in.read(buffer, bufferQuantum * i, bufferQuantum);
if (len < bufferQuantum) break; // the recording may be interrupted
bufferLength += len;
targetLine.stop();
targetLine.close();
//Save the recorded sound into a file
AudioInputStream stream = AudioSystem.getAudioInputStream(new ByteArrayInputStream(buffer, 0, bufferLength));
AudioFileFormat.Type fileType = AudioFileFormat.Type.WAVE;
File file = new File(...); // your file name
AudioSystem.write(stream, fileType, file);
//TO PLAY:
//Get the line for playing
try {
sourceLine = AudioSystem.getSourceDataLine(format);
catch (LineUnavailableException e) {
showMessage("Unable to get a playback line");
//The following has to repeated every time you play a new piece of sound
sourceLine.open(format);
sourceLine.start();
int quantums = bufferLength / bufferQuantum;
for (int i = 0; i < quantums; i++) {
sourceLine.write(buffer, bufferQuantum * i, bufferQuantum);
sourceLine.drain(); //Drain the line to make sure all the sound you feed it is played
sourceLine.stop();
sourceLine.close();
//Or, if you want to play a file:
File audioFile = new File(...);//
AudioInputStream in = AudioSystem.getAudioInputStream(audioFile);
sourceDataLine.open(format);
sourceDataLine.start();
while(true) {
if(in.read(buffer,0,bufferQuantum) == -1) break; // read a bit of sound from the file
sourceDataLine.write(buffer,0,buffer.length); // and play it
sourceDataLine.drain();
sourceDataLine.stop();
sourceDataLine.close();You may also do this to record sound directly into a file:
targetLine.open(format);
targetLine.start();
AudioInputStream in = new AudioInputStream(targetLine);
AudioFileFormat.Type fileType = AudioFileFormat.Type.WAVE;
File file = new File(...); // your file name
new Thread() {public void run() {AudioSystem.write(stream, fileType, file);}}.start(); //Run this in a separate thread
//When you want to stop recording, run the following: (usually triggered by a button or sth)
targetLine.stop();
targetLine.close();Edited by: Maigo on Jun 26, 2008 7:44 AM -
How to convert arraylist into array
how to convert arraylist into array?
If you are using generics, I would use this version of toArray:
List < X > list = ...
X[] array = list.toArray(new X[list.size()]);If you are not using generics, that same thing looks like:
List list = ...
X[] array = (X[]) list.toArray(new X[list.size()]); -
How to upload data into IT0000 using ABAP-HR program
Hello,
I'm required to upload data into multiple infotypes [IT000, 0001, 0002, etc] using single input text file. Can anyone able to guide me, how to upload data into IT0000 using ABAP program ?
Thanks in advance.
Regards
Prabhakar.
Message was edited by:
Prabhakara MuthyalExample code for HR_MAINTAIN_MASTERDATA to COPY IT0002
DATA: INT_0002_FINAL TYPE STANDARD TABLE OF PA0002 WITH HEADER LINE.
DATA: VALUES LIKE PPROP OCCURS 10 WITH HEADER LINE,
RETURN LIKE BAPIRETURN1,.
LOOP AT INT_0002_FINAL.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-PERNR'.
VALUES-FVAL = INT_0002_FINAL-PERNR.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-BEGDA'.
VALUES-FVAL = INT_0002_FINAL-BEGDA.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-ENDDA'.
VALUES-FVAL = INT_0002_FINAL-ENDDA.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-nachn'.
VALUES-FVAL = INT_0002_FINAL-NACHN.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-gblnd'.
VALUES-FVAL = INT_0002_FINAL-GBLND.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-vorna'.
VALUES-FVAL = INT_0002_FINAL-VORNA.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-rufnm'.
VALUES-FVAL = INT_0002_FINAL-RUFNM.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-name2'.
VALUES-FVAL = INT_0002_FINAL-NAME2.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-inits'.
VALUES-FVAL = INT_0002_FINAL-INITS.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-famst'.
VALUES-FVAL = INT_0002_FINAL-FAMST.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-gbdat'.
VALUES-FVAL = INT_0002_FINAL-GBDAT.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-sprsl'.
VALUES-FVAL = INT_0002_FINAL-SPRSL.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-anzkd'.
VALUES-FVAL = INT_0002_FINAL-ANZKD.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-natio'.
VALUES-FVAL = INT_0002_FINAL-NATIO.
APPEND VALUES.
* maintain master data
CALL FUNCTION 'HR_MAINTAIN_MASTERDATA'
EXPORTING
PERNR = INT_0002_FINAL-PERNR
ACTIO = 'COP'
BEGDA = INT_0002_FINAL-BEGDA
* ENDDA = INT_0002_FINAL-ENDDA
SUBTY = SPACE
NO_ENQUEUE = SPACE
DIALOG_MODE = '0'
TCLAS = 'A'
IMPORTING
RETURN1 = RETURN
TABLES
PROPOSED_VALUES = VALUES
* MODIFIED_KEYS =
EXCEPTIONS
OTHERS = 1.
IF RETURN IS INITIAL.
WRITE:/' Done....'.
ELSE.
WRITE:/ RETURN-ID, RETURN-TYPE, RETURN-NUMBER, RETURN-MESSAGE_V1, RETURN-MESSAGE_V2, RETURN-MESSAGE_V3, RETURN-MESSAGE_V4.
ENDIF.
CLEAR VALUES.
REFRESH VALUES.
ENDLOOP. -
How to populate multi-cluster arrays using matlab code?
Hi,
I have an array of clusters containing two 'Double' elements in each cluster. I am looking for a method to populate this array using MATLAB code. I need around 1000 clusters in the array, so populating it using the front panel is not practical. There is also some calculation involved in deciding the value in each element. If there is an example or a method to do this, please point me in the right direction.
Thanksaltenbach wrote:
Can you attach a typical file so we know that the structure is? It is easy to convert from any data structure to any other data structure. You could even read it as a 1D string array and parse each line into a cluster, for example. It all depends on how the fil is arranged. You could also read the file as a flat string and chop it up into the desired structure later.
I have attached the .vi file. I need to convert the spreadsheet to an array of clusters, thats where I'm getting stuck. (The vi is an example from help libraries)
That is the part where I need to change so that I can use a spreadsheet.
Attachments:
Buffered counter.vi 52 KB -
How can i import into imovie using the camera's built in memory?
How can I import into imovie from my cannon video camera built in memory. All that comes up when I connect the USB cable is what is stored on the memory card and it doesn't give me the option to use what is stored on the built in memory
That is not a feature of iPhoto - suggest to Apple - iPhoto Menu ==> provide iPhoto feedback.
With the new Photo app later this year the integration between IOS and the Mac will be much greater
LN -
Says I can't import recorded sound into iMovie because I the files don't have iLife preview
Hi,
I am trying to either record sound directly onto iMovie to use as a voiceover or record on Garageband and then import it to iMovie. I have not found a way to record on iMovie, so I was trying to do it on garageband, but when I try to open the file on iMovie, it says I can not because it does not have iLife preview. I have a new Macbook Pro with Retina Display.
Thank you!Hi avalewinter,
Welcome to the Apple Support Communities!
I understand that you would like to record a voiceover directly in iMovie. To accomplish this, please use the instructions located in the attached article.
iMovie (2013): Add audio and music
Record a voiceover
You can record your own narration to add to your movie.
Position the playhead where you want to start recording in the timeline, and choose Window > Record Voiceover.The voiceover recording controls appear below the viewer.
To adjust the recording settings, do any of the following:
To change the input device: Click the Voiceover Options button, and choose an option from the Input Source pop-up menu.
To adjust the input level of the microphone: Click the Voiceover Options button, and drag the Volume slider right to increase the volume of what is being recorded, or left to decrease it. You can monitor the audio levels by using the built-in audio meter on the Record button. You should set the volume so that the audio meter in the microphone (the Record button) stays green, even when your voice is at its loudest.
To mute sound from other clips while recording: Click the Voiceover Options button, and select the Mute Project checkbox.
To start recording, click the Record button.
To stop recording, click the Record button again (or press the Space bar).The recorded audio appears as a new clip in the timeline, above the background music. The voiceover clip is attached to the clip that was below the playhead when the recording was started. The track is named VO: Movie Name - Date, where “Movie Name” is the name of your movie, and “Date” is the date of the recording.
Click the close button to dismiss the voiceover recording controls.
Best regards,
Joe -
How to convert columns into rows using transpose function
Hi
anybody tell me how to convert columns values into rows using transpose function.Since BluShadow went to all the trouble to put it together, someone should use it.
See the post titled How do I convert rows to columns? here SQL and PL/SQL FAQ
John -
How to convert XML into XSD Using Altova XML Spy
Hi,
How to convert XML file into XSD Using Altova XML Spy.
I want to use that XSD as an External Def in my IR
Regards
Sumanhi
Following is the path where you could get the PDF's and zip file.
https://www.sdn.sap.com/irj/sdn/howtoguides?rid=/webcontent/uuid/5024a59a-4276-2910-7580-f52eb789194b [original link is broken]
please check out the following Heading, and at the bottom corner you will find the download option where you will get the zip file:
How to Generate XSD Schemas from Existing MDM 5.5 Repositories
You can download xomlite45.jar from sdn
copy the jar file to your java installation location like c:>java in
Java jar xomLite45.jar MyFile.xml
then you get correspondig MyFile.xsd
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/bf0e8a97-0d01-0010-f0a2-af3b18b7f4eb -
How to upload data into CRM using batch job
Hello,
I got some problem and need some hints.
I am uploading data from a flat text file (product data) into CRM using thefunction module GUI_UPLOAD. My program starts with a selection screen whereI enter the path and the filename of the program, then I click start, and
the data is transferred in CRM. This works perfect, and I can automaticallycreate service products in CRM.
Here comes the PROB:
But now I want to automize this procedure using a batch job that automatically picks up the file from the server and processes it automatically without any user interaction. BUT I always get an error saying that my function module GUI_UPLOAD can't run in batch mode. So
anyone has an idea how to do this? Any other function modules that can run in batch mode? Any other ideas?
Thx very much for ur help on this.Hi Bill,
GUI_UPLOAD, like the name says, uses the SAPGUI to upload the data to theserver.. and in a batch job, you don't have the connection to a SAPGUI.
So you should use following kind of coding:
DATA MSG(100).
OPEN DATASET "FILENAM" FOR INPUT IN TEXT MODE ENCODING DEFAULT MESSAGE
MSG.
IF sy-subrc = 0.
DO.
READ DATASET "FILENAM" INTO [Your internal table].
IF sy-subrc <> 0.
EXIT.
ENDIF.
APPEND [Your internal table]P_DATA.
ENDDO.
ENDIF.
The file should then be available on the server.
Regards -
How to capture sound into an mp3 file
Hi all,
I have a program to capture sound into a wav file . and it's wrkng.
but in my site i have an mp3 player. can i capture the sound directly to an mp3 file?
I use classes like AudioSystem, TargetDataLine, AudioFormat etc.
For the file format i specify like
AudioFileFormat.Type.WAVE
like this can i do for mp3??
Please help me...
Thanx and Regards,
sand...try with spool or UTL_FILE...
Re: CSV into Oracle and Oracle into CSV
SQL> spool c:\test1.csv
SQL> select substr(str,2,length(str)-3) from (select regexp_replace(column_value,'\s*<[^>]*>[^>]*>',',') str from table(xmlsequence(cursor(select * from test_emp))));
SUBSTR(STR,2,LENGTH(STR)-3)
9999,fredi's,CLERK,2345,10-OCT-06,1250,123,20
4567,STEWART,ANALYST,3456,02-APR-07,3200,215,30
2345,Cockrel,CLERK,7566,23-JAN-82,800,30
3 rows selected.
SQL> spool off; -
How to record sound with JMF?
I just want to record a clip of sound and save it in a WAV file. I exhausted the web but just couldn't find a tutorial. Would someone be kind enough to give me a tutorial or a sample code? The simpler the better. Thanks.
Hi there,
The following lines of code will record sound for 5 sec and save it in file C:/test.wav.
import java.io.IOException;
import javax.media.CannotRealizeException;
import javax.media.DataSink;
import javax.media.Format;
import javax.media.Manager;
import javax.media.MediaLocator;
import javax.media.NoDataSinkException;
import javax.media.NoProcessorException;
import javax.media.NotRealizedError;
import javax.media.Processor;
import javax.media.ProcessorModel;
import javax.media.format.AudioFormat;
import javax.media.protocol.FileTypeDescriptor;
public class WAVWriter {
public void record(){
AudioFormat format = new AudioFormat(AudioFormat.LINEAR, 44100, 16, 1);
ProcessorModel model = new ProcessorModel(new Format[]{format}, new FileTypeDescriptor(FileTypeDescriptor.WAVE));
try {
Processor processor = Manager.createRealizedProcessor(model);
DataSink sink = Manager.createDataSink(processor.getDataOutput(), new MediaLocator("file:///C:/test.wav"));
processor.start();
sink.open();
sink.start();
Thread.sleep(5000);
sink.stop();
sink.close();
processor.stop();
processor.close();
} catch (NoProcessorException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (CannotRealizeException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (NoDataSinkException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (NotRealizedError e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
public static void main(String[] args) {
new WAVWriter().record();
}I hope this will help. Don't forget to go through JMF guide (http://www.cdt.luth.se/~johank/smd151/jmf/jmf2_0-guide.pdf), especially page 81... it's not always helpfull, but sometimes, it may give you some good answers.
Happy coding!!!
Maybe you are looking for
-
VMWare Fusion vs. Parallels Desktop for Mac + Captivate?
I'm likely to purchase a new MacBook Pro in the very near future, and wish to run Captivate on it. I've seen a few posts in this forum by folks using VMWare Fusion with mixed results. The posts are a couple of years old, so I'm curious to get the lat
-
Remote Control and RDP sessions
Is anyone else experiencing the following using ZEN 11 SP1 with Windows 7 SP1... A user is accessing their machine via RDP and needs assistance so we attempt to use zenworks remote control to connect to their desktop, but all we see is the ctrl-alt-d
-
Hi there, I'm looking for the way how to make multiple insert/update on a table with multiple CLOB/BLOB fields using Objects for OLE for C++. When I looked into samples, there is only single insert (of one CLOB). This, in turn, a provided sample will
-
Can't open Illustrator CS5 because PowerPC not supported
Hi, I just purchased a brand new macbook pro OS X 10.8.2. I tried to reinstall my CS5 Design Premium Suite and all the apllications work EXCEPT Illustrator. The error message reads "You can't open the application "Adobe Illustrator CS5.1" because Pow
-
Issue: No aut determination of Picking request during delivery creation
Hi! I have created a new shipping point as copy of existing shipping point. Issue is that for this new shipping point deliveries are created but not the picking request. I can not find any difference in the set up w/regards to: Plant Storage Location