Thomas Harte
99fa86a67e
Adds a test for lookup sine. And fixes lookup sine.
2020-04-20 18:40:47 -04:00
Thomas Harte
6568c29c54
Improves commentary.
2020-04-19 22:42:25 -04:00
Thomas Harte
c54bbc5a04
Rename Table.h; LogSin -> LogSign and make it a bit more typer.
2020-04-19 13:33:17 -04:00
Thomas Harte
92d0c466c2
Moves complete phase -> output calculation inside Operator.
...
Reasoning being: otherwise I wasn't currently enforcing non-sine waveforms.
2020-04-19 13:27:24 -04:00
Thomas Harte
020c760976
Simplifies the phase counter.
2020-04-19 00:30:14 -04:00
Thomas Harte
cdfd7de221
Minor: enables all melodic channels when rhythm mode is disabled; supports non-modulated channels.
2020-04-18 17:48:29 -04:00
Thomas Harte
3da2e91acf
Adjusts range of output, makes declaration of level
full owner of type information.
2020-04-17 23:29:09 -04:00
Thomas Harte
3948304172
Attempts to use table-based maths.
2020-04-17 23:23:16 -04:00
Thomas Harte
4a295cd95e
Wraps log_sin in an access function to enshrine sign and mask rules; switches both functions to non-math.h clashing names.
2020-04-17 23:22:42 -04:00
Thomas Harte
6f7c8b35c5
Applies an ahead-of-time transformation to the exp
table, and wraps it in a helper function.
2020-04-17 22:33:13 -04:00
Thomas Harte
e58ba27c00
Clarifies meaning of scaling. Though it isn't yet applied.
2020-04-17 22:30:10 -04:00
Thomas Harte
0aceddd088
Starts tidying up the OPL2.
...
This is as a precursor to switching to using the proper table lookups, which I hope will automatically fix my range issues.
2020-04-15 22:10:50 -04:00
Thomas Harte
30ff399218
With some fixes for scale, I think possibly this is close for melodic channels.
2020-04-15 21:27:27 -04:00
Thomas Harte
a7e63b61eb
Just from printing numbers: corrects transition from attack to decay.
2020-04-15 00:26:01 -04:00
Thomas Harte
b13b0d9311
Starts towards implementing some OPL test cases.
2020-04-14 23:51:45 -04:00
Thomas Harte
d8380dc3e2
Tries to be a little neater in spelling out the work here.
...
I think I'm somewhat circling here now; I need to think of a way of getting clean comparison data.
2020-04-14 21:55:42 -04:00
Thomas Harte
d805e9a8f0
Actually, octave probably works this way around? Higher octaves = higher frequencies.
2020-04-14 21:39:12 -04:00
Thomas Harte
aa45142728
Endeavours to fix attenuation and add FM synthesis.
...
I now definitely think my frequency counting is wrong.
2020-04-14 18:32:06 -04:00
Thomas Harte
09d1aed3a5
Attempts to voice the current attenuation (and, therefore, the ADSR output), even if linearly rather than logarithmically.
2020-04-13 22:12:55 -04:00
Thomas Harte
a1f80b5142
Takes a stab at per-operator ADSR.
...
Heavy caveats apply: no KSR is applied, non-ADSR attenuation isn't applied, attenuation isn't voiced in general.
2020-04-13 21:39:06 -04:00
Thomas Harte
d3fbdba77c
Add missing #include.
2020-04-12 14:20:02 -04:00
Thomas Harte
632d797c9d
Adjusts frequency formula. This could be close.
...
I guess next I need to get ADSR/volume in general working, before I can go FM? Then I'll worry about using the proper log-sin/exp tables.
2020-04-12 14:15:09 -04:00
Thomas Harte
559a2d81c1
Baby step: starts trying to output the raw FM carrier, no modulation, no ADSR.
2020-04-12 12:46:40 -04:00
Thomas Harte
7a5f23c0a5
Adds accommodations for the OPLL.
2020-04-10 22:05:22 -04:00
Thomas Harte
84b115f15f
Attempts to move forward in defining what the parts of an OPL are meant to do.
2020-04-10 19:13:52 -04:00
Thomas Harte
a0d14f4030
Starts trying to make sense of the various fields at play.
2020-04-08 23:15:44 -04:00
Thomas Harte
dd6769bfbc
Splits OPLL and OPL2 classes.
...
Logic is: they have different mixers (additive in the OPL2, time-division multiplexing in the OPLL) as well as different register sets. So I'll put operator and channel logic directly into those structs.
2020-04-07 23:15:26 -04:00
Thomas Harte
db4b71fc9a
Adds correct LSFR, something of OPLL -> OPL2 logic.
2020-04-05 22:57:53 -04:00
Thomas Harte
0ed7d257e1
Add some extra notes, implement correct mapping to only 18 operators. Not 22.
2020-04-05 14:32:55 -04:00
Thomas Harte
335a68396f
Attempts to complete OPL2 register decoding.
2020-04-04 23:39:09 -04:00
Thomas Harte
84cdf6130f
Starts at least trying to decode OPL2 register writes.
2020-04-04 23:29:25 -04:00
Thomas Harte
b0abc4f7bb
Implements enough wiring that the Master System will instantiate and talk to an OPLL.
2020-04-03 20:05:36 -04:00