libinstpatch Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties |
IpatchSampleStoreSndFileIpatchSampleStoreSndFile — Sample store object type which uses libsndfile to access audio in sound files |
IpatchSampleStoreSndFile; #define IPATCH_SAMPLE_STORE_SND_FILE_UNUSED_FLAG_SHIFT IpatchSample * ipatch_sample_store_snd_file_new (const char *filename
); gboolean ipatch_sample_store_snd_file_init_read (IpatchSampleStoreSndFile *store
); gboolean ipatch_sample_store_snd_file_init_write (IpatchSampleStoreSndFile *store
,int file_format
,int sub_format
,int endian
,int channels
,int samplerate
);
"endian" IpatchSndFileEndian : Read / Write "file-format" IpatchSndFileFormat : Read / Write "file-name" gchar* : Read / Write "fine-tune" gint : Read / Write "loop-end" guint : Read / Write "loop-start" guint : Read / Write "loop-type" IpatchSampleLoopType : Read / Write "root-note" gint : Read / Write "sub-format" IpatchSndFileSubFormat : Read / Write
#define IPATCH_SAMPLE_STORE_SND_FILE_UNUSED_FLAG_SHIFT
IpatchSample * ipatch_sample_store_snd_file_new (const char *filename
);
Creates a new libsndfile sample store. ipatch_sample_store_snd_file_init_read()
or ipatch_sample_store_snd_file_init_write()
must be called, depending on
audio file mode, prior to opening the sample.
|
File name to assign to the new libsndfile sample store |
Returns : |
New libsndfile sample store, cast as a IpatchSample for convenience. |
gboolean ipatch_sample_store_snd_file_init_read
(IpatchSampleStoreSndFile *store
);
Initialize a libsndfile sample store for reading. Should be called prior to opening the sample store and after the filename has been assigned. Fills in the "file-format", "sub-format", "endian", "sample-rate" and "sample-size" information properties. In addition the "sample-format" property is set to a value for optimal loading of the audio data (least amount of conversion necessary to yield uncompressed PCM audio), which will be the audio format of the sample store.
gboolean ipatch_sample_store_snd_file_init_write (IpatchSampleStoreSndFile *store
,int file_format
,int sub_format
,int endian
,int channels
,int samplerate
);
Initialize a libsndfile sample store for writing. Should be called prior to
opening the sample store. The "file-format",
"sub-format", "endian"
and "sample-rate" properties will be assigned the provided values.
In addition the "sample-format" property is set to a value for optimal
writing of the audio data (including the channels
value), which will be the
audio format of the sample store.
|
libsndfile sample store |
|
libsndfile file format type (GEnum "IpatchSndFileFormat") |
|
libsndfile audio format type (GEnum "IpatchSndFileSubFormat") |
|
libsndfile endian selection (IpatchSampleStoreSndFileEndian) |
|
Number of channels (1-8, 1=mono, 2=stereo, etc) |
|
Audio sample rate |
Returns : |
TRUE if format variables are valid, FALSE otherwise
|
"endian"
property"endian" IpatchSndFileEndian : Read / Write
Endian byte order of file.
Default value: IPATCH_SND_FILE_ENDIAN_FILE
"file-format"
property "file-format" IpatchSndFileFormat : Read / Write
File format.
Default value: wav
"fine-tune"
property"fine-tune" gint : Read / Write
Fine tuning in cents.
Allowed values: [-99,99]
Default value: 0
"loop-end"
property"loop-end" guint : Read / Write
Loop end in frames (after loop).
Default value: 0
"loop-start"
property"loop-start" guint : Read / Write
Start of loop in frames.
Default value: 0
"loop-type"
property"loop-type" IpatchSampleLoopType : Read / Write
Loop method type.
Default value: IPATCH_SAMPLE_LOOP_NONE
"root-note"
property"root-note" gint : Read / Write
Root MIDI note.
Allowed values: [0,127]
Default value: 60