Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
fengalin committed Jan 28, 2024
1 parent bb2afe2 commit 109b67d
Show file tree
Hide file tree
Showing 22 changed files with 1,522 additions and 955 deletions.
2,128 changes: 1,327 additions & 801 deletions Cargo.lock

Large diffs are not rendered by default.

29 changes: 9 additions & 20 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "jstation-controller"
version = "0.3.1"
version = "0.3.1-99"
authors = ["François Laignel <[email protected]>"]
categories = ["Multimedia"]
keywords = ["guitar", "jstation"]
Expand All @@ -11,32 +11,21 @@ repository = "https://github.com/fengalin/jstation-controller"
edition = "2021"

[dependencies]
bitflags = "1.3.2"
env_logger = "0.10"
flume = "0.10.13"
futures = "0.3.25"
iced = { version = "0.7", features = [ "default_system_font", "smol" ] }
iced_audio = "0.10"
iced_core = "0.7"
iced_lazy = "0.4"
iced_native = "0.8"
iced_wgpu = "0.8"
bitflags = "2.4"
env_logger = "0.11"
flume = "0.11"
iced = { version = "0.9", features = [ "smol" ] }
iced_audio = "0.12"
iced_lazy = "0.6.1"
iced_native = "0.10.3"
jstation_derive = { path = "jstation_derive" }
log = { version = "0.4", features = ["release_max_level_info"] }
midir = "0.9"
nom = "7.1.1"
once_cell = "1.0"
smallvec = { version = "1.10", features = [ "union" ] }
smol = "1.2.5"
smol = "1.3"
thiserror = "1.0"

[profile.release]
lto = true

