wavelength 1.0.0
Loading...
Searching...
No Matches
CSyntheditCtrl Class Reference

ActiveX control that edits synthesiser banks for the workbook add-in. More...

#include <SyntheditCtl.h>

Inheritance diagram for CSyntheditCtrl:
Collaboration diagram for CSyntheditCtrl:

Public Types

enum  {
  dispidNewBank = 1L , dispidAttachSampleToInstrument = 2L , dispidDeleteInstrument = 3L , dispidDeleteSample = 4L ,
  dispidNewInstrument = 5L , dispidNewSample = 6L , dispidRetireBank = 7L , dispidShutdownSynthCtrl = 8L ,
  dispidMakeSimpleBankFile = 9L , dispidXferSynthData = 10L , dispidDoDebugSomething = 11L , dispidReadAndSaveBankFile = 12L ,
  dispidSaveBank = 13L , dispidNewSamplesFromFolder = 14L , dispidNewInstrumentsFromFolder = 15L , dispidNewSampleDescription = 16L ,
  dispidDeleteSampleDescription = 17L , dispidInitSynthControl = 18L , eventidUpdateSampleComments = 1L , eventidUpdateSampleDescriptionComments = 2L ,
  eventidUpdateSampleData = 3L , eventidUpdateBankData = 4L , eventidUpdateInstrumentData = 5L , eventidUpdateSampleDescData = 6L ,
  eventidUpdateInstrumentComments = 7L , eventidInsertNewSample = 8L , eventidProtectWorkSheets = 9L , eventidInsertNewInstrument = 10L ,
  eventidInsertNewSampleDescription = 11L , eventidDeleteSampleDescription = 12L , eventidDeleteInstrument = 13L , eventidDeleteSample = 14L ,
  eventidUpdateHyperLinks = 15L
}
 Dispatch identifiers of the methods, as the type library numbers them. More...
enum  XferAction {
  kActionGetBankData = 0 , kActionGetInstrumentData = 1 , kActionGetSampleDescData = 2 , kActionGetSampleData = 3 ,
  kActionGetBankSamplesIDs = 4 , kActionGetBankInstrumentIDs = 5 , kActionGetInstrumentSampleDescIDs = 6 , kActionGetSampleWriteup = 7 ,
  kActionGetInstrumentWriteup = 8 , kActionSetBankData = 9 , kActionSetInstrumentData = 10 , kActionSetSampleDescData = 11 ,
  kActionSetSampleData = 12 , kActionGetReferencedSample = 13
}
 The data XferSynthData() reads or writes, as the add-in numbers it. More...

Public Member Functions

 CSyntheditCtrl ()
virtual void OnDraw (CDC *pdc, const CRect &rcBounds, const CRect &rcInvalid)
 Fill the bounds with white and draw an ellipse.
virtual void DoPropExchange (CPropExchange *pPX)
 Exchange the persistent properties, of which there are none besides the version.
virtual void OnResetState ()

Protected Member Functions

 ~CSyntheditCtrl ()
 Stop the systems InitSynthControl() started.
afx_msg long NewBank ()
 Create a bank, loading it from a file the user picks or prompting for its bank change identifier.
afx_msg long AttachSampleToInstrument (long iBankID, long iSampleID, long iInstrumentID)
 Add a description that plays a sample to an instrument.
afx_msg long DeleteInstrument (long iBankID, long iInstrumentID)
 Delete an instrument and its descriptions, and update the worksheets.
afx_msg long DeleteSample (long iBankID, long iSampleID)
 Delete a sample and the descriptions that play it, and update the worksheets.
afx_msg long NewInstrument (long iBankID)
 Add an instrument with program zero.
afx_msg long NewSample (long iBankID)
 Add the samples of the WAV files the user picks.
afx_msg long RetireBank (long iBankID)
 Close a bank.
afx_msg long ShutdownSynthCtrl ()
 Do nothing.
afx_msg long MakeSimpleBankFile ()
 Create a bank of six instruments of four samples each, which the user picks, save it, and close it.
afx_msg long XferSynthData (long iBankID, long iAction, VARIANT FAR *ioLongArray, VARIANT FAR *ioStringArray)
 Read or write the data of a bank, an instrument, a sample description, or a sample.
afx_msg long DoDebugSomething ()
 Do nothing.
afx_msg long ReadAndSaveBankFile ()
 Create a bank, save it, and close it.
afx_msg long SaveBank (long iBankID, long iSaveAs)
 Save a bank, prompting for the file when it has none or when requested.
afx_msg long NewSamplesFromFolder (long iBankID)
 Add the WAV files of a folder the user picks, and of its subfolders, as samples.
afx_msg long NewInstrumentsFromFolder (long iBankID)
 Add an instrument for each folder, the one the user picks and its subfolders, that has WAV files, playing those files.
afx_msg long NewSampleDescription (long iBankID, long iInstrumentID, long iSampleIDOptional)
 Add descriptions to an instrument for a sample, or for the WAV files the user picks.
afx_msg long DeleteSampleDescription (long iBankID, long iInstrumentID, long iSampleDescID)
 Delete a description from an instrument.
afx_msg long InitSynthControl (LPCTSTR iSystemDirectory)
 Start the systems with the editor configuration.
afx_msg void AboutBox ()
 Show the about box.
void FireUpdateSampleComments (long iBankID, VARIANT FAR *iSampleIDs)
void FireUpdateSampleDescriptionComments (long iBankID, long iSampleID, VARIANT FAR *iSampleDescIDs)
void FireUpdateSampleData (long iBankID, long iSampleID)
void FireUpdateBankData (long iBankID)
void FireUpdateInstrumentData (long iBankID, long iInstrumentID)
void FireUpdateSampleDescData (long iBankID, long iInstrumentID, long iSampleDescID)
void FireUpdateInstrumentComments (long iBankID, long iInstrumentID)
void FireInsertNewSample (long iBankID, long iSampleID)
void FireProtectWorkSheets (long iBankID, long iYesNo)
void FireInsertNewInstrument (long iBankID, long iInstrumentID)
void FireInsertNewSampleDescription (long iBankID, long iInstrumentID, long iSampleDescID)
void FireDeleteSampleDescription (long iBankID, long iInstrumentID, long iSampleDescID)
void FireDeleteInstrument (long iBankID, long iInstrumentID)
void FireDeleteSample (long iBankID, long iSampleID)
void FireUpdateHyperLinks (long iBankID)

Detailed Description

ActiveX control that edits synthesiser banks for the workbook add-in.

The control is invisible at run time. The add-in calls its methods and keeps its worksheets in step through its events. The class name is from the runtime class information; the names of the methods and events are from the type library.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Dispatch identifiers of the methods, as the type library numbers them.

Enumerator
dispidNewBank 

NewBank().

dispidAttachSampleToInstrument 

AttachSampleToInstrument().

dispidDeleteInstrument 

DeleteInstrument().

dispidDeleteSample 

DeleteSample().

dispidNewInstrument 

NewInstrument().

dispidNewSample 

NewSample().

dispidRetireBank 

RetireBank().

dispidShutdownSynthCtrl 

ShutdownSynthCtrl().

dispidMakeSimpleBankFile 

MakeSimpleBankFile().

dispidXferSynthData 

XferSynthData().

dispidDoDebugSomething 

DoDebugSomething().

dispidReadAndSaveBankFile 

ReadAndSaveBankFile().

dispidSaveBank 

SaveBank().

dispidNewSamplesFromFolder 

NewSamplesFromFolder().

dispidNewInstrumentsFromFolder 

NewInstrumentsFromFolder().

dispidNewSampleDescription 

NewSampleDescription().

dispidDeleteSampleDescription 

DeleteSampleDescription().

dispidInitSynthControl 

InitSynthControl().

eventidUpdateSampleComments 

FireUpdateSampleComments().

eventidUpdateSampleDescriptionComments 

FireUpdateSampleDescriptionComments().

eventidUpdateSampleData 

FireUpdateSampleData().

eventidUpdateBankData 

