Skip to content

Releases: undisbeliever/terrific-audio-driver

v0.0.16

22 Dec 03:43
Compare
Choose a tag to compare

This release fixes a major MML state tracking bug that can cause dropped instructions, including dropped portamento notes.

Changelog

Audio driver changes:

  • Added portamento_pitch instruction

MML changes:

  • Fixed a note tracking bug that can cause successive {} portamentos to not key-on.
    For example, {cd} {cf} {cg} would only play a single portamento.
  • Added the ?@ subroutine instrument hint command.
    • The ?@ hint will be used when previewing subroutines in the GUI.
  • Added PR play sample rate MML command
  • Added PF play instrument at frequency MML command
  • Added P, PR and PF pitches to portamento and broken chord.
  • Portamento pitch1 is now optional if the previous note is slurred and known (ie, not at the start of a loop).
    c & {d} is now allowed.
  • Fixed a state tracking bug involving loops that can cause dropped instructions.
  • Fixed missing set_detune 0 instruction when MD value is small
  • Fixed MP and portamento not accounting for manual D detune
  • Fixed portamento not testing if detune was changed after the previous note
  • Added instrument tracking for previous slurred note before portamento

GUI changes:

  • Sample Analyser can now analyse samples up to a length of 32768.

Known bugs:

  • Sample Analyser spectrum can only analyse the first 32768 samples in a long BRR sample

v0.0.15

17 Dec 01:26
Compare
Choose a tag to compare

This release adds new pitch instructions and fixes a major bug with panning in v0.0.14.

It's the final stretch for the driver features. The bytecode assembly and MML syntax should be stabilised on the next release.

Changelog

Known bugs:

  • Sample Analyser spectrum can only analyse the first 16384 samples in a long BRR sample

Audio driver changes:

  • Added play_pitch instruction (P MML command)
  • Added play_noise instruction (N MML command)
  • Added disable_noise instruction (N- MML command)
  • Added pitch modulation (enable_pmod, disable_pmod instructions) (PM and PM0 MML commands)
  • Added VxPITCH detune (set_detune, disable_detune instructions and D MML command)
  • Fixed EON when channels G & H are ducked and unducked
  • Fixed unbalanced vibrato with a quarter-wavelength of 64 ticks
  • Incremented maximum vibrato quarter-wavelength to 128 ticks
  • Fixed vibrato mid-point after a slurred portamento
  • Fixed panbrello unintentionally active when a song or sound effect starts

MML changes:

  • Allow 0 ticks before and after a : skip last loop MML command. For example: [ ceg : v+2 ]4
  • Added MD automatic detune by cents MML command

Bytecode assembly changes:

  • Allow 0 ticks before and after skip_last_loop instruction

GUI changes:

  • Fixed tremolo or panbrello when starting playback in the middle of a tremolo/panbrello effect
  • Fixed rust bytecode interpreter TIMER0 register mismatch

v 0.0.14

05 Dec 07:50
Compare
Choose a tag to compare

Changelog

Known bugs:

  • Sample Analyser spectrum can only analyse the first 16384 samples in a long BRR sample.

Audio driver changes:

  • SET_MUSIC_CHANNELS IO command now key-offs the disabled channels
  • Added volume slides
  • Added tremolo
  • Added pan slides
  • Added panbrello

Bytecode assembly changes:

  • Fixed maximum vibrato quarter wavelength value
  • Added $ hexadecimal number parsing to bytecode assembly
  • Instructions with signed arguments (adjust_volume and adjust_pan) now require a + or - sign
  • Fixed note range after a loop with a skip_last_loop instruction

MML changes:

  • Fixed maximum vibrato quarter wavelength value
  • Added px set pan command
    • px0 is centered
    • Negative px values pan to the left. px-64 is 100% to the left.
    • Positive px values pan to the right. px+64 is 100% to the right.
  • Out-of-range errors now show the value that was out-of-range
  • Added subroutine no-instrument note tracking.
    • The compiler now emits an error if a subroutine call would play an out-of-range note.
    • The GUI's subroutine playback will now use the first MML instrument that can play all of the
      subroutine's no-instrument notes.
  • Fixed a panic with non-ASCII UTF-8 in MML
  • Fixed negative hexadecimal numbers in #FirFilter
  • Fixed note range after a loop with a : skip-last-loop command

BRR changes:

  • Added gaussian overflow glitch detector (3 maximum-negative values in a row)
  • Added a gaussian overflow glitch penalty to the BRR encoder (Optional - on by default)

GUI changes:

  • Added a way to set the instrument and settings when previewing song subroutines
    • Click on the ! button in the song toolbar and a new textbox will appear
    • Input (or paste) the MML you want to execute before the subroutine is played
      (ie, @Flute E would set the instrument to Flute and turn on echo)
    • Preview the subroutine with the Play from line start (F6) or Play from cursor (F7) buttons.
    • Be aware, no notes in the "! preview prefix" textbox will not be played.
  • Added a song start field to the song tab
    • Sets the starting position when playing the song with the play-button or F5
    • Pressing "set" or F9 while editing the song selects the start position
    • Useful for editing and previewing ! MML subroutines.
      Press F9 before the subroutines is called, edit macro, press F5 to listen to the macro.
    • Pressing Shift + "set" or Shift+F9 will also mute the other channels.
    • Pressing Shift + play-button or Shift+F5 will play the song from the beginning
  • Shift clicking the channel buttons A-H will select only one channel (Ctrl+Shift 0-9).
  • Fixed a panic in the Sample Analyser if the sample is longer than 16384 samples.
  • Sample Analyser now uses Hann window when calculating the spectrum.
  • Fixed unable to click on the comment textbox in the sample editor.
  • Fixed rust bytecode interpreter going off the rails after a channel ends

Compiler changes:

  • Increased maximum common-audio-data size
  • Added tad-compiler 64tass-enums command
  • Added tad-compiler 64tass-export command
  • Added hexadecimal segment suffix to tad-compiler ca65-export
    (using the -x or -X command line options)
  • Moved ca65-export LoadAudioData to the start of the first segment.

65816 API changes:

  • Added a 64tass API (identical to the ca65 API)
  • Renamed MAX_PAN to TAD_MAX_PAN
  • Renamed CENTER_PAN to TAD_CENTER_PAN
  • Renamed MIN_TICK_CLOCK to TAD_MIN_TICK_CLOCK

v0.0.13

23 Oct 23:42
Compare
Choose a tag to compare

This release fixes an unintended 1-tick delay in portamento and adds a minimum-ticks parameter to early-release.

CAUTION: This release has breaking changes to portamento and early-release.
Please check all songs and sound effect that use portamento and early-release.

Changelog

BREAKING Audio Driver changes:

  • Portamento effects are now processed immediately after bytecode.
    • The pitch now changes on the same tick as the portamento instruction.
    • Previously, the pitch changed 1 tick after the portamento instruction.
    • This fixes a bug in the MML {} portamento command,
      where (for example) {c g} played c note for 2 ticks, when it should have played c for 1 tick.

BREAKING MML changes:

  • Added optional minimum-ticks parameter to the q early release MML command.
    • two-parameter q early release is unaffected if the second parameter has a GAIN mode
      (D E I B F).
    • If the second q early release parameter is a number, it will be read as the minimum-ticks parameter.
  • Forbid raw GAIN in q early release MML command.

BREAKING Bytecode changes:

  • Added required minimum ticks parameter to the set_early_release instruction.
    • set_early_release instructions will need to be modified.
    • If the instruction used a GAIN mode (D E I B F) it will output an error
    • If the instruction used raw GAIN, it will erroneously read the 2nd argument as minimum-ticks.
  • Forbid raw GAIN in set_early_release instructions

MML Changes:

  • Fixed an off-by-one error in the portamento PITCH velocity calculation.
  • Added rounding to the portamento PITCH velocity calculation.

v0.0.12

20 Oct 10:20
Compare
Choose a tag to compare

This release adds temp-GAIN and early-release (with an optional GAIN envelope) to the audio driver.
Both features have been designed to simplify custom release envelopes.

early-release-with-gain-waveform

; Early release with linear decrease GAIN release envelope
A q10,D16
A c d d f2.  c d d e2.  r

Changelog

Bytecode changes:

  • Added note range tests to bytecode assembly.
  • Changed the bytecode format to increase the number of non play-note instructions from 32 to 64.
  • Added temporary GAIN instructions
  • Added set_early_release instruction
    • set_early_release can also be used to add a custom release envelope to channels.

MML changes:

  • Added bytecode assembly to MML
    • Syntax: \asm { }
    • Bytecode instructions can be separated by | dividers or new lines.
  • Added temporary GAIN MML commands
    • GT0 - disable temporary GAIN
    • GT<gain> - write the raw 8 bit value to the GAIN register
    • GFT<value> - fixed temporary envelope (0-127)
    • GDT<rate> - linear temporary decrease envelope (0-31)
    • GET<rate> - exponential decrease temporary envelope (0-31)
    • GIT<rate> - linear increase temporary envelope (0-31)
    • GBT<rate> - bent increase temporary envelope (0-31)
    • GT - reuse previous temporary GAIN
  • Added Q%<0-255> Fine Quantize MML command.
  • Added Q Quantize with temp-GAIN.
    • For example: Q4,D10 c4 will expand to c8 & GDT10 r8
    • Q<n>,D<rate> - Quantize with linear decrease envelope (0-31)
    • Q<n>,E<rate> - Quantize with exponential decrease envelope (0-31)
    • Q<n>,I<rate> - Quantize with linear increase envelope (0-31)
    • Q<n>,B<rate> - Quantize with bent increase envelope (0-31)
    • Q<n>,<gain> - Quantize with a raw GAIN value (1-255)
  • Added q set early release command
    • The q command supports early-release with a custom GAIN envelope and is useful for custom-release envelopes.
      For example, q10,D16 will change the envelope to linear-decrease (D16) 10 ticks before a note's key-off.
  • Fixed portamento not quantized with the Q quantize MML command.

GUI changes:

  • Fix sound effects stopping at the first rest instruction.
    (This only effected the GUI, the spc700 audio driver was unaffected).

v0.0.11

08 Sep 10:06
Compare
Choose a tag to compare

CAUTION: This release has breaking changes to the rest bytecode instruction, please check all sound effects.

CAUTION: This release has breaking changes to MML vibrato and subroutine calls, please check all songs.


BREAKING MML changes:

  • ~ manual vibrato persists across subroutine calls.
    • MP vibrato does not persist across subroutine calls (unchanged from v0.0.10).

BREAKING Bytecode changes:

  • call_subroutine does not disable vibrato
  • return_from_subroutine does not disable vibrato
  • rest has been renamed to wait (to match the w MML command)
  • rest_keyoff has been renamed to rest (to match the r MML command)

Bytecode changes:

  • Loops and subroutines now use a traditional stack.
    • The maximum number of nested loops has increased.
  • Added call_subroutine_and_disable_vibrato instruction
  • Added return_from_subroutine_and_disable_vibrato instruction
  • Added goto_relative bytecode instruction.

MML changes:

  • MML subroutines can now call subroutines
  • Fixed slurred note tracking after a subroutine call.
    A {} portamento after an MML subroutine that ends with a slurred note now has the same
    behaviour as a {} portamento after a loop that ends with a slurred note.
  • Fixed slurred note tracking at the start of a loop and after a : skip last loop command.
  • Fixed vibrato not disabled if a subroutine ends with MP0.
  • Fixed wrong MP vibrato state at the start of a loop (ie, MP20,4 [a MP30,6 b]4).
    • ~ manual vibrato loop behaviour is unchanged.
  • Fixed wrong MP vibrato state after a L set loop point MML command.
    • ~ manual vibrato loop behaviour is unchanged.

GUI changes:

  • Closing a song tab while the song is playing will stop audio.

Data format changes:

  • Removed loop point from song header. Songs now loop using the goto_relative instruction.

v0.0.10

31 Jul 08:16
Compare
Choose a tag to compare

CAUTION: This release changes the data formats and IO commands.
You must update the audio driver and ca65/PVSnesLib API.

TLDR:

  • 8 music channels.
  • New sound effect dropout behaviour (documentation).
  • Made the ca65/PVSnesLib sound effect queue public.
  • Added a PAUSE_MUSIC_PLAY_SFX IO command.
  • Lots of space saving optimisations.

Audio driver changes:

  • Increased the number of music channels to 8.
  • Rewrote the main loop.
    • Virtual channel valid/dirty state is stored in a bitset in preparation for channel ducking.
    • IO ports are read a lot more often.
    • Changed how disabled channels are handled.
  • Added sound effect dropout behaviour (documentation).
    • Added interruptible flag to sound effects.
    • Sound effects with the one-channel flag set will play on at most 1 sfx channel.
      If there is a play_sound_effect command for a one-channel sound effect that is already playing:
      • The sound effect will be reset if the sound effect is interruptible.
      • The play_sound_effect command will be dropped if the sound effect is not interruptible.
    • High-priority sound effects will ignore the interruptible flag if both sfx channels are uninterruptible.
    • Low-priority sound effects will not play if both sfx channels are active.
  • The pitch table is now variable-sized.
  • Added a channelSoA.volShadowValid flag.
    • vol_l and vol_r are now calculated after the bytecode has been processed.
  • return_from_subroutine bytecode instruction disables the channel if it is not in a subroutine.
  • Moved common audio data Structure of Arrays pointers to common audio data.
    • The amount of available Audio-RAM is unchanged.
  • Lots of little space-saving optimisations.