[patch.crates-io]
iced = { git = "https://github.com/fengalin/iced", tag = "0.7.9-subscription-unfold-none-handling" }
iced_core = { git = "https://github.com/fengalin/iced", tag = "0.7.9-subscription-unfold-none-handling" }
iced_graphics = { git = "https://github.com/fengalin/iced", tag = "0.7.9-subscription-unfold-none-handling" }
iced_lazy = { git = "https://github.com/fengalin/iced", tag = "0.7.9-subscription-unfold-none-handling" }
iced_native = { git = "https://github.com/fengalin/iced", tag = "0.7.9-subscription-unfold-none-handling" }
iced_wgpu = { git = "https://github.com/fengalin/iced", tag = "0.7.9-subscription-unfold-none-handling" }
60 changes: 51 additions & 9 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ allow = [
"BSD-2-Clause",
"BSD-3-Clause",
"BSL-1.0",
"CC0-1.0",
"ISC",
"MIT",
"MIT-0",
Expand All @@ -14,31 +13,74 @@ allow = [
"Zlib",
]

[advisories]
# Used by iced-lazy v0.6.1
ignore = ["RUSTSEC-2023-0042"]

[bans]
multiple-versions = "deny"
skip = [
{ name = "arrayvec", version = "0.5"},
{ name = "async-channel", version = "1.9"},
{ name = "async-io", version = "1.13"},
{ name = "async-lock", version = "2.8"},
{ name = "bitflags", version = "1.3"},
{ name = "calloop", version = "0.10"},
{ name = "cocoa", version = "0.24"},
{ name = "core-graphics", version = "0.22"},
{ name = "foreign-types", version = "0.3"},
{ name = "event-listener", version = "2.5"},
{ name = "event-listener", version = "3.1"},
{ name = "fastrand", version = "1.9"},
{ name = "foreign-types-shared", version = "0.1"},
{ name = "futures-lite", version = "1.13"},
{ name = "hashbrown", version = "0.12"},
{ name = "indexmap", version = "1.9"},
{ name = "libloading", version = "0.7"},
{ name = "linux-raw-sys", version = "0.3"},
{ name = "memmap2", version = "0.5"},
{ name = "memoffset", version = "0.6"},
{ name = "nix", version = "0.22"},
{ name = "nix", version = "0.24"},
{ name = "nix", version = "0.25"},
{ name = "parking_lot", version = "0.11"},
{ name = "parking_lot_core", version = "0.8"},
{ name = "raw-window-handle", version = "0.3"},
{ name = "raw-window-handle", version = "0.4"},
{ name = "polling", version = "2.8"},
{ name = "redox_syscall", version = "0.2"},
{ name = "raw-window-handle", version = "0.3.4"},
{ name = "raw-window-handle", version = "0.4.3"},
{ name = "rustix", version = "0.37"},
{ name = "smithay-client-toolkit", version = "0.16"},
{ name = "smithay-client-toolkit", version = "0.18"},
{ name = "syn", version = "1"},
{ name = "wayland-client", version = "0.29"},
{ name = "wayland-cursor", version = "0.29"},
{ name = "wayland-protocols", version = "0.29"},
{ name = "wayland-scanner", version = "0.29"},
{ name = "wayland-sys", version = "0.29"},
{ name = "wayland-sys", version = "0.31"},
{ name = "windows-sys", version = "0.36"},
{ name = "windows-sys", version = "0.48"},
{ name = "windows-targets", version = "0.48"},
{ name = "windows_aarch64_msvc", version = "0.36"},
{ name = "windows_aarch64_msvc", version = "0.42"},
{ name = "windows_aarch64_msvc", version = "0.48"},
{ name = "windows_aarch64_gnullvm", version = "0.42"},
{ name = "windows_aarch64_gnullvm", version = "0.48"},
{ name = "windows_i686_gnu", version = "0.36"},
{ name = "windows_i686_gnu", version = "0.42"},
{ name = "windows_i686_gnu", version = "0.48"},
{ name = "windows_i686_msvc", version = "0.36"},
{ name = "windows_i686_msvc", version = "0.42"},
{ name = "windows_i686_msvc", version = "0.48"},
{ name = "windows_x86_64_gnu", version = "0.36"},
{ name = "windows_x86_64_gnu", version = "0.42"},
{ name = "windows_x86_64_gnu", version = "0.48"},
{ name = "windows_x86_64_gnullvm", version = "0.42"},
{ name = "windows_x86_64_gnullvm", version = "0.48"},
{ name = "windows_x86_64_msvc", version = "0.36"},
{ name = "windows_x86_64_msvc", version = "0.42"},
{ name = "windows_x86_64_msvc", version = "0.48"},
]

[sources]
unknown-git = "deny"
allow-git = [
"https://github.com/fengalin/iced",
#"https://github.com/iced-rs/iced",
"https://github.com/iced-rs/winit",
]
1 change: 1 addition & 0 deletions src/jstation/interface.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use iced::futures;
use std::sync::Arc;

use crate::{
Expand Down
10 changes: 1 addition & 9 deletions src/jstation/midi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ pub mod channel_voice;
pub use channel_voice::ChannelVoice;

pub mod split_bytes;
pub use split_bytes::*;

pub mod sysex;
pub use sysex::{
Expand Down Expand Up @@ -36,14 +35,7 @@ impl From<sysex::Message> for Message {
fn parse_midi_channel_voice(input: &[u8]) -> IResult<&[u8], Message> {
let (i, cv) = midi::channel_voice::parse(input)?;

let cv = ChannelVoice::try_from(cv).map_err(|err| {
use nom::error::{self, Error};

log::debug!("{err}");
nom::Err::Error(Error::new(input, error::ErrorKind::NoneOf))
})?;

Ok((i, cv.into()))
Ok((i, ChannelVoice::from(cv).into()))
}

fn parse_sysex(i: &[u8]) -> IResult<&[u8], Message> {
Expand Down
3 changes: 0 additions & 3 deletions src/jstation/procedure/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,3 @@ declare_procs!(
who_am_i: WhoAmIReq, WhoAmIResp;
result: ToMessageResp;
);

pub use one_program::OneProgramRefResp;
pub use program_update::ProgramUpdateRefResp;
24 changes: 15 additions & 9 deletions src/jstation/procedure/utility_settings.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
use nom::IResult;

use crate::{
jstation::{data::RawValue, take_split_bytes_bool, take_split_bytes_chan, take_split_bytes_len, take_split_bytes_u8, BufferBuilder, ProcedureBuilder, ProcedureId},
jstation::{
data::RawValue, take_split_bytes_bool, take_split_bytes_chan, take_split_bytes_len,
take_split_bytes_u8, BufferBuilder, ProcedureBuilder, ProcedureId,
},
midi,
};

Expand Down Expand Up @@ -62,13 +65,16 @@ impl UtilitySettingsResp {
let (i, midi_merge) = take_split_bytes_bool(i, checksum)?;
let (i, midi_channel) = take_split_bytes_chan(i, checksum)?;

Ok((i, UtilitySettingsResp {
stereo_mono,
dry_track,
digital_out_level: RawValue::try_from(digital_out_level).unwrap(),
global_cabinet,
midi_merge,
midi_channel,
}))
Ok((
i,
UtilitySettingsResp {
stereo_mono,
dry_track,
digital_out_level: RawValue::from(digital_out_level),
global_cabinet,
midi_merge,
midi_channel,
},
))
}
}
2 changes: 1 addition & 1 deletion src/midi/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub enum Error {
PortConnection,

#[error("Couldn't retrieve a MIDI port name")]
PortInfoError(#[from] midir::PortInfoError),
PortInfo(#[from] midir::PortInfoError),

#[error("Invalid MIDI port name {}", .0)]
PortNotFound(Arc<str>),
Expand Down
12 changes: 6 additions & 6 deletions src/ui/amp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ where
ui::amp_cabinet_label(self.amp.modeling.param_name()),
ui::checkbox("nick", state.show_nick, Event::MustShowNicks),
],
vertical_space(Length::Units(5)),
vertical_space(Length::Fixed(5f32)),
];

if state.show_nick {
Expand All @@ -78,26 +78,26 @@ where
));
}

let title_area = column![text("Amp"), vertical_space(Length::Units(10)), modeling];
let title_area = column![text("Amp"), vertical_space(Length::Fixed(10f32)), modeling];

use amp::Parameter::*;
let content: Element<_> = ui::dsp(
title_area,
row![
ui::knob(self.amp.gain, |normal| Gain(amp::Gain::from_normal(normal))).build(),
horizontal_space(Length::Units(15)),
horizontal_space(Length::Fixed(15f32)),
ui::knob(self.amp.bass, |normal| Bass(amp::Bass::from_normal(normal))).build(),
horizontal_space(Length::Units(10)),
horizontal_space(Length::Fixed(10f32)),
ui::knob(self.amp.middle, |normal| Middle(amp::Middle::from_normal(
normal
)))
.build(),
horizontal_space(Length::Units(10)),
horizontal_space(Length::Fixed(10f32)),
ui::knob(self.amp.treble, |normal| Treble(amp::Treble::from_normal(
normal
)))
.build(),
horizontal_space(Length::Units(15)),
horizontal_space(Length::Fixed(15f32)),
ui::knob(self.amp.level, |normal| Level(amp::Level::from_normal(
normal
)))
Expand Down
33 changes: 18 additions & 15 deletions src/ui/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use iced::{
widget::{column, container, horizontal_space, row, scrollable, vertical_space, Column, Text},
Alignment, Application, Command, Element, Length, Theme,
};
use iced_native::command::Action;
use iced_native::command;
use once_cell::sync::Lazy;
use smol::future::FutureExt;

Expand Down Expand Up @@ -58,7 +58,7 @@ impl App {
.expect("Not connected");
self.ports.borrow_mut().set_ports(port_in, port_out);

return Ok(Command::single(Action::Future(
return Ok(Command::single(command::Action::Future(
future::ready(Message::HideModal).boxed(),
)));
}
Expand Down Expand Up @@ -136,7 +136,9 @@ impl Application for App {

(
app,
Command::single(Action::Future(future::ready(Message::StartScan).boxed())),
Command::single(command::Action::Future(
future::ready(Message::StartScan).boxed(),
)),
)
}

Expand Down Expand Up @@ -275,7 +277,7 @@ impl Application for App {

dsp = dsp.push(row![
ui::dsp_keep_width(ui::cabinet::Panel::new(self.jstation.dsp().cabinet)),
horizontal_space(Length::Units(10)),
horizontal_space(Length::Fixed(10f32)),
ui::dsp_keep_width(ui::noise_gate::Panel::new(self.jstation.dsp().noise_gate)),
]);

Expand Down Expand Up @@ -303,7 +305,7 @@ impl Application for App {

iced::widget::Button::new(row![
ui::value_label(prog_id.nb().to_string()),
horizontal_space(Length::Units(5)),
horizontal_space(Length::Fixed(5f32)),
ui::value_label(
self.jstation
.get_program(prog_id)
Expand All @@ -323,17 +325,18 @@ impl Application for App {
ui::button("Settings...")
.on_press(ShowUtilitySettings)
.style(style::Button::Default.into()),
horizontal_space(Length::Units(10)),
horizontal_space(Length::Fixed(10f32)),
ui::button("MIDI...")
.on_press(ShowMidiConnection)
.style(style::Button::Default.into()),
horizontal_space(Length::Units(10)),
horizontal_space(Length::Fixed(10f32)),
ui::button("Tuner...")
.on_press(ShowTuner)
.style(style::Button::Default.into()),
horizontal_space(Length::Units(20)),
ui::text_input("program name", self.jstation.dsp().name.as_str(), Rename)
.width(Length::Units(200)),
horizontal_space(Length::Fixed(20f32)),
ui::text_input("program name", self.jstation.dsp().name.as_str())
.on_input(Rename)
.width(Length::Fixed(200f32)),
horizontal_space(Length::Fill),
]
.width(widget::DEFAULT_DSP_WIDTH);
Expand All @@ -345,7 +348,7 @@ impl Application for App {
.on_press(Undo)
.style(style::Button::Default.into()),
);
left_header = left_header.push(horizontal_space(Length::Units(10)));
left_header = left_header.push(horizontal_space(Length::Fixed(10f32)));
}

left_header = left_header.push(
Expand All @@ -368,7 +371,7 @@ impl Application for App {
horizontal_space(widget::DSP_PROGRAM_SPACING),
right_header
],
vertical_space(Length::Units(10)),
vertical_space(Length::Fixed(10f32)),
row![
scrollable(dsp),
horizontal_space(widget::DSP_PROGRAM_SPACING),
Expand All @@ -395,7 +398,7 @@ impl Application for App {

iced::widget::Button::new(row![
ui::value_label(prog_id.nb().to_string()),
horizontal_space(Length::Units(5)),
horizontal_space(Length::Fixed(5f32)),
ui::value_label(
self.jstation
.get_program(prog_id)
Expand All @@ -417,7 +420,7 @@ impl Application for App {
"MIDI Connection",
column![
ui::midi::Panel::new(self.ports.clone(), Midi),
vertical_space(Length::Units(20)),
vertical_space(Length::Fixed(20f32)),
ui::button("Scan")
.on_press(StartScan)
.style(style::Button::Default.into()),
Expand Down Expand Up @@ -581,5 +584,5 @@ pub enum Error {

#[derive(Debug, Copy, Clone, Hash)]
pub enum Subscription {
JStation(usize),
JStation,
}
6 changes: 3 additions & 3 deletions src/ui/cabinet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ where
fn view(&self, state: &Self::State) -> Element<Event> {
let mut cabinet_types = column![
text("Cabinet"),
vertical_space(Length::Units(10)),
vertical_space(Length::Fixed(10f32)),
row![
ui::amp_cabinet_label(self.cabinet.typ.param_name()),
ui::checkbox("nick", state.show_nick, Event::MustShowNicks),
],
vertical_space(Length::Units(5)),
vertical_space(Length::Fixed(5f32)),
]
.width(Length::Units(350));
.width(Length::Fixed(350f32));

if state.show_nick {
cabinet_types = cabinet_types.push(ui::pick_list(
Expand Down
Loading

0 comments on commit 109b67d

Please sign in to comment.