FireUpdateBankData().

eventidUpdateInstrumentData 

FireUpdateInstrumentData().

eventidUpdateSampleDescData 

FireUpdateSampleDescData().

eventidUpdateInstrumentComments 

FireUpdateInstrumentComments().

eventidInsertNewSample 

FireInsertNewSample().

eventidProtectWorkSheets 

FireProtectWorkSheets().

eventidInsertNewInstrument 

FireInsertNewInstrument().

eventidInsertNewSampleDescription 

FireInsertNewSampleDescription().

eventidDeleteSampleDescription 

FireDeleteSampleDescription().

eventidDeleteInstrument 

FireDeleteInstrument().

eventidDeleteSample 

FireDeleteSample().

eventidUpdateHyperLinks 

FireUpdateHyperLinks().

◆ XferAction

The data XferSynthData() reads or writes, as the add-in numbers it.

Enumerator
kActionGetBankData 

Bank volume, identifier, and name.

kActionGetInstrumentData 

Instrument settings and name.

kActionGetSampleDescData 

Sample description settings and name.

kActionGetSampleData 

Sample loop points, file, and users.

kActionGetBankSamplesIDs 

Identifiers of the bank's samples.

kActionGetBankInstrumentIDs 

Identifiers of the bank's instruments.

kActionGetInstrumentSampleDescIDs 

Identifiers of an instrument's descriptions.

kActionGetSampleWriteup 

Text about a sample.

kActionGetInstrumentWriteup 

Text about an instrument.

kActionSetBankData 

Bank volume, identifier, and name.

kActionSetInstrumentData 

Instrument settings and name.

kActionSetSampleDescData 

Sample description settings and name.

kActionSetSampleData 

Sample loop points and name.

kActionGetReferencedSample 

The sample a description plays.

Constructor & Destructor Documentation

◆ CSyntheditCtrl()

CSyntheditCtrl::CSyntheditCtrl ( )
Ghidra address:
0x100025e8

◆ ~CSyntheditCtrl()

CSyntheditCtrl::~CSyntheditCtrl ( )
protected

Stop the systems InitSynthControl() started.

Ghidra address:
0x10002646

Member Function Documentation

◆ OnDraw()

virtual void CSyntheditCtrl::OnDraw ( CDC * pdc,
const CRect & rcBounds,
const CRect & rcInvalid )
virtual

Fill the bounds with white and draw an ellipse.

Parameters
pdcThe device context.
rcBoundsThe bounds of the control.
rcInvalidThe area to redraw.
Ghidra address:
0x10002694

◆ DoPropExchange()

virtual void CSyntheditCtrl::DoPropExchange ( CPropExchange * pPX)
virtual

Exchange the persistent properties, of which there are none besides the version.

Parameters
pPXThe exchange.
Ghidra address:
0x100026d2

◆ OnResetState()

virtual void CSyntheditCtrl::OnResetState ( )
virtual
Ghidra address:
0x10002710

◆ NewBank()

afx_msg long CSyntheditCtrl::NewBank ( )
protected

Create a bank, loading it from a file the user picks or prompting for its bank change identifier.

The prompt repeats until the identifier is not negative.

Returns
The bank.
Ghidra address:
0x10002ac7

◆ AttachSampleToInstrument()

afx_msg long CSyntheditCtrl::AttachSampleToInstrument ( long iBankID,
long iSampleID,
long iInstrumentID )
protected

Add a description that plays a sample to an instrument.

Parameters
iBankIDThe bank.
iSampleIDThe sample.
iInstrumentIDThe instrument.
Returns
The description.
Ghidra address:
0x10002cf7

◆ DeleteInstrument()

afx_msg long CSyntheditCtrl::DeleteInstrument ( long iBankID,
long iInstrumentID )
protected

Delete an instrument and its descriptions, and update the worksheets.

Parameters
iBankIDThe bank.
iInstrumentIDThe instrument.
Returns
The result of BankWin::DeleteInstrument().
Ghidra address:
0x10002d59

◆ DeleteSample()

