Audio GUI for T4

Status
Not open for further replies.

Frank B

Senior Member
I have started to customize the GUI for the Teensy4, hoping that Paul will adopt the changes.

https://frankboesing.github.io/T4_Audio_Design_Tool/

2020-03-22 13_36_53-Start.png

I've introduced several different colours.
All objects with the same color use the same device, means: you cannot use two objects with the same color.

I haven't done much with the info panel yet - it's still a big TODO.

Please test it all, and post problems here - or much better: - do a pullrequest. Thanks a lot.
Repo: https://github.com/FrankBoesing/T4_Audio_Design_Tool
 
Last edited:
Frank,

Since you've already got your code on GitHub, you can serve it live straight from GitHub using the "Pages" feature of GitHub.

For example, I've got a floating-point fork of the Audio library and I also extended the Audio GUI to go along with the floating-point fork. I serve the GUI via GitHub Pages.

My GUI is live at this address: https://tympan.github.io/Tympan_Audio_Design_Tool/

And, if you want to see how I set it up on GitHub: https://github.com/Tympan/Tympan_Audio_Design_Tool

If you want to serve it live this way, and if you choose to follow my model, the steps are something like:

1) Move the Teensy Audio GUI code to its own repo, not mixed in with the rest of the Audio library
2) In GitHub, go to your new repo, go under "settings", and activate GitHub Pages

I think that's all that I had to do to make it work!

Chip
 
Having played with this, it seems like a neat thing would be to have only one GUI, with check boxes for including specific libraries, like Chip's floating point, and radio buttons for the processor, T3, T4, etc. The use of colors could show the add-ons, like float. Then the GUI would be checking more inconsistencies, like integer data going to float processes, as well as providing the objects for the code.

But thanks to both Frank B and Chip for these GUI's. Bob
 
I notice that "Import" does not bring in the Patch Cords, and not always the objects. This is true for both of the external GUI's. "Export" seems fine.
 
The general interest in a updated GUI for the two Teensy-4 models is obviously zero. I will end the topic here and archive the project on Github.
 
Frank, did you save a copy of this work?

Now that 1.52 is released, I've been working to update the design tool. Here's the current work in progress.

https://www.pjrc.com/teensy/gui2/

If you still have a copy of this, I'd really like to double check that I didn't forget or overlook anything. If your copy documented stuff like pinouts, might be nice to compare.
 
Hi Paul, yes.
But it is not of much use.

2020-05-24 23_12_04-Start.png

I've added some minor changes:
1) All in- and outputs which use the same device - for example all which use I2S1 - have the same color. This means you can't use more than one.
2020-05-24 23_02_43-Cortana.png
2) In addition they have this Information in the Info-Panel and Mouse-Over (text in red):
2020-05-24 23_01_32-Cortana.png2020-05-24 23_02_17-Start.png



Next, I wanted to add some Javascript to print an alert or prvent adding an object in this case. But I got distracted..
 

Attachments

  • indexT4.zip
    35.1 KB · Views: 79
Hi all, sorry to interject, but I was wondering if there are any plans to allow users of the Audio library to use 3.3V as the reference voltage when using AudioInputAnalog objects (ADC input). It seems relevant to ask due to the topic of this thread.
 
@Paul: It would involve creating a pin - or device array, setting the element to "true" if in use and before inserting the object it would be neccessary to check that flag.
From the description quite easy :)
But a quite a bit of work, though.

Re: Pins:
I don't remember.... :) I don't think that I added much of documentation - I was more interested in other things (see above) and planned to add documentation later.
 
@audeophilic - yes you asked this before.
You simply can't change the voltage reference on the T4/T41, if I remember correctly.
 
I don't mean to question your thought process, but I don't believe that is true. I'm not entirely sure how the settings are configured for the ADC in input_adc.h/cpp, but using analogRead I am able to read the full spectrum. According to the specs of the T4 chip, the ADC accepts input of up to 3.3v, and in fact this is the default.

Again, I apologize, as I don't mean to derail the post, but I'm sure there has got to be a way to do it within the library. Consider it a feature request, or even something I can help to develop. :) I would love to discuss it on my thread though.
 
t would involve creating a pin - or device array, setting the element to "true" if in use and before inserting the object it would be neccessary to check that flag.
From the description quite easy :)
But a quite a bit of work, though.

Yes, a lot of work indeed. I will look at trying this in a couple days.
 
@Frank - Now I see what you were trying to do with the colors and device info. Detecting compatibility between the many inputs and outputs is something I've wanted to do for a very long time. I've actually thought quite a lot about how I want to do this. It's more complex than just which device is used, but I have some ideas about how to do this well.... The big problem (for me) has been the Javascript coding. I'm slow with Javascript. :(

I will try to add I/O compatibility metadata soon. When we have the necessary metadata, maybe this will feel easier?

On the GUI, the way I want to see this work is warning icon to automatically appears on all objects on the canvas which are detected to be incompatible with any other. Visually, something like this:

incompatible.png

Clicking the warning icons would bring up a dialog or panel with an explanation of why these can't work together.
 
I've added the compatibility metadata with these commits.

https://github.com/PaulStoffregen/Audio/commit/deddf6ad40a795f67c3128bab52da8577558d456
https://github.com/PaulStoffregen/Audio/commit/714b5ec9d3d5bf5fb7d9fd6e5656bc22d7c39518

The concept is each input & output object requires access to multiple resources. Access can be exclusive or shareable with others. When shared, all objects must use the same setting.

Here are the resources for regular I2S input and output, which obviously work together.

Code:
{"type":"AudioInputI2S",         "resource":"I2S Device",    "shareable":true,  "setting":"I2S Master"},
{"type":"AudioInputI2S",         "resource":"Sample Rate",   "shareable":true,  "setting":"Teensy Control"},
{"type":"AudioInputI2S",         "resource":"IN1 Pin",       "shareable":false},

{"type":"AudioOutputI2S",        "resource":"I2S Device",    "shareable":true,  "setting":"I2S Master"},
{"type":"AudioOutputI2S",        "resource":"Sample Rate",   "shareable":true,  "setting":"Teensy Control"},
{"type":"AudioOutputI2S",        "resource":"OUT1A Pin",     "shareable":false},

They both use the "I2S Device" resources with the same "I2S Master" setting. Likewise, they both use "Sample Rate" with the same setting. Each exclusively uses different pins, so no conflicts.

However, if another I2S output is dragged onto the canvas, because the OUT1A pin is used exclusively, a duplicate copy will conflict. Both the new output and old output would get the yellow triangle warning. But the I2S input would not get a triangle, because there is no conflict.

If a PT2811 output is then added, it would conflict in multiple ways.

Code:
{"type":"AudioOutputPT8211",     "resource":"I2S Device",    "shareable":true,  "setting":"PT8211 Protocol"},
{"type":"AudioOutputPT8211",     "resource":"Sample Rate",   "shareable":true,  "setting":"Teensy Control"},
{"type":"AudioOutputPT8211",     "resource":"OUT1A Pin",     "shareable":false},

It also uses the OUT1A pin exclusively, so it conflicts with the other outputs. But it also shares "I2S Device" with setting "PT8211 Protocol". So it will cause a conflict with all the outputs and the input using "I2S Device" with setting "I2S Master". All of them will get triangles cause the I2S device is used differently.

While this is much more complex than just specifying which device is used, I believe it is the simplest way that can represent the many ways different combinations of inputs and outputs can and can't work together.

So far I've done no Javascript, other than creating this JSON metadata. Odds are slim I'll have time to work on JS code to actually do anything. I'm also not great with Javascript, so could really use help.

@Frank - any chance you might try to create JS code which uses this metadata? My hope is to have those little yellow triangles appear when conflicts exist, and eventually to have those icons clickable for a human readable description of the conflict. That description might require adding friendly names for the resource names? But just getting the icons to appear & disappear would be a huge improvement.
 
@Frank - any chance you might try to create JS code which uses this metadata?

Paul, I'm gonna go have a look.
But it's gonna take time because I'm busy with moving arrangements and I have to renovate.


I don't know what happens where in this huge code, and I have to get used to it. That's why I had switched to the colors.
But I'll give it a try.


*And I don't like Javascript...
 
So,

adding pt8211, i2s1, spdif1, adat1, mqs1

will conflict here:

Code:
Conflict: spdif1 setting['SPDIF Protocol'] and i2s1 setting['I2S Master'] 
Conflict: shareable 'OUT1A Pin'  spdif1 and i2s1 
Conflict: pt8211_1 setting['PT8211 Protocol'] and i2s1 setting['I2S Master']
Conflict: pt8211_1 setting['PT8211 Protocol'] and spdif1 setting['SPDIF Protocol'] 
Conflict: shareable 'OUT1A Pin'  pt8211_1 and i2s1 
Conflict: shareable 'OUT1A Pin'  pt8211_1 and spdif1 
Conflict: adat1 setting['ADAT Protocol'] and i2s1 setting['I2S Master']
Conflict: adat1 setting['ADAT Protocol'] and spdif1 setting['SPDIF Protocol'] 
Conflict: adat1 setting['ADAT Protocol'] and pt8211_1 setting['PT8211 Protocol'] 
Conflict: shareable 'OUT1A Pin'  adat1 and i2s1 
Conflict: shareable 'OUT1A Pin'  adat1 and spdif1 
Conflict: shareable 'OUT1A Pin'  adat1 and pt8211_1

Is this correct, or is something missing?
If yes, that code ist working - it just writes to the javscript console now.
Adding the Icons is a bit more work for me, since I have to figure out how that works..

Not today. too late.
 
Last edited:
You may want to add a resource "Teensy Model" - some things do not work on T3 and vice versa.
But this needs a global setting - a radio or checkbox or ..

Edit:
Code attached. Open the Javascript-Console to see the output.

Have to sleep now... tztztz
 
Last edited:
Status
Not open for further replies.
Back
Top