Browse Source

Split tags into tags.{hpp,cpp}

tags/v0.6.0
Andrew Belt 7 years ago
parent
commit
382babbb28
6 changed files with 139 additions and 97 deletions
  1. +1
    -1
      dep/glfw
  2. +0
    -1
      include/app.hpp
  3. +1
    -49
      include/plugin.hpp
  4. +72
    -0
      include/tags.hpp
  5. +1
    -46
      src/plugin.cpp
  6. +64
    -0
      src/tags.cpp

+ 1
- 1
dep/glfw

@@ -1 +1 @@
Subproject commit 30489c5aa1392f698e904c6aced1d7a486634c40
Subproject commit 682f1cf203707f21c2eed4fa3f89c23c52accc49

+ 0
- 1
include/app.hpp View File

@@ -23,7 +23,6 @@ struct SVGPanel;
// A 1U module should be 15x380. Thus the width of a module should be a factor of 15.
#define RACK_GRID_WIDTH 15
#define RACK_GRID_HEIGHT 380

static const Vec RACK_GRID_SIZE = Vec(15, 380);




+ 1
- 49
include/plugin.hpp View File

@@ -1,59 +1,12 @@
#pragma once
#include <string>
#include <list>
#include "tags.hpp"


namespace rack {


enum ModelTag {
AMPLIFIER_TAG,
ATTENUATOR_TAG,
BLANK_TAG,
CLOCK_TAG,
CONTROLLER_TAG,
DELAY_TAG,
DIGITAL_TAG,
DISTORTION_TAG,
DRUM_TAG,
DUAL_TAG,
DYNAMICS_TAG,
EFFECT_TAG,
ENVELOPE_FOLLOWER_TAG,
ENVELOPE_GENERATOR_TAG,
EQUALIZER_TAG,
EXTERNAL_TAG,
FILTER_TAG,
FUNCTION_GENERATOR_TAG,
GRANULAR_TAG,
LFO_TAG,
LOGIC_TAG,
LOW_PASS_GATE_TAG,
MIDI_TAG,
MIXER_TAG,
MULTIPLE_TAG,
NOISE_TAG,
OSCILLATOR_TAG,
PANNING_TAG,
QUAD_TAG,
QUANTIZER_TAG,
RANDOM_TAG,
REVERB_TAG,
RING_MODULATOR_TAG,
SAMPLE_AND_HOLD_TAG,
SAMPLER_TAG,
SEQUENCER_TAG,
SLEW_LIMITER_TAG,
SWITCH_TAG,
SYNTH_VOICE_TAG,
TUNER_TAG,
UTILITY_TAG,
VISUAL_TAG,
WAVESHAPER_TAG,
NUM_TAGS
};


struct ModuleWidget;
struct Model;

@@ -118,7 +71,6 @@ std::string pluginGetLoginStatus();

extern std::list<Plugin*> gPlugins;
extern std::string gToken;
extern std::string gTagNames[NUM_TAGS];


} // namespace rack


+ 72
- 0
include/tags.hpp View File

@@ -0,0 +1,72 @@
#pragma once
#include <string>


namespace rack {


/** Describes the type(s) of each module
To see comments, turn word wrap on. I'm using inline comments so I can automatically sort the list when more tags are added.
*/
enum ModelTag {
AMPLIFIER_TAG,
ATTENUATOR_TAG,
BLANK_TAG,
CHORUS_TAG,
CLOCK_TAG,
COMPRESSOR_TAG,
CONTROLLER_TAG, // Use only if the artist "performs" with this module. Knobs are not sufficient. Examples: on-screen keyboard, XY pad.
DELAY_TAG,
DIGITAL_TAG,
DISTORTION_TAG,
DRUM_TAG,
DUAL_TAG, // The core functionality times two. If multiple channels are a requirement for the module to exist (ring modulator, mixer, etc), it is not a Dual module.
DYNAMICS_TAG,
EFFECT_TAG,
ENVELOPE_FOLLOWER_TAG,
ENVELOPE_GENERATOR_TAG,
EQUALIZER_TAG,
EXTERNAL_TAG,
FILTER_TAG,
FLANGER_TAG,
FUNCTION_GENERATOR_TAG,
GRANULAR_TAG,
LFO_TAG,
LIMITER_TAG,
LOGIC_TAG,
LOW_PASS_GATE_TAG,
MIDI_TAG,
MIXER_TAG,
MULTIPLE_TAG,
NOISE_TAG,
OSCILLATOR_TAG,
PANNING_TAG,
PHASER_TAG,
PHYSICAL_MODELING_TAG,
QUAD_TAG, // The core functionality times four. If multiple channels are a requirement for the module to exist (ring modulator, mixer, etc), it is not a Quad module.
QUANTIZER_TAG,
RANDOM_TAG,
RECORDING_TAG,
REVERB_TAG,
RING_MODULATOR_TAG,
SAMPLE_AND_HOLD_TAG,
SAMPLER_TAG,
SEQUENCER_TAG,
SLEW_LIMITER_TAG,
SWITCH_TAG,
SYNTH_VOICE_TAG, // A synth voice must have an envelope built-in.
TUNER_TAG,
UTILITY_TAG, // Serves only extremely basic functions, like inverting, max, min, multiplying by 2, etc.
VISUAL_TAG,
VOCODER_TAG,
WAVESHAPER_TAG,
NUM_TAGS
};


void tagsInit();

extern std::string gTagNames[NUM_TAGS];


} // namespace rack

+ 1
- 46
src/plugin.cpp View File

@@ -31,52 +31,6 @@ namespace rack {
std::list<Plugin*> gPlugins;
std::string gToken;

std::string gTagNames[NUM_TAGS] = {
"Amplifier/VCA",
"Attenuator",
"Blank",
"Clock",
"Controller",
"Delay",
"Digital",
"Distortion",
"Drum",
"Dual/Stereo",
"Dynamics",
"Effect",
"Envelope Follower",
"Envelope Generator",
"Equalizer",
"External",
"Filter/VCF",
"Function Generator",
"Granular",
"LFO",
"Logic",
"Low Pass Gate",
"MIDI",
"Mixer",
"Multiple",
"Noise",
"Oscillator/VCO",
"Panning",
"Quad",
"Quantizer",
"Random",
"Reverb",
"Ring Modulator",
"Sample and Hold",
"Sampler",
"Sequencer",
"Slew Limiter",
"Switch",
"Synth Voice",
"Tuner",
"Utility",
"Visual",
"Waveshaper",
};


static bool isDownloading = false;
static float downloadProgress = 0.0;
@@ -293,6 +247,7 @@ static void refreshPurchase(json_t *pluginJ) {
////////////////////

void pluginInit() {
tagsInit();
// Load core
// This function is defined in core.cpp
Plugin *coreManufacturer = new Plugin();


+ 64
- 0
src/tags.cpp View File

@@ -0,0 +1,64 @@
#include "tags.hpp"


namespace rack {


std::string gTagNames[NUM_TAGS];


void tagsInit() {
gTagNames[AMPLIFIER_TAG] = "Amplifier/VCA";
gTagNames[ATTENUATOR_TAG] = "Attenuator";
gTagNames[BLANK_TAG] = "Blank";
gTagNames[CHORUS_TAG] = "Chorus";
gTagNames[CLOCK_TAG] = "Clock";
gTagNames[COMPRESSOR_TAG] = "Compressor";
gTagNames[CONTROLLER_TAG] = "Controller";
gTagNames[DELAY_TAG] = "Delay";
gTagNames[DIGITAL_TAG] = "Digital";
gTagNames[DISTORTION_TAG] = "Distortion";
gTagNames[DRUM_TAG] = "Drum";
gTagNames[DUAL_TAG] = "Dual/Stereo";
gTagNames[DYNAMICS_TAG] = "Dynamics";
gTagNames[EFFECT_TAG] = "Effect";
gTagNames[ENVELOPE_FOLLOWER_TAG] = "Envelope Follower";
gTagNames[ENVELOPE_GENERATOR_TAG] = "Envelope Generator";
gTagNames[EQUALIZER_TAG] = "Equalizer";
gTagNames[EXTERNAL_TAG] = "External";
gTagNames[FILTER_TAG] = "Filter/VCF";
gTagNames[FLANGER_TAG] = "Flanger";
gTagNames[FUNCTION_GENERATOR_TAG] = "Function Generator";
gTagNames[GRANULAR_TAG] = "Granular";
gTagNames[LFO_TAG] = "LFO";
gTagNames[LIMITER_TAG] = "Limiter";
gTagNames[LOGIC_TAG] = "Logic";
gTagNames[LOW_PASS_GATE_TAG] = "Low Pass Gate";
gTagNames[MIDI_TAG] = "MIDI";
gTagNames[MIXER_TAG] = "Mixer";
gTagNames[MULTIPLE_TAG] = "Multiple";
gTagNames[NOISE_TAG] = "Noise";
gTagNames[OSCILLATOR_TAG] = "Oscillator/VCO";
gTagNames[PANNING_TAG] = "Panning";
gTagNames[PHASER_TAG] = "Phaser";
gTagNames[QUAD_TAG] = "Quad";
gTagNames[QUANTIZER_TAG] = "Quantizer";
gTagNames[RANDOM_TAG] = "Random";
gTagNames[RECORDING_TAG] = "Recording";
gTagNames[REVERB_TAG] = "Reverb";
gTagNames[RING_MODULATOR_TAG] = "Ring Modulator";
gTagNames[SAMPLE_AND_HOLD_TAG] = "Sample and Hold";
gTagNames[SAMPLER_TAG] = "Sampler";
gTagNames[SEQUENCER_TAG] = "Sequencer";
gTagNames[SLEW_LIMITER_TAG] = "Slew Limiter";
gTagNames[SWITCH_TAG] = "Switch";
gTagNames[SYNTH_VOICE_TAG] = "Synth Voice";
gTagNames[TUNER_TAG] = "Tuner";
gTagNames[UTILITY_TAG] = "Utility";
gTagNames[VISUAL_TAG] = "Visual";
gTagNames[VOCODER_TAG] = "Vocoder";
gTagNames[WAVESHAPER_TAG] = "Waveshaper";
}


} // namespace rack

Loading…
Cancel
Save