manicksan
Well-known member
Hi,
* You define the array like this:
* static class member's value?
* I have now included a option that is found in the rename class(tab/workspace) dialog.
(it's opened by double clicking the tab)
I have also created a field to add extra class declarations when having inheritance.
There is also a new object called destructor code @ special category
this makes it possible to add additional destructor code
* When a project is given a specific name @ settings - arduino - project name
(and then applied/saved)
all unique saved projects are available at the main menu (top right) - projects
note. all projects are stored in the browser indexedDB which will be deleted when clearing the browser cache
When exporting as a zip this zip can then be imported again (it will look for the GUI_TOOL.json inside that zip, and use that)
* I have created a example that should mostly reassemble your example
"On the use of a base class, consider the following:"
} is at new line to make coping easier don't forget to include it
* You define the array like this:
* static class member's value?
* I have now included a option that is found in the rename class(tab/workspace) dialog.
(it's opened by double clicking the tab)
I have also created a field to add extra class declarations when having inheritance.
There is also a new object called destructor code @ special category
this makes it possible to add additional destructor code
* When a project is given a specific name @ settings - arduino - project name
(and then applied/saved)
all unique saved projects are available at the main menu (top right) - projects
note. all projects are stored in the browser indexedDB which will be deleted when clearing the browser cache
When exporting as a zip this zip can then be imported again (it will look for the GUI_TOOL.json inside that zip, and use that)
* I have created a example that should mostly reassemble your example
"On the use of a base class, consider the following:"
Code:
{"version":1,"settings":{"arduino":{"IOcheckAtExport":false,"Board":{"Platform":"","Board":"","Options":""}},"BiDirDataWebSocketBridge":{},"workspaces":{},"sidebar":{},"palette":{},"editor":{},"devTest":{},"IndexedDBfiles":{"testFileNames":"testFile.txt"},"NodeDefGenerator":{},"NodeDefManager":{},"NodeHelpManager":{}},"workspaces":[{"type":"tab","id":"Main","label":"SynthVoice","inputs":0,"outputs":0,"export":true,"isMain":false,"mainNameType":"tabName","mainNameExt":".ino","generateCppDestructor":false,"extraClassDeclarations":"","settings":{},"nodes":[{"id":"SynthVoice_code1","type":"Function","name":"code","comment":"private:\r\n AudioConnection outputCord;\r\n virtual AudioStream& getOutputStream(void) = 0;\r\npublic:\r\n virtual ~SynthVoice(){};\r\n virtual void noteOn(float freq, float vel, int chan=-1) = 0;\r\n virtual void noteOn(int MIDInote, int MIDIvel, int chan=-1) = 0;\r\n virtual void noteOff(void) = 0;\r\n virtual bool isPlaying(void) = 0;\r\n int connect(AudioStream& str) { return connect(str,0);}","x":140,"y":65,"z":"Main","bgColor":"#DDFFBB","wires":[]}]},{"type":"tab","id":"f061342f.9b8268","label":"WaveAndEnvVoice","inputs":0,"outputs":0,"export":true,"isMain":false,"mainNameType":"tabName","mainNameExt":".ino","generateCppDestructor":true,"extraClassDeclarations":"final : public SynthVoice","settings":{},"nodes":[{"id":"WaveAndEnvVoice_includeDef1","type":"IncludeDef","name":"\"SynthVoice.h\"","comment":"","x":240,"y":70,"z":"f061342f.9b8268","bgColor":"#DDFFBB","wires":[]},{"id":"WaveAndEnvVoice_waveform1","type":"AudioSynthWaveform","name":"wave","comment":"","x":245,"y":130,"z":"f061342f.9b8268","bgColor":"#E6E0F8","wires":[["WaveAndEnvVoice_exp env1:0"]]},{"id":"WaveAndEnvVoice_code1","type":"Function","name":"code1","comment":"private:\n bool isNew;\n \n static short wave_type[4];\n AudioStream& getOutputStream(void) {AudioStream& result {amp}; return result;};\n\npublic: \nvoid noteOn(int MIDInote, int MIDIvel, int chan=-1){}; // don't support this\nvoid noteOn(float freq, float vel, int chan=-1)\n{\n // ... do some stuff\n}\nvoid noteOff(void){env.noteOff();};\nbool isPlaying(void) {return env.isActive();};\n ","x":255,"y":210,"z":"f061342f.9b8268","bgColor":"#DDFFBB","wires":[]},{"id":"WaveAndEnvVoice_constructor code1","type":"ConstructorCode","name":"constructor code","comment":"env.attack(129.2);\n// .. etc.\n\nwave_type[] = {\n WAVEFORM_PULSE,\n WAVEFORM_SQUARE,\n WAVEFORM_SAWTOOTH,\n WAVEFORM_TRIANGLE\n};","x":226,"y":274,"z":"f061342f.9b8268","bgColor":"#DDFFBB","wires":[]},{"id":"WaveAndEnvVoice_exp env1","type":"AudioEffectExpEnvelope","name":"env","comment":"","x":345,"y":130,"z":"f061342f.9b8268","bgColor":"#E6E0F8","wires":[["WaveAndEnvVoice_amp1:0"]]},{"id":"WaveAndEnvVoice_amp1","type":"AudioAmplifier","name":"amp","comment":"","x":450,"y":130,"z":"f061342f.9b8268","bgColor":"#E6E0F8","wires":[["WaveAndEnvVoice_Out1:0"]]},{"id":"WaveAndEnvVoice_Out1","type":"TabOutput","name":"Out","comment":"","x":575,"y":130,"z":"f061342f.9b8268","bgColor":"#cce6ff","wires":[]}]},{"type":"tab","id":"a6317b06.79ff28","label":"SomeOtherTopologyVoice","inputs":0,"outputs":0,"export":true,"isMain":false,"mainNameType":"tabName","mainNameExt":".ino","generateCppDestructor":true,"extraClassDeclarations":"final : public SynthVoice","settings":{},"nodes":[{"id":"SomeOtherTopologyVoice_includeDef1","type":"IncludeDef","name":"\"SynthVoice.h\"","comment":"","x":210,"y":75,"z":"a6317b06.79ff28","bgColor":"#DDFFBB","wires":[]}]},{"type":"tab","id":"32dd68c9.e73c58","label":"Main","inputs":0,"outputs":0,"export":true,"isMain":true,"mainNameType":"projectName","mainNameExt":".ino","generateCppDestructor":false,"extraClassDeclarations":"","settings":{},"nodes":[{"id":"Main_includeDef1","type":"IncludeDef","name":"\"SynthVoice.h\"","comment":"","x":190,"y":125,"z":"32dd68c9.e73c58","bgColor":"#DDFFBB","wires":[]},{"id":"Main_includeDef2","type":"IncludeDef","name":"\"WaveAndEnvVoice.h\"","comment":"","x":180,"y":165,"z":"32dd68c9.e73c58","bgColor":"#DDFFBB","wires":[]},{"id":"Main_includeDef3","type":"IncludeDef","name":"\"SomeOtherTopologyVoice.h\"","comment":"","x":170,"y":203,"z":"32dd68c9.e73c58","bgColor":"#DDFFBB","wires":[]},{"id":"Main_code1","type":"Function","name":"code2","comment":"\r\n\r\n#define POLYPHONY 12\r\nSynthVoice* voices[POLYPHONY] = {NULL};\r\n\r\nmakerFunction(void)\r\n{\r\n voices[0] = new SomeOtherTopologyVoice;\r\n voices[1] = new WaveAndEnvVoice;\r\n}\r\n\r\n\r\nvoid breakerFunction(int v)\r\n{\r\n if (NULL != voices[v])\r\n {\r\n delete voices[v];\r\n voices[v] = NULL;\r\n }\r\n}\r\n\r\nvoid setup() {\r\n \r\n}\r\n\r\nvoid loop() {\r\n \r\n}","x":160,"y":275,"z":"32dd68c9.e73c58","bgColor":"#DDFFBB","wires":[]}]},{"type":"tab","id":"f8aa3d4.01479c","label":"ArrayOfVoicesExample","inputs":0,"outputs":0,"export":true,"isMain":false,"mainNameType":"main","mainNameExt":".ino","generateCppDestructor":true,"extraClassDeclarations":"","settings":{},"nodes":[{"id":"SynthExample_WaveAndEnvVoice1","type":"WaveAndEnvVoice","name":"waev[8]","x":261,"y":180,"z":"f8aa3d4.01479c","bgColor":"#CCFFCC","wires":[["SynthExample_mixer1:0"]]},{"id":"SynthExample_mixer1","type":"AudioMixer","name":"mixer","inputs":"1","comment":"","x":430,"y":180,"z":"f8aa3d4.01479c","bgColor":"#E6E0F8","wires":[[]]}]}],"nodeAddons":{"expEnvelope":{"isAddon":true,"label":"exp envelope","description":"","credits":"","homepage":"","url":"https://api.github.com/repos/[user]/[repository]/contents/[subpath if any]","types":{"AudioEffectExpEnvelope":{"defaults":{"name":{"value":"WaveAndEnvVoice_exp env1"},"comment":{},"color":{"value":"#E6E0F8"}},"shortName":"exp env","inputs":1,"outputs":1,"inputTypes":{"0":"i16"},"outputTypes":{"0":"i16"},"category":"effect","help":"","color":"#E6E0F8","icon":"arrow-in.png"}}}}
}
} is at new line to make coping easier don't forget to include it