biermanncarl / cx16-concerto

Concerto is a music making software for the Commander X16.
BSD 2-Clause "Simplified" License
5 stars 0 forks source link

Thoughts on exposing out PWM and other timbre internals to voices? #3

Open m00dawg opened 1 year ago

m00dawg commented 1 year ago

I'm starting to look at I'm going to implement pattern/channel affects and realized fairly quickly that at present there's no easy way for me to mess with PWM as an example outside of a timbre patch.

I noticed I can mess with volume, vibrato, and pitch slides and was going to start work on implementing those as pattern effects. For chiptuney stuff, it's common to mess with PWM in pattern data too which would basically overwrite the default for the timbre that is being used.

I expect it would eat up memory but being able to adjust most of the timbre values but within a channel (at least for the PSGs since I know the FM could have issues there due to it only being able to handle a certain amount of changes within a given time frame), could be highly useful.

One example might be something like changing PWM syncopatced to a rhythm. Something like:

00 C-4 .. V10
01 --- .. ...
02 D#4 .. V20
03 --- .. ...
04 F-4 .. V80
05 --- .. ...
06 G-4 .. V10
07 --- .. ...

Since Timbres support multiple VERA voices, being able to either access each voice's PWM value or have a global that shifts the values one way or another could be useful. In either case, based on how things are implemented, this would require tracking PWM (and/or PWM per voice) state for each Concerto channel which is why I thought it might end up eating up lots of RAM.

Curious as to your thoughts!

Tim

biermanncarl commented 1 year ago

Hi Tim!

Thanks for your suggestion! Yes, I have also noticed that Concerto's modulation capabilities are rather scarce when it comes to PWM. So far I have been quite conservative with adding modulation capabilities, as they not only eat up RAM, but also CPU. If we add a PWM effect, there will be one additional check for every active PSG voice in every tick (127 ticks per second). But I also agree that PWM modulation capability is something very desirable, so I might consider adding it at some point.