Programmer Guide/Macro Library/BSF: Difference between revisions

From STX Wiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 37: Line 37:
|}
|}
==NewDialog==
==NewDialog==
;<code>BSF NEWDIALOG [ <var>srate</var> [ ; <var>nch</var> ; <var>code</var> ]</code>: New soundfile dialog.
;<code>BSF NEWDIALOG [ <var>srate</var> [ ; <var>nch</var> ; <var>code</var> ]</code>: Dialog to create a new soundfile.
{|class="einrahmen"
{|class="einrahmen"
!argument !!description !!default
!argument !!description !!default
|-
|-
|<var>type</var>
|<var>srate</var>
|Selects the action to perform:<BR>
|Sampling rate in Hz
<code>LOAD</code> or <code>OPEN</code> &rarr; open existing file<BR>
|last dialog value
<code>SAVE</code> or <code>NEW</code> &rarr; create new file
|<code>OPEN</code>
|-
|-
|<var>title</var>
|<var>nch</var>
|The caption of the dialog window.
|Number of channels.
|<code>Select File</code>
|last dialog value
|-
|-
|<var>file</var>
|<var>code</var>
|The default file or directory.
|Signal sample size (number of bits) and code.
|current directory
|last dialog value
|-
|-
|<var>ftype1</var> ...
!RESULT !!description
|Each <var>ftype</var> argument defines one entry of the filetype-combobox of the dialog.<BR>
|-
Each filetype is defined by the string <code><var>extension</var>=<var>description</var></code>.<BR>
|<var>path</var> ||The full pathname of the created soundfile.
Example: <code>WAV=wave files</code><BR>
|-
If a <var>ftype</var> argument is the name of a (simple) table item, each entry of the table defines a filetype.
|''empty string'' ||If the dialog was canceled or the creation fails.
|}
;Notes:
*This function uses a two step dialog. In the first the soundfile name is selected. The second is used to select the soundfile parameters.
*On return, the soundfile is created but not opened.
;See also:
==OpenDialog==
;<code>BSF OPENDIALOG</code>: Dialog to open an existing soundfile.
{|class="einrahmen"
|-
|-
!RESULT !!description
!RESULT !!description
|-
|-
|<var>path</var> ||The full pathname of the file to be opened or created.
|<var>path</var> ||The full pathname of the selected soundfile.
|-
|-
|''empty string'' ||If the dialog was canceled.
|''empty string'' ||If the dialog was canceled or the soundfile check fails.
|}
|}
;Notes:
*On return, the soundfile is checked (existence, format) but not opened.
;See also:
;See also:
==OpenDialog==
==Open==
==Open==



Revision as of 06:55, 12 May 2011

  • File: BSF.STX, linked to library STX.LIB
  • Title: soundfile handling

Content
NewDialog OpenDialog
Open Close CloseAll
Select Truncate
Variables and items used by this library
name type description
@ParSoundFileNew global variable default values for function NewDialog
@ListAudioSampleCode global variable list of defined sample code keywords
@MaxAudioChannels global variable maximum number of soundfile channels
@MaxAudioSRate global variable maximum sampling rate in Hz
@ListAudioSRate global variable list of standard sampling rate values
@TempDir global variable directory for temporary files
BSFOpenList table item list of open soundfiles (only for BScript applications);

this table is used by the functions Open, Close and CloseAll

SoundFileList shell variable name of the shared soundfile table item (see BSTXIni)

NewDialog

BSF NEWDIALOG [ srate [ ; nch ; code ]
Dialog to create a new soundfile.
argument description default
srate Sampling rate in Hz last dialog value
nch Number of channels. last dialog value
code Signal sample size (number of bits) and code. last dialog value
RESULT description
path The full pathname of the created soundfile.
empty string If the dialog was canceled or the creation fails.
Notes
  • This function uses a two step dialog. In the first the soundfile name is selected. The second is used to select the soundfile parameters.
  • On return, the soundfile is created but not opened.
See also

OpenDialog

BSF OPENDIALOG
Dialog to open an existing soundfile.
RESULT description
path The full pathname of the selected soundfile.
empty string If the dialog was canceled or the soundfile check fails.
Notes
  • On return, the soundfile is checked (existence, format) but not opened.
See also

Open

Close

CloseAll

Select

Truncate

Navigation menu

Personal tools