Skip to content

Update ml_synth_multi_saw_example.ino#4

Open
Aggebitter wants to merge 1 commit intomarcel-licence:mainfrom
Aggebitter:patch-1
Open

Update ml_synth_multi_saw_example.ino#4
Aggebitter wants to merge 1 commit intomarcel-licence:mainfrom
Aggebitter:patch-1

Conversation

@Aggebitter
Copy link
Copy Markdown
Contributor

Works with ML_SynthTools pull #27 with updated "board_ttgo_t9_rgb_led_wm8978.h"

Just some basic to get audio out and RGB-LEDS working following your coding

Works with ML_SynthTools pull #27 with updated "board_ttgo_t9_rgb_led_wm8978.h"

Just some basic to get audio out and RGB-LEDS working following your coding
/* PSRAM will be fully used by the looper */
Serial.printf("Total PSRAM: %d\n", ESP.getPsramSize());
Serial.printf("Free PSRAM: %d\n", ESP.getFreePsram());

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I think it would be better to prepare a general function like Board_Setup or similar. This will be put in the library to avoid changing all existing projects

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've checked my files. I would prefer to Move the WM8978_setup routine into the audio setup and maybe put a #ifdef WM8778_ENABLED around it.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've prepared an update to make the WM8978 module available for global usage. Please pull the update. Do you think it would be a good solution to put the definition into wm8978.h ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I prefer a clean setup as in a well defined board.h for each board. The pins are fixed on those boards and a lot of them share the same hardware and functions but with different pin definitions.

A "common_board.h" could be the place holder for people to define pins for there own build and by doing it that way your synth tool box would be a lot easier to adapt on different hardware DIY or bought.

At the moment pin definitions is a bit "all over the place" no hard feelings :)
I had a lot of issues on just figuring out what pin definition was the "true" one as the Arduino IDE sucks on those basic parts. Cloning and using PlatformIO made it possible to trace back where the changes needed to be done

Thanks for a greate lib. Just ordered my first eurorack case and MIDI interfaces.
Your lib will soon have a sweet home at my desk

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, I did some changed over the time to find a clean concept to find out where to place the information. My goal is to separate project and general information. A project shouldn't care about different boards etc. It can be configured to enable/disable features.

Having a DIY setup pin definition can be part of the project. If there is an official board / PCB used with a fixed PIN setup, the definition goes into the board header file.

I am happy that it finds a new home =)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a idea. When I confirmed my setup on the TTGO T9 board I just made "my_custom_bord.ini" where I put everything, used your defines and added mine.
I could make a framework for ESP32 following your layout on bords.

With well documented comments I think it would help people. And if there is a new board in town, save it with the board name and then just merge it in to the lib
//Agge

#ifdef BLINK_LED_PIN
Blink_Process();
#endif
#ifdef BOARD_TTGO_T9_RGB_LED_WM8978
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about to combine all in one Blink_Process function with a switch to select between LED via GPIO or WS2812b or similar?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was exactly what I was thinking. You have that YouTube clip where you are using a led strip. Well let's integrate WS2812b that as a feature.

There must be a define for what LED on the string that should blink.
But with ledstrips it does not matter in cpu cycles if you blink or if you do something else with all leds. all leds are addressed even if one is updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants