zynaddsubfx

ZynAddSubFX open source synthesizer
Log | Files | Refs | Submodules | LICENSE

Presets.h (2115B)


      1 /*
      2   ZynAddSubFX - a software synthesizer
      3 
      4   Presets.h - Presets and Clipboard management
      5   Copyright (C) 2002-2005 Nasca Octavian Paul
      6   Author: Nasca Octavian Paul
      7 
      8   This program is free software; you can redistribute it and/or
      9   modify it under the terms of the GNU General Public License
     10   as published by the Free Software Foundation; either version 2
     11   of the License, or (at your option) any later version.
     12 */
     13 
     14 #ifndef PRESETS_H
     15 #define PRESETS_H
     16 
     17 #include "../globals.h"
     18 
     19 namespace zyn {
     20 
     21 class PresetsStore;
     22 
     23 /**Presets and Clipboard management*/
     24 class Presets
     25 {
     26     friend class PresetsArray;
     27     public:
     28         Presets();
     29         virtual ~Presets();
     30 
     31         virtual void copy(PresetsStore &ps, const char *name); /**<if name==NULL, the clipboard is used*/
     32         //virtual void paste(PresetsStore &ps, int npreset); //npreset==0 for clipboard
     33         virtual bool checkclipboardtype(PresetsStore &ps);
     34         void deletepreset(PresetsStore &ps, int npreset);
     35 
     36         char type[MAX_PRESETTYPE_SIZE];
     37         //void setelement(int n);
     38     protected:
     39         void setpresettype(const char *type);
     40     private:
     41         virtual void add2XML(XMLwrapper& xml)    = 0;
     42         //virtual void getfromXML(XMLwrapper *xml) = 0;
     43         //virtual void defaults() = 0;
     44 };
     45 
     46 /*
     47     Location where a "consumer" in zyn is located, where
     48     consumers are envelopes, LFOs and filters.
     49     Note that the AD synth global consumers correspond to those of PAD synth
     50  */
     51 //currently no enum, since this won't work with rPreset
     52 //enum consumer_location_t
     53 //{
     54 
     55 #define ad_global_amp 0
     56 #define ad_global_freq 1
     57 #define ad_global_filter 2
     58 
     59 #define ad_voice_amp 3
     60 #define ad_voice_freq 4
     61 #define ad_voice_filter 5
     62 
     63 #define ad_voice_fm_amp 6
     64 #define ad_voice_fm_freq 7
     65 
     66 #define sub_freq 8
     67 #define sub_filter 9
     68 #define sub_bandwidth 10
     69 
     70 #define in_effect 11
     71 #define loc_unspecified 12
     72 
     73 #define dynfilter_0 13
     74 #define dynfilter_1 14
     75 #define dynfilter_2 15
     76 #define dynfilter_3 16
     77 #define dynfilter_4 17
     78 
     79 //};
     80 using consumer_location_t = int;
     81 
     82 enum class consumer_location_type_t
     83 {
     84     freq, amp, filter, unspecified
     85 };
     86 
     87 }
     88 
     89 #endif