Forum Rule: Always post complete source code & details to reproduce any issue!
Page 1 of 2 1 2 LastLast
Results 1 to 25 of 32

Thread: Node Red / Audio System Design Tool Modification

  1. #1
    Junior Member
    Join Date
    Feb 2017
    Posts
    4

    Node Red / Audio System Design Tool Modification

    Hello,


    Firstly, a personal hats-off to Paul for your audio design tool - if only all coding could be made so straightforward!

    Inspired by your work, I am trying to modify your code to produce .xml data as an auto-generated output, rather than arduino code.

    So my question is, where/how is the code auto-generated?

    I have discovered that node red spits out a json string that i could convert to .xml...
    however, i prefer the .html node definition you use in your index file (as opposed to the dual .js & .html of node).


    Any help/pointers would be much appreciated.

    Thanks,

    Tom

  2. #2
    Senior Member
    Join Date
    Oct 2015
    Location
    Vermont, USA
    Posts
    189
    The code is generated in red/main.js: https://github.com/PaulStoffregen/Au...ui/red/main.js

    Scroll down to the function "save(force)". You can see that it writes the "#include" then it steps through each of the nodes then it steps through each of the AudioConnections.

    I, too, have built on Paul's work to create my own custom version of the GUI. I still use it to produce Arduino code, but I chose to have it also produce the setup() and loop() routines (including the required AudioMemory calls) so that it creates all the code that you need to get a system running.

    Chip

  3. #3
    Junior Member
    Join Date
    Feb 2017
    Posts
    4
    Brilliant thank you Chip!

    You save me a load of searching.

    Your application sounds cool.. Im trying to get code generated based on drop-down selections.


    Will keep posted.


    Tom

  4. #4
    Senior Member
    Join Date
    Oct 2015
    Location
    Vermont, USA
    Posts
    189
    Definitely would love to see what kind of functionality you add!

    BTW, if you use GitHub, you can put your version of your GUI up there in such a way that your GUI is served live to the world at no cost and with no other effort.

    "GitHub Pages" is a functionality that GitHub makes available for everyone's repo. It's a really, really convenient of serving webages, like the Teensy Audio GUI. All you have to do is go to the setup page for your repo, make a couple of mouse clicks to enable the functionality for that repo, and you're done!. Your pages, your docs, your Teensy GUI, your whatever are live!

    For example, even though my GUI is still a work in progress, it's active and can be used here: https://chipaudette.github.io/OpenAudio_ArduinoLibrary/

    Chip
    Last edited by chipaudette; 02-20-2017 at 04:37 PM.

  5. #5
    Junior Member
    Join Date
    Feb 2017
    Posts
    4
    Wow thanks for showing me Github pages, very powerful tool I am learning slowly!

    I like the hover-image popups you have going. I will let you know here once i have a repo up and running.


    Tom

  6. #6
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,553
    Really, the Node Red folks deserve most of the credit. They made an awesome GUI. I mostly just hacked it up quite a lot. Luckily, Manfred came along about a year ago and fixed most of the bugs I added. I'm not actually all that great with javascript, and I'm pretty much preoccupied with USB host right now, and even when I get back to the audio stuff I'll be mostly working on the DSP side... so if you guys have GUI additions, please let me know? Might not manage to merge them quickly, but please don't mistake my overwhelmed schedule for lack of interest. I could really use help on the javascript side!

  7. #7
    Junior Member
    Join Date
    Feb 2017
    Posts
    4
    Sorry for not getting back to you sooner!

    The UI side of this project is on the back burner atm, got some python scripting to do before I can use node. Thanks for referencing the Node team - I wouldn't have heard about them without PJRC.

    Regards

  8. #8
    Member Etienne's Avatar
    Join Date
    Mar 2016
    Location
    Ardeche, France
    Posts
    42
    I love this interface too, this is really powerful.
    I've a lot of code spread in different projects, and very often for a new project, I'm wasting time regrouping all these piece of code.
    So I'm trying to adapt this red-node interface, to do a more generic input/process/output system, but not dedicated to audio (actually the goal is to design HID devices in a few clicks).
    I've just started this project, but you can have a look here : http://www.aiwave.fr/gui/ (there's a lot of things, like documentations, that are meaningless for the moment, as I didn't rewrite them yet).
    Now what I'm working on the ability to configure nodes in the interface.
    Once this works, there will be 2 things to put in place :
    - add the configuration parameters to each node declaration (for example for the digital input, the Pin number, the debounce time, pull option, etc...) -> don't know yet how to retrieve parameters in save(force) in main.js, but this should be easy.
    - modify the AudioConnection and Audio Stream system to be able to transmit different types of data (bits, "analog" values, data buffers). This would be without using buffers (streams).

    The second part will probably be the most difficult, but it's worth the effort I think.
    Last edited by Etienne; 05-05-2017 at 09:42 PM.

  9. #9
    Member Etienne's Avatar
    Join Date
    Mar 2016
    Location
    Ardeche, France
    Posts
    42
    Edit : ok I've managed to add node parameters, they are saved and used when generating code, as class parameters.
    I've also managed to change dynamically the number of inputs (see the HID Send object), but I didn't manage to have a redraw when leaving the edit window.
    I wanted to see input/output names when hovering the connections, but didn't manage to do it (it's still beta on the current node-red version 0.17).
    Maybe I should move this post as it not related to audio anymore (but maybe I will put back the audio features later, but it will need some work).
    Still here : http://www.aiwave.fr/gui

  10. #10
    Quote Originally Posted by Etienne View Post
    Hi, ehm.. ERR_CONNECTION_TIMED_OUT

    Daniele.

  11. #11
    Member Etienne's Avatar
    Join Date
    Mar 2016
    Location
    Ardeche, France
    Posts
    42
    sorry, server was down !
    Fixed now

  12. #12
    Junior Member
    Join Date
    Apr 2017
    Posts
    7

    Question code available ?

    Quote Originally Posted by Etienne View Post
    ...
    Maybe I should move this post as it not related to audio anymore (but maybe I will put back the audio features later, but it will need some work).
    Still here : http://www.aiwave.fr/gui
    very interesting, i always wondered why the teensy audio gui has no objects such as buttons aka DigitalIn or 'leds' aka DigitalOut.
    if exporting from your site, it generates code containing objects like 'nDigitalInput'.

    what library or code do these objects refer to ?
    any git available ?

    grtx

  13. #13
    Member Etienne's Avatar
    Join Date
    Mar 2016
    Location
    Ardeche, France
    Posts
    42
    These objects refer to a library I'm currently writing. It's in late alpha stage I would say (not all base features are present), I will release a beta on Git as soon as I think it is usable by other than me
    I've updated the gui to let you see the latest progress on this side.

  14. #14
    Member Etienne's Avatar
    Join Date
    Mar 2016
    Location
    Ardeche, France
    Posts
    42
    Hi everyone,

    I've finally uploaded a first very-early-beta of the arduino library that comes with the gui tool.
    It's here : https://github.com/EtienneGameSeed/node-blue
    The online version of the tool has moved here : http://www.nodeblue.org/gui

    I hope you'll like it. There's still a lot of things to do (including a proper documentation and tutorials), but it's working...

    I have a very strange error that has appeared recently, only with the Teensy LC. I have no idea of how to deal with it :
    "instruction not supported in Thumb16 mode -- subs r0,#1"

    I'll create a new topic dedicated to this soon.

  15. #15
    Senior Member
    Join Date
    Jul 2014
    Posts
    2,330
    Could not get gui to work
    nodeblue.org not reachable
    gui in file index.html is no valid html only text file

  16. #16
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    4,098
    Think the nodeblue link is broken. Keep getting can't reach the page. Tried it in MS Edge and firefox

  17. #17
    Member Etienne's Avatar
    Join Date
    Mar 2016
    Location
    Ardeche, France
    Posts
    42
    Ok sorry, I've tried from another IP, and it doesn't work. It seems I have a server configuration problem, as I'm only able to access it from my own IP address.
    I'm currently looking in my server configuration to find the problem, I'll keep you updated
    Last edited by Etienne; 07-31-2017 at 08:49 PM.

  18. #18
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    4,098
    Just tried it again and same thing. One, I just click on the link you just posted and second I did a copy and paste. The exact error is it can't reach www.nodeblue.org.

    Edit. Looks like our posts crossed.

  19. #19
    Member Etienne's Avatar
    Join Date
    Mar 2016
    Location
    Ardeche, France
    Posts
    42
    It should work now, please try again

  20. #20
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    4,098
    Just tried again with the same results, i.e., can't reach this page

  21. #21
    Member Etienne's Avatar
    Join Date
    Mar 2016
    Location
    Ardeche, France
    Posts
    42
    hmm, as it was a DNS problem, I guess it just needs time to propagate. It may need 24 to 48 hours at most. Sorry for this...
    In the mean time, if you want to try out, you can download the gui folder of the lib and open the "index.html".

  22. #22
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    4,098
    Etienne. The link is working now.

  23. #23
    Member Etienne's Avatar
    Join Date
    Mar 2016
    Location
    Ardeche, France
    Posts
    42
    Thanks for the info, but it may not work anymore (or not everywhere). I'm not a web expert, I'll try to get help from a friend tomorrow to get it right.
    I've put a copy in the original location : http://www.aiwave.fr/gui
    I'll keep it there until it's fixed.

    Another thing : I've updated the main.js script on git, as it was not generating the setup() and loop() code. Also be careful with the examples in the gui folder, some may not work (I have changed many things recently and I need to do a check on every one of them. Don't hesitate to report any bug).

    Any help with the error I've reported when trying to compile for Teensy LC would be greatly appreciated ("instruction not supported in Thumb16 mode -- subs r0,#1")
    Last edited by Etienne; 08-01-2017 at 12:44 AM.

  24. #24
    Very interesting work.

    With teensy 3.6 working fine but with arduino UNO not working some compiler errors (port defines ... etc.).

    Many thanks

  25. #25
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,679
    Quote Originally Posted by Etienne View Post
    Any help with the error I've reported when trying to compile for Teensy LC would be greatly appreciated ("instruction not supported in Thumb16 mode -- subs r0,#1")
    In which file/function ?

    You may want to take a look here ? https://forum.pjrc.com/threads/27624...ll=1#post66086
    Last edited by Frank B; 08-05-2017 at 11:53 AM.

Posting Permissions

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