Skip to content

Commit

Permalink
Merge pull request #15 from subalterngames/play_state
Browse files Browse the repository at this point in the history
Reduced CPU usage
  • Loading branch information
subalterngames authored Nov 27, 2023
2 parents 0968daf + 89fe0ac commit f3dc1aa
Show file tree
Hide file tree
Showing 61 changed files with 1,357 additions and 1,615 deletions.
19 changes: 9 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 5 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
members = ["audio", "common", "input", "io", "render", "text"]

[workspace.package]
version = "0.1.4"
version = "0.2.0"
authors = ["Esther Alter <[email protected]>"]
description = "A minimalist and ergonomic MIDI sequencer"
documentation = "https://github.com/subalterngames/cacophony"
Expand All @@ -13,7 +13,6 @@ serde_json = "1.0"
rust-ini = "0.18"
directories = "5.0.1"
midir = "0.9.1"
crossbeam-channel = "0.5.8"
csv = "1.2.1"
cpal = "0.13.1"
hound = "3.5.0"
Expand Down Expand Up @@ -70,8 +69,8 @@ features = []
[workspace.dependencies.oxisynth]
version = "0.0.3"
features = []
git = "https://github.com/PolyMeilex/OxiSynth.git"
branch = "master"
git = "https://github.com/subalterngames/OxiSynth.git"
branch = "midi_event_copy_clone"

[workspace.dependencies.tts]
version = "0.25.6"
Expand All @@ -85,7 +84,7 @@ speech_dispatcher_0_9 = ["text/speech_dispatcher_0_9"]

[package]
name = "cacophony"
version = "0.1.4"
version = "0.2.0"
authors = ["Esther Alter <[email protected]>"]
description = "A minimalist and ergonomic MIDI sequencer"
documentation = "https://github.com/subalterngames/cacophony"
Expand Down Expand Up @@ -121,7 +120,7 @@ path = "text"
name = "Cacophony"
identifier = "com.subalterngames.cacophony"
icon = ["icon/32.png", "icon/64.png", "icon/128.png", "icon/256.png"]
version = "0.1.4"
version = "0.2.0"
resources = ["data/*"]
copyright = "Copyright (c) Subaltern Games LLC 2023. All rights reserved."
short_description = "A minimalist and ergonomic MIDI sequencer."
Expand Down
1 change: 0 additions & 1 deletion audio/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ edition.workspace = true

[dependencies]
cpal = { workspace = true }
crossbeam-channel = { workspace = true }
hound = { workspace = true }
id3 = { workspace = true }
mp3lame-encoder = { workspace = true }
Expand Down
27 changes: 0 additions & 27 deletions audio/src/command.rs
Original file line number Diff line number Diff line change
@@ -1,31 +1,8 @@
use crate::export_state::ExportState;
use std::path::PathBuf;

/// A command for the synthesizer.
#[derive(Debug, Eq, PartialEq, Clone)]
pub enum Command {
/// Set the synthesizer's framerate.
SetFramerate { framerate: u32 },
/// Send this to announce that we're playing music, as opposed to arbitrary user input audio.
PlayMusic { time: u64 },
/// Send this to stop playing music.
StopMusic,
/// Schedule a stop-all event.
StopMusicAt { time: u64 },
/// Stop all sound.
SoundOff,
/// Note-on ASAP.
NoteOn { channel: u8, key: u8, velocity: u8 },
/// Schedule a note-on event.
NoteOnAt {
channel: u8,
key: u8,
velocity: u8,
start: u64,
end: u64,
},
/// Note-off ASAP.
NoteOff { channel: u8, key: u8 },
/// Load a SoundFont file.
LoadSoundFont { channel: u8, path: PathBuf },
/// Set a program.
Expand All @@ -39,8 +16,4 @@ pub enum Command {
UnsetProgram { channel: u8 },
/// Set the overall gain.
SetGain { gain: u8 },
/// Export audio.
Export { path: PathBuf, state: ExportState },
/// Ask for the export state.
SendExportState,
}
Loading

0 comments on commit f3dc1aa

Please sign in to comment.