afx_msg long CSyntheditCtrl::DeleteSample ( long iBankID,
long iSampleID )
protected

Delete a sample and the descriptions that play it, and update the worksheets.

Parameters
iBankIDThe bank.
iSampleIDThe sample.
Returns
The result of BankWin::DeleteSample().
Ghidra address:
0x10003025

◆ NewInstrument()

afx_msg long CSyntheditCtrl::NewInstrument ( long iBankID)
protected

Add an instrument with program zero.

Parameters
iBankIDThe bank.
Returns
The instrument.
Ghidra address:
0x10003158

◆ NewSample()

afx_msg long CSyntheditCtrl::NewSample ( long iBankID)
protected

Add the samples of the WAV files the user picks.

Parameters
iBankIDThe bank.
Returns
The last sample, or -1 when none was added.
Ghidra address:
0x100031bb

◆ RetireBank()

afx_msg long CSyntheditCtrl::RetireBank ( long iBankID)
protected

Close a bank.

Parameters
iBankIDThe bank.
Returns
The result of BankManager::RetireBank().
Ghidra address:
0x100033da

◆ ShutdownSynthCtrl()

afx_msg long CSyntheditCtrl::ShutdownSynthCtrl ( )
protected

Do nothing.

Returns
Zero.
Ghidra address:
0x100033f5

◆ MakeSimpleBankFile()

afx_msg long CSyntheditCtrl::MakeSimpleBankFile ( )
protected

Create a bank of six instruments of four samples each, which the user picks, save it, and close it.

Returns
Zero.
Ghidra address:
0x1000541a

◆ XferSynthData()

afx_msg long CSyntheditCtrl::XferSynthData ( long iBankID,
long iAction,
VARIANT FAR * ioLongArray,
VARIANT FAR * ioStringArray )
protected

Read or write the data of a bank, an instrument, a sample description, or a sample.

Parameters
iBankIDThe bank.
iActionAn XferAction.
ioLongArrayA one-dimensional array of VT_I4 for the numbers.
ioStringArrayA one-dimensional array of VT_BSTR for the text.
Returns
Zero. The result of the transfer is discarded.
Ghidra address:
0x10003402

◆ DoDebugSomething()

afx_msg long CSyntheditCtrl::DoDebugSomething ( )
protected

Do nothing.

Returns
Zero.
Ghidra address:
0x1000550a

◆ ReadAndSaveBankFile()

afx_msg long CSyntheditCtrl::ReadAndSaveBankFile ( )
protected

Create a bank, save it, and close it.

Returns
Zero.
Ghidra address:
0x10005517

◆ SaveBank()

afx_msg long CSyntheditCtrl::SaveBank ( long iBankID,
long iSaveAs )
protected

Save a bank, prompting for the file when it has none or when requested.

Parameters
iBankIDThe bank.
iSaveAsPositive to prompt for the file even when the bank has one.
Returns
The result of BankWin::Save(), or -1 when nothing was saved.
Ghidra address:
0x10002779

◆ NewSamplesFromFolder()

afx_msg long CSyntheditCtrl::NewSamplesFromFolder ( long iBankID)
protected

Add the WAV files of a folder the user picks, and of its subfolders, as samples.

Parameters
iBankIDThe bank.
Returns
-1.
Ghidra address:
0x1000554b

◆ NewInstrumentsFromFolder()

afx_msg long CSyntheditCtrl::NewInstrumentsFromFolder ( long iBankID)
protected

Add an instrument for each folder, the one the user picks and its subfolders, that has WAV files, playing those files.

Parameters
iBankIDThe bank.
Returns
-1.
Ghidra address:
0x10005cdb

◆ NewSampleDescription()

afx_msg long CSyntheditCtrl::NewSampleDescription ( long iBankID,
long iInstrumentID,
long iSampleIDOptional )
protected

Add descriptions to an instrument for a sample, or for the WAV files the user picks.

Parameters
iBankIDThe bank.
iInstrumentIDThe instrument.
iSampleIDOptionalThe sample, or a negative value to prompt for files.
Returns
Zero.
Ghidra address:
0x10005e2d

