How to use the control in your projects
First of all let us say that if this guide should not be clear to you, feel free to contact our support team for any doubt or curiosity you may have: we usually answer all of our customers questions in less than 24 hours. Note that the purpose of this guide is to give a taste of the main features available inside Audio Sound Editor for .NET.
As an integration to this guide several examples of use of this component can be found inside the "Samples" folder: if during the setup phase you left the installation directory to its default, you will find them inside "C:\Program Files\Audio Sound Editor for .NET\Samples".
The first needed step is to add the control to your project: see the How to add the control to your projects tutorial for details.
Before starting sound editing management, the component needs to be initialised: for this purpose it's mandatory a call to the InitEditor method; the best place to call this initialisation method is usually the container form initialisation function: for example, when using Visual C#, it will be the Form_Load function. The main purposes of calling the InitEditor method is to synchronise the component with its container form
After the control's initialization we should decide if the sound under editing will be stored in memory or inside a temporary file: this can be done through the GetStoreMode and SetStoreMode methods; it's important to note that the sound under editing will be always stored in uncompressed WAV PCM format so its total size could become an issue when dealing with low-end systems:
|•||when stored in memory, it will be possible getting the pointer to the memory buffer containing WAV PCM data through the GetMemoryPtr method and the total size in bytes of the memory buffer through the GetMemorySize method: it's strongly suggested avoiding memory based storage for clips longer than 10 minutes.|
|•||when stored inside a temporary file, it will be possible getting its absolute pathname through the GetTempFilePathname method and its total size in bytes through the GetTempFileSize method.|
At this point we can load a sound for editing purposes from different sources:
|•||from a disk file through the LoadSound or LoadSoundFromRawFile methods; the most diffused file formats are supported.|
|•||from a file, previously encrypted through our CryptSound™ application, through the LoadSoundEncrypted method.|
|•||from a memory buffer through the LoadSoundFromMemory or LoadSoundFromRawMemory methods; the most diffused file formats are supported.|
|•||from the system Clipboard through the LoadSoundFromClipboard method: the availability of a sound inside the Clipboard can be detected calling the IsSoundAvailableInClipboard method.|
|•||from another instance of Active Sound Editor through the LoadSoundFromEditingSession method.|
|•||from a recording session activated by an instance of our Audio Sound Recorder for .NET through the LoadSoundFromRecordingSession method.|
A loading session can be canceled through the LoadSoundCancel method.
By default, each of the mentioned loading methods will create a new editing session discarding the existing one: this behaviour can be modified through the SetLoadingMode method which allows loading a new sound without discarding the existing editing session and to perform one of the following operations:
|•||Append the loaded sound to the existing editing session.|
|•||Insert the loaded sound at a given position within the existing editing session: the insertion position must be previously set through the SetInsertPos method.|
|•||Mix the loaded sound at a given position within the existing editing session: the mixing position must be previously set through the SetMixingPos method; it's important to note that, during the mixing phase, you can separately modify the volume of the loaded sound and the volume of the existing editing session through a previous call to the SetMixingParams method: as a further feature this method allows putting the loaded sound in loop over a given range of the existing editing session.|
|•||Overwrite the existing editing session with the loaded sound: the overwrite position must be previously set through the SetOverwritePos method.|
As a further loading feature, you can limit the range of sound data that will be loaded from the given sound file with a previous call to the SetLoadingRange method, a useful feature if you want to extract a small portion of an existing sound file for editing purposes.
Further editing features, applicable to the whole editing session or to a specific range, can be summarized by the following list:
|•||Copy to the clipboard through the CopyRangeToClipboard method.|
|•||Delete through the DeleteRange method.|
|•||Delete of portions outside of a given range through ReduceToRange method.|
|•||Silence insertion through the InsertSilence method.|
A certain number of special effects can be applied to the existing editing session through the EffectsMan class:
|•||DMO (DirectX Media Object) effects|
|•||Internal and External Custom DSP effects|
|•||Commercial and freeware VST effects|
|•||Playback rate change|
|•||IIR and FIR filters|
|•||Vocal removal filter|
|•||DC Offset removal|
Basic noise removal is also supported for the following kind of noises:
|•||Pops and Clicks removal|
|•||Hiss noise removal|
See the How to perform noise removal tutorial for further details.
An editing session can be canceled through the EditSoundCancel method.
During the editing session the DisplayWaveformAnalyzer property, which implements the WaveformAnalyzer class, allows performing a deep analysis and detailed graphical visualization, with zooming and panning capabilities, of the sound's waveform; it can also produce a bitmap (in memory or into a graphic file) of the waveform itself.
Contents of the editing session can be exported to an output file through the ExportToFile method. The encoding format used for the output file can be set through the EncodeFormats.FormatToUse property and settings specific for each available sound format can be set through the available sub-properties of the EncodeFormats property: if for example you need to export in MP3 format, you will have to deal with properties and methods available inside the EncodeFormats.MP3 property.
A basic playback system is also available in order to play the current content of the editing session; available methods are the following:
If you should need more sophisticated playback features, for example displaying visual feedbacks (VU-Meter, Spectrum, etc.) during playback, you should consider using Audio Sound Editor in conjunction with our Audio DJ Studio for .NET which comes with a method, named LoadSoundFromEditingSession, that allows loading and playing back contents of an editing session.
Through the SilencePositionsDetect method, the control supports Silence detection, a feature which allows detecting positions of silent portions inside the loaded sound and store them inside a list. The list of detected silent portions can be enumerated at a later time through the SilencePositionsGetNum and SilencePositionsGetRange methods.
Silence detection can be canceled at any time through the SilencePositionsCancelDetect method.
Finally, an editing session can be closed and its contents discarded from memory through a call to the CloseSound method.
Further capabilities of the component, not directly related to sound editing, are the following:
|•||the JoinFilesFromDisk method allows joining two mono sound files into one single stereo output sound file.|
|•||the ExtractAudioFromVideoFile method allows extracting the audio track from a video clip and to store it inside an output sound file that may be used later for further editing.|
|•||Conversion of sound files from an audio format to another one with the possibility to keep existing tags and to apply normalization and DC Offset removal: see the How to convert the format of sound files tutorial for details.|
An important topic to keep count of is how synchronization between the container application and events generated by this component works: see the How to synchronize the container application with the control tutorial for further details.