5 unstable releases

0.3.0 Mar 26, 2024
0.2.1 Jun 8, 2023
0.2.0 Jun 6, 2023
0.1.1 Jun 3, 2023
0.1.0 Jun 1, 2023

#193 in Audio

Download history 1/week @ 2024-02-28 59/week @ 2024-03-20 42/week @ 2024-03-27 43/week @ 2024-04-03 3/week @ 2024-04-10

147 downloads per month

MIT/Apache

1MB
21K SLoC

Contains (Zip file, 5KB) tests/init/init-2.2.0.phaseplant

synthahol-phase-plant

A library to read and write presets for the Phase Plant synthesizer.

crates.io Docs Workflows

NOTE

The preset file format changed in version 2.2 of Phase Plant. The format is now a JSON inside a ZIP container and is no longer a binary blob. This library does not support the new format.

Overview

synthahol-phase-plant is a library to read and write presets for the Phase Plant synthesizer by Kilohearts.

This library was developed independently by Sheldon Young. It is not a product of Kilohearts, please do not contact them for support.

Reading and Writing a Preset

use std::fs::File;
use phase_plant::io::{ReadPreset, WritePreset};
use phase_plant::kilohearts::phase_plant::Preset;

fn main() -> std::io::Result<()> {
    // Read
    let preset = Preset::read_file("Example.phaseplant")?;
    let author = preset.metadata.author.unwrap_or("anonymous".to_owned());
    println!("The preset was created by {author}");

    // Write
    let mut preset = Preset::default();
    preset.metadata.name = Some("Example Preset".to_owned());

    let mut preset_file = File::create("example.phaseplant")?;
    let write_result = preset.write(&mut preset_file)?;
    for message in write_result.messages {
        println!("{message}");
    }

    Ok(())
}

Known Limitations

  • Writing is a work in progress.
  • Presets created by version of Phase Plant before the public release version of 1.7.0 are not supported. Some of the early factory presets were created with a pre-release version of Phase Plant.
  • Modulation routing is a work in progress.
  • Snapin hosts like Multipass, Slice Eq and Snap Heap are not yet fully supported. CarveEQ is not supported because it is stored like a host in the preset.

Other Libraries

Use kibank to combine presets into a bank.

Issues

If you have any problems with or questions about this project, please contact the developers by creating a GitHub issue.

Contributing

You are invited to contribute to new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can.

Before you start to code, we recommend discussing your plans through a GitHub issue, especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give you feedback on your design, and help you find out if someone else is working on the same thing.

The copyrights of contributions to this project are retained by their contributors. No copyright assignment is required to contribute to this project.

License

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Dependencies

~2.2–3MB
~65K SLoC