ElectroTechnique / TSynth-Teensy4.1

TSynth for Teensy 4.1
147 stars 41 forks source link

MultiTimbre Mode #113

Closed winder closed 2 years ago

winder commented 2 years ago

To make this code easier to review, I made a change on master to fix line endings. This work is still in progress.

This PR has 3 sets of changes: 1) Option to disable audio interface. A single commit adding support for compiling with USB_MIDI_SERIAL. 2) Splitting header files and cpp files so that they can be included multiple times. These are the remaining commits on oct 19. 3) Menu options to configure multiple timbres. I'm still working on these changes, but it is actually starting to work.

When TSynth starts, it's currently hard coded with 3 timbres ("Overhead", "Big Bass", "Bells"). A lookup by name is used to avoid any indexing problems.

The timbres are triggered as follows: MIDI Channel is assigned by the timbre index. If there are 2 timbres Channel 1 and Channel 2 select them. All other MIDI channels trigger all timbres.

Timbre Config: double-press "Settings"

Timbre Profiles: double-press "Recall"

ElectroTechnique commented 2 years ago

Very impressive! No problems with odd noise. The AudioMemory could come down a bit. Random crashes stopped after your refactoring, which supported my idea that it was running out of RAM previously.

Perhaps patches need a volume, which I avoided. I think people would expect it. Set a volume for each patch when part of a timbre?

ElectroTechnique commented 2 years ago

I think I need a user manual too, for the voice and MIDI channel set-up!

winder commented 2 years ago

Thanks, I still have more work to but was excited to share. I'm glad to hear that it worked for you.

Patch-level volume would be great, even without multi timbres. Especially in unison mode I've noticed the loudness sometimes varies quite a bit between patches. Since the number of voices with unison mode can vary a lot now this is probably even more important. Maybe there could be a gain setting or CC-only parameter.

Another setting I'm thinking of is a note-on delay.

Before these changes or writing a manual I'll need to finish the work started here. I still need to get MT settings stored on the SD card and build the UI for it. Also some of the settings I want to make don't fit in well with the existing hard-coded arrays, so I need to extend that a bit more. For example, the number of voices per timbre should help avoid over-allocating.