TEE1010 - Part 8 Proper Song Mode - A FCB1010 rebuild with a Teensy 4.1

In this video I show Song mode where I can link patterns together. The songs can be saved to an SD card which is inserted into the teensy 4.1 SD slot. I have also made big changes to the software as I felt it was getting unwieldy in terms of structure. The processes are still the same, just the skeleton is changed. Also, the interface is now mostly decoupled from the playing of the music so that sounds will continue as changes are being made.

A couple of smaller things:

  • You can alter the drums patterns dynamically while songs are playing with an expression pedal so it sounds more natural.
  • I implemented a menu system to change pedal mode.

Because there is so much change in the software structure I have only outlined the major changes, otherwise it would take forever to explain it all. Happy to answer questions or get advice…

https://www.youtube.com/watch?v=WZB7t0RAzAs

Code

3 Likes

Hi John,

I agree, refactoring code can certainly make debugging down the line much easier too without affecting the functionality (assuming it’s done correctly :sweat_smile:)

Personally, when I’m looking at someone else’s code or working on group projects, I run my scripts through an auto-formatting tool.

Most of them are free and in certain IDE and have settings you can edit for indentation (personally I’m a fan of VS Code which is also free and cross platform, you can jump into the extensions menu on the left and search for CLang from there which usually works quite nicely for ino files)

2 Likes

Thanks Bryce. I have Visual Studio and have used it for JavaScript but I prefer the Arduino IDE for Teensy. The Arduino IDE has auto-formatting of sorts with “Command-T” which works pretty well. It doesn’t have code completion but I don’t miss that much.

3 Likes