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

Thread: Audio System Design Tool++ update

  1. #26
    Senior Member manicksan's Avatar
    Join Date
    Jun 2020
    Location
    Sweden
    Posts
    221
    Latest update includes:

    * Settings tab categories can have individual colors
    (hardcoded but easy to manipulate in code)
    Click image for larger version. 

Name:	ColoredSettings.png 
Views:	11 
Size:	20.8 KB 
ID:	23372

    * Project Tree View is now functional (except it don't update when adding/moving a node to a group)
    * double click now opens the node correctly without having to uncheck the "Auto switch to info-tab when selecting/deselecting node(s)." setting
    * have icons

    Click image for larger version. 

Name:	ProjectTreeViewer.jpg 
Views:	8 
Size:	43.0 KB 
ID:	23373
    project tree can for example be used to quickly edit nodes without having to switch tabs.

    * Palette categories can now have individual colors
    (defined in index.html)
    have also rainbow-color mode so that each cat. get it's own color automatically.

    * UI_TextBox item now functional

    here is a functional calculator made by
    using the new textbox and some scriptbuttons
    Name:  ProofOfConceptCalculator.png
Views: 153
Size:  4.3 KB

    * Workspace tabs have now a min width setting:
    settings-Workspace-Other-"Min Workspace Tab Size"

  2. #27
    Senior Member manicksan's Avatar
    Join Date
    Jun 2020
    Location
    Sweden
    Posts
    221
    Here is the calculator code if anyone is interested.
    It can be imported by Import-JSON
    (don't forget to uncheck the Replace Flow checkbox if you just want to import it into a existing design)

    Code:
    [{"id":"TextBox1","type":"UI_TextBox","name":"TextBox","comment":1928,"w":227,"h":42,"textSize":14,"x":180,"y":240,"z":"","bgColor":"#6BF8A2","wires":[]},{"id":"scriptBtn1","type":"UI_ScriptButton","name":"1","comment":"var txtBox=RED.nodes.namedNode(\"TextBox\");\ntxtBox.comment+=d.name;\ntxtBox.dirty=true;\nRED.view.redraw();","w":30,"h":37,"textSize":14,"nodes":[],"x":80,"y":290,"z":"","bgColor":"#DDFFBB","wires":[]},{"id":"scriptBtn2","type":"UI_ScriptButton","name":"2","comment":"var txtBox=RED.nodes.namedNode(\"TextBox\");\ntxtBox.comment+=d.name;\ntxtBox.dirty=true;\nRED.view.redraw();","w":30,"h":37,"textSize":14,"nodes":[],"x":120,"y":290,"z":"","bgColor":"#DDFFBB","wires":[]},{"id":"scriptBtn3","type":"UI_ScriptButton","name":"3","comment":"var txtBox=RED.nodes.namedNode(\"TextBox\");\ntxtBox.comment+=d.name;\ntxtBox.dirty=true;\nRED.view.redraw();","w":30,"h":37,"textSize":14,"nodes":[],"x":160,"y":290,"z":"","bgColor":"#DDFFBB","wires":[]},{"id":"scriptBtn4","type":"UI_ScriptButton","name":"4","comment":"var txtBox=RED.nodes.namedNode(\"TextBox\");\ntxtBox.comment+=d.name;\ntxtBox.dirty=true;\nRED.view.redraw();","w":30,"h":37,"textSize":14,"nodes":[],"x":80,"y":340,"z":"","bgColor":"#DDFFBB","wires":[]},{"id":"scriptBtn5","type":"UI_ScriptButton","name":"5","comment":"var txtBox=RED.nodes.namedNode(\"TextBox\");\ntxtBox.comment+=d.name;\ntxtBox.dirty=true;\nRED.view.redraw();","w":30,"h":37,"textSize":14,"nodes":[],"x":120,"y":340,"z":"","bgColor":"#DDFFBB","wires":[]},{"id":"scriptBtn6","type":"UI_ScriptButton","name":"6","comment":"var txtBox=RED.nodes.namedNode(\"TextBox\");\ntxtBox.comment+=d.name;\ntxtBox.dirty=true;\nRED.view.redraw();","w":30,"h":37,"textSize":14,"nodes":[],"x":160,"y":340,"z":"","bgColor":"#DDFFBB","wires":[]},{"id":"scriptBtn7","type":"UI_ScriptButton","name":"7","comment":"var txtBox=RED.nodes.namedNode(\"TextBox\");\ntxtBox.comment+=d.name;\ntxtBox.dirty=true;\nRED.view.redraw();","w":30,"h":37,"textSize":14,"nodes":[],"x":80,"y":390,"z":"","bgColor":"#DDFFBB","wires":[]},{"id":"scriptBtn8","type":"UI_ScriptButton","name":"8","comment":"var txtBox=RED.nodes.namedNode(\"TextBox\");\ntxtBox.comment+=d.name;\ntxtBox.dirty=true;\nRED.view.redraw();","w":30,"h":37,"textSize":14,"nodes":[],"x":120,"y":390,"z":"","bgColor":"#DDFFBB","wires":[]},{"id":"scriptBtn9","type":"UI_ScriptButton","name":"9","comment":"var txtBox=RED.nodes.namedNode(\"TextBox\");\ntxtBox.comment+=d.name;\ntxtBox.dirty=true;\nRED.view.redraw();","w":30,"h":37,"textSize":14,"nodes":[],"x":160,"y":390,"z":"","bgColor":"#DDFFBB","wires":[]},{"id":"scriptBtn10","type":"UI_ScriptButton","name":"0","comment":"var txtBox=RED.nodes.namedNode(\"TextBox\");\ntxtBox.comment+=d.name;\ntxtBox.dirty=true;\nRED.view.redraw();","w":72,"h":37,"textSize":14,"nodes":[],"x":100,"y":440,"z":"","bgColor":"#DDFFBB","wires":[]},{"id":"scriptBtn11","type":"UI_ScriptButton","name":".","comment":"var txtBox=RED.nodes.namedNode(\"TextBox\");\ntxtBox.comment+=d.name;\ntxtBox.dirty=true;\nRED.view.redraw();","w":30,"h":37,"textSize":14,"nodes":[],"x":160,"y":440,"z":"","bgColor":"#DDFFBB","wires":[]},{"id":"scriptBtn12","type":"UI_ScriptButton","name":"+","comment":"var txtBox=RED.nodes.namedNode(\"TextBox\");\ntxtBox.comment+=d.name;\ntxtBox.dirty=true;\nRED.view.redraw();","w":30,"h":37,"textSize":14,"nodes":[],"x":200,"y":290,"z":"","bgColor":"#DDFFBB","wires":[]},{"id":"scriptBtn13","type":"UI_ScriptButton","name":"-","comment":"var txtBox= RED.nodes.namedNode(\"TextBox\");\ntxtBox.comment += d.name;\ntxtBox.dirty=true;\nRED.view.redraw();","w":30,"h":37,"textSize":14,"nodes":[],"x":200,"y":340,"z":"","bgColor":"#DDFFBB","wires":[]},{"id":"scriptBtn14","type":"UI_ScriptButton","name":"/","comment":"var txtBox= RED.nodes.namedNode(\"TextBox\");\ntxtBox.comment += d.name;\ntxtBox.dirty=true;\nRED.view.redraw();","w":30,"h":37,"textSize":14,"nodes":[],"x":200,"y":390,"z":"","bgColor":"#DDFFBB","wires":[]},{"id":"scriptBtn15","type":"UI_ScriptButton","name":"*","comment":"var txtBox= RED.nodes.namedNode(\"TextBox\");\ntxtBox.comment += d.name;\ntxtBox.dirty=true;\nRED.view.redraw();","w":30,"h":37,"textSize":14,"nodes":[],"x":200,"y":440,"z":"","bgColor":"#DDFFBB","wires":[]},{"id":"scriptBtn16","type":"UI_ScriptButton","name":"=","comment":"var txtBox= RED.nodes.namedNode(\"TextBox\");\ntxtBox.comment=eval(txtBox.comment);\ntxtBox.dirty=true;\nRED.view.redraw();","w":63,"h":178,"textSize":14,"nodes":[],"x":260,"y":365,"z":"","bgColor":"#DDFFBB","wires":[]}
    ]

  3. #28
    Senior Member manicksan's Avatar
    Join Date
    Jun 2020
    Location
    Sweden
    Posts
    221
    Latest update includes:

    * hardcoded default settings that is used when restoring the settings.

    * the default settings is used to get and store only the changed settings in the JSON
    (to minimize the size)

    * each setting category have it's own restore button
    Name:  SettingsCatMenu.png
Views: 128
Size:  7.0 KB

    * Each tab can now have individual Workspace settings (only the settings in Workspace/View category is used)
    that mean each tab can have it's own background color, size, grid settings, and so on
    it's good when having some tabs that are only GUI then they can have the GUI-run always active for example.

    note. when changing a setting it's automatically saved in the current tab, and then saved to disk

    * "Min Workspace Tab Size" have it's own category Workspaces (because of the above)
    (workspaces.js the workspace tab functionality will be moved here later, just like in latest Node-Red)

    * fixed settings issues that affected:
    drawing of the vertical grid
    useCenterBasedPositions which is a boolean, I used parseInt(value) on that

  4. #29
    Oh dear. I just went to your design tool to make some edits to my project and started as I always do by trying to upload the .json from the last .zip file I downloaded and the design tools just sits infinitely showing "...." as you can see here:

    Click image for larger version. 

Name:	designtool.png 
Views:	7 
Size:	17.6 KB 
ID:	23427

    This is pretty fatal if you ever have a situation where an "old version" JSON file cannot be reloaded.

    There is a copy of the JSON that won't load here: https://raw.githubusercontent.com/wr.../GUI_TOOL.json

    Hopefully you can use that to work out why it sticks in an infinite load loop?

  5. #30
    Senior Member manicksan's Avatar
    Join Date
    Jun 2020
    Location
    Sweden
    Posts
    221
    it's now fixed

  6. #31
    Senior Member manicksan's Avatar
    Join Date
    Jun 2020
    Location
    Sweden
    Posts
    221
    It was the setting called useCenterBasedPositions
    Because of the bug in #28 caused it to be stored as null
    An then when the setting is compared against the def value I use to string() and that cannot take null as input. It fixed so that when a project is loaded with that setting set to null its using the default value that is true.

    I allways use my template project to check that everything is ok, but this time it slipped through.

  7. #32
    Great stuff. Thanks for the swift response! :-)

  8. #33
    Senior Member manicksan's Avatar
    Join Date
    Jun 2020
    Location
    Sweden
    Posts
    221
    I think your design was using non center based locations so either you have to reallign all nodes, or uncheck useCenterBasedPositions on all tabs.

    I think I need to add a setting menu item to copy current tab settings to all other.

  9. #34
    I have to admit that I have no idea what "useCenterBasedPositions" actually means. I guess I probably need to find out!...

    EDIT: OK so I have read this...
    Click image for larger version. 

Name:	center.jpg 
Views:	10 
Size:	26.7 KB 
ID:	23442
    and I still have no idea what it means. I guess I shall remain blissfully ignorant :-)

  10. #35
    Senior Member manicksan's Avatar
    Join Date
    Jun 2020
    Location
    Sweden
    Posts
    221
    first a note. the location system used only matter if snap to grid is used.
    And the choice is mostly esthetic.

    the popup only describes the problem when switching between modes.

    Maybe I should include these two images in that popup
    and also describe what non center based location means.

    Center Based Location:
    Click image for larger version. 

Name:	CenterBasedLocations.png 
Views:	3 
Size:	29.8 KB 
ID:	23443

    Top Left Based Location:
    Click image for larger version. 

Name:	TopLeftBasedLocation.png 
Views:	2 
Size:	32.3 KB 
ID:	23444





    Center based location is the best choice when drawing the audio flow as every wire connected is then aligned to the grid
    and a wire can then be completely straight when going from a output to an input.


    Top Left location is to make it easier to Left align nodes that have no I/O
    for example code nodes.

    Here is some code nodes with different lengths, with "Center Based Locations"
    as you can see it's hard to to proper left alignment
    Click image for larger version. 

Name:	CenterAllignedNodes.png 
Views:	3 
Size:	26.6 KB 
ID:	23445


    Here is the same nodes but with "Top Left Locations"
    Click image for larger version. 

Name:	LeftAllignedNodes.png 
Views:	3 
Size:	26.2 KB 
ID:	23446


    edit. when switching between modes the node location is not changed

  11. #36
    Senior Member manicksan's Avatar
    Join Date
    Jun 2020
    Location
    Sweden
    Posts
    221
    update:
    implemented indexedDB projects

    so that now every time the project name is changed
    there is a new "file" with that name saved to the indexedDB project "dir"

    which can then be opened in the new projects menu:
    Click image for larger version. 

Name:	ProjectsMenu.png 
Views:	6 
Size:	29.7 KB 
ID:	23463

  12. #37
    Senior Member manicksan's Avatar
    Join Date
    Jun 2020
    Location
    Sweden
    Posts
    221
    @wrightflyer
    I had no idea that you could have a src sub folder in the sketch,
    I have tried with using a "instruments" sub folder but without sucess, that's why I invented the DontRemoveCodeFiles node type.
    This means DontRemoveCodeFiles is not needed anymore in my project, as platform io already support sub folders.

    Here is a thread that verify the src sub folder.
    https://forum.arduino.cc/index.php?topic=587970.0

    I plan to use the indexedDB to store additional files like the instrument files, so that when exporting to zip or via the IDE extensions the project is more "complete" from the start.

    Recently I also got the idea that the board settings could also be done in the Tool and also be included in the export as either "preferences.txt" (in combination with my prefsaver extension)
    Or as a make file for the hardcore coders.

    And maybe in the future there could be a small daemon program that links the Tool direct with the compiler and teensy loader.

  13. #38
    Yup, when I first wrote my code I just had everything in the INO directory but when it came to adding 128 GM instruments (128 .cpp and 128 .h) things got a bit busy so I looked for a way to divide and modularize things. At first I thought I could just put directories alongside the directory with the INO but then I read an explanation that said that when Arduino builds it basically copies all sources to a temp directory first then builds there. It used to be limited to "all files in the INO directory" but then people pushed for an expansion of this so they agree to recursively scan a "src" sub-dir and copy all that stuff over too. So this allowed me to break things up.

  14. #39
    Something has gone AWOL! To clear all tabs in order to start a new project it used to be possible to go to Examples and load "Empty Workflow" which simply removed everything but that option seems to have disappeared. So how are you supposed to clear everything to start from scratch?

    EDIT: I found a workaround. Simply use "Import JSON" and have the "replace" box ticked but then press OK without having entered any text into to JSON text edit. That seems to quickly wipe everything.

    (To make sure my polyphony note routing works I simply wanted to create a quick, multi-voice wavetable based piano project so I could implement the same ideas in my main synth).

  15. #40
    Senior Member manicksan's Avatar
    Join Date
    Jun 2020
    Location
    Sweden
    Posts
    221
    I did some restructuring of the example menu
    so that it's much easier to add new examples
    (by having the menu structure json in index.html)
    and to make the menu easier to structure.
    For example it now have dividers.

    I have now updated the Tool so that
    the "Empty New Project" is back in the menu (at the top).

    I have been working with a new feature that makes
    it possible to select Platform, Board and options directly in the tool
    and then they will be added to the exported zip
    both for arduino ide pref.file and platformio.ini

    and because there is a example of a make file
    in the teensyduino folder I will have that exported as well.

    I have implemented it by importing the different boards.txt files
    they can be imported in the tool by a button in Settings-Arduino-Export-"Board settings"-"Import Boards File"
    It works this way:
    1. the platform is selected
    2. click Import Boards File - browse and select the boards.txt file for the current platform
    3. then the file is imported and saved to a IndexedDB table called otherFiles as a record "file" with the name [platform].boards.txt
    4. this "file" is then reloaded and parsed to a json tree

    this means there is needed one "file" for each platform in this datatable.
    There will be support for boards.local.txt (to load user custom menu choices)
    after the export part is completed.

    It's all done except the export part which I'm working with
    right "now".

    There will also be a function to remove saved projects
    but that will require a popup window of some sorts
    and it's required that it looks nice and works correctly,
    so it will take some time, maybe.

    Also a function to export all saved projects and files to a zip will be added.
    and functionality to regularly "save" (download) the projects and files to a zip.
    (if for example the browser have some hickup and deletes everything)

  16. #41
    Senior Member manicksan's Avatar
    Join Date
    Jun 2020
    Location
    Sweden
    Posts
    221
    I have now implemented the export to arduino IDE pref.file

    But when doing it for the platformio is a little harder as that cannot use the boards.txt to straight generate the platformio.ini
    I can do the -D [usbtype] just straight of
    and -D TEENSY_OPT_[optimizationlevel] this needs some "lockup-table"

    but f_cpu is not documented
    how can I implement this flag?

    ?keyboard layout? what is this used for?

  17. #42
    Senior Member manicksan's Avatar
    Join Date
    Jun 2020
    Location
    Sweden
    Posts
    221
    can the following be used in platformio.ini???
    -O2
    -O1
    -O3
    -Og
    -Os --specs=nano.specs


    I can now generate:
    (platformio.ini)
    Code:
    [env:teensy]
    platform = teensy
    framework = arduino
    board = teensy40
    build_flags =  -D USB_MIDI_AUDIO_SERIAL -D TEENSY_OPT_FASTER
    (arduino ide preferences.txt) by using my prefsaver extension
    Code:
    board=teensy40
    target_package=teensy
    target_platform=avr
    custom_usb=teensy40_serialmidiaudio
    custom_speed=teensy40_600
    custom_opt=teensy40_o2std
    custom_keys=teensy40_en-us

Posting Permissions

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