|
From: <Rel...@us...> - 2008-01-12 16:49:54
|
Revision: 195
http://modplug.svn.sourceforge.net/modplug/?rev=195&view=rev
Author: Relabsoluness
Date: 2008-01-12 08:49:50 -0800 (Sat, 12 Jan 2008)
Log Message:
-----------
+ MIDI controller mapping to plug params.
+ Ability to take MIDI volume into account when playing notes.
+ Ability to pass MIDI to plug.
+ Ability to start/continue/stop play with certain MIDI messages (untested)
+ Ability to choose how volume commands behave for plugs.
. Fixed sending wrong MIDI message in ::MidiCC.
+ Keyshortcuts for preset navigation jumps in VST editor.
. Default VST editor preset field name validation in the menubar.
+ Added ability to edit various flags in song properties.
. Fix for pattern duplicate for small patterns (http://lpchip.com/modplug/viewtopic.php?t=1747)
. Fixed song properties-menu entry in mainframe(was grayed and didn't show keyshortcut)
. Fixed crash with certain toolbar related ini-settings (http://lpchip.com/modplug/viewtopic.php?t=2033)
. Further fixes to prevent unnotified overwriting of file.
/ .bak-files won't now be shown with "All modules" filter when loading modules.
. Show row playtime didn't on certain cases work on first pattern row (http://lpchip.com/modplug/viewtopic.php?t=2044)
. Fix to faulty play with certain instruments without notes in IT compatible playmode (http://lpchip.com/modplug/viewtopic.php?t=2080)
. Pattern number box didn't open pattern properties when using MPTm. (http://lpchip.com/modplug/viewtopic.php?t=2073)
. Fixed wrong MIDI CC names in macro editor.
./ Setting volume to 0(v00) in pattern didn't necessarily set volume to 0 when using volume random variation for instrument. All other random variation behaviors are changed as well; now the 'swing' is applied directly to channel values instead of using swing addition, and by default the swing effect is reset on new note. (http://lpchip.com/modplug/viewtopic.php?t=2074)
/ MPTm made with this version will be recognized as IT in earlier versions.
/ Merged MPTm loading/saving function to that of IT.
/ Various validity checks for read data in ITP loading.
/ Removed unused files from the include directory.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/AbstractVstEditor.cpp
trunk/OpenMPT/mptrack/AutoSaver.cpp
trunk/OpenMPT/mptrack/CommandSet.cpp
trunk/OpenMPT/mptrack/CommandSet.h
trunk/OpenMPT/mptrack/Ctrl_gen.cpp
trunk/OpenMPT/mptrack/Ctrl_ins.cpp
trunk/OpenMPT/mptrack/Ctrl_ins.h
trunk/OpenMPT/mptrack/Ctrl_pat.cpp
trunk/OpenMPT/mptrack/Ctrl_seq.cpp
trunk/OpenMPT/mptrack/InputHandler.cpp
trunk/OpenMPT/mptrack/MainFrm.cpp
trunk/OpenMPT/mptrack/Mainbar.cpp
trunk/OpenMPT/mptrack/Mainfrm.h
trunk/OpenMPT/mptrack/Moddoc.cpp
trunk/OpenMPT/mptrack/Moddoc.h
trunk/OpenMPT/mptrack/Modedit.cpp
trunk/OpenMPT/mptrack/Mpdlgs.cpp
trunk/OpenMPT/mptrack/Mpt_midi.cpp
trunk/OpenMPT/mptrack/Mptrack.cpp
trunk/OpenMPT/mptrack/Mptrack.h
trunk/OpenMPT/mptrack/OrderToPatternTable.cpp
trunk/OpenMPT/mptrack/OrderToPatternTable.h
trunk/OpenMPT/mptrack/Stdafx.h
trunk/OpenMPT/mptrack/View_gen.cpp
trunk/OpenMPT/mptrack/View_ins.cpp
trunk/OpenMPT/mptrack/View_pat.cpp
trunk/OpenMPT/mptrack/View_smp.cpp
trunk/OpenMPT/mptrack/View_tre.cpp
trunk/OpenMPT/mptrack/Vstplug.cpp
trunk/OpenMPT/mptrack/dlg_misc.cpp
trunk/OpenMPT/mptrack/dlg_misc.h
trunk/OpenMPT/mptrack/mod2midi.cpp
trunk/OpenMPT/mptrack/mptrack.rc
trunk/OpenMPT/mptrack/pattern.cpp
trunk/OpenMPT/mptrack/pattern.h
trunk/OpenMPT/mptrack/patternContainer.cpp
trunk/OpenMPT/mptrack/patternContainer.h
trunk/OpenMPT/mptrack/res/img_list.bmp
trunk/OpenMPT/mptrack/resource.h
trunk/OpenMPT/mptrack/typedefs.h
trunk/OpenMPT/soundlib/LOAD_AMF.CPP
trunk/OpenMPT/soundlib/Load_ams.cpp
trunk/OpenMPT/soundlib/Load_far.cpp
trunk/OpenMPT/soundlib/Load_it.cpp
trunk/OpenMPT/soundlib/Load_mid.cpp
trunk/OpenMPT/soundlib/Load_xm.cpp
trunk/OpenMPT/soundlib/Snd_flt.cpp
trunk/OpenMPT/soundlib/Snd_fx.cpp
trunk/OpenMPT/soundlib/Sndfile.cpp
trunk/OpenMPT/soundlib/Sndfile.h
trunk/OpenMPT/soundlib/Sndmix.cpp
trunk/OpenMPT/soundlib/midi.h
trunk/OpenMPT/soundlib/mod_specifications.h
Added Paths:
-----------
trunk/OpenMPT/mptrack/MIDIMappingDialog.cpp
trunk/OpenMPT/mptrack/MIDIMappingDialog.h
Removed Paths:
-------------
trunk/OpenMPT/include/3DL2.H
trunk/OpenMPT/include/3DL2HELP.H
trunk/OpenMPT/include/AudioEffect.cpp
trunk/OpenMPT/include/AudioEffect.hpp
trunk/OpenMPT/include/MachineInterface.h
trunk/OpenMPT/include/audioeffectx.cpp
trunk/OpenMPT/include/audioeffectx.h
trunk/OpenMPT/soundlib/MPT_module.cpp
trunk/OpenMPT/soundlib/MPT_module.h
trunk/OpenMPT/soundlib/load_mptm.cpp
Deleted: trunk/OpenMPT/include/3DL2.H
===================================================================
--- trunk/OpenMPT/include/3DL2.H 2007-11-17 20:42:39 UTC (rev 194)
+++ trunk/OpenMPT/include/3DL2.H 2008-01-12 16:49:50 UTC (rev 195)
@@ -1,227 +0,0 @@
-// 3DL2.H
-//
-
-#ifndef _3DL2_H_INCLUDED
-#define _3DL2_H_INCLUDED
-
-#ifdef __cplusplus
-extern "C" {
-#endif // __cplusplus
-
-#pragma pack(push, 4)
-
-// I3DL2 listener property set {DA0F0520-300A-11D3-8A2B-0060970DB011}
-DEFINE_GUID(DSPROPSETID_I3DL2_ListenerProperties,
- 0xDA0F0520,
- 0x300A,
- 0x11D3,
- 0x8A, 0x2B, 0x00, 0x60, 0x97, 0x0D, 0xB0, 0x11);
-
-typedef enum
-{
-// sets all I3DL2 listener properties
- DSPROPERTY_I3DL2LISTENER_ALL,
-// room effect level at low frequencies
- DSPROPERTY_I3DL2LISTENER_ROOM,
-// room effect high-frequency level re. low frequency level
- DSPROPERTY_I3DL2LISTENER_ROOMHF,
-// like DS3D flRolloffFactor but for room effect
- DSPROPERTY_I3DL2LISTENER_ROOMROLLOFFFACTOR,
-// reverberation decay time at low-frequencies
- DSPROPERTY_I3DL2LISTENER_DECAYTIME,
-// high-frequency to low-frequency decay time ratio
- DSPROPERTY_I3DL2LISTENER_DECAYHFRATIO,
-// early reflections level relative to room effect
- DSPROPERTY_I3DL2LISTENER_REFLECTIONS,
-// delay time of first reflection
- DSPROPERTY_I3DL2LISTENER_REFLECTIONSDELAY,
-// late reverberation level relative to room effect
- DSPROPERTY_I3DL2LISTENER_REVERB,
-// late reverberation delay time relative to first reflection
- DSPROPERTY_I3DL2LISTENER_REVERBDELAY,
-// reverberation diffusion (echo density)
- DSPROPERTY_I3DL2LISTENER_DIFFUSION,
-// reverberation density (modal density)
- DSPROPERTY_I3DL2LISTENER_DENSITY,
-// reference high frequency
- DSPROPERTY_I3DL2LISTENER_HFREFERENCE
-} DSPROPERTY_I3DL2_LISTENERPROPERTY;
-
-// use this structure for DSPROPERTY_I3DL2LISTENER_ALL
-// - all levels are hundredths of decibels (mB)
-// - all times are in seconds (s)
-typedef struct _I3DL2_LISTENERPROPERTIES
-{
- LONG lRoom; // [-10000, 0] default: -10000 mB
- LONG lRoomHF; // [-10000, 0] default: 0 mB
- FLOAT flRoomRolloffFactor; // [0.0, 10.0] default: 0.0
- FLOAT flDecayTime; // [0.1, 20.0] default: 1.0 s
- FLOAT flDecayHFRatio; // [0.1, 2.0] default: 0.5
- LONG lReflections; // [-10000, 1000] default: -10000 mB
- FLOAT flReflectionsDelay; // [0.0, 0.3] default: 0.02 s
- LONG lReverb; // [-10000, 2000] default: -10000 mB
- FLOAT flReverbDelay; // [0.0, 0.1] default: 0.04 s
- FLOAT flDiffusion; // [0.0, 100.0] default: 100.0 %
- FLOAT flDensity; // [0.0, 100.0] default: 100.0 %
- FLOAT flHFReference; // [20.0, 20000.0] default: 5000.0 Hz
-} I3DL2_LISTENERPROPERTIES, *LPI3DL2_LISTENERPROPERTIES;
-
-// property ranges and defaults:
-
-#define I3DL2LISTENER_MINROOM (-10000)
-#define I3DL2LISTENER_MAXROOM 0
-#define I3DL2LISTENER_DEFAULTROOM (-10000)
-
-#define I3DL2LISTENER_MINROOMHF (-10000)
-#define I3DL2LISTENER_MAXROOMHF 0
-#define I3DL2LISTENER_DEFAULTROOMHF 0
-
-#define I3DL2LISTENER_MINROOMROLLOFFFACTOR 0.0f
-#define I3DL2LISTENER_MAXROOMROLLOFFFACTOR 10.0f
-#define I3DL2LISTENER_DEFAULTROOMROLLOFFFACTOR 0.0f
-
-#define I3DL2LISTENER_MINDECAYTIME 0.1f
-#define I3DL2LISTENER_MAXDECAYTIME 20.0f
-#define I3DL2LISTENER_DEFAULTDECAYTIME 1.0f
-
-#define I3DL2LISTENER_MINDECAYHFRATIO 0.1f
-#define I3DL2LISTENER_MAXDECAYHFRATIO 2.0f
-#define I3DL2LISTENER_DEFAULTDECAYHFRATIO 0.5f
-
-#define I3DL2LISTENER_MINREFLECTIONS (-10000)
-#define I3DL2LISTENER_MAXREFLECTIONS 1000
-#define I3DL2LISTENER_DEFAULTREFLECTIONS (-10000)
-
-#define I3DL2LISTENER_MINREFLECTIONSDELAY 0.0f
-#define I3DL2LISTENER_MAXREFLECTIONSDELAY 0.3f
-#define I3DL2LISTENER_DEFAULTREFLECTIONSDELAY 0.02f
-
-#define I3DL2LISTENER_MINREVERB (-10000)
-#define I3DL2LISTENER_MAXREVERB 2000
-#define I3DL2LISTENER_DEFAULTREVERB (-10000)
-
-#define I3DL2LISTENER_MINREVERBDELAY 0.0f
-#define I3DL2LISTENER_MAXREVERBDELAY 0.1f
-#define I3DL2LISTENER_DEFAULTREVERBDELAY 0.04f
-
-#define I3DL2LISTENER_MINDIFFUSION 0.0f
-#define I3DL2LISTENER_MAXDIFFUSION 100.0f
-#define I3DL2LISTENER_DEFAULTDIFFUSION 100.0f
-
-#define I3DL2LISTENER_MINDENSITY 0.0f
-#define I3DL2LISTENER_MAXDENSITY 100.0f
-#define I3DL2LISTENER_DEFAULTDENSITY 100.0f
-
-#define I3DL2LISTENER_MINHFREFERENCE 20.0f
-#define I3DL2LISTENER_MAXHFREFERENCE 20000.0f
-#define I3DL2LISTENER_DEFAULTHFREFERENCE 5000.0f
-
-// I3DL2 buffer property set {DA0F0521-300A-11D3-8A2B-0060970DB011}
-DEFINE_GUID(DSPROPSETID_I3DL2_BufferProperties,
- 0xDA0F0521,
- 0x300A,
- 0x11D3,
- 0x8A, 0x2B, 0x00, 0x60, 0x97, 0x0D, 0xB0, 0x11);
-
-typedef enum
-{
-// sets all I3DL2 buffer properties
- DSPROPERTY_I3DL2BUFFER_ALL,
-// sets both obstruction properties
- DSPROPERTY_I3DL2BUFFER_OBSTRUCTIONALL,
-// sets both occlusion properties
- DSPROPERTY_I3DL2BUFFER_OCCLUSIONALL,
-// additional direct path level correction
- DSPROPERTY_I3DL2BUFFER_DIRECT,
-// additional direct path high-frequency re. low-frequency level correction
- DSPROPERTY_I3DL2BUFFER_DIRECTHF,
-// additional room effect level correction
- DSPROPERTY_I3DL2BUFFER_ROOM,
-// additional room effect high-frequency re. low-frequency level correction
- DSPROPERTY_I3DL2BUFFER_ROOMHF,
-// like DS3D flRolloffFactor but for room effect
- DSPROPERTY_I3DL2BUFFER_ROOMROLLOFFFACTOR,
-// main obstruction control (attenuation at high frequencies)
- DSPROPERTY_I3DL2BUFFER_OBSTRUCTION,
-// obstruction low-frequency re. high-frequency ratio
- DSPROPERTY_I3DL2BUFFER_OBSTRUCTIONLFRATIO,
-// main occlusion control (attenuation at high frequencies)
- DSPROPERTY_I3DL2BUFFER_OCCLUSION,
-// occlusion low-frequency re. high-frequency ratio
- DSPROPERTY_I3DL2BUFFER_OCCLUSIONLFRATIO
-} DSPROPERTY_I3DL2_BUFFERPROPERTY;
-
-// use this structure for DSPROPERTY_I3DL2BUFFER_OBSTRUCTIONALL
-// - all levels are hundredths of decibels (mB)
-typedef struct _I3DL2_OBSTRUCTIONPROPERTIES
-{
- LONG lHFLevel; // [-10000, 0] default: 0 mB
- FLOAT flLFRatio; // [0.0, 1.0] default: 0.0
-} I3DL2_OBSTRUCTIONPROPERTIES, *LPI3DL2_OBSTRUCTIONPROPERTIES;
-
-// use this structure for DSPROPERTY_I3DL2BUFFER_OCCLUSIONALL
-// - all levels are hundredths of decibels (mB)
-typedef struct _I3DL2_OCCLUSIONPROPERTIES
-{
- LONG lHFLevel; // [-10000, 0] default: 0 mB
- FLOAT flLFRatio; // [0.0, 1.0] default: 0.25
-} I3DL2_OCCLUSIONPROPERTIES, *LPI3DL2_OCCLUSIONPROPERTIES;
-
-// use this structure for DSPROPERTY_I3DL2BUFFER_ALL
-// - all levels are hundredths of decibels (mB)
-typedef struct _I3DL2_BUFFERPROPERTIES
-{
- LONG lDirect; // [-10000, 1000] default: 0 mB
- LONG lDirectHF; // [-10000, 0] default: 0 mB
- LONG lRoom; // [-10000, 1000] default: 0 mB
- LONG lRoomHF; // [-10000, 0] default: 0 mB
- FLOAT flRoomRolloffFactor; // [0.0, 10.0] default: 0.0
- I3DL2_OBSTRUCTIONPROPERTIES Obstruction;
- I3DL2_OCCLUSIONPROPERTIES Occlusion;
-} I3DL2_BUFFERPROPERTIES, *LPI3DL2_BUFFERPROPERTIES;
-
-// property ranges and defaults:
-
-#define I3DL2BUFFER_MINDIRECT (-10000)
-#define I3DL2BUFFER_MAXDIRECT 1000
-#define I3DL2BUFFER_DEFAULTDIRECT 0
-
-#define I3DL2BUFFER_MINDIRECTHF (-10000)
-#define I3DL2BUFFER_MAXDIRECTHF 0
-#define I3DL2BUFFER_DEFAULTDIRECTHF 0
-
-#define I3DL2BUFFER_MINROOM (-10000)
-#define I3DL2BUFFER_MAXROOM 1000
-#define I3DL2BUFFER_DEFAULTROOM 0
-
-#define I3DL2BUFFER_MINROOMHF (-10000)
-#define I3DL2BUFFER_MAXROOMHF 0
-#define I3DL2BUFFER_DEFAULTROOMHF 0
-
-#define I3DL2BUFFER_MINROOMROLLOFFFACTOR 0.0f
-#define I3DL2BUFFER_MAXROOMROLLOFFFACTOR 10.f
-#define I3DL2BUFFER_DEFAULTROOMROLLOFFFACTOR 0.0f
-
-#define I3DL2BUFFER_MINOBSTRUCTION (-10000)
-#define I3DL2BUFFER_MAXOBSTRUCTION 0
-#define I3DL2BUFFER_DEFAULTOBSTRUCTION 0
-
-#define I3DL2BUFFER_MINOBSTRUCTIONLFRATIO 0.0f
-#define I3DL2BUFFER_MAXOBSTRUCTIONLFRATIO 1.0f
-#define I3DL2BUFFER_DEFAULTOBSTRUCTIONLFRATIO 0.0f
-
-#define I3DL2BUFFER_MINOCCLUSION (-10000)
-#define I3DL2BUFFER_MAXOCCLUSION 0
-#define I3DL2BUFFER_DEFAULTOCCLUSION 0
-
-#define I3DL2BUFFER_MINOCCLUSIONLFRATIO 0.0f
-#define I3DL2BUFFER_MAXOCCLUSIONLFRATIO 1.0f
-#define I3DL2BUFFER_DEFAULTOCCLUSIONLFRATIO 0.25f
-
-#pragma pack(pop)
-
-#ifdef __cplusplus
-}
-#endif // __cplusplus
-
-#endif
Deleted: trunk/OpenMPT/include/3DL2HELP.H
===================================================================
--- trunk/OpenMPT/include/3DL2HELP.H 2007-11-17 20:42:39 UTC (rev 194)
+++ trunk/OpenMPT/include/3DL2HELP.H 2008-01-12 16:49:50 UTC (rev 195)
@@ -1,102 +0,0 @@
-// 3DL2HELP.H
-//
-
-#ifndef _3DL2HELP_H_INCLUDED
-#define _3DL2HELP_H_INCLUDED
-
-// Example listener environment presets
-// for use with DSPROPERTY_I3DL2LISTENER_ALL.
-// Each array contains 12 values whose order and types are defined
-// by structure I3DL2_LISTENERPROPERTIES (defined in 3DL2.H).
-
-#define I3DL2_ENVIRONMENT_PRESET_DEFAULT \
--10000, 0,0.0f, 1.00f,0.50f,-10000,0.020f,-10000,0.040f,100.0f,100.0f,5000.0f
-
-#define I3DL2_ENVIRONMENT_PRESET_GENERIC \
- -1000, -100,0.0f, 1.49f,0.83f, -2602,0.007f, 200,0.011f,100.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_PADDEDCELL \
- -1000,-6000,0.0f, 0.17f,0.10f, -1204,0.001f, 207,0.002f,100.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_ROOM \
- -1000, -454,0.0f, 0.40f,0.83f, -1646,0.002f, 53,0.003f,100.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_BATHROOM \
- -1000,-1200,0.0f, 1.49f,0.54f, -370,0.007f, 1030,0.011f,100.0f, 60.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_LIVINGROOM \
- -1000,-6000,0.0f, 0.50f,0.10f, -1376,0.003f, -1104,0.004f,100.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_STONEROOM \
- -1000, -300,0.0f, 2.31f,0.64f, -711,0.012f, 83,0.017f,100.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_AUDITORIUM \
- -1000, -476,0.0f, 4.32f,0.59f, -789,0.020f, -289,0.030f,100.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_CONCERTHALL \
- -1000, -500,0.0f, 3.92f,0.70f, -1230,0.020f, -2,0.029f,100.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_CAVE \
- -1000, 0,0.0f, 2.91f,1.30f, -602,0.015f, -302,0.022f,100.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_ARENA \
- -1000, -698,0.0f, 7.24f,0.33f, -1166,0.020f, 16,0.030f,100.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_HANGAR \
- -1000,-1000,0.0f,10.05f,0.23f, -602,0.020f, 198,0.030f,100.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_CARPETEDHALLWAY \
- -1000,-4000,0.0f, 0.30f,0.10f, -1831,0.002f, -1630,0.030f,100.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_HALLWAY \
- -1000, -300,0.0f, 1.49f,0.59f, -1219,0.007f, 441,0.011f,100.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_STONECORRIDOR \
- -1000, -237,0.0f, 2.70f,0.79f, -1214,0.013f, 395,0.020f,100.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_ALLEY \
- -1000, -270,0.0f, 1.49f,0.86f, -1204,0.007f, -4,0.011f,100.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_FOREST \
- -1000,-3300,0.0f, 1.49f,0.54f, -2560,0.162f, -613,0.088f, 79.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_CITY \
- -1000, -800,0.0f, 1.49f,0.67f, -2273,0.007f, -2217,0.011f, 50.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_MOUNTAINS \
- -1000,-2500,0.0f, 1.49f,0.21f, -2780,0.300f, -2014,0.100f, 27.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_QUARRY \
- -1000,-1000,0.0f, 1.49f,0.83f,-10000,0.061f, 500,0.025f,100.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_PLAIN \
- -1000,-2000,0.0f, 1.49f,0.50f, -2466,0.179f, -2514,0.100f, 21.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_PARKINGLOT \
- -1000, 0,0.0f, 1.65f,1.50f, -1363,0.008f, -1153,0.012f,100.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_SEWERPIPE \
- -1000,-1000,0.0f, 2.81f,0.14f, 429,0.014f, 648,0.021f, 80.0f, 60.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_UNDERWATER \
- -1000,-4000,0.0f, 1.49f,0.10f, -449,0.007f, 1700,0.011f,100.0f,100.0f,5000.0f
-
-// Examples simulating General MIDI 2'musical' reverb presets
-//
-// Name (Decay time) Description
-//
-// Small Room (1.1s) A small size room with a length of 5m or so.
-// Medium Room (1.3s) A medium size room with a length of 10m or so.
-// Large Room (1.5s) A large size room suitable for live performances.
-// Medium Hall (1.8s) A medium size concert hall.
-// Large Hall (1.8s) A large size concert hall suitable for a full orchestra.
-// Plate (1.3s) A plate reverb simulation.
-
-#define I3DL2_ENVIRONMENT_PRESET_SMALLROOM \
- -1000, -600,0.0f, 1.10f,0.83f, -400,0.005f, 500,0.010f,100.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_MEDIUMROOM \
- -1000, -600,0.0f, 1.30f,0.83f, -1000,0.010f, -200,0.020f,100.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_LARGEROOM \
- -1000, -600,0.0f, 1.50f,0.83f, -1600,0.020f, -1000,0.040f,100.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_MEDIUMHALL \
- -1000, -600,0.0f, 1.80f,0.70f, -1300,0.015f, -800,0.030f,100.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_LARGEHALL \
- -1000, -600,0.0f, 1.80f,0.70f, -2000,0.030f, -1400,0.060f,100.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_PLATE \
- -1000, -200,0.0f, 1.30f,0.90f, 0,0.002f, 0,0.010f,100.0f, 75.0f,5000.0f
-
-// Example material transmission presets
-// for use with DSPROPERTY_I3DL2BUFFER_OCCLUSIONALL
-// or DSPROPERTY_I3DL2BUFFER_OBSTRUCTIONALL.
-// Each array contains 2 values whose order and types are defined
-// by structure I3DL2_OCCLUSIONPROPERTIES
-// or I3DL2_OBSTRUCTIONPROPERTIES (defined in 3DL2.H).
-
-#define I3DL2_MATERIAL_PRESET_SINGLEWINDOW -2800,0.71f
-#define I3DL2_MATERIAL_PRESET_DOUBLEWINDOW -5000,0.40f
-#define I3DL2_MATERIAL_PRESET_THINDOOR -1800,0.66f
-#define I3DL2_MATERIAL_PRESET_THICKDOOR -4400,0.64f
-#define I3DL2_MATERIAL_PRESET_WOODWALL -4000,0.50f
-#define I3DL2_MATERIAL_PRESET_BRICKWALL -5000,0.60f
-#define I3DL2_MATERIAL_PRESET_STONEWALL -6000,0.68f
-#define I3DL2_MATERIAL_PRESET_CURTAIN -1200,0.15f
-
-#endif
Deleted: trunk/OpenMPT/include/AudioEffect.cpp
===================================================================
--- trunk/OpenMPT/include/AudioEffect.cpp 2007-11-17 20:42:39 UTC (rev 194)
+++ trunk/OpenMPT/include/AudioEffect.cpp 2008-01-12 16:49:50 UTC (rev 195)
@@ -1,393 +0,0 @@
-//-------------------------------------------------------------------------------------------------------
-// VST Plug-Ins SDK
-// Version 1.0
-// \xA9 2003 Steinberg Media Technologies, All Rights Reserved
-//
-// you should not have to edit this file
-// use override methods instead
-//-------------------------------------------------------------------------------------------------------
-
-#include <stddef.h>
-#include <string.h>
-#include <stdio.h>
-#include <math.h>
-
-#ifndef __AudioEffect__
-#include "AudioEffect.hpp"
-#endif
-
-#ifndef __AEffEditor__
-#include "AEffEditor.hpp"
-#endif
-
-//-------------------------------------------------------------------------------------------------------
-long dispatchEffectClass (AEffect *e, long opCode, long index, long value, void *ptr, float opt)
-{
- AudioEffect *ae = (AudioEffect*)(e->object);
-
- if (opCode == effClose)
- {
- ae->dispatcher (opCode, index, value, ptr, opt);
- delete ae;
- return 1;
- }
-
- return ae->dispatcher (opCode, index, value, ptr, opt);
-}
-
-//-------------------------------------------------------------------------------------------------------
-float getParameterClass (AEffect *e, long index)
-{
- AudioEffect *ae = (AudioEffect*)(e->object);
- return ae->getParameter (index);
-}
-
-//-------------------------------------------------------------------------------------------------------
-void setParameterClass (AEffect *e, long index, float value)
-{
- AudioEffect *ae = (AudioEffect*)(e->object);
- ae->setParameter (index, value);
-}
-
-//-------------------------------------------------------------------------------------------------------
-void processClass (AEffect *e, float **inputs, float **outputs, long sampleFrames)
-{
- AudioEffect *ae = (AudioEffect*)(e->object);
- ae->process (inputs, outputs, sampleFrames);
-}
-
-//-------------------------------------------------------------------------------------------------------
-void processClassReplacing (AEffect *e, float **inputs, float **outputs, long sampleFrames)
-{
- AudioEffect *ae = (AudioEffect*)(e->object);
- ae->processReplacing (inputs, outputs, sampleFrames);
-}
-
-
-//-------------------------------------------------------------------------------------------------------
-// AudioEffect Implementation
-//-------------------------------------------------------------------------------------------------------
-
-//-------------------------------------------------------------------------------------------------------
-AudioEffect::AudioEffect (audioMasterCallback audioMaster, long numPrograms, long numParams)
-{
- this->audioMaster = audioMaster;
- editor = 0;
- this->numPrograms = numPrograms;
- this->numParams = numParams;
- curProgram = 0;
-
- memset(&cEffect, 0, sizeof (cEffect));
- cEffect.magic = kEffectMagic;
- cEffect.dispatcher = dispatchEffectClass;
- cEffect.process = processClass;
- cEffect.setParameter = setParameterClass;
- cEffect.getParameter = getParameterClass;
- cEffect.numPrograms = numPrograms;
- cEffect.numParams = numParams;
- cEffect.numInputs = 1;
- cEffect.numOutputs = 2;
- cEffect.flags = 0;
- cEffect.resvd1 = 0;
- cEffect.resvd2 = 0;
- cEffect.initialDelay = 0;
- cEffect.realQualities = 0;
- cEffect.offQualities = 0;
- cEffect.ioRatio = 1.f;
- cEffect.object = this;
- cEffect.user = 0;
- cEffect.uniqueID = CCONST ('N', 'o', 'E', 'f'); // you must set this!
- cEffect.version = 1;
- cEffect.processReplacing = processClassReplacing;
-
- sampleRate = 44100.f;
- blockSize = 1024L;
-}
-
-//-------------------------------------------------------------------------------------------------------
-AudioEffect::~AudioEffect ()
-{
- if (editor)
- delete editor;
-}
-
-//-------------------------------------------------------------------------------------------------------
-long AudioEffect::dispatcher (long opCode, long index, long value, void *ptr, float opt)
-{
- long v = 0;
-
- switch (opCode)
- {
- case effOpen: open (); break;
- case effClose: close (); break;
- case effSetProgram: if (value < numPrograms) setProgram (value); break;
- case effGetProgram: v = getProgram (); break;
- case effSetProgramName: setProgramName ((char *)ptr); break;
- case effGetProgramName: getProgramName ((char *)ptr); break;
- case effGetParamLabel: getParameterLabel (index, (char *)ptr); break;
- case effGetParamDisplay: getParameterDisplay (index, (char *)ptr); break;
- case effGetParamName: getParameterName (index, (char *)ptr); break;
-
- case effSetSampleRate: setSampleRate (opt); break;
- case effSetBlockSize: setBlockSize (value); break;
- case effMainsChanged: if (!value) suspend (); else resume (); break;
- case effGetVu: v = (long)(getVu () * 32767.); break;
-
-
- // Editor
- case effEditGetRect: if (editor) v = editor->getRect ((ERect **)ptr); break;
- case effEditOpen: if (editor) v = editor->open (ptr); break;
- case effEditClose: if (editor) editor->close (); break;
- case effEditIdle: if (editor) editor->idle (); break;
-
- #if MAC
- case effEditDraw: if (editor) editor->draw ((ERect *)ptr); break;
- case effEditMouse: if (editor) v = editor->mouse (index, value); break;
- case effEditKey: if (editor) v = editor->key (value); break;
- case effEditTop: if (editor) editor->top (); break;
- case effEditSleep: if (editor) editor->sleep (); break;
- #endif
-
- case effIdentify: v = CCONST ('N', 'v', 'E', 'f'); break;
- case effGetChunk: v = getChunk ((void**)ptr, index ? true : false); break;
- case effSetChunk: v = setChunk (ptr, value, index ? true : false); break;
- }
- return v;
-}
-
-//-------------------------------------------------------------------------------------------------------
-long AudioEffect::getMasterVersion ()
-{
- long version = 1;
- if (audioMaster)
- {
- version = audioMaster (&cEffect, audioMasterVersion, 0, 0, 0, 0);
- if (!version) // old
- version = 1;
- }
- return version;
-}
-
-//-------------------------------------------------------------------------------------------------------
-long AudioEffect::getCurrentUniqueId ()
-{
- long id = 0;
- if (audioMaster)
- id = audioMaster (&cEffect, audioMasterCurrentId, 0, 0, 0, 0);
- return id;
-}
-
-//-------------------------------------------------------------------------------------------------------
-void AudioEffect::masterIdle ()
-{
- if (audioMaster)
- audioMaster (&cEffect, audioMasterIdle, 0, 0, 0, 0);
-}
-
-//-------------------------------------------------------------------------------------------------------
-bool AudioEffect::isInputConnected (long input)
-{
- long ret = 0;
- if (audioMaster)
- ret = audioMaster (&cEffect, audioMasterPinConnected, input, 0, 0, 0);
- return ret ? false : true; // return value is 0 for true
-}
-
-//-------------------------------------------------------------------------------------------------------
-bool AudioEffect::isOutputConnected (long output)
-{
- long ret = 0;
- if (audioMaster)
- ret = audioMaster (&cEffect, audioMasterPinConnected, output, 1, 0, 0);
- return ret ? false : true; // return value is 0 for true
-}
-
-//-------------------------------------------------------------------------------------------------------
-void AudioEffect::setParameterAutomated (long index, float value)
-{
- setParameter (index, value);
- if (audioMaster)
- audioMaster (&cEffect, audioMasterAutomate, index, 0, 0, value); // value is in opt
-}
-
-//-------------------------------------------------------------------------------------------------------
-// Flags
-//-------------------------------------------------------------------------------------------------------
-void AudioEffect::hasVu (bool state)
-{
- if (state)
- cEffect.flags |= effFlagsHasVu;
- else
- cEffect.flags &= ~effFlagsHasVu;
-}
-
-//-------------------------------------------------------------------------------------------------------
-void AudioEffect::hasClip (bool state)
-{
- if (state)
- cEffect.flags |= effFlagsHasClip;
- else
- cEffect.flags &= ~effFlagsHasClip;
-}
-
-//-------------------------------------------------------------------------------------------------------
-void AudioEffect::canMono (bool state)
-{
- if (state)
- cEffect.flags |= effFlagsCanMono;
- else
- cEffect.flags &= ~effFlagsCanMono;
-}
-
-//-------------------------------------------------------------------------------------------------------
-void AudioEffect::canProcessReplacing (bool state)
-{
- if (state)
- cEffect.flags |= effFlagsCanReplacing;
- else
- cEffect.flags &= ~effFlagsCanReplacing;
-}
-
-//-------------------------------------------------------------------------------------------------------
-void AudioEffect::programsAreChunks (bool state)
-{
- if (state)
- cEffect.flags |= effFlagsProgramChunks;
- else
- cEffect.flags &= ~effFlagsProgramChunks;
-}
-
-//-------------------------------------------------------------------------------------------------------
-void AudioEffect::setRealtimeQualities (long qualities)
-{
- cEffect.realQualities = qualities;
-}
-
-//-------------------------------------------------------------------------------------------------------
-void AudioEffect::setOfflineQualities (long qualities)
-{
- cEffect.offQualities = qualities;
-}
-
-//-------------------------------------------------------------------------------------------------------
-void AudioEffect::setInitialDelay (long delay)
-{
- cEffect.initialDelay = delay;
-}
-
-//-------------------------------------------------------------------------------------------------------
-// Strings Conversion
-//-------------------------------------------------------------------------------------------------------
-void AudioEffect::dB2string (float value, char *text)
-{
- if (value <= 0)
- #if MAC
- strcpy (text, "-\xB0");
- #else
- strcpy (text, "-oo");
- #endif
- else
- float2string ((float)(20. * log10 (value)), text);
-}
-
-//-------------------------------------------------------------------------------------------------------
-void AudioEffect::Hz2string (float samples, char *text)
-{
- float sampleRate = getSampleRate ();
- if (!samples)
- float2string (0, text);
- else
- float2string (sampleRate / samples, text);
-}
-
-//-------------------------------------------------------------------------------------------------------
-void AudioEffect::ms2string (float samples, char *text)
-{
- float2string ((float)(samples * 1000. / getSampleRate ()), text);
-}
-
-//-------------------------------------------------------------------------------------------------------
-void AudioEffect::float2string (float value, char *text)
-{
- long c = 0, neg = 0;
- char string[32];
- char *s;
- double v, integ, i10, mantissa, m10, ten = 10.;
-
- v = (double)value;
- if (v < 0)
- {
- neg = 1;
- value = -value;
- v = -v;
- c++;
- if (v > 9999999.)
- {
- strcpy (string, "Huge!");
- return;
- }
- }
- else if( v > 99999999.)
- {
- strcpy (string, "Huge!");
- return;
- }
-
- s = string + 31;
- *s-- = 0;
- *s-- = '.';
- c++;
-
- integ = floor (v);
- i10 = fmod (integ, ten);
- *s-- = (char)((long)i10 + '0');
- integ /= ten;
- c++;
- while (integ >= 1. && c < 8)
- {
- i10 = fmod (integ, ten);
- *s-- = (char)((long)i10 + '0');
- integ /= ten;
- c++;
- }
- if (neg)
- *s-- = '-';
- strcpy (text, s + 1);
- if (c >= 8)
- return;
-
- s = string + 31;
- *s-- = 0;
- mantissa = fmod (v, 1.);
- mantissa *= pow (ten, (double)(8 - c));
- while (c < 8)
- {
- if (mantissa <= 0)
- *s-- = '0';
- else
- {
- m10 = fmod (mantissa, ten);
- *s-- = (char)((long)m10 + '0');
- mantissa /= 10.;
- }
- c++;
- }
- strcat (text, s + 1);
-}
-
-//-------------------------------------------------------------------------------------------------------
-void AudioEffect::long2string (long value, char *text)
-{
- char string[32];
-
- if (value >= 100000000)
- {
- strcpy (text, "Huge!");
- return;
- }
- sprintf (string, "%7d", (int)value);
- string[8] = 0;
- strcpy (text, (char *)string);
-}
-//-------------------------------------------------------------------------------------------------------
-//-------------------------------------------------------------------------------------------------------
Deleted: trunk/OpenMPT/include/AudioEffect.hpp
===================================================================
--- trunk/OpenMPT/include/AudioEffect.hpp 2007-11-17 20:42:39 UTC (rev 194)
+++ trunk/OpenMPT/include/AudioEffect.hpp 2008-01-12 16:49:50 UTC (rev 195)
@@ -1,131 +0,0 @@
-//-------------------------------------------------------------------------------------------------------
-// VST Plug-Ins SDK
-// Version 1.0
-// \xA9 2003, Steinberg Media Technologies, All Rights Reserved
-//-------------------------------------------------------------------------------------------------------
-
-#ifndef __AudioEffect__
-#define __AudioEffect__
-
-#ifndef __AEffect__
-#include "AEffect.h" // "c" interface
-#endif
-
-class AEffEditor;
-class AudioEffect;
-
-//-------------------------------------------------------------------------------------------------------
-// Needs to be defined by the audio effect and is
-// called to create the audio effect object instance.
-AudioEffect* createEffectInstance (audioMasterCallback audioMaster);
-
-long dispatchEffectClass (AEffect *e, long opCode, long index, long value, void *ptr, float opt);
-float getParameterClass (long index);
-void setParameterClass (long index, float value);
-void processClass (AEffect *e, float **inputs, float **outputs, long sampleFrames);
-void processClassReplacing (AEffect *e, float **inputs, float **outputs, long sampleFrames);
-
-//-------------------------------------------------------------------------------------------------------
-class AudioEffect
-{
-friend class AEffEditor;
-friend long dispatchEffectClass (AEffect *e, long opCode, long index, long value, void *ptr, float opt);
-friend float getParameterClass (AEffect *e, long index);
-friend void setParameterClass (AEffect *e, long index, float value);
-friend void processClass (AEffect *e, float **inputs, float **outputs, long sampleFrames);
-friend void processClassReplacing (AEffect *e, float **inputs, float **outputs, long sampleFrames);
-
-public:
- AudioEffect (audioMasterCallback audioMaster, long numPrograms, long numParams);
- virtual ~AudioEffect ();
-
- virtual void setParameter (long index, float value) { index = index; value = value; }
- virtual float getParameter (long index) { index = index; return 0; }
- virtual void setParameterAutomated (long index, float value);
-
- AEffect *getAeffect () { return &cEffect; } // Returns the AEffect Structure
-
- void setEditor (AEffEditor *editor)
- { this->editor = editor;
- if (editor) cEffect.flags |= effFlagsHasEditor;
- else cEffect.flags &= ~effFlagsHasEditor; } // Should be called if you want to define your own editor
-
- //---Called from audio master (Host -> Plug)---------------
- virtual void process (float **inputs, float **outputs, long sampleFrames) = 0;
- virtual void processReplacing (float **inputs, float **outputs, long sampleFrames)
- { inputs = inputs; outputs = outputs; sampleFrames = sampleFrames; }
-
- virtual long dispatcher (long opCode, long index, long value, void *ptr, float opt); // Opcodes dispatcher
-
- virtual void open () {} // Called when Plugin is initialized
- virtual void close () {} // Called when Plugin will be released
-
- //---Program----------------------------
- virtual long getProgram () { return curProgram; }
- virtual void setProgram (long program) { curProgram = program; }// Don't forget to set curProgram
- virtual void setProgramName (char *name) { *name = 0; } // All following refer to curProgram
- virtual void getProgramName (char *name) { *name = 0; }
-
- virtual void getParameterLabel (long index, char *label) { index = index; *label = 0; } // example: "dB"
- virtual void getParameterDisplay (long index, char *text) { index = index; *text = 0; } // example: "6.01"
- virtual void getParameterName (long index, char *text) { index = index; *text = 0; } // example: "Volume"
-
- virtual float getVu () { return 0; }
-
- virtual long getChunk (void** data, bool isPreset = false) { return 0; } // Returns the Size in bytes of the chunk (Plugin allocates the data array)
- virtual long setChunk (void* data, long byteSize, bool isPreset = false) { return 0; }
-
- virtual void setSampleRate (float sampleRate) { this->sampleRate = sampleRate; }
- virtual void setBlockSize (long blockSize) { this->blockSize = blockSize; }
-
- virtual void suspend () {} // Called when Plugin is switched to Off
- virtual void resume () {} // Called when Plugin is switched to On
-
- //---Setup---------------------------
- virtual void setUniqueID (long iD) { cEffect.uniqueID = iD; } // must call this!
- virtual void setNumInputs (long inputs) { cEffect.numInputs = inputs; }
- virtual void setNumOutputs (long outputs) { cEffect.numOutputs = outputs; }
-
- virtual void hasVu (bool state = true);
- virtual void hasClip (bool state = true);
- virtual void canMono (bool state = true);
- virtual void canProcessReplacing (bool state = true); // Tells that the processReplacing () could be used
- virtual void programsAreChunks (bool state = true);
- virtual void setRealtimeQualities (long qualities);
- virtual void setOfflineQualities (long qualities);
- virtual void setInitialDelay (long delay); // Uses to report the Plugin's latency (Group Delay)
-
- //---Inquiry-------------------------
- virtual float getSampleRate () { return sampleRate; }
- virtual long getBlockSize () { return blockSize; }
-
- //---Host communication--------------
- virtual long getMasterVersion ();
- virtual long getCurrentUniqueId ();
- virtual void masterIdle ();
- virtual bool isInputConnected (long input);
- virtual bool isOutputConnected (long output);
-
- //---Tools---------------------------
- virtual void dB2string (float value, char *text);
- virtual void Hz2string (float samples, char *text);
- virtual void ms2string (float samples, char *text);
- virtual void float2string (float value, char *string);
- virtual void long2string (long value, char *text);
-
-protected:
- //---Members-------------------------
- float sampleRate;
- AEffEditor *editor;
- audioMasterCallback audioMaster;
- long numPrograms;
- long numParams;
- long curProgram;
- long blockSize;
- AEffect cEffect;
-};
-
-#endif // __AudioEffect__
-//-------------------------------------------------------------------------------------------------------
-//-------------------------------------------------------------------------------------------------------
-
Deleted: trunk/OpenMPT/include/MachineInterface.h
===================================================================
--- trunk/OpenMPT/include/MachineInterface.h 2007-11-17 20:42:39 UTC (rev 194)
+++ trunk/OpenMPT/include/MachineInterface.h 2008-01-12 16:49:50 UTC (rev 195)
@@ -1,514 +0,0 @@
-// Copyright (C) 1997-2000 Oskari Tammelin (ot...@ik...)
-// This header file may be used to write _freeware_ DLL "machines" for Buzz
-// Using it for anything else is not allowed without a permission from the author
-
-#ifndef __MACHINE_INTERFACE_H
-#define __MACHINE_INTERFACE_H
-
-#define MI_VERSION 15
-
-typedef unsigned char byte;
-typedef unsigned short word;
-typedef unsigned long dword;
-
-double const PI = 3.14159265358979323846;
-
-#define MAX_BUFFER_LENGTH 256 // in number of samples
-
-// machine types
-#define MT_MASTER 0
-#define MT_GENERATOR 1
-#define MT_EFFECT 2
-
-// special parameter values
-#define NOTE_NO 0
-#define NOTE_OFF 255
-#define NOTE_MIN 1 // C-0
-#define NOTE_MAX ((16 * 9) + 12) // B-9
-#define SWITCH_OFF 0
-#define SWITCH_ON 1
-#define SWITCH_NO 255
-#define WAVE_MIN 1
-#define WAVE_MAX 200
-#define WAVE_NO 0
-
-// CMachineParameter flags
-#define MPF_WAVE 1
-#define MPF_STATE 2
-#define MPF_TICK_ON_EDIT 4
-
-// CMachineInfo flags
-#define MIF_MONO_TO_STEREO (1<<0)
-#define MIF_PLAYS_WAVES (1<<1)
-#define MIF_USES_LIB_INTERFACE (1<<2)
-#define MIF_USES_INSTRUMENTS (1<<3)
-#define MIF_DOES_INPUT_MIXING (1<<4)
-#define MIF_NO_OUTPUT (1<<5) // used for effect machines that don't actually use any outputs (WaveOutput, AuxSend etc.)
-#define MIF_CONTROL_MACHINE (1<<6) // used to control other (non MIF_CONTROL_MACHINE) machines
-#define MIF_INTERNAL_AUX (1<<7) // uses internal aux bus (jeskola mixer and jeskola mixer aux)
-
-// work modes
-#define WM_NOIO 0
-#define WM_READ 1
-#define WM_WRITE 2
-#define WM_READWRITE 3
-
-// state flags
-#define SF_PLAYING 1
-#define SF_RECORDING 2
-
-
-enum BEventType
-{
- DoubleClickMachine, // return true to ignore default handler (open parameter dialog), no parameters
- gDeleteMachine // data = CMachine *, param = ThisMac
-
-};
-
-class CMachineInterface;
-typedef bool (CMachineInterface::*EVENT_HANDLER_PTR)(void *);
-
-
-enum CMPType { pt_note, pt_switch, pt_byte, pt_word };
-
-class CMachineParameter
-{
-public:
-
- CMPType Type; // pt_byte
- char const *Name; // Short name: "Cutoff"
- char const *Description;// Longer description: "Cutoff Frequency (0-7f)"
- int MinValue; // 0
- int MaxValue; // 127
- int NoValue; // 255
- int Flags;
- int DefValue; // default value for params that have MPF_STATE flag set
-};
-
-class CMachineAttribute
-{
-public:
- char const *Name;
- int MinValue;
- int MaxValue;
- int DefValue;
-};
-
-class CMasterInfo
-{
-public:
- int BeatsPerMin; // [16..500]
- int TicksPerBeat; // [1..32]
- int SamplesPerSec; // usually 44100, but machines should support any rate from 11050 to 96000
- int SamplesPerTick; // (int)((60 * SPS) / (BPM * TPB))
- int PosInTick; // [0..SamplesPerTick-1]
- float TicksPerSec; // (float)SPS / (float)SPT
-
-};
-
-// CWaveInfo flags
-#define WF_LOOP 1
-#define WF_STEREO 8
-#define WF_BIDIR_LOOP 16
-
-class CWaveInfo
-{
-public:
- int Flags;
- float Volume;
-
-};
-
-class CWaveLevel
-{
-public:
- int numSamples;
- short *pSamples;
- int RootNote;
- int SamplesPerSec;
- int LoopStart;
- int LoopEnd;
-};
-
-// oscillator waveforms (used with GetOscillatorTable function)
-#define OWF_SINE 0
-#define OWF_SAWTOOTH 1
-#define OWF_PULSE 2 // square
-#define OWF_TRIANGLE 3
-#define OWF_NOISE 4
-#define OWF_303_SAWTOOTH 5
-
-// each oscillator table contains one full cycle of a bandlimited waveform at 11 levels
-// level 0 = 2048 samples
-// level 1 = 1024 samples
-// level 2 = 512 samples
-// ...
-// level 9 = 8 samples
-// level 10 = 4 samples
-// level 11 = 2 samples
-//
-// the waves are normalized to 16bit signed integers
-//
-// GetOscillatorTable retusns pointer to a table
-// GetOscTblOffset returns offset in the table for a specified level
-
-inline int GetOscTblOffset(int const level)
-{
- ASSERT(level >= 0 && level <= 10);
- return (2048+1024+512+256+128+64+32+16+8+4) & ~((2048+1024+512+256+128+64+32+16+8+4) >> level);
-}
-
-class CPattern;
-class CSequence;
-class CMachineInterfaceEx;
-class CMachine;
-
-class CMachineDataOutput;
-class CMachineInfo;
-
-class CMICallbacks
-{
-public:
- virtual CWaveInfo const *GetWave(int const i);
- virtual CWaveLevel const *GetWaveLevel(int const i, int const level);
- virtual void MessageBox(char const *txt);
- virtual void Lock();
- virtual void Unlock();
- virtual int GetWritePos();
- virtual int GetPlayPos();
- virtual float *GetAuxBuffer();
- virtual void ClearAuxBuffer();
- virtual int GetFreeWave();
- virtual bool AllocateWave(int const i, int const size, char const *name);
- virtual void ScheduleEvent(int const time, dword const data);
- virtual void MidiOut(int const dev, dword const data);
- virtual short const *GetOscillatorTable(int const waveform);
-
- // envelopes
- virtual int GetEnvSize(int const wave, int const env);
- virtual bool GetEnvPoint(int const wave, int const env, int const i, word &x, word &y, int &flags);
-
- virtual CWaveLevel const *GetNearestWaveLevel(int const i, int const note);
-
- // pattern editing
- virtual void SetNumberOfTracks(int const n);
- virtual CPattern *CreatePattern(char const *name, int const length);
- virtual CPattern *GetPattern(int const index);
- virtual char const *GetPatternName(CPattern *ppat);
- virtual void RenamePattern(char const *oldname, char const *newname);
- virtual void DeletePattern(CPattern *ppat);
- virtual int GetPatternData(CPattern *ppat, int const row, int const group, int const track, int const field);
- virtual void SetPatternData(CPattern *ppat, int const row, int const group, int const track, int const field, int const value);
-
- // sequence editing
- virtual CSequence *CreateSequence();
- virtual void DeleteSequence(CSequence *pseq);
-
-
- // special ppat values for GetSequenceData and SetSequenceData
- // empty = NULL
- // <break> = (CPattern *)1
- // <mute> = (CPattern *)2
- // <thru> = (CPattern *)3
- virtual CPattern *GetSequenceData(int const row);
- virtual void SetSequenceData(int const row, CPattern *ppat);
-
-
- // buzz v1.2 (MI_VERSION 15) additions start here
-
- virtual void SetMachineInterfaceEx(CMachineInterfaceEx *pex);
- // group 1=global, 2=track
- virtual void ControlChange__obsolete__(int group, int track, int param, int value); // set value of parameter
-
- // direct calls to audiodriver, used by WaveInput and WaveOutput
- // shouldn't be used for anything else
- virtual int ADGetnumChannels(bool input);
- virtual void ADWrite(int channel, float *psamples, int numsamples);
- virtual void ADRead(int channel, float *psamples, int numsamples);
-
- virtual CMachine *GetThisMachine(); // only call this in Init()!
- virtual void ControlChange(CMachine *pmac, int group, int track, int param, int value); // set value of parameter (group & 16 == don't record)
-
- // returns pointer to the sequence if there is a pattern playing
- virtual CSequence *GetPlayingSequence(CMachine *pmac);
-
- // gets ptr to raw pattern data for row of a track of a currently playing pattern (or something like that)
- virtual void *GetPlayingRow(CSequence *pseq, int group, int track);
-
- virtual int GetStateFlags();
-
- virtual void SetnumOutputChannels(CMachine *pmac, int n); // if n=1 Work(), n=2 WorkMonoToStereo()
-
- virtual void SetEventHandler(CMachine *pmac, BEventType et, EVENT_HANDLER_PTR p, void *param);
-
- virtual char const *GetWaveName(int const i);
-
- virtual void SetInternalWaveName(CMachine *pmac, int const i, char const *name); // i >= 1, NULL name to clear
-
- virtual void GetMachineNames(CMachineDataOutput *pout); // *pout will get one name per Write()
- virtual CMachine *GetMachine(char const *name);
- virtual CMachineInfo const *GetMachineInfo(CMachine *pmac);
- virtual char const *GetMachineName(CMachine *pmac);
-
- virtual bool GetInput(int index, float *psamples, int numsamples, bool stereo, float *extrabuffer);
-};
-
-
-class CLibInterface
-{
-public:
- virtual void GetInstrumentList(CMachineDataOutput *pout) {}
-
- // make some space to vtable so this interface can be extended later
- virtual void Dummy1() {}
- virtual void Dummy2() {}
- virtual void Dummy3() {}
- virtual void Dummy4() {}
- virtual void Dummy5() {}
- virtual void Dummy6() {}
- virtual void Dummy7() {}
- virtual void Dummy8() {}
- virtual void Dummy9() {}
- virtual void Dummy10() {}
- virtual void Dummy11() {}
- virtual void Dummy12() {}
- virtual void Dummy13() {}
- virtual void Dummy14() {}
- virtual void Dummy15() {}
- virtual void Dummy16() {}
- virtual void Dummy17() {}
- virtual void Dummy18() {}
- virtual void Dummy19() {}
- virtual void Dummy20() {}
- virtual void Dummy21() {}
- virtual void Dummy22() {}
- virtual void Dummy23() {}
- virtual void Dummy24() {}
- virtual void Dummy25() {}
- virtual void Dummy26() {}
- virtual void Dummy27() {}
- virtual void Dummy28() {}
- virtual void Dummy29() {}
- virtual void Dummy30() {}
- virtual void Dummy31() {}
- virtual void Dummy32() {}
-
-
-};
-
-
-class CMachineInfo
-{
-public:
- int Type; // MT_GENERATOR or MT_EFFECT,
- int Version; // MI_VERSION
- // v1.2: high word = internal machine version
- // higher version wins if two copies of machine found
- int Flags;
- int minTracks; // [0..256] must be >= 1 if numTrackParameters > 0
- int maxTracks; // [minTracks..256]
- int numGlobalParameters;
- int numTrackParameters;
- CMachineParameter const **Parameters;
- int numAttributes;
- CMachineAttribute const **Attributes;
- char const *Name; // "Jeskola Reverb"
- char const *ShortName; // "Reverb"
- char const *Author; // "Oskari Tammelin"
- char const *Commands; // "Command1\nCommand2\nCommand3..."
- CLibInterface *pLI; // ignored if MIF_USES_LIB_INTERFACE is not set
-};
-
-class CMachineDataInput
-{
-public:
- virtual void Read(void *pbuf, int const numbytes);
-
- void Read(int &d) { Read(&d, sizeof(int)); }
- void Read(dword &d) { Read(&d, sizeof(dword)); }
- void Read(short &d) { Read(&d, sizeof(short)); }
- void Read(word &d) { Read(&d, sizeof(word)); }
- void Read(char &d) { Read(&d, sizeof(char)); }
- void Read(byte &d) { Read(&d, sizeof(byte)); }
- void Read(float &d) { Read(&d, sizeof(float)); }
- void Read(double &d) { Read(&d, sizeof(double)); }
- void Read(bool &d) { Read(&d, sizeof(bool)); }
-
-};
-
-class CMachineDataOutput
-{
-public:
- virtual void Write(void *pbuf, int const numbytes);
-
- void Write(int d) { Write(&d, sizeof(int)); }
- void Write(dword d) { Write(&d, sizeof(dword)); }
- void Write(short d) { Write(&d, sizeof(short)); }
- void Write(word d) { Write(&d, sizeof(word)); }
- void Write(char d) { Write(&d, sizeof(char)); }
- void Write(byte d) { Write(&d, sizeof(byte)); }
- void Write(float d) { Write(&d, sizeof(float)); }
- void Write(double d) { Write(&d, sizeof(double)); }
- void Write(bool d) { Write(&d, sizeof(bool)); }
- void Write(char const *str) { Write((void *)str, strlen(str)+1); }
-
-};
-
-// envelope info flags
-#define EIF_SUSTAIN 1
-#define EIF_LOOP 2
-
-class CEnvelopeInfo
-{
-public:
- char const *Name;
- int Flags;
-};
-
-class CMachineInterface
-{
-public:
- virtual ~CMachineInterface() {}
- virtual void Init(CMachineDataInput * const pi) {}
- virtual void Tick() {}
- virtual bool Work(float *psamples, int numsamples, int const mode) { return false; }
- virtual bool WorkMonoToStereo(float *pin, float *pout, int numsamples, int const mode) { return false; }
- virtual void Stop() {}
- virtual void Save(CMachineDataOutput * const po) {}
- virtual void AttributesChanged() {}
- virtual void Command(int const i) {}
-
- virtual void SetNumTracks(int const n) {}
- virtual void MuteTrack(int const i) {}
- virtual bool IsTrackMuted(int const i) const { return false; }
-
- virtual void MidiNote(int const channel, int const value, int const velocity) {}
- virtual void Event(dword const data) {}
-
- virtual char const *DescribeValue(int const param, int const value) { return NULL; }
-
- virtual CEnvelopeInfo const **GetEnvelopeInfos() { return NULL; }
-
- virtual bool PlayWave(int const wave, int const note, float const volume) { return false; }
- virtual void StopWave() {}
- virtual int GetWaveEnvPlayPos(int const env) { return -1; }
-
-
-public:
- // initialize these members in the constructor
- void *GlobalVals;
- void *TrackVals;
- int *AttrVals;
-
- // these members are initialized by the
- // engine right after it calls CreateMachine()
- // don't touch them in the constructor
- CMasterInfo *pMasterInfo;
- CMICallbacks *pCB;
-
-};
-
-// buzz v1.2 extended machine interface
-class CMachineInterfaceEx
-{
-public:
- virtual char const *DescribeParam(int const param) { return NULL; } // use this to dynamically change name of parameter
- virtual bool SetInstrument(char const *name) { return false; }
-
- virtual void GetSubMenu(int const i, CMachineDataOutput *pout) {}
-
- virtual void AddInput(char const *macname, bool stereo) {} // called when input is added to a machine
- virtual void DeleteInput(char const *macename) {}
- virtual void RenameInput(char const *macoldname, char const *macnewname) {}
-
- virtual void Input(float *psamples, int numsamples, float amp) {} // if MIX_DOES_INPUT_MIXING
-
- virtual void MidiControlChange(int const ctrl, int const channel, int const value) {}
-
- virtual void SetInputChannels(char const *macname, bool stereo) {}
-
- virtual bool HandleInput(int index, int amp, int pan) { return false; }
-
- // make some space to vtable so this interface can be extended later
- virtual void Dummy1() {}
- virtual void Dummy2() {}
- virtual void Dummy3() {}
- virtual void Dummy4() {}
- virtual void Dummy5() {}
- virtual void Dummy6() {}
- virtual void Dummy7() {}
- virtual void Dummy8() {}
- virtual void Dummy9() {}
- virtual void Dummy10() {}
- virtual void Dummy11() {}
- virtual void Dummy12() {}
- virtual void Dummy13() {}
- virtual void Dummy14() {}
- virtual void Dummy15() {}
- virtual void Dummy16() {}
- virtual void Dummy17() {}
- virtual void Dummy18() {}
- virtual void Dummy19() {}
- virtual void Dummy20() {}
- virtual void Dummy21() {}
- virtual void Dummy22() {}
- virtual void Dummy23() {}
- virtual void Dummy24() {}
- virtual void Dummy25() {}
- virtual void Dummy26() {}
- virtual void Dummy27() {}
- virtual void Dummy28() {}
- virtual void Dummy29() {}
- virtual void Dummy30() {}
- virtual void Dummy31() {}
- virtual void Dummy32() {}
-
-};
-
-class CMILock
-{
-public:
- CMILock(CMICallbacks *p) { pCB = p; pCB->Lock(); }
- ~CMILock() { pCB->Unlock(); }
-private:
- CMICallbacks *pCB;
-};
-
-#define MACHINE_LOCK CMILock __machinelock(pCB);
-
-#ifdef STATIC_BUILD
-
- typedef CMachineInfo const *(__cdecl *GET_INFO)();
- typedef CMachineInterface *(__cdecl *CREATE_MACHINE)();
-
- extern void RegisterMachine(CMachineInfo const *pmi, GET_INFO gi, CREATE_MACHINE cm);
-
-#define DLL_EXPORTS(INIT_FUNC) \
- static CMachineInfo const * __cdecl GetInfo() { return &MacInfo; } \
- static CMachineInterface * __cdecl CreateMachine() { return new mi; } \
- void INIT_FUNC() { RegisterMachine(&MacInfo, GetInfo, CreateMachine); } \
-
-
-#define DLL_EXPORTS_NS(NS, INIT_FUNC) /* namespaced version */ \
- static CMachineInfo const * __cdecl GetInfo() { return &NS::MacInfo; } \
- static CMachineInterface * __cdecl CreateMachine() { return new NS::mi; } \
- void INIT_FUNC() { RegisterMachine(&NS::MacInfo, GetInfo, CreateMachine); } \
-
-
-
-#else
-
- #define DLL_EXPORTS extern "C" { \
- __declspec(dllexport) CMachineInfo const * __cdecl GetInfo() \
- { \
- return &MacInfo; \
- } \
- __declspec(dllexport) CMachineInterface * __cdecl CreateMachine() \
- { \
- return new mi; \
- } \
- }
-
-#endif
-
-#endif
\ No newline at end of file
Deleted: trunk/OpenMPT/include/audioeffectx.cpp
===================================================================
--- trunk/OpenMPT/include/audioeffectx.cpp 2007-11-17 20:42:39 UTC (rev 194)
+++ trunk/OpenMPT/include/audioeffectx.cpp 2008-01-12 16:49:50 UTC (rev 195)
@@ -1,793 +0,0 @@
-//-------------------------------------------------------------------------------------------------------
-// VST Plug-Ins SDK
-// Version 2.3 Extension
-// \xA9 2003 Steinberg Media Technologies, All Rights Reserved
-//
-// you should not have to edit this file
-// use override methods instead, as suggested in the class declaration (audioeffectx.h)
-//-------------------------------------------------------------------------------------------------------
-
-#ifndef __audioeffectx__
-#include "audioeffectx.h"
-#endif
-
-#ifndef __AEffEditor__
-#include "AEffEditor.hpp"
-#endif
-
-//---------------------------------------------------------------------------------------------
-// 'canDo' strings. note other 'canDos' can be evaluated by calling the according
-// function, for instance if getSampleRate returns 0, you
-// will certainly want to assume that this selector is not supported.
-//---------------------------------------------------------------------------------------------
-
-const char* hostCanDos [] =
-{
- "sendVstEvents",
- "sendVstMidiEvent",
- "sendVstTimeInfo",
- "receiveVstEvents",
- "receiveVstMidiEvent",
- "receiveVstTimeInfo",
-
- "reportConnectionChanges",
- "acceptIOChanges",
- "sizeWindow",
-
- "asyncProcessing",
- "offline",
- "supplyIdle",
- "supportShell", // 'shell' handling via uniqueID as suggested by Waves
- "openFileSelector"
-#if VST_2_2_EXTENSIONS
- ,
- "editFile",
- "closeFileSelector"
-#endif // VST_2_2_EXTENSIONS
-#if VST_2_3_EXTENSIONS
- ,
- "startStopProcess"
-#endif // VST_2_3_EXTENSIONS
-};
-
-const char* plugCanDos [] =
-{
- "sendVstEvents",
- "sendVstMidiEvent",
- "sendVstTimeInfo",
- "receiveVstEvents",
- "receiveVstMidiEvent",
- "receiveVstTimeInfo",
- "offline",
- "plugAsChannelInsert",
- "plugAsSend",
- "mixDryWet",
- "noRealTime",
- "multipass",
- "metapass",
- "1in1out",
- "1in2out",
- "2in1out",
- "2in2out",
- "2in4out",
- "4in2out",
- "4in4out",
- "4in8out", // 4:2 matrix to surround bus
- "8in4out", // surround bus to 4:2 matrix
- "8in8out"
-#if VST_2_1_EXTENSIONS
- ,
- "midiProgramNames",
- "conformsToWindowRules" // mac: doesn't mess with grafport. general: may want
- // to call sizeWindow (). if you want to use sizeWindow (),
- // you must return true (1) in canDo ("conformsToWindowRules")
-#endif // VST_2_1_EXTENSIONS
-
-#if VST_2_3_EXTENSIONS
- ,
- "bypass"
-#endif // VST_2_3_EXTENSIONS
-};
-
-//-------------------------------------------------------------------------------------------------------
-//-------------------------------------------------------------------------------------------------------
-// AudioEffectX extends AudioEffect with the new features. so you should derive
-// your plug from AudioEffectX
-//-------------------------------------------------------------------------------------------------------
-//-------------------------------------------------------------------------------------------------------
-
-//-------------------------------------------------------------------------------------------------------
-// VstEvents + VstTimeInfo
-//-------------------------------------------------------------------------------------------------------
-
-//-------------------------------------------------------------------------------------------------------
-AudioEffectX::AudioEffectX (audioMasterCallback audioMaster, long numPrograms, long numParams)
- : AudioEffect (audioMaster, numPrograms, numParams)
-{
-}
-
-//-------------------------------------------------------------------------------------------------------
-AudioEffectX::~AudioEffectX ()
-{
-}
-
-//-------------------------------------------------------------------------------------------------------
-long AudioEffectX::dispatcher (long opCode, long index, long value, void *ptr, float opt)
-{
- long v = 0;
- switch(opCode)
- {
- // VstEvents
- case effProcessEvents:
- v = processEvents ((VstEvents*)ptr);
- break;
-
- // parameters and programs
- case effCanBeAutomated:
- v = canParameterBeAutomated (index) ? 1 : 0;
- break;
- case effString2Parameter:
- v = string2parameter (index, (char*)ptr) ? 1 : 0;
- break;
-
- case effGetNumProgramCategories:
- v = getNumCategories ();
- break;
- case effGetProgramNameIndexed:
- v = getProgramNameIndexed (value, index, (char*)ptr) ? 1 : 0;
- break;
- case effCopyProgram:
- v = copyProgram (index) ? 1 : 0;
- break;
-
- // connections, configuration
- case effConnectInput:
- inputConnected (index, value ? true : false);
- v = 1;
- break;
- case effConnectOutput:
- outputConnected (index, value ? true : false);
- v = 1;
- break;
- case effGetInputProperties:
- v = getInputProperties (index, (VstPinProperties*)ptr) ? 1 : 0;
- break;
- case effGetOutputProperties:
- v = getOutputProperties (index, (VstPinProperties*)ptr) ? 1 : 0;
- break;
- case effGetPlugCategory:
- v = (long)getPlugCategory ();
- break;
-
- // realtime
- case effGetCurrentPosition:
- v = reportCurrentPosition ();
- break;
-
- case effGetDestinationBuffer:
- v = (long)reportDestinationBuffer ();
- break;
-
- // offline
- case effOfflineNotify:
- v = offlineNotify ((VstAudioFile*)ptr, value, index != 0);
- break;
- case effOfflinePrepare:
- v = offlinePrepare ((Vs...
[truncated message content] |