Node Red / Audio System Design Tool Modification

Status
Not open for further replies.

td0034

New member
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
 
The code is generated in red/main.js: https://github.com/PaulStoffregen/Audio/blob/master/gui/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
 
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
 
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:
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
 
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!
 
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
 
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:
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
 
code available ?

...
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
 
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.
 
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.
 
Could not get gui to work
nodeblue.org not reachable
gui in file index.html is no valid html only text file
 
Think the nodeblue link is broken. Keep getting can't reach the page. Tried it in MS Edge and firefox
 
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:
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.
 
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".
 
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:
Very interesting work.

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

Many thanks
 
Status
Not open for further replies.
Back
Top