Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microtuning support #278

Closed
suhr opened this issue Nov 14, 2017 · 9 comments
Closed

Microtuning support #278

suhr opened this issue Nov 14, 2017 · 9 comments

Comments

@suhr
Copy link

suhr commented Nov 14, 2017

Like in One-SF2.

See AnaMark tuning file format.

@derselbst
Copy link
Member

derselbst commented Nov 14, 2017 via email

@suhr
Copy link
Author

suhr commented Nov 14, 2017

So frontends use fluidsynth as a library, not as a server? I see.

Fluidsynth supports the Midi Tuning Standard

Does that mean I can send MTS messages over MIDI to tune the synth?

@derselbst
Copy link
Member

derselbst commented Nov 14, 2017 via email

@suhr
Copy link
Author

suhr commented Nov 14, 2017

Amazing. I believe this should be documented somewhere.

@derselbst
Copy link
Member

It's on the todo list:

- Write documention on tuning

The API doc would be a suitable place. However I have neither experience with MTS nor a use-case for it.

@suhr
Copy link
Author

suhr commented Nov 14, 2017

I definitely have a use case for MTS, but I don't have a tool to send MTS messages. I'll write one and try to tune fluidsynth into 31edo.

@derselbst
Copy link
Member

Ok, good luck. Closing this for now.

@suhr
Copy link
Author

suhr commented Nov 14, 2017

It doesn't seem do to anything. Following http://www.hermode.com/downloads/Apple_Logic_Tuning_Data.pdf and http://www.microtonal-synthesis.com/MIDItuning.html, I send SINGLE NOTE TUNING CHANGE and then TUNING PROGRAM CHANGE

fn run()  {
    let midi_out = MidiOutput::new("MTS Output").unwrap();

    let mut conn_out = midi_out.connect(0, "mts-out").unwrap();

    let mut bytes = vec![0xf0, 0x7f, 0x7f, 0x08, 0x02, 0, 127];
    for (i, v) in (0..128u8).map(|i| 36.77 + (12.0 / 31.0) * i as f32).enumerate() {
        let int = v.round();
        let msb = (int * 128.0).round();
        let lsb = (msb * 128.0).round();

        bytes.push(i as u8);
        bytes.push(int as u8);
        bytes.push(msb as u8);
        bytes.push(lsb as u8);
    };

    bytes.push(0xf7);

    drop(conn_out.send(&bytes));

    drop(conn_out.send(&[0xb0, 0x64, 0, 0x65, 0x03, 0x06, 0]));

    conn_out.close();
}

QSynth (a fluidsynth frontend) receives the message, but the tuning doesn't change.

Fluidsynth version: 1.1.6
QSynth version: 0.4.3

@derselbst
Copy link
Member

Please discuss that "HowTo" on the mailing list, I cant give useful support. An make sure you use 1.1.8, 1.1.6 is outdated and unsupported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants