Audio Lib Manicken design tool

Status
Not open for further replies.
To answer your first question #22
There is a setting @ Arduino-other-io check at export
That makes it possible to export a design without any IO objects
 
I like your documentation

It is not my strong side to write it myself.

The vars was until recently required to have fully declared variables:
vartype varname = 1;
now it's okay to just write
vartype varname;
 
There is one wrong statement in the manual
The Arduino IDE plugin do not use WebSerial
Instead it uses html post to retrieve all exports
from the tool, by running a limited "webserver"/webservice
 
There is a setting @ Arduino-other-io check at export
That makes it possible to export a design without any IO objects
The Arduino IDE plugin do not use WebSerial
Instead it uses html post to retrieve all exports
from the tool, by running a limited "webserver"/webservice
I'll integrate that into the document.

I'm glad you like it though there isn't much in it until now.
But maybe you can integrate some of its examples to your examples collection.
 
Sorry, but I have a new one:

Code:
{"version":1,"settings":{"arduino":{"useExportDialog":true,"IOcheckAtExport":false,"StandardIncludeHeader":"#include <Arduino.h>\n#include <Audio.h>\n\n","Board":{"Platform":"","Board":"","Options":""}},"BiDirDataWebSocketBridge":{},"workspaces":{},"sidebar":{},"palette":{},"editor":{},"devTest":{},"IndexedDBfiles":{"testFileNames":"testFile.txt"},"NodeDefGenerator":{},"NodeDefManager":{},"NodeHelpManager":{},"OSC":{}},"workspaces":[{"type":"tab","id":"Main","label":"helloworld_audio2c","inputs":0,"outputs":0,"export":true,"isMain":true,"mainNameType":"tabName","mainNameExt":".ino","generateCppDestructor":false,"extraClassDeclarations":"","settings":{},"nodes":[{"id":"helloworld_audio2b_MyTone1","type":"MyTone","name":"mytone","x":285,"y":50,"z":"Main","bgColor":"#ccffcc","wires":[["helloworld_audio2b_i2s1:0","helloworld_audio2b_i2s1:1"]]},{"id":"helloworld_audio2_code3","type":"Function","name":"declarations","comment":"\nconst int ledPin = 13;\nMyTone mytone;","x":340,"y":195,"z":"Main","bgColor":"#DDFFBB","wires":[]},{"id":"helloworld_audio2_code1","type":"Function","name":"setup()","comment":"void setup()\n{\n    pinMode(ledPin, OUTPUT);\n      \n    AudioMemory(10);\n    sgtl5000.enable();\n    sgtl5000.volume(0.3);\n    \n    //mytone.sine.frequency(440);\n    mytone.set_frequency(440);\n}\n","x":335,"y":245,"z":"Main","bgColor":"#DDFFBB","wires":[]},{"id":"helloworld_audio2_code2","type":"Function","name":"loop()","comment":"void loop()\n{\n    digitalWrite(ledPin, 1);\n    mytone.set_amplitude(0.9);\n    delay(250);\n    digitalWrite(ledPin, 0);\n    mytone.set_amplitude(0);\n    delay(1750);\n}","x":333.25,"y":290.25,"z":"Main","bgColor":"#DDFFBB","wires":[]},{"id":"helloworld_audio2b_i2s1","type":"AudioOutputI2S","name":"i2s","comment":"","x":420,"y":55,"z":"Main","bgColor":"#E6E0F8","wires":[]},{"id":"helloworld_audio2b_sgtl5000_1","type":"AudioControlSGTL5000","name":"sgtl5000","comment":"","x":420,"y":120,"z":"Main","bgColor":"#E6E0F8","wires":[]}]},{"type":"tab","id":"6f633541.989e4c","label":"MyTone","inputs":0,"outputs":0,"export":true,"isMain":false,"mainNameType":"tabName","mainNameExt":".ino","generateCppDestructor":false,"extraClassDeclarations":"","settings":{},"nodes":[{"id":"Tone_sine1","type":"AudioSynthWaveformSine","name":"sine","comment":"","x":150,"y":40,"z":"6f633541.989e4c","bgColor":"#E6E0F8","wires":[["MyTone_Out1:0"]]},{"id":"MyTone_code1","type":"Function","name":"set frequency and amplitude","comment":"void set_frequency(float f){\n    sine.frequency(f);\n}\n\nvoid set_amplitude(float a){\n    sine.amplitude(a);\n}","x":190,"y":115,"z":"6f633541.989e4c","bgColor":"#DDFFBB","wires":[]},{"id":"MyTone_Out1","type":"TabOutput","name":"Out","comment":"","x":311.25,"y":41.25,"z":"6f633541.989e4c","bgColor":"#cce6ff","wires":[]}]}],"nodeAddons":{}}

The audio connections are not exported.
 
That's because you have audio objects inside the "main" tab
, It's not supported and not really meant to be used like that, instead you need a additional class/tab, and then you can use (drop) that inside the main tab.
This is to keep all audio stuff outside the main.
 
Yes I could put the warning in the export dialog, and when using the "webserver API bridge" there will be a separate dialog to show it.
 
I will also have a additional setting that puts all files in the zip inside a folder with the same name as the "main".into and therefore make it as a complete sketch that can be loaded directly by the Arduino IDE.

In your doc you should mention that the webserver is a plugin to the Arduino IDE and maybe a link to that as well
https://github.com/manicken/arduinoAPIwebserver

About the IO check I think it could be a good idea if I'm actually checking for additional audio objects in the design and if none are found then no IO check would be performed, that would make it not necessary to uncheck the setting for designs not containing any audio stuff.
 
Last edited:
Think I need to add more comments in the graphic diagram and the code, will that help?

Also think that the IO check should just be a warning that still allows the design to be exported if the user wishes, then the Io check setting only needs to be changed in some rare situations.

I am now at Gran Canaria so no major changes will happen until I get home.
 
Well, I wish you a good vacation!
think that the IO check should just be a warning
that would be perfect.

Think I need to add more comments in the graphic diagram and the code,
Do you mean for the poysynth or for the Tool?
For the synth:
It is really complex, and I don't think comments will help so much.
What would help for a beginner would be a much simpler design with much less possibilities.
If I have the time I'll try to do something in this direction.

For the Tool: also here are so many things you can do...
What is fine: you have already added a lot of information.
At the beginning however you really don't know where to start. I hope my document can help a little here.
 
Just wanted to say I appreciate what Jean Claude is doing. The design tool is really excellent but it's also been kind of overwhelming to get started into, for me anyway.
 
ok now it only do a IO check when there is any audio objects
also now the IO check dialog is just a warning,
so that you can still export if you choose so.

(the IO check setting is still there for some very rare situations)

Also I have make it possible to export files into a subfolder in the zip file
There is a setting to enable that
@ settings-arduino-"Zip file subfolder"

the name is firstly taken from the main tab if set
then if there is no main tab it uses the name from:
settings-arduino-projectname

this functionality is useful when anyone want to export complete Arduino sketches.
 
Oh, that's a good idea!
I had a quick look at them just now.
If I understand well, your simple synth is monophonic? I suppose so.
When you have a moment some time wondering what to do, you could maybe include a simple polyphonic synth ?
--
For the moment i'm working on other projects, but I will surely come back to this!
 
But it can play multiple different notes at the same time, is not that what's called a polysynth?
That system even 'recycle' recently played notes so it you repress a key before the release has been completed, it just use that place instead of a new one. Also it have a fully working 'multiple note' sustain function.
 
I now finally found a moment to try the simple polysynth:
I have now created a simpler variant of my PolySynth
check this post
https://forum.pjrc.com/threads/69316...l=1#post298867
on a Teensy 3.1. It works, but sometimes there is a note that "hangs". I had the same phenomenon during my experiments with the monosynth.
Could it be that the Teensy3 is too slow?
I will take a closer look at your code as soon as I have time to do it.
 
I have tried the SimplePolySynth on a Teensy4.1 and it works really fine! :)
The example is also very good for learning.
 
Last edited:
I have tried the SimplePolySynth on a Teensy4.1 and it works really fine! :)
The example is also very good for learning.

Good :D

One suggestion: for Linux users like me it is annoying that the files in the exported ZIP contain a backslah. Wouldn't it be a good idea to omit this folder reference, as you can export all of the files to a folder with the name of the project. Anyway they are all in one folder, so it is not needed to include a subfolder information.

I have now fixed so that the folder function feature also works in linux by using / as the folder seperator (which also works in windows)


if you don't like that feature it can be turned off in settings-'teensy/c++'-export-'Zip file subfolder'
but it's intended to make exporting and creating a 'sketch' easier
 
Status
Not open for further replies.
Back
Top