Top | ![]() |
![]() |
![]() |
![]() |
IpatchSampleStoreSndFileIpatchSampleStoreSndFile — Sample store object type which uses libsndfile to access audio in sound files |
IpatchSample * | ipatch_sample_store_snd_file_new () |
gboolean | ipatch_sample_store_snd_file_init_read () |
gboolean | ipatch_sample_store_snd_file_init_write () |
IpatchSndFileEndian | endian | Read / Write |
IpatchSndFileFormat | file-format | Read / Write |
char * | file-name | Read / Write |
int | fine-tune | Read / Write |
guint | loop-end | Read / Write |
guint | loop-start | Read / Write |
IpatchSampleLoopType | loop-type | Read / Write |
int | root-note | Read / Write |
IpatchSndFileSubFormat | sub-format | Read / Write |
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.
New libsndfile sample store, cast as a IpatchSample for convenience.
[type IpatchSampleStoreSndFile]
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.
store |
libsndfile sample store |
|
file_format |
libsndfile file format type (GEnum "IpatchSndFileFormat") |
|
sub_format |
libsndfile audio format type (GEnum "IpatchSndFileSubFormat") |
|
endian |
libsndfile endian selection (IpatchSampleStoreSndFileEndian) |
|
channels |
Number of channels (1-8, 1=mono, 2=stereo, etc) |
|
samplerate |
Audio sample rate |
“endian”
property“endian” IpatchSndFileEndian
Endian byte order of file.
Owner: IpatchSampleStoreSndFile
Flags: Read / Write
Default value: IPATCH_SND_FILE_ENDIAN_FILE
“file-format”
property “file-format” IpatchSndFileFormat
File format.
Owner: IpatchSampleStoreSndFile
Flags: Read / Write
Default value: wav
“file-name”
property “file-name” char *
File name.
Owner: IpatchSampleStoreSndFile
Flags: Read / Write
Default value: NULL
“fine-tune”
property “fine-tune” int
Fine tuning in cents.
Owner: IpatchSampleStoreSndFile
Flags: Read / Write
Allowed values: [-99,99]
Default value: 0
“loop-end”
property “loop-end” guint
Loop end in frames (after loop).
Owner: IpatchSampleStoreSndFile
Flags: Read / Write
Default value: 0
“loop-start”
property “loop-start” guint
Start of loop in frames.
Owner: IpatchSampleStoreSndFile
Flags: Read / Write
Default value: 0
“loop-type”
property“loop-type” IpatchSampleLoopType
Loop method type.
Owner: IpatchSampleStoreSndFile
Flags: Read / Write
Default value: IPATCH_SAMPLE_LOOP_NONE
“root-note”
property “root-note” int
Root MIDI note.
Owner: IpatchSampleStoreSndFile
Flags: Read / Write
Allowed values: [0,127]
Default value: 60