Open clydeshaffer opened 3 days ago
Eventually it would make sense to export a bin that gets imported but I think simply generating the C struct literal to paste into code would also be a reasonable starting point.
Example:
Instrument slapbass = {
0x58, 0x88, 0x58, 0x5f,
0x18, 0x08, 0x04, 0x02,
0x18, 0x08, 0x04, 0x02,
28, 12, 0, 12,
0,
-24
};
In another tab or view of Sound Sculptor it shouldn't be too hard to set the parameters of an instrument and test it out with either manually triggered notes or a looped melody.
This is what the struct for instruments looks like
The instrument struct defines envelopes for each operator of the instrument. All amplitude values are 8-bits, where the lower four bits represent fractional values, analogous to subpixels. The upper four bits are used as the integer value for amplitude.
env_initial controls the initial amplitude applied to the channel UNLESS velocity values are enabled for the song in which case env_initial is ignored and the song note value is used.
env_decay controls the amount that is subtracted from the amplitude each frame that the note is held, until it reaches the value indicated by
env_sustain is the amplitude value at which env_decay will no longer be subtracted from the amplitude
op_transpose represents a number of semitones that will be added to the MIDI note given by the music data to determine the note used for the operator when playing a note
feedback gives a value for the amount that the first operator feeds into itself to produce a more chaotic (heard as noisiness) waveform. Should strictly be in the range [0,8], inclusive.
transpose is a semitone offset, similar to op_transpose, but applied to all operators of the instrument.