MML Changes:

  • Fixed merged relative volume commands clamping to an i8 (-128..=+127).
    • V+100 V+100 will now correctly merge into a single V+200 command.
  • Support larger values for v+/v-/V+/V- relative volume commands.
  • Optimise saturating relative volume command into absolute pan commands.
    (For example, V+255 is transformed into V255 and V-255 is transformed into V0).
  • Support larger values for p+/p- relative pan commands.
  • Optimise saturating relative pan command into absolute pan commands.
    (For example, p+200 is transformed into p128 and p-100 is transformed into p0.)

IO Command changes:

  • Removed SET_ENABLED_CHANNELS IO command, replaced with SET_MUSIC_CHANNELS.
    • Masking channels 6 & 7 no-longer silences sound effects.
  • Added PAUSE_MUSIC_PLAY_SFX IO command.

ca65 API changes:

  • The sound effect queue variables are now public.

PVSnesLib API changes:

  • The sound effect queue variables are now public.

File formats:

  • Changed the format of the sound effects file.
    • Added attributes to the sound effect name line.
    • tad-compiler and tad-gui can still read sound effect files in the old format.

GUI changes:

  • Fixed table not scrolling when items are added or moved.
  • Fixed selected row not visible when editing table cells.
  • Rewrote the GUI's data storage, list messages and item selection:
    • Fixed instrument and sample tables button enabled/disabled state.
    • Fixed missing name deduplication in instrument and sample tables.
    • Fixed name deduplicator not detecting an already deduplicated name.
  • Added pitch table size to the sample sizes widget.
  • Fixed sound effects window not playing selected sound effect with spacebar.
  • Fixed sound effects window selection scrolling and clicking without moving the mouse cursor.
  • Fixed pan slider playing from both speakers when 100% to the right

v0.0.9

18 Jun 08:48
Compare
Choose a tag to compare

BRR changes:

  • Added more invalid wave file error messages

GUI changes:

  • Songs can be played in the sound effect tab.
    • Select a song on the Sound Effect tab toolbar, click the rightmost play button (or press F7).
    • The textbox after the song combo-box is the starting offset in ticks.
  • Sound effects can now be played while a song is playing.
    • Click on the SFX button in a song tab or Menu > Audio > Sound Effects.
    • Double click on a Sound Effect name to play the sound effect.
    • This window will send PLAY_SOUND_EFFECT IO commands to the emulated audio driver,
      allowing the user to hear how the sound effects will sound in-game.
    • The sound effects window is disabled when the sound effects tab is open.
  • Added a sample sizes graph and table to the Samples tab.
    • Click on the large button above the Instruments list to view it.
    • If there is an error combining samples into Common Audio Data, the sample sizes widget will
      display an error message.
  • Added a pan slider to the Sound Effects tab.
  • Added custom toolbar icons.
  • Added Clear sample cache and rebuild to the File menu.
  • Fixed song note tracking not cleared when the audio thread plays a different song
  • Lots of improvements to the compiler thread:
    • The Common Audio Data is compiled whenever an instrument or sample is changed.
    • The "Dependency Error" bug has been fixed.
    • Improved inter-thread messaging.
    • Plus many more small optimisations.

v0.0.8

04 May 02:40
Compare
Choose a tag to compare

Version 0.0.8 changelog

  • Added PVSnesLib integration code
  • Added tad-compiler pv-export command
  • Added tad-compiler pv-enums command
  • Added include sound effects argument to tad-compiler song2spc (-s or --sound-effects)

MML Changes:

  • Fixed @ set instrument, A set ADSR and/or G set gain MML commands not emitting a
    set instrument/ADSR/gain instruction after a L set loop point MML command.
  • Forbid the L set loop point MML command inside a [ ] MML loop.

Audio Driver Changes:

  • Fixed audio driver not clearing the echo buffer.

ca65 API Changes:

  • Added Tad_LoadSongIfChanged subroutine
  • Added Tad_GetSong subroutine
  • Fixed ca65 API tests not rebuilding when tad-audio.s changes
  • Fixed Illegal addressing mode error when compiling with ca65 v2.19
  • Fixed typos in ca65 API documentation

v0.0.7

16 Mar 03:36
Compare
Choose a tag to compare
v0.0.7 Pre-release
Pre-release

Changelog:

  • Added ca65 integration code
  • Added tad-compiler ca65-export command
  • Added tad-compiler ca65-enums command
  • Fixed missing key-off in the pause IO command
  • Added bounds checking to the play_sound_effect IO command

Breaking changes:

  • Moved Loader to audio-RAM address $200