◆ DeleteSampleDescription()

afx_msg long CSyntheditCtrl::DeleteSampleDescription ( long iBankID,
long iInstrumentID,
long iSampleDescID )
protected

Delete a description from an instrument.

Parameters
iBankIDThe bank.
iInstrumentIDThe instrument.
iSampleDescIDThe description.
Returns
Zero.
Ghidra address:
0x10006554

◆ InitSynthControl()

afx_msg long CSyntheditCtrl::InitSynthControl ( LPCTSTR iSystemDirectory)
protected

Start the systems with the editor configuration.

Parameters
iSystemDirectoryThe directory of synth_editor_config.txt.
Returns
Zero.
Ghidra address:
0x1000675f

◆ AboutBox()

afx_msg void CSyntheditCtrl::AboutBox ( )
protected

Show the about box.

Ghidra address:
0x10002723

◆ FireUpdateSampleComments()

void CSyntheditCtrl::FireUpdateSampleComments ( long iBankID,
VARIANT FAR * iSampleIDs )
inlineprotected
Ghidra address:
0x10006ab0

◆ FireUpdateSampleDescriptionComments()

void CSyntheditCtrl::FireUpdateSampleDescriptionComments ( long iBankID,
long iSampleID,
VARIANT FAR * iSampleDescIDs )
inlineprotected
Ghidra address:
0x10006cf0

◆ FireUpdateSampleData()

void CSyntheditCtrl::FireUpdateSampleData ( long iBankID,
long iSampleID )
inlineprotected
Ghidra address:
0x10006ae0

◆ FireUpdateBankData()

void CSyntheditCtrl::FireUpdateBankData ( long iBankID)
inlineprotected
Ghidra address:
0x10006e70

◆ FireUpdateInstrumentData()

void CSyntheditCtrl::FireUpdateInstrumentData ( long iBankID,
long iInstrumentID )
inlineprotected
Ghidra address:
0x10006d80

◆ FireUpdateSampleDescData()

void CSyntheditCtrl::FireUpdateSampleDescData ( long iBankID,
long iInstrumentID,
long iSampleDescID )
inlineprotected
Ghidra address:
0x10006d20

◆ FireUpdateInstrumentComments()

void CSyntheditCtrl::FireUpdateInstrumentComments ( long iBankID,
long iInstrumentID )
inlineprotected
Ghidra address:
0x10006bc0

◆ FireInsertNewSample()

void CSyntheditCtrl::FireInsertNewSample ( long iBankID,
long iSampleID )
inlineprotected
Ghidra address:
0x10006cc0

◆ FireProtectWorkSheets()

void CSyntheditCtrl::FireProtectWorkSheets ( long iBankID,
long iYesNo )
inlineprotected
Ghidra address:
0x10006b10

◆ FireInsertNewInstrument()

void CSyntheditCtrl::FireInsertNewInstrument ( long iBankID,
long iInstrumentID )
inlineprotected
Ghidra address:
0x10006c70

◆ FireInsertNewSampleDescription()

void CSyntheditCtrl::FireInsertNewSampleDescription ( long iBankID,
long iInstrumentID,
long iSampleDescID )
inlineprotected
Ghidra address:
0x10006ec0

◆ FireDeleteSampleDescription()

void CSyntheditCtrl::FireDeleteSampleDescription ( long iBankID,
long iInstrumentID,
long iSampleDescID )
inlineprotected
Ghidra address:
0x10006b40

◆ FireDeleteInstrument()

void CSyntheditCtrl::FireDeleteInstrument ( long iBankID,
long iInstrumentID )
inlineprotected
Ghidra address:
0x10006b70

◆ FireDeleteSample()

void CSyntheditCtrl::FireDeleteSample ( long iBankID,
long iSampleID )
inlineprotected
Ghidra address:
0x10006bf0

◆ FireUpdateHyperLinks()

void CSyntheditCtrl::FireUpdateHyperLinks ( long iBankID)
inlineprotected
Ghidra address:
0x10006c20

The documentation for this class was generated from the following file: