Forum Rule: Always post complete source code & details to reproduce any issue!
Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 26 to 50 of 53

Thread: Audio Lib Manicken design tool

  1. #26
    Senior Member manicksan's Avatar
    Join Date
    Jun 2020
    Location
    Sweden
    Posts
    606
    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

  2. #27
    Senior Member manicksan's Avatar
    Join Date
    Jun 2020
    Location
    Sweden
    Posts
    606
    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;

  3. #28
    Senior Member manicksan's Avatar
    Join Date
    Jun 2020
    Location
    Sweden
    Posts
    606
    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

  4. #29
    Member
    Join Date
    Dec 2021
    Location
    Luxembourg
    Posts
    28
    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.

  5. #30
    Member
    Join Date
    Dec 2021
    Location
    Luxembourg
    Posts
    28
    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.

  6. #31
    Senior Member manicksan's Avatar
    Join Date
    Jun 2020
    Location
    Sweden
    Posts
    606
    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.

  7. #32
    Member
    Join Date
    Dec 2021
    Location
    Luxembourg
    Posts
    28
    OK, no Audio objects in the main tab!
    I'll mention it in the doc.
    Maybe one could get a warning?

  8. #33
    Senior Member manicksan's Avatar
    Join Date
    Jun 2020
    Location
    Sweden
    Posts
    606
    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.

  9. #34
    Member
    Join Date
    Dec 2021
    Location
    Luxembourg
    Posts
    28
    Very good!
    My example using arrays to make a Fourier synthesis now works, it is in the doc.

  10. #35
    Senior Member manicksan's Avatar
    Join Date
    Jun 2020
    Location
    Sweden
    Posts
    606
    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 by manicksan; 01-04-2022 at 02:41 PM.

  11. #36
    Member
    Join Date
    Dec 2021
    Location
    Luxembourg
    Posts
    28
    Your polysynth example is really complex. To better understand it I tryed to melt it down to the essential:
    https://github.com/jean-claudeF/Teen...h_meltdown.pdf

  12. #37
    Senior Member manicksan's Avatar
    Join Date
    Jun 2020
    Location
    Sweden
    Posts
    606
    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.

  13. #38
    Member
    Join Date
    Dec 2021
    Location
    Luxembourg
    Posts
    28
    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.

  14. #39
    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.

  15. #40
    Senior Member manicksan's Avatar
    Join Date
    Jun 2020
    Location
    Sweden
    Posts
    606
    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.

  16. #41
    Member
    Join Date
    Dec 2021
    Location
    Luxembourg
    Posts
    28
    Just out of curiosity:
    Does the Tool also exist in a standalone (offline) version? (To use where there is no internet).

  17. #42
    Senior Member manicksan's Avatar
    Join Date
    Jun 2020
    Location
    Sweden
    Posts
    606
    Just download this
    https://github.com/manicken/manicken...ads/master.zip

    I did try to do a real standalone version a while ago
    Using NW.js
    https://forum.pjrc.com/threads/65740...l=1#post266540
    That don't need any specific browser to be installed.

  18. #43
    Senior Member manicksan's Avatar
    Join Date
    Jun 2020
    Location
    Sweden
    Posts
    606
    I have now created a simpler variant of my PolySynth
    check this post
    https://forum.pjrc.com/threads/69316...l=1#post298867

  19. #44
    Senior Member manicksan's Avatar
    Join Date
    Jun 2020
    Location
    Sweden
    Posts
    606
    and there is also this hello world design I created
    https://raw.githubusercontent.com/ma...dBlinkLed.json

  20. #45
    Member
    Join Date
    Dec 2021
    Location
    Luxembourg
    Posts
    28
    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!

  21. #46
    Senior Member manicksan's Avatar
    Join Date
    Jun 2020
    Location
    Sweden
    Posts
    606
    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.

  22. #47
    Senior Member manicksan's Avatar
    Join Date
    Jun 2020
    Location
    Sweden
    Posts
    606
    By reading synth wiki
    It's a polysynth with first note priority

    https://en.wikipedia.org/wiki/Polyph...in_instruments
    Last edited by manicksan; 01-27-2022 at 06:32 PM. Reason: Add link

  23. #48
    Member
    Join Date
    Dec 2021
    Location
    Luxembourg
    Posts
    28
    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.

  24. #49
    Member
    Join Date
    Dec 2021
    Location
    Luxembourg
    Posts
    28
    I have tried the SimplePolySynth on a Teensy4.1 and it works really fine! :-)
    The example is also very good for learning.
    Last edited by Jean-ClaudeF; 03-04-2022 at 08:21 AM.

  25. #50
    Senior Member manicksan's Avatar
    Join Date
    Jun 2020
    Location
    Sweden
    Posts
    606
    Quote Originally Posted by Jean-ClaudeF View Post
    I have tried the SimplePolySynth on a Teensy4.1 and it works really fine! :-)
    The example is also very good for learning.
    Good

    Quote Originally Posted by Jean-ClaudeF View Post
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •