Oakland, CA 94607
- Text Messages Only to: 510-224-9239
- Email: voxels@yahoo.com
| import Foundation | |
| import Combine | |
| import SwiftUI | |
| /// An `ObservableObject` ViewModel that subscribes to a `CDJ3000Manager` | |
| /// and publishes its state for a SwiftUI View. | |
| /// | |
| /// This class is marked with `@MainActor`, which ensures that all UI-related | |
| /// state updates are automatically published on the main thread. | |
| @MainActor |
| import Foundation | |
| /// A `Sendable` struct for defining a single MIDI Note message. | |
| public struct MidiNoteMapping: Sendable, Equatable { | |
| public var channel: UInt8 | |
| public var note: UInt8 | |
| } | |
| /// A `Sendable` struct for defining a single MIDI Control Change (CC) message. | |
| public struct MidiControlChangeMapping: Sendable, Equatable { |
| import Foundation | |
| import CoreMIDI | |
| // Note: This file assumes the `MIDIAdapter.h` and `MIDIAdapter.mm` files | |
| // from your project are available and included in the build target. | |
| // It also assumes Core MIDI definitions like MIDIMessage_32 are available. | |
| // --- UPDATE: We are removing the MIDIAdapter dependency for this class --- | |
| // Define a simple Deck ID for clarity | |
| public enum DeckID: Sendable { |
| import Foundation | |
| import CoreMIDI | |
| import Combine | |
| // MARK: - MIDI Command Mapping | |
| /// A namespace for mapping CDJ-3000 MIDI commands from the official PDF. | |
| /// We focus on MIDI 1.0 Channel Voice messages (Note On/Off, Control Change). | |
| /// "n" (e.g., 9n, Bn) corresponds to the MIDI channel (0-15). | |
| private enum CDJ3000Commands { |
| // | |
| // VideoConverter.swift | |
| // SpatialVideoConverter | |
| // | |
| // Created by Michael A Edgcumbe on 2/21/24. | |
| // | |
| import Foundation | |
| import AVFoundation | |
| import VideoToolbox |
| // | |
| // PlacesSearchSession.swift | |
| // No Maps | |
| // | |
| // Created by Michael A Edgcumbe on 3/19/23. | |
| // | |
| import Foundation | |
| import CloudKit |
Oakland, CA 94607
| // | |
| // LaunchController.swift | |
| // ToyPhotoGallery | |
| // | |
| // Created by Voxels on 7/2/18. | |
| // Copyright © 2018 Michael Edgcumbe. All rights reserved. | |
| // | |
| import UIKit |
| func scrollViewDidScroll(_ scrollView: UIScrollView) { | |
| if scrollDirection == .horizontal { | |
| calculateTransforms(with:scrollView.contentOffset) | |
| } | |
| } | |
| func calculateTransforms(with offset:CGPoint) { | |
| guard let collectionView = collectionView else { | |
| return | |
| } |
| // MARK: - Animation | |
| extension GalleryViewController { | |
| func animateCollectionViews(preview:Bool, with indexPath:IndexPath?) { | |
| guard let oldCollectionView = collectionView, let collectionViewModel = oldCollectionView.model else { | |
| return | |
| } | |
| let angle = CGFloat(Measurement(value: 90, unit: UnitAngle.degrees) | |
| .converted(to: .radians).value) |