Instead of generating sounds, this new prototype use samples which allows easier experimentations (no need to code)
SYNTH.INI script allows to change parameters
01.2016
I have made some experiments with PCM sound.
My initial idea was to try to find some unexplored ways to produce sounds on STe.
In particular I have tried to look if there was something to do with blitter which is not really used for this purpose currently.
What I found useful using the blitter for sound:
it copies things fast...
for PCM stereo mode, it can interlace samples easily (store your samples interlaced and use endmasks on the blitter for the secondly copied voice)
it can manage a looping copy of a sample for free
it can transpose your sample by octave (using different increment X source)
it can manage volume levels dynamically for free using bit shift. But in this case you will not be able to interlace your samples storage anymore =>
you will need to use the higher byte to store 0 or -1 in order to simulate a signed right shift (instead of blitter unsigned shift).
it can add special effects for free using half tone mask (for example "metalize" a sound by masking least significant bits of samples values)
On the other side, I did not find a way to use it to :
add (mix) channels
transpose sound freely (only octave transpose)
These facts led me to make a sound routine :
with only 2 digital voices (ideally it should be completed with the YM chip voices)
with 12 semitones pretransposed versions of the sample
which means it is better to use short looping samples to keep a low memory footprint
short samples with well controlled looping periods fits particularly well with sounds generated from synthesis algorithms
The routine is divided into two main parts :
first part is sound precomputation
sound precomputation from synthesis algorithms
samples loading + pre-transpose
pre-transpose / precomputation of semitones can be optimized in pure replay mode to generate only the sounds/semitones used into the current score
second part is the run-time play routine. It is implemented on 3 layers :
3: score management and / or musician inputs management
2: the second layer translate the layer 3 requests into blitter copy requests managed by layer 1
1: the blitter copies requests => in pure playing mode (in a demo for example), we should scope/store/replay only these requests (avoid spending time in layer 2 + 3 for optimal cpu load)
Next steps :
the current propotype coded in C works on both STe and PC: I think the next step is to prototype on PC something "sonically interesting".
currently the sample generation is made in C using floating point calculations and it is awfully slow on ST (even under emulator at full speed !). If something sonically interesting is found ;), I guess it would be great to port the generation part to fixed float math in order to speed it up.
04.2016
As I lack a bit of enthousiastic feedbacks from musicians, I put this project in standby and move to work on a screen for the 30th anniversary of Ubisoft: https://youtu.be/Gbq4wI9HsEw11.2017
I have been at the Alchimie 12 party on the 9/10th of november 2017 with friends in the south of France.
There were a couple of impressive demos released on Amstrad (Amstrad compos ranked 1st and 2nd at the party)
Discussing with an Amstrad coder reminds me an old pre-transposed soundtrack routine I have made in 1993 (never released) using a .mod converter in GFA + ASM replay routine.
Back from the party I decided to reboot my blitter sound project in new terms :
use .mod format as input (in order to have good editing tools for free)
develop a tool to convert the .mod format for my replay routine
use 4 channels (instead of 2). Blitter is bad at adding but it is good at interleaving so I decided to go for a 50khz/25khz interleaved replay routine (like Protracker 2 STe did in the 90's).
On the 13th of december I had a 1st working C version on PC :)
This first version was allocating more than 290kb of memory for my test mod, but it made me pretty confident in being able to obtain something usable.
Also I have determined that filling the sound buffer for one frame with the blitter allows me to target around 15% of VBL for replay.