Java - MIDI sequencer and synthezer - Asked By waseem kaleem on 13-Sep-11 10:25 AM

Can any one provide me sample code or article how to capture voice using MIDI device in java?
I need urgently.
Thank you  
Riley K replied to waseem kaleem on 13-Sep-11 11:31 AM

The javax.sound.sampled package consists of eight interfaces, twelve top-level classes, twelve inner classes, and two exceptions. To record and play audio, you only need to deal with a total of seven parts of the package.

The basic recording process is as follows:

Describe the audio format in which you want to record the data. This includes specifying the sampling rate and the number of channels (mono versus stereo) for the audio. You specify these properties using the aptly named AudioFormat class. There are two constructors for creating an AudioFormat object:

   AudioFormat(AudioFormat.Encoding encoding, 
  float sampleRate, int sampleSizeInBits, 
  int channels, int frameSize, float frameRate, 
  boolean bigEndian
   AudioFormat(float sampleRate, int sampleSizeInBits, 
  int channels, boolean signed, boolean bigEndian

The first constructor lets you explicitly set the audio format encoding, while the latter uses a default. The available encodings are ALAW, PCM_SIGNED, PCM_UNSIGNED, and ULAW. 

refer this links


waseem kaleem replied to Riley K on 13-Sep-11 11:54 AM
I am sorry.I  want to capture sound through MIDI device.In other words,I want to use squencer to capture voice.