Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for ASID playback over MIDI, interfacing SIDs on hardware (#178) #179

Draft
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

micheldebree
Copy link
Collaborator

@micheldebree micheldebree commented Dec 13, 2023

  • When new configuration item is set to a MIDI interface name, ASID will be sent out in parallel with the reSID audio
  • Tested with MacOS and Windows
  • Non-tested support for Linux included
  • Based on compiled-in RtMidi
  • Fixes ASID support #28

TODO:

  • Toggle ReSID/ASID from the UI
    • Mute/init ASID when switching off/on
    • Visual feedback
  • Stop sending messages to ASID when SF2 is not playing
  • Use a default MIDI device if configured device is not found

Documentation

  • MIDI interface must be selected with Playback.ASID.MidiInterface config option in the user.ini
  • Switch between RESID and ASID with Alt-O (visible in top bar. If it doesn't change, there is no MIDI device found)

Example for macOS

In ~/.config/sidfactory2/user.ini:

Playback.ASID.MidiInterface = "MIDISPORT 2x2 Port A"

A way to find out the available values, is to run SF2 from the terminal and check the logging:

/Applications/SIDFactoryII.app/Contents/MacOS/SIDFactoryII

2024-07-02 11:03:49.665 SIDFactoryII[56993:1090015] INFO: [FOUND] MIDI output port 0: MPK Mini Mk II
2024-07-02 11:03:49.665 SIDFactoryII[56993:1090015] INFO: [FOUND] MIDI output port 1: MiniFuse 4
2024-07-02 11:03:49.665 SIDFactoryII[56993:1090015] INFO: [FOUND] MIDI output port 2: MIDISPORT 2x2 Port A
2024-07-02 11:03:49.665 SIDFactoryII[56993:1090015] INFO: [FOUND] MIDI output port 3: MIDISPORT 2x2 Port B

* When new configuration item is set to a MIDI interface name, ASID will be sent out in parallel with the reSID audio
* Tested with MacOS and Windows
* Non-tested support for Linux included
* Based on compiled-in RtMidi
RawPowerLaxity and others added 14 commits December 14, 2023 10:26
…te the cycle offset from the first write. The address range the inspection is done for is 0xd400 to and including 0xd406. The same write order can be assumed for the two other channels. Writes to 0xd415 to 0xd418 does not require any ordering or timing to function adequately.
[trivial] Added comments to sections of ASID specific code that should be moved (and possibly encapsulated)
[minor] Added utility for rtmidi functionality that is better maintained in that context
[minor] Changed handlng of opening midi out port. Kept the ini files option, but if that is not set there's a dialogue that can be invoked from the intro screen (only for now)
[minor] Added Thomas Jansson to the programmers credits, and same for the author of the RtMidi library
…l zero ADSR and Control reg on each channel by sending a midi package to the device.
@micheldebree
Copy link
Collaborator Author

About the toggle:

  • We can have a toggle in the statusbar to select ReSID and/or ASID, similar to the other toggles in the status bar
    • values: ReSID/ASID/ReSID+ASID
    • What do we call it? Device? Engine?
    • Combination settings will explode if we ever introduce another engine
  • We can have a toggle per 'engine'
    • ReSID On/Off and ASID On/Off
    • Both off is a nonsense setting
  • For ASID, SID model is n.a., do we disable that toggle when ASID is selected?

micheldebree and others added 7 commits January 20, 2024 14:51
- Only toggleable with mouse
- Does nothing except keep the setting in AuxilaryDataHardwarePreferences
…pointer to a volatile memory address by using it there.
…d value due to not scoping the instance of T in a union.
* Switch for ASID/RESID output

* Removed obsolete comment

* Fix parentheses style

* Formatter config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ASID support
3 participants