Skip to content
This repository has been archived by the owner on Oct 28, 2023. It is now read-only.

Commit

Permalink
renamed to rsynth. example broken
Browse files Browse the repository at this point in the history
  • Loading branch information
piedoom committed Nov 2, 2017
1 parent bc254a9 commit 2d85f3d
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ rust:
- nightly
after_success: |
cargo rustdoc \
&& echo '<meta http-equiv=refresh content=0;url=rvst_synth/index.html>' > target/doc/index.html && \
&& echo '<meta http-equiv=refresh content=0;url=rsynth/index.html>' > target/doc/index.html && \
sudo pip install ghp-import && \
ghp-import -n target/doc && \
git push -qf https://${TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "rvst_synth"
name = "rsynth"
version = "0.1.0"
authors = ["Alexander Lozada <alexanderpaullozada@gmail.com>"]

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# rvst_synth
# rsynth

A crate for organizing synthesizers for [vst2](https://github.com/overdrivenpotato/rust-vst2) and [easyvst](https://github.com/Boscop/easyvst). Inspired by JUCE's API.

Provides a very lightweight `Synthesizer` structure, with many voices. Once a `Voice` trait is implemented, it can be used easily from the `Synthesizer` manager.

[Documentation](https://piedoom.github.io/rvst_synth)
[Documentation](https://resamplr.github.io/rsynth)

MIT License.
10 changes: 5 additions & 5 deletions examples/test_synth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
extern crate num_traits;
extern crate num;
extern crate asprim;
extern crate rvst_synth;
extern crate rsynth;
extern crate rand;

use num_traits::Float;
Expand All @@ -14,10 +14,10 @@ use vst2::plugin::{Category, Info, HostCallback};
use vst2::api::Events;

use easyvst::*;
use rvst_synth::synthesizer::*;
use rvst_synth::voice::*;
use rvst_synth::utility::*;
use rvst_synth::utility::note::*;
use rsynth::synthesizer::*;
use rsynth::voice::*;
use rsynth::utility::*;
use rsynth::utility::note::*;

easyvst!(ParamId, ExState, ExPlugin);

Expand Down
8 changes: 3 additions & 5 deletions src/synthesizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ impl<T> Synthesizer<T> where T: Renderable {
#[allow(unused_variables)]
pub fn render_next<'a, F: Float + AsPrim>(&mut self, buffer: &mut AudioBuffer<'a, F>) {

/// split the buffer
// split the buffer
let (mut inputs, mut outputs) = buffer.split();
for voice in &mut self.voices {
voice.render_next::<F>(&mut inputs, &mut outputs);
Expand Down Expand Up @@ -178,8 +178,8 @@ impl<T> Synthesizer<T> where T: Renderable {
for e in events.events() {
// check if the event is a midi signal
match e {
Event::Midi { data, .. } => {
self.process_midi(NoteData::data(data))
Event::Midi(ev) => {
self.process_midi(NoteData::data(ev.data))
},
_ => return
}
Expand All @@ -188,8 +188,6 @@ impl<T> Synthesizer<T> where T: Renderable {

/// Take in note data and turn a note on/off depending on the state
fn process_midi(&mut self, note_data: NoteData){


match note_data.state {
NoteState::On => self.trigger_note_on(note_data),
NoteState::Off => self.trigger_note_off(note_data),
Expand Down

0 comments on commit 2d85f3d

Please sign in to comment.