Softsynth
A new project based on my audio driver.
There was a program called Atari Softsynth for 8-bit Atari computers. Several years ago I wrote an interpreter for its modules on a PC or a Raspberry Pi. The program can play them at 16 bit 44 kHz instead of Atari's 4 bit and 11 kHz
These music modules are text files, written in the "Masic" language (Masic=music+Basic). There are also several definition files for waveforms and envelopes.
This is the example music from it: https://drive.google.com/file/d/1BWjCR3s7HaR8j2bzEnJKiNasa5rkHYJZ/view?usp=sharing
(Jakub Husak - "Wodospadem czasu") - original Atari version sounds like this:
and yes, this is Pokey. Pokey is also to do.
The PC-Softsynth project is here: https://gitlab.com/pik33/pc-softsynth2
I want to recreate this on a P2
I added new options and registers to the audio driver so now it can use PC-Softsynth's .s2 and .h2 waveform and envelope definition files to define the sound.
I want to have 2 functions: an interpreter/player to add it do the Prop2play, and a MIDI sound module to play (and have fun with these sounds) using a MIDi keyboard
For the interpreter, several things can be much simpler to do here than in the PC, as I have now hardware assisted generator instead of software synthesis. The program "only" have to interpret the text file with the music... but of course I have the Pascal source of PC-Softsynth.
The sound module should allow to select the definitions and enable to play with these definitions with the MIDI keyboard using a polyphony. The definitions are short enough to keep them in HUB, so maybe I can use 32-channel version.
The first working test program allows to play several sounds (C4 to C5) using a keyboard (Z to <) , either connected via the RPi zero interface or PC keyboard via Flexprop's serial port at 2 Mbps). It looks for ASCII code at $31 or $3D. I will add a MIDi when I return home: the MIDI IN already works at pin 29 and send its report to long[$38]
Comments
Now it can be controlled by a MIDI keyboard. Still monophonic, I have to write a procedure which will assign the channels when the key is pressed, but it is fun even now
I have this keyboard: https://novationmusic.com/en/keys/impulse
It has a lot of knobs and sliders, so all the program can be controlled using this keyboard.
I attached .bas only, the rest of the project is unchanged. Midi is received and processed in retrocog.spin2
If someone wants to test this, the MIDI IN is at P29 now.
I want a polyphony! Let's write
Love it
Any possibility of an mp3 demo?
I'm a musician and have lots of gear.
I have a couple of units that few people are aware of. I use them with my guitars but they are reportedly amazing with synths:
Craig
8 channel polyphony works now Still not 100% reliable but it plays including velocity level. I am now starting to have my own MIDI controlled sound module. I have to switch to 32-channel driver hoping it can manage 32 channels AND envelope control
MP3 demo of what? My first random hitting the keys?
There is an mp3 in the first post. It uses these sounds I am implementing in the program
I am now randomly hitting the MIDI keyboard keys listening to what the P2 produces to find and fix bugs. The audio driver needs optimizing for this purpose: all the unneeded stuff has to be removed and more channel added instead. It doesn't work correctly at the short period (37) I set there, to many slowdowns. In the current version I doubled the period reducing the resulting sample rate to about 44 kHz
There is no need to keep Paula driver structure for the Softsynth. Paula's period control is too coarse for this: Amiga uses only 3 octaves in its tracker music. Now I am not using the variable period: it is constant, and the skip parameter does the job for this type of samples. This means the variable period is not needed here and can be constant, which will simplify the driver and make more channels possible.
My P2 is hooked up to a CNC machine. Customer might get nervous if it starts doing the Kraftwerk thing
Point being that I can't test your code.
Craig
“Its not a bug! Its an undocumented feature!”
I have a DC motor driver that takes PWM output from a P2. One night something-something happened that involved pizza (“circular debugging tools”) and multiple adult beverages. In the morning the motor winding was doing the first few measures of the theme from “Close Encounters Of The Third Kind”. (Yes, I know, I’m doing it wrong…) Hehehe
This thing is a simple, 32 channel wavetable synthesizer for the synth instead of the "Paula type" driver. It needs 2 definitions to work: a waveform (1 period of a wave, up to 32 kB long), and an envelope (256 bytes).
These s2 and h2 files in the repository are such definitions from the PC-Softsynth program